diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index faf5eef..0000000 --- a/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# http://editorconfig.org -root = true - -[*] -end_of_line = lf -indent_style = space -indent_size = 4 -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 547db66..0000000 --- a/.flake8 +++ /dev/null @@ -1,34 +0,0 @@ -[flake8] -min_python_version = 3.7.0 -max-line-length = 100 -ban-relative-imports = true -format-greedy = 1 -inline-quotes = double -enable-extensions = TC, TC1 -suppress-none-returning = true -type-checking-exempt-modules = typing, typing-extensions -eradicate-whitelist-extend = ^-.*; -extend-ignore = - # E203: Whitespace before ':' (pycqa/pycodestyle#373) - E203, - # SIM106: Handle error-cases first - SIM106, - # ANN101: Missing type annotation for self in method - ANN101, - # ANN102: Missing type annotation for cls in classmethod - ANN102, - E722 -per-file-ignores = - # F401: Module imported by unused (non-implicit modules) - # TC002: Move third-party import '...' into a type-checking block - __init__.py:F401,TC002, - # ANN201: Missing return type annotation for public function - tests/test_*:ANN201 - tests/**/test_*:ANN201 -extend-exclude = - # Frozen and not subject to change in this repo: - get-poetry.py, - install-poetry.py, - # External to the project's coding standards: - tests/fixtures/*, - tests/**/fixtures/*, diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index e6b7408..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: Publish to PyPI - -env: - pythonVersion: "3.11" - -on: - release: - types: [published] - -jobs: - build: - name: "Build and Test" - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Use Python ${{ env.pythonVersion }} - uses: actions/setup-python@v3 - with: - python-version: ${{ env.pythonVersion }} - architecture: x64 - - - name: Install Poetry - run: pip install --user poetry - - - name: Install dependencies - run: poetry install - - - name: Run Tests - run: poetry run pytest tests/ - - - name: Run Linter - run: poetry run flake8 src/ - - publish: - name: "Deploy package to PyPI" - runs-on: ubuntu-latest - needs: [build] - - steps: - - uses: actions/checkout@v3 - - - name: Use Python ${{ env.pythonVersion }} - uses: actions/setup-python@v3 - with: - python-version: ${{ env.pythonVersion }} - architecture: x64 - - - name: Install Poetry - run: pip install --user poetry - - - name: Install dependencies - run: poetry install - - - name: Publish to PyPI - env: - PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} - PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: poetry publish --build --username $PYPI_USERNAME --password $PYPI_PASSWORD - - docs: - name: "Deploy Docs" - runs-on: ubuntu-latest - needs: [build, publish] - steps: - - uses: actions/checkout@v3 - with: - persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token - fetch-depth: 0 # otherwise, you will failed to push refs to dest repo - - - name: Use Python ${{ env.pythonVersion }} - uses: actions/setup-python@v3 - with: - python-version: ${{ env.pythonVersion }} - architecture: x64 - - - name: Install Poetry - run: pip install --user poetry - - - name: Install dependencies - run: poetry install - - - name: Create local changes - run: | - cd docs - make html - cd .. - rm -rf tests src .github *.md *.MD *.rst *.lock *.toml LICENSE .flake8 dist .vscode - rm -rf .editorconfig - mv docs/build/html/* . - rm -rf docs/ - touch .nojekyll - echo "py.sdk.tago.io" > CNAME - - - name: Commit files - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add -A - git commit -m "generated documentation" - - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages - force: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index af16ad2..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Units Tests - -env: - pythonVersion: "3.11" - -on: push - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Use Python ${{ env.pythonVersion }} - uses: actions/setup-python@v3 - with: - python-version: ${{ env.pythonVersion }} - architecture: x64 - - - name: Install Poetry - run: pip install --user poetry - - - name: Install dependencies - run: poetry install - - - name: Run Tests - run: poetry run pytest tests/ - - - name: Run Linter - run: poetry run flake8 src/ diff --git a/tests/__init__.py b/.nojekyll similarity index 100% rename from tests/__init__.py rename to .nojekyll diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index eb5a2c9..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "python.linting.enabled": true, - "python.linting.flake8Enabled": true, - "python.formatting.provider": "black", - "editor.formatOnSave": true, - "cSpell.words": [ - "dateutil", - "ignoretz", - "PYPI", - "pytest", - "serie_number" - ] -} diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..3ae29dc --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +py.sdk.tago.io diff --git a/Device/Device_Type.html b/Device/Device_Type.html new file mode 100644 index 0000000..7d7da80 --- /dev/null +++ b/Device/Device_Type.html @@ -0,0 +1,196 @@ + + + + + + + + + Device Type — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Device Type

+
+

LocationGeoJSON

+
+

Attributes:

+
+

type: “Point”

+

coordinates: list[str]

+
+
+
+
+

Data

+
+

Attributes:

+
+
+
id: str
+
Data ID.
+
+
+
device: str
+
ID of the device holding the data.
+
+
+
variable: str
+
Name of the variable for the data.
+
+
+
value: str or float or int or bool
+
Data value.
+
+
+
group: str
+
Series for the data. Used for grouping different data values.
+
+
+
unit: str
+
Unit for the data value.
+
+
+
location: LocationGeoJSON
+
Location for the data value.
+
+
+
metadata: any
+
Metadata for the data value.
+
+
+
time: date
+
Timestamp for the data value.
+
+
+
created_at: date
+
Timestamp for the data value. Determined by the API.
+
+
+
+
+
+

DataQueryDefault

+
+

Attributes:

+
+

query: Enum[_DataQueryFirstLast]

+

qty: int

+

details: bool

+

ordination: “descending” or “ascending”

+

skip: int

+
+
+
+
+

DataQueryFirstLast

+
+

Attributes:

+
+

query: “last_item”, “last_value”, “last_location”, “last_insert”, “first_item”, “first_value”, “first_location”, “first_insert”

+
+
+
+
+

DataQuery

+

DataQuery = DataQueryDefault or DataQueryFirstLast

+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Device/index.html b/Device/index.html new file mode 100644 index 0000000..6f7ce6c --- /dev/null +++ b/Device/index.html @@ -0,0 +1,317 @@ + + + + + + + + + Device — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Device

+

In order to modify, add, delete or do anything else with the data inside buckets, it is necessary to use the device function.

+
+

Instance

+
+

Parameters:

+
+
+
token: str
+
Device Token
+
+
+
Optional region: Regions: “usa-1” or “env”
+
Region is a optional parameter
+
+
+
+
+
Example:
+
    from tagoio_sdk import Device
+
+    myDevice = Device({"token": "my_device_token", "region": "usa-1"})
+
+
+
+
+
+

info

+

Get information about the current device.

+
+
Example:
+
    from tagoio_sdk import Device
+
+    myDevice = Device({ "token": "my_device_token" })
+    result = myDevice.info()
+
+
+
+
+
+

sendData

+

Send data to device.

+
+

Parameters:

+
+
+
data: Data or list[Data]
+
An array or one object with data to be send to TagoIO using device token
+
+
+
+
+
Example:
+
    from tagoio_sdk import Device
+
+    myDevice = Device({ "token": "my_device_token" })
+    result = myDevice.sendData({
+        "variable": "temperature",
+        "unit": "F",
+        "value": 55,
+        "time": "2015-11-03 13:44:33",
+        "location": { "lat": 42.2974279, "lng": -85.628292 },
+    })
+
+
+
+
+
+

getData

+

Get data from TagoIO Device.

+
+

Parameters:

+
+
+
queryParams: DataQuery
+
Object with query params
+
+
+
+
+
Example:
+
    from tagoio_sdk import Device
+
+    myDevice = Device({ "token": "my_device_token" })
+    result = myDevice.getData({
+        "query": "last_item",
+        "variable": "humidity",
+    })
+
+
+
+
+
+

editData

+

Edit data in a Mutable-type device.

+
+

Parameters:

+
+
+
data: Data or list[Data]
+
Array or object with the data to be edited, each object with the data’s ID.
+
+
+
+
+
Example:
+
    from tagoio_sdk import Device
+
+    myDevice = Device({"token": "my_device_token"})
+    result = myDevice.editData(
+        {
+            "id": "id_of_the_data_item",
+            "value": "123",
+            "time": "2022-04-01 12:34:56",
+            "location": {"lat": 42.2974279, "lng": -85.628292},
+        }
+    )
+
+
+
+
+
+

deleteData

+

Delete data from device.

+
+

Parameters:

+
+
+
queryParams: DataQuery
+
Object with query params
+
If not pass any query param, it will delete the last item
+
+
+
+
+
Example:
+
    from tagoio_sdk import Device
+
+    myDevice = Device({ "token": "my_device_token" });
+    result = myDevice.deleteData({
+        "query": "last_item",
+        "variable": "humidity",
+        "value": 10
+    });
+
+
+
+
+
+

getParameters

+

Get parameters from device.

+
+

Parameters:

+
+
+
onlyUnRead: bool
+
set true to get only unread parameters
+
+
+
+
+
Example:
+
    from tagoio_sdk import Device
+
+    myDevice = Device({ "token": "my_device_token" })
+    result = myDevice.getParameters()
+
+
+
+
+
+

setParameterAsRead

+

Mark parameter as read.

+
+

Parameters:

+
+
+
parameterID: GenericID: str
+
Parameter identification
+
+
+
+
+
Example:
+
    from tagoio_sdk import Device
+
+    myDevice = Device({ "token": "my_device_token" })
+    result = myDevice.setParameterAsRead(parameterID="parameter_id")
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 06f985b..0000000 --- a/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2022 Tago LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md deleted file mode 100644 index e2e5ce3..0000000 --- a/README.md +++ /dev/null @@ -1,61 +0,0 @@ -
-

- TagoIO -

- -# TagoIO - Python SDK - -Official Python SDK for TagoIO - -## Installation - -```bash -pip install tagoio-sdk -``` - -## Quick Example - -If you have any questions, feel free to check our [Help Center](https://help.tago.io/portal/en/home) - -### Insert Device Data - -```python -from tagoio_sdk import Device - -myDevice = Device({ "token": "my_device_token" }) -result = myDevice.sendData({ - "variable": "temperature", - "unit": "F", - "value": 55, - "time": "2015-11-03 13:44:33", - "location": { "lat": 42.2974279, "lng": -85.628292 }, -}) -``` - -### Edit Device Data - -```python -from tagoio_sdk import Device - -myDevice = Device({"token": "my_device_token"}) -result = myDevice.editData( - { - "id": "id_of_the_data_item", - "value": "123", - "time": "2022-04-01 12:34:56", - "location": {"lat": 42.2974279, "lng": -85.628292}, - } -) -``` - -## Development Commands - -```bash -poetry install -poetry run pytest tests/ -poetry run flake8 src -``` - -## License - -TagoIO SDK for Python is released under the [Apache-2.0 License](https://github.com/tago-io/sdk-python/blob/master/LICENSE) diff --git a/Resources/Account/Account_type.html b/Resources/Account/Account_type.html new file mode 100644 index 0000000..2de921b --- /dev/null +++ b/Resources/Account/Account_type.html @@ -0,0 +1,170 @@ + + + + + + + + + Account Type — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Account Type

+
+

AccountOptions

+
+

Attributes:

+
+
+
user_view_welcome: bool
+
decimal_separator: str
+
thousand_separator: str
+
last_whats_new: Optional[datetime]
+
+
+
+
+
+

AccountOpt

+
+

Attributes:

+
+
+
authenticator: bool
+
sms: bool
+
email: bool
+
+
+
+
+
+

AccountInfo

+
+

Attributes:

+
+
+
active: bool
+
name: str
+
email: str
+
country: Optional[str]
+
timezone: str
+
company: Optional[str]
+
newsletter: Optional[bool]
+
developer: Optional[bool]
+
blocked: bool
+
id: GenericID
+
language: str
+
last_login: Optional[datetime]
+ +
phone: Optional[str]
+
send_invoice: bool
+
stripe_id: Optional[str]
+
type: str
+
plan: str
+
created_at: datetime
+
updated_at: datetime
+
otp: Optional[AccountOpt]
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/Account/index.html b/Resources/Account/index.html new file mode 100644 index 0000000..910eefe --- /dev/null +++ b/Resources/Account/index.html @@ -0,0 +1,156 @@ + + + + + + + + + Account — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Account

+

Manage Account.

+
+

info

+

Gets all account information.

+
+

Return:

+
+
+
AccountInfo: AccountInfo
+
+
+
+
+
Example:
+
    from tagoio_sdk import Resources
+
+    resources = Resources()
+    result = resources.account.info()
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/Billing/Billing_Type.html b/Resources/Billing/Billing_Type.html new file mode 100644 index 0000000..5d222f8 --- /dev/null +++ b/Resources/Billing/Billing_Type.html @@ -0,0 +1,414 @@ + + + + + + + + + Billing Type — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Billing Type

+
+

BillingPlan

+
+

BillingPlan = “free” or “starter” or “scale”

+
+
+
+

BillingAddOn

+
+

**BillingAddOn**= “mobile” or “custom_dns”

+
+
+
+

BillingService

+
+
+
BillingService =

“input” or +“output”or +“analysis”or +“data_records” or +“sms” or +“email” or +“run_users” or +“push_notification” or +“file_storage”

+
+
+
+
+
+

BillingServicePrice

+
+

Attributes:

+
+
+
amount: int or float
+
Amount available in the service tier.
+
+
+
price: int or float
+
Price for the service tier.
+
+
+
+
+
+

BillingAllServicePrices

+
+

BillingAllServicePrices = dict[BillingService, list[BillingServicePrice]]

+
+
+
+

BillingPlanPrices

+
+

Attributes:

+
+
+ +
Plan name.
+
+
+
price: int or float
+
Plan price.
+
+
+
+
+
+

BillingPlanPrices

+
+

BillingPlanPrices = list[BillingPlanPrices]

+
+
+
+

BillingAddOnPrices

+
+

Attributes:

+
+
+ +
Add-on name.
+
+
+
price: int or float
+
Add-on price.
+
+
+
+
+
+

BillingAddOnPrices

+
+

BillingAddOnPrices = list[BillingAddOnPrices]

+
+
+
+

BillingPrices

+
+

Attributes:

+
+
+
plans: BillingPlanPrices
+
Prices for each plan.
+
+
+
addons: BillingAddOnPrices
+
Prices for each add-on.
+
+

BillingAllServicePrices: BillingAllServicePrices

+
+
+
+
+

current_cycle

+
+

Attributes:

+
+
+
start: str
+
Date when the current cycle started.
+
+
+
end: str
+
Date when the current cycle ends.
+
+
+
+
+
+

BillingServiceSubscription

+
+

Attributes:

+
+

limit: int or float

+
+
+
+
+

BillingSubscriptionServices

+
+

BillingSubscriptionServices = dict[BillingService, BillingServiceSubscription]

+
+
+
+

BillingSubscriptionAddOns

+
+

BillingSubscriptionAddOns = dict[BillingAddOn, list[GenericID]]

+
+
+
+

BillingPaymentError

+
+

Attributes:

+
+
+
message: str or None
+
+

Payment error message.

+
+
details: str or None
+
+

More details on the payment error.

+
+
+
+
+

BillingPaymentPastDue

+
+

Attributes:

+
+
+
amount_due: int or float
+
Amount due that was not paid in a recurring payment.
+
+
+
attempt_count: int or float
+
Amount of attempts for the retried recurring payment.
+
+
+
invoice_url: str
+
URL for the invoice related to the failed recurring payment.
+
+
+
+
+
+

BillingSubscription

+
+

Attributes:

+
+
+
account: GenericID
+
Account ID.
+
+
+ +
Account plan.
+
+
+ +
Limits for each service in the account’s subscription.
+
+
+ +
Add-ons in the account’s subscription.
+
+
+
current_cycle: current_cycle
+
Current cycle for the account’s subscription.
+
+
+
processing: bool
+
Whether changes are still being processed and awaiting response from Stripe.
+
+
+
payment_error: Optional[BillingPaymentError]
+
Payment errors in the account’s subscription.
+
+
+
past_due: Optional[BillingPaymentPastDue]
+
Past due information for recurring payment errors.
+
+
+
upcoming_invoice_total: int or float
+
Value of the upcoming invoice.
+
+
+
trial_end: str or None
+
Timestamp when the trial for the subscription ends if the subscription has a trial active.
+
+
+
+
+
+

BillingEditSubscription

+
+

Attributes:

+
+
+
plan: Optional[BillingPlan]
+
New account plan.
+
Only one of plan, services and addons is accepted.
+
+
+
services: Optional[BillingSubscriptionServices]
+
New limits for each service in the account’s subscription.
+
Only one of plan, services and addons is accepted.
+
+
+
addons: Optional[BillingSubscriptionAddOns]
+
Only one of plan, services and addons is accepted.
+
New add-ons in the account’s subscription.
+
+
+
coupon: Optional[str]
+
Coupon code.
+
+
+
+
+
+

BillingResourceAllocationServices

+
+

BillingResourceAllocationServices = dict[BillingService, Union[int, float]]

+
+
+
+

BillingProfileResourceAllocation

+
+

Attributes:

+
+
+
profile: GenericID
+
Profile ID.
+
+
+
updated_at: str
+
Timestamp when the resource allocation for the profile was last updated.
+
+

BillingResourceAllocationServices: BillingResourceAllocationServices

+
+
+
+
+

BillingProfileEditResourceAllocation

+
+

Attributes:

+
+
+
profile: Optional[GenericID]
+
Profile ID.
+
+

BillingResourceAllocationServices: Optional[BillingResourceAllocationServices]

+
+
+
+
+

BillingEditResourceAllocation

+
+

BillingEditResourceAllocation = list[BillingProfileEditResourceAllocation]

+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/Billing/index.html b/Resources/Billing/index.html new file mode 100644 index 0000000..db1ed71 --- /dev/null +++ b/Resources/Billing/index.html @@ -0,0 +1,223 @@ + + + + + + + + + Billing — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Billing

+

Manage Billing for the account.

+
+

getPrices

+

Get pricing for plans, services and add-ons.

+
+
Example:
+
    from tagoio_sdk import Resources
+
+    resources = Resources()
+    result = resources.billing.getPrices()
+
+
+
+
+
+

getSubscription

+

Get the account subscription information.

+
+
Example:
+
    from tagoio_sdk import Resources
+
+    resources = Resources()
+    result = resources.billing.getSubscription()
+
+
+
+
+
+

editSubscription

+

Get data from TagoIO Device.

+
+

Parameters:

+
+
+ +
Object with updates to subscription
+
+
+
+
throws
+

If the subscription has a pending operation.

+
+
throws
+

If updating more than one of plan, services and add-ons at the same time.

+
+
throws
+

If purchasing add-ons or changing service limits on the Free plan.

+
+
throws
+

If using an invalid coupon.

+
+
+
+
+
+

editAllocation

+
+

Edit the resource allocation for the profiles in an account.

+

The resource allocation array doesn’t need to have an object for each of the account’s profiles, as long as the sum of the allocated amounts for the services doesn’t exceed the account’s service limit.

+

The resource allocation object for a profile doesn’t need to have all the services.

+

Parameters:

+
+
+ +
Array with the resource allocation
+
+
+
+
throws
+

If passed an object that is not an allocation array.

+
+
throws
+

If the account only has one profile.

+
+
throws
+

If one of the profile IDs in the allocation array doesn’t exist in the account.

+
+
throws
+

If the allocated amount for one of the services exceeds the available amount.

+
+
returns
+

Success message.

+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/Buckets/index.html b/Resources/Buckets/index.html new file mode 100644 index 0000000..eea2b1f --- /dev/null +++ b/Resources/Buckets/index.html @@ -0,0 +1,180 @@ + + + + + + + + + Buckets — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Buckets

+

Manage buckets in account.

+
+

info

+

Gets information about the bucket

+
+

Parameters:

+
+
+
bucketID: GenericID: str
+
Bucket ID
+
+
+
+
+
Example:
+
    from tagoio_sdk import Resources
+
+    resources = Resources()
+    result = resources.buckets.info("Bucket ID")
+
+
+
+
+
+

amount

+

Get Amount of data on the Bucket

+
+

Parameters:

+
+
+
bucketID: GenericID: str
+
Bucket ID
+
+
+
+
+
Example:
+
    from tagoio_sdk import Resources
+
+    resources = Resources()
+    result = resources.buckets.amount("Bucket ID")
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/Dashboards/Dashboard_Type.html b/Resources/Dashboards/Dashboard_Type.html new file mode 100644 index 0000000..2034608 --- /dev/null +++ b/Resources/Dashboards/Dashboard_Type.html @@ -0,0 +1,394 @@ + + + + + + + + + Dashboards Type — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Dashboards Type

+
+

Arrangement

+
+

Attributes:

+
+

widget_id: str

+

x: int or float

+

y: int or float

+

width: int or float

+

height: int or float

+

tab: Optional[str]

+
+
+
+
+

DashboardCreateInfo

+
+

Attributes:

+
+

label: str

+

arrangement: list[Arrangement]

+

tags: list[TagsObj]

+

visible: bool

+
+
+
+
+

icon

+
+

Attributes:

+
+

url: str

+

color: Optional[str]

+
+
+
+
+

conditions

+
+

Attributes:

+
+

key: str

+

value: str

+
+
+
+
+

filter_conditions

+
+

Attributes:

+
+

blueprint_device: str

+

tag_key: str

+

type: str

+
+
+
+
+

shared

+
+

Attributes:

+
+

id: str

+

email: str

+

name: str

+

free_account: bool

+

allow_tags: bool

+

expire_time: str

+

allow_share: bool

+
+
+
+
+

blueprint_devices

+
+

Attributes:

+
+

conditions: list[conditions]

+

name: str

+

id: str

+

label: str

+

filter_conditions: list[filter_conditions]

+

theme: any

+

setup: any

+
+
+
+
+

DashboardInfo

+
+

Attributes:

+
+

id: GenericID

+

created_at: datetime

+

updated_at: datetime

+

last_access: datetime

+

group_by: list

+

tabs: list

+

icon: icon

+

background: any

+

type: str

+

blueprint_device_behavior: “more_than_one” or “always”

+

blueprint_selector_behavior: “open” or “closed” or “always_open” or “always_closed”

+

blueprint_devices: blueprint_devices

+

theme: any

+

setup: any

+

shared: shared

+
+
+
+
+

WidgetData

+
+

Attributes:

+
+

origin: GenericID

+

qty: Optional[Union[int, float]]

+

timezone: Optional[str]

+

variables: Optional[str]

+

bucket: Optional[GenericID]

+

query: Optional[“min” or “max” or “count” or “avg” or “sum”]

+

start_date: Optional[Union[datetime, str]]

+

end_date: Optional[Union[datetime, str]]

+

overwrite: Optional[bool]

+
+
+
+
+

WidgetResource

+
+

Attributes:

+
+

filter: list[TagsObj]

+
+
+
+
+

DeviceResourceView

+
+

DeviceResourceView = f”tags.{str}” or f”param.{str}” or “name” or “id” or “bucket_name” or “network_name” or “connector_name” or “connector” or “network” or “bucket” or “last_input” or “created_at” or “active”

+
+
+
+

WidgetDeviceResource

+
+

Attributes:

+
+

type: “device”

+

view: DeviceResourceView

+

editable: “name” or f”tags.{str}” or f”param.{str}”

+
+
+
+
+

EditDeviceResource

+
+

Attributes:

+
+

device: GenericID

+

name: Optional[str]

+

active: Optional[bool]

+

edit: dict[str, Union[str, bool]]

+
+
+
+
+

EditResourceOptions

+
+

Attributes:

+
+

identifier: Optional[str]

+
+
+
+
+

WidgetInfo

+
+

Attributes:

+
+

analysis_run: Optional[GenericID]

+

dashboard: Optional[GenericID]

+

display: any

+

data: Optional[list[WidgetData]]

+

resource: Optional[list[WidgetDeviceResource]]

+

id: Optional[GenericID]

+

label: str

+

realtime: Optional[bool]

+

type: str

+
+
+
+
+

DevicesRelated

+
+

Attributes:

+
+

bucket: GenericID

+
+
+
+
+

AnalysisRelated

+
+

Attributes:

+
+

id: GenericID

+

name: str

+
+
+
+
+

PostDataModel

+
+

Attributes:

+
+

origin: GenericID

+

variable: str

+
+
+
+
+

blueprint_devices

+
+

Attributes:

+
+

origin: GenericID

+

id: GenericID

+

bucket: Optional[GenericID]

+
+
+
+
+

widgetOverwrite

+
+

Attributes:

+
+

start_date: Optional[any]

+

end_date: Optional[any]

+

timezone: Optional[any]

+
+
+
+
+

GetDataModel

+
+

Attributes:

+
+

overwrite: Optional[widgetOverwrite]

+

blueprint_devices: Optional[list[blueprint_devices]]

+

page: Optional[Union[int, float]]

+

amount: Optional[Union[int, float]]

+
+
+
+
+

PublicKeyResponse

+
+

Attributes:

+
+

token: GenericToken

+

expire_time: ExpireTimeOption

+
+
+
+
+

EditDataModel

+
+

EditDataModel = PostDataModel and {id: GenericID}

+
+
+
+

PublicKeyResponse

+
+

PublicKeyResponse = PublicKeyResponse

+
+
+
+

widgetOverwriteOptions

+
+

widgetOverwriteOptions = “start_date” or “end_date” or “timezone”

+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/Dashboards/index.html b/Resources/Dashboards/index.html new file mode 100644 index 0000000..80a36f0 --- /dev/null +++ b/Resources/Dashboards/index.html @@ -0,0 +1,284 @@ + + + + + + + + + Dashboards — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Dashboards

+

Manage dashboards in account.

+
+

create

+

Gets information about the dashboard

+
+

Parameters:

+
+
+
dashboardObj: DashboardCreateInfo
+
Dashboard object
+
+
+
+
+
+

edit

+

Modify any property of the dashboards

+
+

Parameters:

+
+
+
dashboardID: GenericID: str
+
Dashboard identification
+
+
+
dashboardObj: DashboardCreateInfo
+
Dashboard Object with data to be replaced
+
+
+
+
+
+

delete

+

Deletes an dashboard from the account

+
+

Parameters:

+
+
+
dashboardID: GenericID: str
+
Dashboard identification
+
+
+
+
+
+

info

+

Gets information about the dashboard

+
+

Parameters:

+
+
+
dashboardID: GenericID: str
+
Dashboard identification
+
+
+
+
+
+

duplicate

+

Duplicate the dashboard to your own account

+
+

Parameters:

+
+
+
dashboardID: GenericID: str
+
Dashboard identification
+
+
+
dashboardObj: { “setup”: Optional[any], “new_label”: Optional[str] }
+
Dashboard Object with data of the duplicate dashboard
+
+
+
+
+
+

getPublicKey

+

Generate a new public token for the dashboard

+
+

Parameters:

+
+
+
dashboardID: GenericID: str
+
Dashboard identification
+
+
+
expireTime: ExpireTimeOption = “never”
+
Time when token will expire
+
+
+
+
+
+

listDevicesRelated

+

Get list of devices related with dashboard

+
+

Parameters:

+
+
+
dashboardID: GenericID: str
+
Dashboard identification
+
+
+
+
+
+

listAnalysisRelated

+

Get list of analysis related with a dashboard

+
+

Parameters:

+
+
+
dashboardID: GenericID: str
+
Dashboard identification
+
+
+
+
+
+

runWidgetHeaderButtonAnalysis

+

Runs an analysis located in a widget’s header button

+
+

Parameters:

+
+
+
analysisID: GenericID: str
+
The id of the analysis to run
+
+
+
dashboardID: GenericID: str
+
Dashboard identification
+
+
+
widgetID: GenericID: str
+
The id of the widget that contains the header button
+
+
+
scope: Optional[any]
+
Data to send to the analysis
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/Devices/Devices_Type.html b/Resources/Devices/Devices_Type.html new file mode 100644 index 0000000..3b32f73 --- /dev/null +++ b/Resources/Devices/Devices_Type.html @@ -0,0 +1,652 @@ + + + + + + + + + Devices Type — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Devices Type

+
+

bucket

+
+

Attributes:

+
+

id: GenericID

+

name: str

+
+
+
+
+

DeviceInfo

+
+

Attributes:

+
+
+
id: GenericID
+
Device ID.
+
+
+
type: DataStorageType
+
Device’s data storage (bucket) type.
+
+
+
profile: GenericID
+
ID of the profile that owns the device.
+
+
+
bucket: bucket
+
Bucket storing the device’s data.
+
+
+
last_output: datetime or None
+
Date for the device’s last output.
+
+
+
last_input: datetime or None
+
Date for the device’s last input.
+
+
+
updated_at: datetime
+
Date for the device’s last update.
+
+
+
created_at: datetime
+
Date for the device’s creation.
+
+
+
inspected_at: datetime or None
+
Date for the device’s last inspection.
+
+
+
last_retention: datetime or None
+
Date for the device’s last data retention.
+
+
+
+
+
+

DeviceInfoList

+
+

Attributes:

+
+
+
id: GenericID
+
Device ID.
+
+
+
type: DataStorageType
+
Device’s data storage (bucket) type.
+
+
+
profile: GenericID
+
ID of the profile that owns the device.
+
+
+
last_output: datetime or None
+
Date for the device’s last output.
+
+
+
last_input: datetime or None
+
Date for the device’s last input.
+
+
+
updated_at: datetime
+
Date for the device’s last update.
+
+
+
created_at: datetime
+
Date for the device’s creation.
+
+
+
inspected_at: datetime or None
+
Date for the device’s last inspection.
+
+
+
last_retention: datetime or None
+
Date for the device’s last data retention.
+
+
+
bucket: GenericID
+
+
+
+
+
+

DeviceQuery

+
+

Attributes:

+
+
+
page: int or float
+
Page of list starting from 1
+
+
+
amount: int or float
+
Amount of items will return.
+
+
+
fields: list[ + “id” or + “type” or + “profile” or + “last_output” or + “last_input” or + “updated_at” or + “created_at” or + “inspected_at” or + “last_retention” +]
+
Array of field names.
+
+
+
filter: DeviceInfo
+
Filter object.
+
+
+
orderBy: list[ + “name” or + “visible” or + “active” or + “last_input” or + “last_output” or + “created_at” or + “updated_at” or + “asc” or + “desc” +]
+
Tuple with a field and an order
+
+
+
resolveBucketName: Optional[bool]
+
+
+
+
+
+

DeviceListItem

+
+

DeviceListItem = DeviceInfoList

+
+
+
+

ConfigurationParams

+
+

Attributes:

+
+

sent: bool

+

key: str

+

value: str

+

id: Optional[str]

+
+
+
+
+

DeviceCreateResponse

+
+

Attributes:

+
+

device_id: GenericID

+

bucket_id: GenericID

+

token: GenericToken

+
+
+
+
+

DeviceCreateInfoBasic

+
+

Attributes:

+
+
+
name: str
+
Device name.
+
+
+
connector: GenericID
+
Connector ID.
+
+
+
network: GenericID
+
Network ID.
+
+
+
type: Optional[DataStorageType]
+
[Optional] Device’s data storage (bucket) type.
+
:default: “legacy”
+
+
+
description: Optional[str or None]
+
[Optional] Description of the device.
+
+
+
active: Optional[bool]
+
[Optional] Set if the device will be active.
+
+
+
visible: Optional[bool]
+
[Optional] Set if the device will be visible.
+
+
+
configuration_params: Optional[list[ConfigurationParams]]
+
[Optional] An array of configuration params
+
+
+
tags: Optional[list[TagsObj]]
+
[Optional] An array of tags
+
+
+
serie_number: Optional[str]
+
[Optional] Device serial number.
+
+
+
connector_parse: Optional[bool]
+
[Optional] If device will use connector parser
+
+
+
parse_function: Optional[str]
+
[Optional] Javascript code for use as payload parser
+
+
+
+
+
+

DeviceCreateInfoBasicMutable

+
+

Attributes:

+
+
+
name: str
+
Device name.
+
+
+
connector: GenericID
+
Connector ID.
+
+
+
network: GenericID
+
Network ID.
+
+
+
type: “mutable”
+
Device’s data storage (bucket) type.
+
:default: “legacy”
+
+
+
description: str or None
+
Description of the device.
+
+
+
active: bool
+
Set if the device will be active.
+
+
+
visible: bool
+
Set if the device will be visible.
+
+
+
configuration_params: list[ConfigurationParams]
+
An array of configuration params
+
+
+
tags: list[TagsObj]
+
An array of tags
+
+
+
serie_number: str
+
Device serial number.
+
+
+
connector_parse: bool
+
If device will use connector parser
+
+
+
parse_function: str
+
Javascript code for use as payload parser
+
+
+
+
+
+

DeviceCreateInfoBasicImutable

+
+

Attributes:

+
+
+
name: str
+
Device name.
+
+
+
connector: GenericID
+
Connector ID.
+
+
+
network: GenericID
+
Network ID.
+
+
+
type: “imutable”
+
Device’s data storage (bucket) type.
+
:default: “legacy”
+
+
+
description: str or None
+
Description of the device.
+
+
+
active: bool
+
Set if the device will be active.
+
+
+
visible: bool
+
Set if the device will be visible.
+
+
+
configuration_params: list[ConfigurationParams]
+
An array of configuration params
+
+
+
tags: list[TagsObj]
+
An array of tags
+
+
+
serie_number: str
+
Device serial number.
+
+
+
connector_parse: bool
+
If device will use connector parser
+
+
+
parse_function: str
+
Javascript code for use as payload parser
+
+
+
chunk_period: “day” or “week” or “month” or “quarter”
+
Chunk division to retain data in the device.
+
Required for Immutable devices.
+
+
+
chunk_retention: int or float
+
Amount of chunks to retain data according to the chunk_period.
+
Integer between in the range of 0 to 36 (inclusive).
+
Required for Immutable devices.
+
+
+
+
+
+

DeviceCreateInfoMutable

+
+

DeviceCreateInfoMutable = DeviceCreateInfoBasicMutable

+
+
+
+

DeviceCreateInfoImmutable

+
+

DeviceCreateInfoImmutable = DeviceCreateInfoBasicImutable

+
+
+
+

DeviceCreateInfo

+
+

DeviceCreateInfo = DeviceCreateInfoMutable or DeviceCreateInfoImmutable

+
+
+
+

DeviceEditInfo

+
+

Attributes:

+
+
+
name: str
+
Device name.
+
+
+
connector: GenericID
+
Connector ID.
+
+
+
network: GenericID
+
Network ID.
+
+
+
description: str or None
+
Description of the device.
+
+
+
active: bool
+
Set if the device will be active.
+
+
+
visible: bool
+
Set if the device will be visible.
+
+
+
configuration_params: list[ConfigurationParams]
+
An array of configuration params
+
+
+
tags: list[TagsObj]
+
An array of tags
+
+
+
serie_number: str
+
Device serial number.
+
+
+
connector_parse: bool
+
If device will use connector parser
+
+
+
parse_function: str
+
Javascript code for use as payload parser
+
+
+
chunk_retention: int or float
+
Amount of chunks to retain data according to the chunk_period.
+
Integer between in the range of 0 to 36 (inclusive).
+
Required for Immutable devices.
+
+
+
+
+
+

TokenData

+
+

Attributes:

+
+
+
name: str
+
A name for the token.
+
+
+
expire_time: ExpireTimeOption
+
The time for when the token should expire.
+
It will be randomly generated if not included.
+
Accepts “never” as value.
+
+
+
permission: PermissionOption
+
Token permission should be ‘write’, ‘read’ or ‘full’.
+
+
+
serie_number: Optional[str]
+
[optional] The serial number of the device.
+
+
+
verification_code: Optional[str]
+
[optional] Verification code to validate middleware requests.
+
+
+
middleware: Optional[str]
+
[optional] Middleware or type of the device that will be added.
+
+
+
+
+
+

DeviceTokenDataList

+
+

Attributes:

+
+

token: GenericToken

+

device_id: GenericID

+

network_id: GenericID

+

name: str

+

permission: PermissionOption

+

serie_number: str or None

+

last_authorization: str or None

+

expire_time: ExpireTimeOption

+

created_at: str

+
+
+
+
+

ListDeviceTokenQuery

+
+

Attributes:

+
+
+
page: int or float
+
Page of list starting from 1
+
+
+
amount: int or float
+
Amount of items will return.
+
+
+
fields: list[ + “token” or + “device_id” or + “network_id” or + “name” or + “permission” or + “serie_number” or + “last_authorization” or + “expire_time” +]
+
Array of field names.
+
+
+ +
Filter object.
+
+
+
orderBy: Optional[ +list[ + “name” or + “permission” or + “serie_number” or + “last_authorization” or + “created_at” or + “asc” or + “desc” +]]
+
[Optional] Tuple with a field and an order
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/Devices/index.html b/Resources/Devices/index.html new file mode 100644 index 0000000..742473e --- /dev/null +++ b/Resources/Devices/index.html @@ -0,0 +1,382 @@ + + + + + + + + + Devices — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Devices

+

Manage devices in account.

+
+

create

+

Generates and retrieves a new action from the Device

+
+

Parameters:

+
+
+
deviceObj: DeviceCreateInfo
+
Object data to create new device
+
+
+
+
+
+

delete

+

Deletes an device from the account

+
+

Parameters:

+
+
+
deviceID: GenericID: str
+
Device ID
+
+
+
+
+
+

edit

+

Modify any property of the device

+
+

Parameters:

+
+
+
deviceID: GenericID: str
+
Device ID
+
+
+
deviceObj: DeviceEditInfo
+
Device object with fields to replace
+
+
+
+
+
+

emptyDeviceData

+

Empty all data in a device.

+
+

Parameters:

+
+
+
deviceID: GenericID: str
+
Device ID
+
+
+
+
+
+

getDeviceData

+

Get data from all variables in the device.

+
+

Parameters:

+
+
+
deviceID: GenericID: str
+
Device ID
+
+
+
Optional queryParams: DataQuery
+
Query parameters to filter the results.
+
+
+
+
+
Example:
+
    from tagoio_sdk import Resources
+
+    resources = Resources()
+    resources.devices.getDeviceData("myDeviceId");
+
+
+
+
+
+

info

+

Get Info of the Device

+
+

Parameters:

+
+
+
deviceID: GenericID: str
+
Device ID
+
+
+
+
+
+

listDevice

+

Retrieves a list with all devices from the account

+
+

Parameters:

+
+
+
Optional queryObj: DeviceQuery
+
Search query params
+
+
+
+
+
Default queryObj:
+
    queryObj: {
+        "page": 1,
+        "fields": ["id", "name"],
+        "filter": {},
+        "amount": 20,
+        "orderBy": "name,asc",
+        "resolveBucketName": false
+    }
+
+
+
+
+
+

paramSet

+

Create or edit param for the Device

+
+

Parameters:

+
+
+
deviceID: GenericID: str
+
Device ID
+
+
+ +
Configuration Data
+
+
+
paramID: Optional[GenericID: str]
+
Parameter ID
+
+
+
+
+
+

paramList

+

List Params for the Device

+
+

Parameters:

+
+
+
deviceID: GenericID: str
+
Device ID
+
+
+
Optional sentStatus: bool
+
True return only sent=true, False return only sent=false
+
+
+
+
+
+

paramRemove

+

Remove param for the Device

+
+

Parameters:

+
+
+
deviceID: GenericID: str
+
Device ID
+
+
+
paramID: GenericID: str
+
Parameter ID
+
+
+
+
+
+

tokenCreate

+

Generates and retrieves a new token

+
+

Parameters:

+
+
+
deviceID: GenericID: str
+
Device ID
+
+
+
tokenParams: TokenData
+
Params for new token
+
+
+
+
+
+

tokenDelete

+

Delete a token

+
+

Parameters:

+
+
+
token: GenericToken: str
+
Device ID
+
+
+
+
+
+

tokenList

+

Retrieves a list of all tokens

+
+

Parameters:

+
+
+
token: GenericToken: str
+
Device ID
+
+
+
Optional queryObj: ListDeviceTokenQuery
+
Search query params
+
+
+
+
+
Default queryObj:
+
    queryObj: {
+        "page": 1,
+        "fields": ["name", "token", "permission"],
+        "filter": {},
+        "amount": 20,
+        "orderBy": "created_at,desc",
+    }
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/IntegrationNetwork/IntegrationNetwork_Type.html b/Resources/IntegrationNetwork/IntegrationNetwork_Type.html new file mode 100644 index 0000000..2e912ef --- /dev/null +++ b/Resources/IntegrationNetwork/IntegrationNetwork_Type.html @@ -0,0 +1,220 @@ + + + + + + + + + Integration Network Type — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Integration Network Type

+
+

serial_number

+
+

Attributes:

+
+
+
mask: Optional[str]
+
label: Optional[str]
+
image: Optional[str]
+
case: Optional[str]
+
help: Optional[str]
+
required: bool
+
+
+
+
+
+

IDeviceParameters

+
+

Attributes:

+
+
+
name: Optional[str]
+
label: Optional[str]
+
type: Optional[“text” or “dropdown” or “switch” or “number”]
+
default: Optional[any]
+
group: Optional[“default” or “main” or “advanced” or “hide”]
+
options: Optional[list[any]]
+
+
+
+
+
+

NetworkCreateInfo

+
+

Attributes:

+
+
+
name: Optional[str]
+
description: Optional[str]
+
logo_irl: Optional[str]
+
icon_url: Optional[str]
+
banner_url: Optional[str]
+
device_parameters: Optional[list[IDeviceParameters]]
+
middleware_endpoint: Optional[str]
+
payload_encoder: Optional[str]
+
payload_decoder: Optional[str]
+
public: Optional[bool]
+
documentation_url: Optional[str]
+
serial_number: Optional[serial_number]
+
require_devices_access: Optional[bool]
+
+
+
+
+
+

NetworkInfo

+
+

Attributes:

+
+
+
id: GenericID
+
name: Optional[str]
+
description: Optional[str]
+
logo_url: Optional[str]
+
icon_url: Optional[str]
+
banner_url: Optional[str]
+
device_parameters: Optional[list[IDeviceParameters]]
+
middleware_endpoint: Optional[str]
+
payload_encoder: Optional[str]
+
payload_decoder: Optional[str]
+
public: Optional[bool]
+
documentation_url: Optional[str]
+
serial_number: Optional[serial_number]
+
+
+
+
+
+

DeviceNetworkToken

+
+

Attributes:

+
+
+
token: uuid
+
network: GenericID
+
name: str
+
created_at: datetime
+
+
+
+
+
+

TokenData

+
+

Attributes:

+
+
+
name: str
+
expire_time: Optional[ExpireTimeOption]
+
permission: PermissionOption
+
serie_number: Optional[str]
+
verification_code: Optional[str]
+
middleware: Optional[str]
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/IntegrationNetwork/index.html b/Resources/IntegrationNetwork/index.html new file mode 100644 index 0000000..f5f03b8 --- /dev/null +++ b/Resources/IntegrationNetwork/index.html @@ -0,0 +1,162 @@ + + + + + + + + + Integration Network — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Integration Network

+

Manage integration network in the account

+
+

listNetwork

+

Get list of networks

+
+

Parameters:

+
+
+
queryObj: Query
+
Network Query
+
+
+
+
+
+

info

+

Gets information about the network

+
+

Parameters:

+
+
+
networkID: GenericID: str
+
Network identification
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/Profile/index.html b/Resources/Profile/index.html new file mode 100644 index 0000000..a3f3175 --- /dev/null +++ b/Resources/Profile/index.html @@ -0,0 +1,219 @@ + + + + + + + + + Profile — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Profile

+

Manage profiles in account.

+
+

info

+

Gets information about the bucket

+
+

Parameters:

+
+
+
profileID: GenericID: str
+
Profile identification
+
+
+
+
+
Example:
+
    from tagoio_sdk import Resources
+
+    resources = Resources()
+    result = resources.profile.info("Profile ID")
+
+
+
+
+
+

list

+

Lists all the profiles in your account

+
+
Example:
+
    from tagoio_sdk import Resources
+
+    resources = Resources()
+    result = resources.profile.list()
+
+
+
+
+
+

summary

+

Gets profile summary

+
+

Parameters:

+
+
+
profileID: GenericID: str
+
Profile identification
+
+
+
+
+
Example:
+
    from tagoio_sdk import Resources
+
+    resources = Resources()
+    result = resources.profile.summary("Profile ID")
+
+
+
+
+
+

tokenList

+

Gets profile tokenList

+
+

Parameters:

+
+
+
profileID: GenericID: str
+
Profile identification
+
queryObj: Optional[Query]
+
Token Query
+
+
+
+
+
Example:
+
    from tagoio_sdk import Resources
+
+    resources = Resources()
+    result = resources.profile.tokenList("Profile ID")
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/Run/Run_Types.html b/Resources/Run/Run_Types.html new file mode 100644 index 0000000..552c0da --- /dev/null +++ b/Resources/Run/Run_Types.html @@ -0,0 +1,730 @@ + + + + + + + + + Run Type — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Run Type

+
+

ThemeOption

+
+
ThemeOption =
+
“actionSchedule” or
+
“actionTriggerByData” or
+
“actionTriggerByResource” or
+
“actionTriggerByMQTT” or
+
“alertDangerBackground” or
+
“alertInfoBackground” or
+
“alertWarningBackground” or
+
“analysisExternal” or
+
“analysisInternal” or
+
“buttonDanger” or
+
“buttonDangerText” or
+
“buttonDefault” or
+
“buttonDefaultText” or
+
“buttonDisabled” or
+
“buttonDisabledText” or
+
“buttonIconLabel” or
+
“buttonPrimary” or
+
“buttonPrimaryText” or
+
“buttonSuccess” or
+
“buttonSuccessText” or
+
“buttonWarning” or
+
“buttonWarningText” or
+
“deviceInputOutput1Day” or
+
“deviceInputOutput3Days” or
+
“deviceInputOutput3Hours” or
+
“deviceInputOutput6Hours” or
+
“deviceInputOutputRest” or
+
“dottedBorder” or
+
“dropdownAccent” or
+
“dropdownBackground” or
+
“floatingSidebarTitle” or
+
“footerBackground” or
+
“formControlBorder” or
+
“gaugeEmpty” or
+
“gaugeFill” or
+
“gaugePrimaryText” or
+
“gaugeSecondaryText” or
+
“iconRadioSelected” or
+
“iconRadioSubTitle” or
+
“informationIcon” or
+
“inputBackground” or
+
“inputBackgroundReadOnly” or
+
“inputError” or
+
“inputForeground” or
+
“inputForegroundReadOnly” or
+
“lightBorder” or
+
“limitAlert” or
+
“link” or
+
“listNavColor” or
+
“listTitleLabel” or
+
“loading” or
+
“loginButton” or
+
“loginButtonText” or
+
“loginForeground” or
+
“loginForm” or
+
“modalContainer” or
+
“modalOverlay” or
+
“navbar” or
+
“navbarBetaDeveloperBorder” or
+
“navbarButton” or
+
“navbarDropdownBorder” or
+
“navbarDropdownOption” or
+
“navbarDropdownOptionBorder” or
+
“navbarText” or
+
“navDescription” or
+
“notificationButtonAmount” or
+
“notificationButtonAmountText” or
+
“notificationFilterBackground” or
+
“notificationFooter” or
+
“notificationItemBorder” or
+
“notificationItemDate” or
+
“notificationItemTextAccepted” or
+
“notificationItemUnread” or
+
“primary” or
+
“publicPageNavigationBar” or
+
“sidebarAccessSelected” or
+
“sidebarAccountSelected” or
+
“sidebarActionSelected” or
+
“sidebarAnalysisSelected” or
+
“sidebarBackground” or
+
“sidebarBillingSelected” or
+
“sidebarBucketSelected” or
+
“sidebarDashboardSelected” or
+
“sidebarDeviceSelected” or
+
“sidebarExploreSelected” or
+
“sidebarFileSelected” or
+
“sidebarForegroundIcon” or
+
“sidebarForegroundText” or
+
“sidebarHomeSelected” or
+
“sidebarItem” or
+
“sidebarRibbon” or
+
“sidebarRunSelected” or
+
“sidebarSeparator” or
+
“sidebarSeparatorForeground” or
+
“sidebarUserSelected” or
+
“snakeButtonOutline” or
+
“svgTagoFont” or
+
“svgTagoIOHole” or
+
“switchDisabledBackground” or
+
“switchSlider” or
+
“tabBackground” or
+
“tabLabelBorder” or
+
“tooltipContainer” or
+
“tooltipText” or
+
“verticalTabItem” or
+
“verticalTabItemBorder” or
+
“widgetCardBackground” or
+
“widgetIconsAccent” or
+
“widgetIconsBackground” or
+
“widgetIconsColor” or
+
“widgetIconsFooterBasic” or
+
“widgetIconsFooterPremium” or
+
“auth_bg_opacity” or
+
“auth_bg_src” or
+
“auth_bg_type” or
+
“auth_form_opacity”
+
+
+
+
+ +
+

signup_fields

+
+

Attributes:

+
+
+
name: str
+
placeholder: str
+
required: bool
+
type: str
+
+
+
+
+
+

feature_devicewifisetup

+
+

Attributes:

+
+
+
background_color: str
+
button_cancel_background_color: str
+
button_cancel_text_color: str
+
button_confirm_background_color: str
+
button_confirm_text_color: str
+
enabled: bool
+
ip: str
+
language: str
+
name: str
+
port: str
+
protocol: str
+
text_color: str
+
translations: Dict[str, object]
+
+
+
+
+
+

email_templates

+
+

Attributes:

+
+
+
subject: str
+
value: str
+
+
+
+
+
+

TypedDict

+
+

Attributes:

+
+
+
subject: str
+
value: str
+
+
+
+
+
+

feature_geolocation

+
+

Attributes:

+
+
+
buffer_size: Union[int, float]
+
device: Union[str, None]
+
enabled: bool
+
middleware_url: str
+
minimum_distance: Union[int, float]
+
minimum_interval: Union[int, float]
+
target: str
+
+
+
+
+
+

otp

+
+

Attributes:

+
+
+
authenticator: bool
+
sms: bool
+
email: bool
+
+
+
+
+
+

RunInfo

+
+

Attributes:

+
+
+
profile: GenericID
+
active: bool
+
name: str
+
sub_title: str
+
url: str
+
email_domain: Union[str, None]
+
signup_method: str
+
favicon: Union[str, None]
+
logo: Union[str, None]
+
signup_logo: Union[str, None]
+
signup_logo_options: object
+
sidebar_buttons: list[sidebar_buttons]
+
signup_fields: list[signup_fields]
+
email_templates: Dict[str, email_templates]
+
feature_devicewifisetup: feature_devicewifisetup
+
feature_geolocation: feature_geolocation
+
theme: ThemeOption
+
integration: object
+
sso_saml_active: bool
+
security: Dict[str, otp]
+
+
+
+
+
+

UserCreateInfo

+
+

Attributes:

+
+
+
name: str
+
email: str
+
password**: str
+
timezone: str
+
company: Optional[str]
+
phone: Optional[str]
+
language: Optional[str]
+
tags: Optional[list[TagsObj]]
+
active: Optional[bool]
+
+
+
+
+
+

UserInfo

+
+

Attributes:

+
+
+
name: str
+
email: str
+
timezone: str
+
company: Optional[str]
+
phone: Optional[str]
+
language: Optional[str]
+
tags: Optional[list[TagsObj]]
+
active: Optional[bool]
+
id: GenericID
+
profile: GenericID
+
active: bool
+
newsletter: bool
+
last_login: Union[datetime, None]
+
created_at: datetime
+
updated_at: datetime
+
options: object
+
tags: list[TagsObj]
+
+
+
+
+
+

LoginResponse

+
+

Attributes:

+
+
+
token: GenericToken
+
expire_date: ExpireTimeOption
+
+
+
+
+
+

LoginAsUserOptions

+
+

Attributes:

+
+
+
expire_time: Optional[str]
+
Date to expire the login token.
+
+
+
+
example:
+
“3 months”, “1 year”, “20 hours”
+
:default: “8 hours”
+
+
+
+
+
+
+

SAMLAttributeMappings

+
+

Attributes:

+
+
+
email: str
+
firstName: str
+
lastName: Optional[str]
+
phone: Optional[str]
+
company: Optional[str]
+
language: Optional[str]
+
timezone: Optional[str]
+
tags: Dict[str, str]
+
+
+
+
+
+

sp

+
+

Attributes:

+
+
+
entity_id: str
+
acs_url: str
+
metadata: str
+
+
+
+
+
+

idp

+
+
+
Attributes:
+
issuer: str
+
+
+
+
+
+
+

RunSAMLInfo

+
+

Attributes:

+
+
+
sp: sp
+
Information for TagoIO’s API routes to use as a Service Provider in SAML authentication flows.
+
+
+
idp: idp
+
Relevant information from the Identity Provider’s metadata after being parsed by TagoIO.
+
+
+
mapping: SAMLAttributeMappings
+
Attribute mappings for the Identity Provider’s attributes to the attributes used in TagoIO.
+
+
+
+
+
+

RunSAMLEditInfo

+
+

Attributes:

+
+
+
idp_metadata: Optional[str]
+
Identity Provider’s XML metadata encoded in a base 64 string.
+
+
+
mapping: SAMLAttributeMappings
+
Attribute mappings for the Identity Provider’s attributes to the attributes used in TagoIO.
+
+
+
+
+
+

CustomDomainDnsRecord

+
+

Attributes:

+
+
+
status: bool
+
+
+
Status for the DNS record check.
+
+
+
When true, the DNS record is properly configured with the provided key and value.
+
When false, the DNS record is either not yet configured or the key exists but the
+
value in the DNS record does not match the value provided.
+
+
+
type: str
+
Type of the DNS record.
+
+
+
key: str
+
Key for key-value pair in the DNS record.
+
+
+
value: str
+
Value for the key-value pair the DNS record.
+
+
+
current_value: Optional[str]
+
Current value in the provider’s record for the DNS record’s key.
+
Only returned when the DNS record has the matching key configured.
+
+
+
When status is true, the value here will be the same as the one in value.
+
When status is false, the value here can is either stale or there was an error
+
copying the provided value in the DNS provider’s record.
+
+
+
+
+
+

CustomDomainResponse

+
+

Attributes:

+
+
+
Type for the Custom Domain response from the API, unparsed.
+
+
+
:internal
+
+
+
active: bool
+
Whether the custom domain is active.
+
+
+
This is only true when all the required DNS records are properly configured in the DNS provider.
+
+
+
domain: str
+
Configured domain for the RUN.
+
+
+
subdomain: str
+
Configured subdomain for the RUN.
+
+
+
email: str
+
Mailing address for the RUN with custom domain.
+
+
+
dns_ssl: CustomDomainDnsRecord
+
DNS record for the SSL certificate.
+
The information in this record needs to be configured in the DNS provider for the custom domain.
+
+
+
dns_page: CustomDomainDnsRecord
+
DNS record for the page endpoint.
+
+
+
The information in this record needs to be configured in the DNS provider for the custom domain.
+
+
+
dns_email_1: CustomDomainDnsRecord
+
First DNS record for the e-mail.
+
+
+
The information in this record needs to be configured in the DNS provider for the custom domain.
+
+
+
dns_email_2: CustomDomainDnsRecord
+
Second DNS record for the e-mail.
+
+
+
The information in this record needs to be configured in the DNS provider for the custom domain.
+
+
+
dns_email_3: CustomDomainDnsRecord
+
Third DNS record for the e-mail.
+
+
+
The information in this record needs to be configured in the DNS provider for the custom domain.
+
+
+
created_at: str
+
Timestamp (in string format) for when the custom domain was configured.
+
+
+
+
+
+

CustomDomainInfo

+
+

Attributes:

+
+
+
Type for the Custom Domain information in a profile’s RUN.
+
+
+
active: bool
+
Whether the custom domain is active.
+
This is only true when all the required DNS records are properly configured in the DNS
+
provider.
+
+
+
domain: str
+
Configured domain for the RUN.
+
+
+
subdomain: str
+
Configured subdomain for the RUN.
+
+
+
email: str
+
Mailing address for the RUN with custom domain.
+
+
+
dns_ssl: CustomDomainDnsRecord
+
DNS record for the SSL certificate.
+
The information in this record needs to be configured in the DNS provider for the custom domain.
+
+
+
dns_page: CustomDomainDnsRecord
+
DNS record for the page endpoint.
+
+
+
The information in this record needs to be configured in the DNS provider for the custom domain.
+
+
+
dns_email_1: CustomDomainDnsRecord
+
First DNS record for the e-mail.
+
+
+
The information in this record needs to be configured in the DNS provider for the custom domain.
+
+
+
dns_email_2: CustomDomainDnsRecord
+
Second DNS record for the e-mail.
+
+
+
The information in this record needs to be configured in the DNS provider for the custom domain.
+
+
+
dns_email_3: CustomDomainDnsRecord
+
Third DNS record for the e-mail.
+
+
+
The information in this record needs to be configured in the DNS provider for the custom domain.
+
+
+
created_at: datetime
+
Timestamp for when the custom domain was configured.
+
+
+
+
+
+

CustomDomainCreate

+

Type for the data required to configure a profile’s RUN Custom Domain.

+
+

Attributes:

+
+
+
domain: str
+
Domain for the RUN’s custom domain.
+
+
+
If the desired custom domain is portal.mycompany.com, this will be “mycompany.com”.
+
+
+
subdomain: str
+
Subdomain for the RUN’s custom domain.
+
If the desired custom domain is portal.mycompany.com, this will be “portal”.
+
+
+
email: str
+
Mailing address for the RUN with custom domain.
+
If the desired custom domain is portal.mycompany.com, this can be either “portal.mycompany.com” or “mycompany.com”.
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/Run/index.html b/Resources/Run/index.html new file mode 100644 index 0000000..04e014b --- /dev/null +++ b/Resources/Run/index.html @@ -0,0 +1,213 @@ + + + + + + + + + Run — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Run

+

Manage services in account.

+
+

ssoSAMLInfo

+

Get the SAML Single Sign-On information for the account’s RUN.

+
+
+

ssoSAMLEdit

+

Edit the SAML Single Sign-On metadata and mappings for the account’s RUN.

+
+

Parameters:

+
+
+ +
Updated data for a RUN’s SAML Single Sign-On configuration.
+
+
+
+
+
+

createCustomDomain

+

Create a TagoRUN custom domain for the profile.

+
+

Parameters:

+
+
+
profile_id: str
+
ID of the profile
+
+
+
customDomainData: CustomDomainCreate
+
query params
+
+
+
+
+
+

getCustomDomain

+

Set details of TagoRun custom domain for the profile.

+
+

Parameters

+
+
+
profile_id: str
+
ID of the profile
+
+
+
+
+
+

deleteCustomDomain

+

Delete a TagoRUN custom domain for the profile.

+
+

Parameters

+
+
+
profile_id: str
+
ID of the profile
+
+
+
+
+
+

regenerateCustomDomain

+

Regenerate a TagoRUN custom domain for the profile.

+
+

Parameters

+
+
+
profile_id: str
+
ID of the profile
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Resources/index.html b/Resources/index.html new file mode 100644 index 0000000..9b65e21 --- /dev/null +++ b/Resources/index.html @@ -0,0 +1,223 @@ + + + + + + + + + Resources — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Resources

+

To set up an resource object, you need to import the Resources class from the tagoio_sdk module.

+
+

Instance

+
+

Parameters:

+
+
+
Optional token: str
+
Token is a optional parameter
+
+
+
Optional region: str “usa-1” or “env”
+
Region is a optional parameter
+
+
+
+
+
Example:
+
    from tagoio_sdk import Resources
+
+    resources = Resources()
+
+
+
+ +
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Services/Attachment_Type.html b/Services/Attachment_Type.html new file mode 100644 index 0000000..d90cf7e --- /dev/null +++ b/Services/Attachment_Type.html @@ -0,0 +1,123 @@ + + + + + + + + + Attachment Type — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Attachment Type

+
+

ArchiveFile

+
+

Attributes:

+
+

name: str

+

content: Base64: str

+

type: str

+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Services/Email_Type.html b/Services/Email_Type.html new file mode 100644 index 0000000..ec62b28 --- /dev/null +++ b/Services/Email_Type.html @@ -0,0 +1,235 @@ + + + + + + + + + Email Type — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Email Type

+
+

AttachmentOptions

+
+

Attributes:

+
+
+
archive: str
+
Archive itself
+
+
+
filename: str
+
Name for the archive
+
+
+
+
+
+

TemplateOptions

+
+

Attributes:

+
+
+
name: str
+
Template name
+
You can create an e-mail template on TagoRUN options at https://admin.tago.io/run
+
+
+
params: Optional[dict[str, Union[int, float]]]
+
[Optional] Parameters to parse on Template
+
You can use that parameter as local variable using $PARAMETER_KEY$ example params = { name: ‘John’ } will be $name$ on template document
+
+
+
+
+
+

EmailBase

+
+

Attributes:

+
+
+
to: str
+
E-mail address to be sent
+
example: “myclien@tago.io
+
+
+
from_name: Optional[str]
+
[Optional] Name of origin
+
example: “My Run”
+
+
+
subject: str
+
Subject of the e-mail only allow with message or html
+
+
+
attachment: Optional[AttachmentOptions]
+
[Optional] Attachment for the e-mail
+
+
+
+
+
+

EmailRawText

+
+

Attributes:

+
+
+
message: str
+
Message in raw text for email body
+
+
+
+
+
+

EmailHTML

+
+

Attributes:

+
+
+
html: str
+
HTML email body
+
+
+
+
+
+

EmailWithTemplate

+
+

Attributes:

+
+
+
to: str
+
E-mail address to be sent
+
example: “myclien@tago.io
+
+
+
from_name: Optional[str]
+
[Optional] Name of origin
+
example: “My Run”
+
+
+
attachment: Optional[AttachmentOptions]
+
[Optional] Attachment for the e-mail
+
+
+
template: Optional[TemplateOptions]
+
[Optional] Use TagoRUN E-Mail Template
+
If you use template together with attachment the back-end will generate a parameter called ‘URL’
+
+
+
+
+
+

EmailWithHTML

+
+

EmailWithHTML: EmailBase or EmailHTML

+
+
+
+

EmailWithRawText

+
+

EmailWithRawText = EmailBase or EmailRawText

+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Services/MQTT_Type.html b/Services/MQTT_Type.html new file mode 100644 index 0000000..8248117 --- /dev/null +++ b/Services/MQTT_Type.html @@ -0,0 +1,134 @@ + + + + + + + + + MQTT Type — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

MQTT Type

+
+

options

+
+

Attributes:

+
+

retain: Optional[bool]

+

qos: Optional[int or float]

+
+
+
+
+

MQTTData

+
+

Attributes:

+
+

topic: str

+

message: str

+

bucket: GenericID: str

+

options: Optional[options]

+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Services/Notification_Type.html b/Services/Notification_Type.html new file mode 100644 index 0000000..a0e87d6 --- /dev/null +++ b/Services/Notification_Type.html @@ -0,0 +1,190 @@ + + + + + + + + + Notification Type — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Notification Type

+
+

NotificationTriggerAnalysis

+
+

Attributes:

+
+

analysis_id: GenericID: str

+
+
+
+
+

NotificationTriggerHTTP

+
+

Attributes:

+
+

url: str

+

method: “POST” or “GET” or “PUT” or “DELETE” or “REDIRECT”

+

body: dict[str, Any]

+
+
+
+
+

NotificationTriggerProfile

+
+

Attributes:

+
+

share_profile: “accept” or “refuse”

+
+
+
+
+

NotificationButton

+
+

Attributes:

+
+

id: str

+

label: str

+

color: Optional[str]

+

triggers: NotificationTriggerAnalysis or NotificationTriggerHTTP`or list[:ref:`NotificationTriggerProfile],

+
+
+
+
+

NotificationIconImage

+
+

Attributes:

+
+

image_url: str

+

bg_color: Optional[HexColor: str]

+

fit: Optional[“fill” or “contain” or “cover”]

+
+
+
+
+

NotificationIconSVG

+
+

Attributes:

+
+

svg_url: str

+

svg_color: Optional[HexColor: str]

+

bg_color: Optional[HexColor: str]

+
+
+
+
+

NotificationCreate

+
+

Attributes:

+
+

title: str

+

message: str

+

read: Optional[bool]

+

icon: Optional[NotificationIconSVG or NotificationIconImage]

+

buttons: Optional[list[NotificationButton]]

+

buttons_enabled: Optional[bool]

+

buttons_autodisable: Optional[bool]

+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Services/Pdf_Type.html b/Services/Pdf_Type.html new file mode 100644 index 0000000..85f6a80 --- /dev/null +++ b/Services/Pdf_Type.html @@ -0,0 +1,226 @@ + + + + + + + + + Notification Type — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Notification Type

+
+

margin

+
+

Attributes:

+
+
+
top: Optional[str or int or float]
+
[Optional] Top margin, accepts values labeled with units. Defaults to 0.
+
+
+
right: Optional[str or int or float]
+
Right margin, accepts values labeled with units. Defaults to 0.
+
+
+
bottom: Optional[str or int or float]
+
[Optional] Bottom margin, accepts values labeled with units. Defaults to 0.
+
+
+
left: Optional[str or int or float]
+
[Optional] Left margin, accepts values labeled with units. Defaults to 0.
+
+
+
+
+
+

options

+
+

Attributes:

+
+
+
displayHeaderFooter: Optional[bool]
+
[Optional] Display header and footer. Defaults to false.
+
+
+
footerTemplate: Optional[str]
+
[Optional] HTML template for the print footer. Should use the same format as the headerTemplate.
+
+
+
format: Optional[str]
+
[Optional] Paper format. If set, takes priority over width or height options. Defaults to ‘Letter’.
+
+
+
headerTemplate: Optional[str]
+
[Optional] HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values
+
into them:
+
- ‘date’ formatted print date
+
- ‘title’ document title
+
- ‘url’ document location
+
- ‘pageNumber’ current page number
+
- ‘totalPages’ total pages in the document
+
+
+
height: Optional[str or int or float]
+
[Optional] Paper height, accepts values labeled with units.
+
+
+
landscape: Optional[bool]
+
[Optional] Paper orientation. Defaults to false.
+
+
+
margin: Optional[margin]
+
[Optional] Paper margins, defaults to none.
+
+
+
pageRanges: Optional[str]
+
[Optional] Paper ranges to print, e.g., ‘1-5, 8, 11-13’. Defaults to the empty string, which means print all pages.
+
+
+
preferCSSPageSize: Optional[bool]
+
[Optional] Give any CSS @page size declared in the page priority over what is declared in width and height or format`options. Defaults to `false, which will scale the content to fit the paper size.
+
+
+
printBackground: Optional[bool]
+
[Optional] Print background graphics. Defaults to false.
+
+
+
scale: Optional[int or float]
+
[Optional] Scale of the webpage rendering. Defaults to 1. Scale amount must be between 0.1 and 2.
+
+
+
width: Optional[str or int or float]
+
[Optional] Paper width, accepts values labeled with units.
+
+
+
+
+
+

PDFParams

+
+

Attributes:

+
+
+
html: Optional[str]
+
[Optional] HTML as string
+
+
+
base64: Optional[str]
+
[Optional] HTML on base64 format
+
+
+
fileName: Optional[str]
+
[Optional] File name of pdf. Without filename, it will generate base64 response With filename it will generate pdf binary
+
+
+
url: Optional[str]
+
[Optional] Generate pdf from URL
+
+
+
options: Optional[options]
+
[Optional] PDF Custom Options
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Services/SMS_Type.html b/Services/SMS_Type.html new file mode 100644 index 0000000..cada686 --- /dev/null +++ b/Services/SMS_Type.html @@ -0,0 +1,128 @@ + + + + + + + + + SMS Type — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

SMS Type

+
+

SMSData

+
+

Attributes:

+
+
+
to: str
+
Number to send SMS, Example: +5599999999999
+
+
+
message: str
+
Message to be send
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Services/index.html b/Services/index.html new file mode 100644 index 0000000..6cc512a --- /dev/null +++ b/Services/index.html @@ -0,0 +1,344 @@ + + + + + + + + + Services — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Services

+
+

Instance

+
+

Parameters:

+
+
+
Optional token: str
+
Token is a optional parameter (Analysis Token).
+
+
+
Optional region: str “usa-1” or “env”
+
Region is a optional parameter
+
+
+
+
+
Example:
+
    from tagoio_sdk import Services
+
+    services = Services()
+
+
+
+
+
+

Attachment

+

Send Attachment

+
+

Parameters:

+
+
+
archive: ArchiveFile
+
Archive JSON Object
+
+
+
+
+
Example:
+
        from tagoio_sdk import Services
+
+        services = Services()
+        services.Attachment.upload(
+            {
+                "name": "Test",
+                "content": "base64",
+                "type": "Test",
+            }
+        )
+
+
+
+
+
+

ConsoleService

+

Log message in analysis console

+
+

Parameters:

+
+
+
message: str
+
Log message
+
+
+
Optional time: datetime
+
Date of message
+
+
+
+
+
Example:
+
        from tagoio_sdk import Services
+
+        services = Services()
+        services.console.log(
+            {
+                "message": "Test",
+            }
+        )
+
+
+
+
+
+

Email

+

Send Email

+
+

Parameters:

+
+
+ +
Email objects
+
+
+
+
+
Example:
+
        from tagoio_sdk import Services
+
+        services = Services()
+        services.email.send(
+            {
+                "to": "myclien@tago.io",
+                "subject": "Test Subject",
+            }
+        )
+
+
+
+
+
+

MQTT

+

Publish to a MQTT Device

+
+

Parameters:

+
+
+
mqtt: MQTTData
+
MQTT object, contains topic, bucket, message and options(retain and qos)
+
+
+
+
+
Example:
+
        from tagoio_sdk import Services
+
+        services = Services()
+        services.MQTT.publish(
+            {
+                "bucket": "my_device_id",
+                "message": "Test",
+                "topic": "teste/TEMPERATURE",
+                "options": {"qos": 0, "retain": False},
+            }
+        )
+
+
+
+
+
+

Notification

+

Send Notification

+

You can add ref_id from a bucket or dashboard, if it is valid it will show up a button Go To +Dashboard Any account with share of the dashboard/bucket will receive too.

+
+

Parameters:

+
+
+
notification: NotificationCreate
+
Notification Object
+
+
+
+
+
Example:
+
        from tagoio_sdk import Services
+
+        services = Services()
+        services.Notification.send(
+            {
+                title: "Example",
+                message: "Message Test",
+            }
+        )
+
+
+
+
+
+

PDF

+

Generate a PDF from html, url or base64

+
+

Parameters:

+
+
+
params: PDFParams
+
Parameters used to generate the pdf
+
+
+
+
+
Example:
+
        from tagoio_sdk import Services
+
+        services = Services()
+        services.PDF.generate(
+            {
+                base64: "base64"
+            }
+        )
+
+
+
+
+
+

SMS

+

Send SMS to phone number

+
+

Parameters:

+
+
+
sms: SMSData
+
Data that sms will be send, number and message
+
+
+
+
+
Example:
+
        from tagoio_sdk import Services
+
+        services = Services()
+        services.sms.send(
+            {
+                "to": "434434434434",
+                "message": "Test",
+            }
+        )
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/docs/source/Device/Device_Type.rst b/_sources/Device/Device_Type.rst.txt similarity index 100% rename from docs/source/Device/Device_Type.rst rename to _sources/Device/Device_Type.rst.txt diff --git a/docs/source/Device/index.rst b/_sources/Device/index.rst.txt similarity index 100% rename from docs/source/Device/index.rst rename to _sources/Device/index.rst.txt diff --git a/docs/source/Resources/Account/Account_type.rst b/_sources/Resources/Account/Account_type.rst.txt similarity index 100% rename from docs/source/Resources/Account/Account_type.rst rename to _sources/Resources/Account/Account_type.rst.txt diff --git a/docs/source/Resources/Account/index.rst b/_sources/Resources/Account/index.rst.txt similarity index 100% rename from docs/source/Resources/Account/index.rst rename to _sources/Resources/Account/index.rst.txt diff --git a/docs/source/Resources/Billing/Billing_Type.rst b/_sources/Resources/Billing/Billing_Type.rst.txt similarity index 100% rename from docs/source/Resources/Billing/Billing_Type.rst rename to _sources/Resources/Billing/Billing_Type.rst.txt diff --git a/docs/source/Resources/Billing/index.rst b/_sources/Resources/Billing/index.rst.txt similarity index 100% rename from docs/source/Resources/Billing/index.rst rename to _sources/Resources/Billing/index.rst.txt diff --git a/docs/source/Resources/Buckets/index.rst b/_sources/Resources/Buckets/index.rst.txt similarity index 100% rename from docs/source/Resources/Buckets/index.rst rename to _sources/Resources/Buckets/index.rst.txt diff --git a/docs/source/Resources/Dashboards/Dashboard_Type.rst b/_sources/Resources/Dashboards/Dashboard_Type.rst.txt similarity index 100% rename from docs/source/Resources/Dashboards/Dashboard_Type.rst rename to _sources/Resources/Dashboards/Dashboard_Type.rst.txt diff --git a/docs/source/Resources/Dashboards/index.rst b/_sources/Resources/Dashboards/index.rst.txt similarity index 100% rename from docs/source/Resources/Dashboards/index.rst rename to _sources/Resources/Dashboards/index.rst.txt diff --git a/docs/source/Resources/Devices/Devices_Type.rst b/_sources/Resources/Devices/Devices_Type.rst.txt similarity index 100% rename from docs/source/Resources/Devices/Devices_Type.rst rename to _sources/Resources/Devices/Devices_Type.rst.txt diff --git a/docs/source/Resources/Devices/index.rst b/_sources/Resources/Devices/index.rst.txt similarity index 100% rename from docs/source/Resources/Devices/index.rst rename to _sources/Resources/Devices/index.rst.txt diff --git a/docs/source/Resources/IntegrationNetwork/IntegrationNetwork_Type.rst b/_sources/Resources/IntegrationNetwork/IntegrationNetwork_Type.rst.txt similarity index 100% rename from docs/source/Resources/IntegrationNetwork/IntegrationNetwork_Type.rst rename to _sources/Resources/IntegrationNetwork/IntegrationNetwork_Type.rst.txt diff --git a/docs/source/Resources/IntegrationNetwork/index.rst b/_sources/Resources/IntegrationNetwork/index.rst.txt similarity index 100% rename from docs/source/Resources/IntegrationNetwork/index.rst rename to _sources/Resources/IntegrationNetwork/index.rst.txt diff --git a/docs/source/Resources/Profile/index.rst b/_sources/Resources/Profile/index.rst.txt similarity index 100% rename from docs/source/Resources/Profile/index.rst rename to _sources/Resources/Profile/index.rst.txt diff --git a/docs/source/Resources/Run/Run_Types.rst b/_sources/Resources/Run/Run_Types.rst.txt similarity index 100% rename from docs/source/Resources/Run/Run_Types.rst rename to _sources/Resources/Run/Run_Types.rst.txt diff --git a/docs/source/Resources/Run/index.rst b/_sources/Resources/Run/index.rst.txt similarity index 100% rename from docs/source/Resources/Run/index.rst rename to _sources/Resources/Run/index.rst.txt diff --git a/docs/source/Resources/index.rst b/_sources/Resources/index.rst.txt similarity index 100% rename from docs/source/Resources/index.rst rename to _sources/Resources/index.rst.txt diff --git a/docs/source/Services/Attachment_Type.rst b/_sources/Services/Attachment_Type.rst.txt similarity index 100% rename from docs/source/Services/Attachment_Type.rst rename to _sources/Services/Attachment_Type.rst.txt diff --git a/docs/source/Services/Email_Type.rst b/_sources/Services/Email_Type.rst.txt similarity index 100% rename from docs/source/Services/Email_Type.rst rename to _sources/Services/Email_Type.rst.txt diff --git a/docs/source/Services/MQTT_Type.rst b/_sources/Services/MQTT_Type.rst.txt similarity index 100% rename from docs/source/Services/MQTT_Type.rst rename to _sources/Services/MQTT_Type.rst.txt diff --git a/docs/source/Services/Notification_Type.rst b/_sources/Services/Notification_Type.rst.txt similarity index 100% rename from docs/source/Services/Notification_Type.rst rename to _sources/Services/Notification_Type.rst.txt diff --git a/docs/source/Services/Pdf_Type.rst b/_sources/Services/Pdf_Type.rst.txt similarity index 100% rename from docs/source/Services/Pdf_Type.rst rename to _sources/Services/Pdf_Type.rst.txt diff --git a/docs/source/Services/SMS_Type.rst b/_sources/Services/SMS_Type.rst.txt similarity index 100% rename from docs/source/Services/SMS_Type.rst rename to _sources/Services/SMS_Type.rst.txt diff --git a/docs/source/Services/index.rst b/_sources/Services/index.rst.txt similarity index 100% rename from docs/source/Services/index.rst rename to _sources/Services/index.rst.txt diff --git a/docs/source/common/Common_Type.rst b/_sources/common/Common_Type.rst.txt similarity index 100% rename from docs/source/common/Common_Type.rst rename to _sources/common/Common_Type.rst.txt diff --git a/docs/source/index.rst b/_sources/index.rst.txt similarity index 100% rename from docs/source/index.rst rename to _sources/index.rst.txt diff --git a/_static/alabaster.css b/_static/alabaster.css new file mode 100644 index 0000000..517d0b2 --- /dev/null +++ b/_static/alabaster.css @@ -0,0 +1,703 @@ +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: Georgia, serif; + font-size: 17px; + background-color: #fff; + color: #000; + margin: 0; + padding: 0; +} + + +div.document { + width: 940px; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 220px; +} + +div.sphinxsidebar { + width: 220px; + font-size: 14px; + line-height: 1.5; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #fff; + color: #3E4349; + padding: 0 30px 0 30px; +} + +div.body > .section { + text-align: left; +} + +div.footer { + width: 940px; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +p.caption { + font-family: inherit; + font-size: inherit; +} + + +div.relations { + display: none; +} + + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #999; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #999; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0; + margin: -10px 0 0 0px; + text-align: center; +} + +div.sphinxsidebarwrapper h1.logo { + margin-top: -10px; + text-align: center; + margin-bottom: 5px; + text-align: left; +} + +div.sphinxsidebarwrapper h1.logo-name { + margin-top: 0px; +} + +div.sphinxsidebarwrapper p.blurb { + margin-top: 0; + font-style: normal; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: Georgia, serif; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar ul li.toctree-l1 > a { + font-size: 120%; +} + +div.sphinxsidebar ul li.toctree-l2 > a { + font-size: 110%; +} + +div.sphinxsidebar input { + border: 1px solid #CCC; + font-family: Georgia, serif; + font-size: 1em; +} + +div.sphinxsidebar hr { + border: none; + height: 1px; + color: #AAA; + background: #AAA; + + text-align: left; + margin-left: 0; + width: 50%; +} + +div.sphinxsidebar .badge { + border-bottom: none; +} + +div.sphinxsidebar .badge:hover { + border-bottom: none; +} + +/* To address an issue with donation coming after search */ +div.sphinxsidebar h3.donation { + margin-top: 10px; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: Georgia, serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #DDD; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #EAEAEA; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + margin: 20px 0px; + padding: 10px 30px; + background-color: #EEE; + border: 1px solid #CCC; +} + +div.admonition tt.xref, div.admonition code.xref, div.admonition a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fafafa; +} + +div.admonition p.admonition-title { + font-family: Georgia, serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: #fff; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.warning { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.danger { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.error { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.caution { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.attention { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.important { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.note { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.tip { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.hint { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.seealso { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.topic { + background-color: #EEE; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt, code { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +.hll { + background-color: #FFC; + margin: 0 -12px; + padding: 0 12px; + display: block; +} + +img.screenshot { +} + +tt.descname, tt.descclassname, code.descname, code.descclassname { + font-size: 0.95em; +} + +tt.descname, code.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #EEE; + background: #FDFDFD; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.field-list p { + margin-bottom: 0.8em; +} + +/* Cloned from + * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68 + */ +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +table.footnote td.label { + width: .1px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin-left: 0; + margin-right: 0; + margin-top: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + /* Matches the 30px from the narrow-screen "li > ul" selector below */ + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #EEE; + padding: 7px 30px; + margin: 15px 0px; + line-height: 1.3em; +} + +div.viewcode-block:target { + background: #ffd; +} + +dl pre, blockquote pre, li pre { + margin-left: 0; + padding-left: 30px; +} + +tt, code { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, code.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fff; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted #004B6B; +} + +/* Don't put an underline on images */ +a.image-reference, a.image-reference:hover { + border-bottom: none; +} + +a.reference:hover { + border-bottom: 1px solid #6D4100; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #004B6B; +} + +a.footnote-reference:hover { + border-bottom: 1px solid #6D4100; +} + +a:hover tt, a:hover code { + background: #EEE; +} + + +@media screen and (max-width: 870px) { + + div.sphinxsidebar { + display: none; + } + + div.document { + width: 100%; + + } + + div.documentwrapper { + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + } + + div.bodywrapper { + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + margin-left: 0; + } + + ul { + margin-left: 0; + } + + li > ul { + /* Matches the 30px from the "ul, ol" selector above */ + margin-left: 30px; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .bodywrapper { + margin: 0; + } + + .footer { + width: auto; + } + + .github { + display: none; + } + + + +} + + + +@media screen and (max-width: 875px) { + + body { + margin: 0; + padding: 20px 30px; + } + + div.documentwrapper { + float: none; + background: #fff; + } + + div.sphinxsidebar { + display: block; + float: none; + width: 102.5%; + margin: 50px -30px -20px -30px; + padding: 10px 20px; + background: #333; + color: #FFF; + } + + div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, + div.sphinxsidebar h3 a { + color: #fff; + } + + div.sphinxsidebar a { + color: #AAA; + } + + div.sphinxsidebar p.logo { + display: none; + } + + div.document { + width: 100%; + margin: 0; + } + + div.footer { + display: none; + } + + div.bodywrapper { + margin: 0; + } + + div.body { + min-height: 0; + padding: 0; + } + + .rtd_doc_footer { + display: none; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .footer { + width: auto; + } + + .github { + display: none; + } +} + + +/* misc. */ + +.revsys-inline { + display: none!important; +} + +/* Make nested-list/multi-paragraph items look better in Releases changelog + * pages. Without this, docutils' magical list fuckery causes inconsistent + * formatting between different release sub-lists. + */ +div#changelog > div.section > ul > li > p:only-child { + margin-bottom: 0; +} + +/* Hide fugly table cell borders in ..bibliography:: directive output */ +table.docutils.citation, table.docutils.citation td, table.docutils.citation th { + border: none; + /* Below needed in some edge cases; if not applied, bottom shadows appear */ + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + + +/* relbar */ + +.related { + line-height: 30px; + width: 100%; + font-size: 0.9rem; +} + +.related.top { + border-bottom: 1px solid #EEE; + margin-bottom: 20px; +} + +.related.bottom { + border-top: 1px solid #EEE; +} + +.related ul { + padding: 0; + margin: 0; + list-style: none; +} + +.related li { + display: inline; +} + +nav#rellinks { + float: right; +} + +nav#rellinks li+li:before { + content: "|"; +} + +nav#breadcrumbs li+li:before { + content: "\00BB"; +} + +/* Hide certain items when printing */ +@media print { + div.related { + display: none; + } +} \ No newline at end of file diff --git a/_static/basic.css b/_static/basic.css new file mode 100644 index 0000000..bf18350 --- /dev/null +++ b/_static/basic.css @@ -0,0 +1,906 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 450px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a.brackets:before, +span.brackets > a:before{ + content: "["; +} + +a.brackets:after, +span.brackets > a:after { + content: "]"; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +table.footnote td, table.footnote th { + border: 0 !important; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +dl.footnote > dt, +dl.citation > dt { + float: left; + margin-right: 0.5em; +} + +dl.footnote > dd, +dl.citation > dd { + margin-bottom: 0em; +} + +dl.footnote > dd:after, +dl.citation > dd:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dt:after { + content: ":"; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/_static/custom.css b/_static/custom.css new file mode 100644 index 0000000..2a924f1 --- /dev/null +++ b/_static/custom.css @@ -0,0 +1 @@ +/* This file intentionally left blank. */ diff --git a/_static/doctools.js b/_static/doctools.js new file mode 100644 index 0000000..e1bfd70 --- /dev/null +++ b/_static/doctools.js @@ -0,0 +1,358 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for all documentation. + * + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + +/** + * make the code below compatible with browsers without + * an installed firebug like debugger +if (!window.console || !console.firebug) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", + "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", + "profile", "profileEnd"]; + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {}; +} + */ + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} + +/** + * Small JavaScript module for the documentation. + */ +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initIndexTable(); + this.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, + LOCALE : 'unknown', + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated === 'undefined') + return string; + return (typeof translated === 'string') ? translated : translated[0]; + }, + + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated === 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; + }, + + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; + }, + + /** + * add context elements like header anchor links + */ + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); + }, + + /** + * workaround a firefox stupidity + * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 + */ + fixFirefoxAnchorBug : function() { + if (document.location.hash && $.browser.mozilla) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, + + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + if (!body.length) { + body = $('body'); + } + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlighted'); + }); + }, 10); + $('') + .appendTo($('#searchbox')); + } + }, + + /** + * init the domain index toggle buttons + */ + initIndexTable : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + $('tr.cg-' + idnum).toggle(); + if (src.substr(-9) === 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { + togglers.click(); + } + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('#searchbox .highlight-link').fadeOut(300); + $('span.highlighted').removeClass('highlighted'); + var url = new URL(window.location); + url.searchParams.delete('highlight'); + window.history.replaceState({}, '', url); + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar : function() { + $('input[name=q]').first().focus(); + }, + + /** + * make the url absolute + */ + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, + + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this === '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + }, + + initOnKeyListeners: function() { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) + return; + + $(document).keydown(function(event) { + var activeElementType = document.activeElement.tagName; + // don't navigate when in search box, textarea, dropdown or button + if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' + && activeElementType !== 'BUTTON') { + if (event.altKey || event.ctrlKey || event.metaKey) + return; + + if (!event.shiftKey) { + switch (event.key) { + case 'ArrowLeft': + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) + break; + var prevHref = $('link[rel="prev"]').prop('href'); + if (prevHref) { + window.location.href = prevHref; + return false; + } + break; + case 'ArrowRight': + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) + break; + var nextHref = $('link[rel="next"]').prop('href'); + if (nextHref) { + window.location.href = nextHref; + return false; + } + break; + case 'Escape': + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) + break; + Documentation.hideSearchWords(); + return false; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case '/': + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) + break; + Documentation.focusSearchBar(); + return false; + } + } + }); + } +}; + +// quick alias for translations +_ = Documentation.gettext; + +$(document).ready(function() { + Documentation.init(); +}); diff --git a/_static/documentation_options.js b/_static/documentation_options.js new file mode 100644 index 0000000..724e382 --- /dev/null +++ b/_static/documentation_options.js @@ -0,0 +1,14 @@ +var DOCUMENTATION_OPTIONS = { + URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), + VERSION: '', + LANGUAGE: 'None', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/_static/file.png b/_static/file.png new file mode 100644 index 0000000..a858a41 Binary files /dev/null and b/_static/file.png differ diff --git a/_static/jquery-3.5.1.js b/_static/jquery-3.5.1.js new file mode 100644 index 0000000..5093733 --- /dev/null +++ b/_static/jquery-3.5.1.js @@ -0,0 +1,10872 @@ +/*! + * jQuery JavaScript Library v3.5.1 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2020-05-04T22:49Z + */ +( function( global, factory ) { + + "use strict"; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; + +var arr = []; + +var getProto = Object.getPrototypeOf; + +var slice = arr.slice; + +var flat = arr.flat ? function( array ) { + return arr.flat.call( array ); +} : function( array ) { + return arr.concat.apply( [], array ); +}; + + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + +var support = {}; + +var isFunction = function isFunction( obj ) { + + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + return typeof obj === "function" && typeof obj.nodeType !== "number"; + }; + + +var isWindow = function isWindow( obj ) { + return obj != null && obj === obj.window; + }; + + +var document = window.document; + + + + var preservedScriptAttributes = { + type: true, + src: true, + nonce: true, + noModule: true + }; + + function DOMEval( code, node, doc ) { + doc = doc || document; + + var i, val, + script = doc.createElement( "script" ); + + script.text = code; + if ( node ) { + for ( i in preservedScriptAttributes ) { + + // Support: Firefox 64+, Edge 18+ + // Some browsers don't support the "nonce" property on scripts. + // On the other hand, just using `getAttribute` is not enough as + // the `nonce` attribute is reset to an empty string whenever it + // becomes browsing-context connected. + // See https://github.com/whatwg/html/issues/2369 + // See https://html.spec.whatwg.org/#nonce-attributes + // The `node.getAttribute` check was added for the sake of + // `jQuery.globalEval` so that it can fake a nonce-containing node + // via an object. + val = node[ i ] || node.getAttribute && node.getAttribute( i ); + if ( val ) { + script.setAttribute( i, val ); + } + } + } + doc.head.appendChild( script ).parentNode.removeChild( script ); + } + + +function toType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + + + +var + version = "3.5.1", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } + + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + even: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return ( i + 1 ) % 2; + } ) ); + }, + + odd: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return i % 2; + } ) ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !isFunction( target ) ) { + target = {}; + } + + // Extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + copy = options[ name ]; + + // Prevent Object.prototype pollution + // Prevent never-ending loop + if ( name === "__proto__" || target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + src = target[ name ]; + + // Ensure proper type for the source value + if ( copyIsArray && !Array.isArray( src ) ) { + clone = []; + } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { + clone = {}; + } else { + clone = src; + } + copyIsArray = false; + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; + } + + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; + }, + + isEmptyObject: function( obj ) { + var name; + + for ( name in obj ) { + return false; + } + return true; + }, + + // Evaluates a script in a provided context; falls back to the global one + // if not specified. + globalEval: function( code, options, doc ) { + DOMEval( code, { nonce: options && options.nonce }, doc ); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return flat( ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), +function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +} ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = toType( obj ); + + if ( isFunction( obj ) || isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.3.5 + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://js.foundation/ + * + * Date: 2020-03-14 + */ +( function( window ) { +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + nonnativeSelectorCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // Instance methods + hasOwn = ( {} ).hasOwnProperty, + arr = [], + pop = arr.pop, + pushNative = arr.push, + push = arr.push, + slice = arr.slice, + + // Use a stripped-down indexOf as it's faster than native + // https://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[ i ] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + + "ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram + identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + + // "Attribute values must be CSS identifiers [capture 5] + // or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + + whitespace + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + + "*" ), + rdescend = new RegExp( whitespace + "|>" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rhtml = /HTML$/i, + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), + funescape = function( escape, nonHex ) { + var high = "0x" + escape.slice( 1 ) - 0x10000; + + return nonHex ? + + // Strip the backslash prefix from a non-hex escape sequence + nonHex : + + // Replace a hexadecimal escape sequence with the encoded Unicode code point + // Support: IE <=11+ + // For values outside the Basic Multilingual Plane (BMP), manually construct a + // surrogate pair + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + fcssescape = function( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }, + + inDisabledFieldset = addCombinator( + function( elem ) { + return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; + }, + { dir: "parentNode", next: "legend" } + ); + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + ( arr = slice.call( preferredDoc.childNodes ) ), + preferredDoc.childNodes + ); + + // Support: Android<4.0 + // Detect silently failing push.apply + // eslint-disable-next-line no-unused-expressions + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + pushNative.apply( target, slice.call( els ) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + + // Can't trust NodeList.length + while ( ( target[ j++ ] = els[ i++ ] ) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + setDocument( context ); + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { + + // ID selector + if ( ( m = match[ 1 ] ) ) { + + // Document context + if ( nodeType === 9 ) { + if ( ( elem = context.getElementById( m ) ) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && ( elem = newContext.getElementById( m ) ) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[ 2 ] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !nonnativeSelectorCache[ selector + " " ] && + ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && + + // Support: IE 8 only + // Exclude object elements + ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { + + newSelector = selector; + newContext = context; + + // qSA considers elements outside a scoping root when evaluating child or + // descendant combinators, which is not what we want. + // In such cases, we work around the behavior by prefixing every selector in the + // list with an ID selector referencing the scope context. + // The technique has to be used as well when a leading combinator is used + // as such selectors are not recognized by querySelectorAll. + // Thanks to Andrew Dupont for this technique. + if ( nodeType === 1 && + ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + + // We can use :scope instead of the ID hack if the browser + // supports it & if we're not changing the context. + if ( newContext !== context || !support.scope ) { + + // Capture the context ID, setting it first if necessary + if ( ( nid = context.getAttribute( "id" ) ) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", ( nid = expando ) ); + } + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + + toSelector( groups[ i ] ); + } + newSelector = groups.join( "," ); + } + + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + nonnativeSelectorCache( selector, true ); + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return ( cache[ key + " " ] = value ); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement( "fieldset" ); + + try { + return !!fn( el ); + } catch ( e ) { + return false; + } finally { + + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); + } + + // release memory in IE + el = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split( "|" ), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[ i ] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + a.sourceIndex - b.sourceIndex; + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( ( cur = cur.nextSibling ) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return ( name === "input" || name === "button" ) && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11 + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + /* jshint -W018 */ + elem.isDisabled !== !disabled && + inDisabledFieldset( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; + } + + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction( function( argument ) { + argument = +argument; + return markFunction( function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ ( j = matchIndexes[ i ] ) ] ) { + seed[ j ] = !( matches[ j ] = seed[ j ] ); + } + } + } ); + } ); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + var namespace = elem.namespaceURI, + docElem = ( elem.ownerDocument || elem ).documentElement; + + // Support: IE <=8 + // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes + // https://bugs.jquery.com/ticket/4833 + return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, subWindow, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9 - 11+, Edge 12 - 18+ + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( preferredDoc != document && + ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { + + // Support: IE 11, Edge + if ( subWindow.addEventListener ) { + subWindow.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( subWindow.attachEvent ) { + subWindow.attachEvent( "onunload", unloadHandler ); + } + } + + // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, + // Safari 4 - 5 only, Opera <=11.6 - 12.x only + // IE/Edge & older browsers don't support the :scope pseudo-class. + // Support: Safari 6.0 only + // Safari 6.0 supports :scope but it's an alias of :root there. + support.scope = assert( function( el ) { + docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); + return typeof el.querySelectorAll !== "undefined" && + !el.querySelectorAll( ":scope fieldset div" ).length; + } ); + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert( function( el ) { + el.className = "i"; + return !el.getAttribute( "className" ); + } ); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert( function( el ) { + el.appendChild( document.createComment( "" ) ); + return !el.getElementsByTagName( "*" ).length; + } ); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert( function( el ) { + docElem.appendChild( el ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + } ); + + // ID filter and find + if ( support.getById ) { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute( "id" ) === attrId; + }; + }; + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; + } else { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode( "id" ); + return node && node.value === attrId; + }; + }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( ( elem = elems[ i++ ] ) ) { + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + } + } + + return []; + } + }; + } + + // Tag + Expr.find[ "TAG" ] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See https://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { + + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert( function( el ) { + + var input; + + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // https://bugs.jquery.com/ticket/12359 + docElem.appendChild( el ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !el.querySelectorAll( "[selected]" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push( "~=" ); + } + + // Support: IE 11+, Edge 15 - 18+ + // IE 11/Edge don't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + // Interestingly, IE 10 & older don't seem to have the issue. + input = document.createElement( "input" ); + input.setAttribute( "name", "" ); + el.appendChild( input ); + if ( !el.querySelectorAll( "[name='']" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + + whitespace + "*(?:''|\"\")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !el.querySelectorAll( ":checked" ).length ) { + rbuggyQSA.push( ":checked" ); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push( ".#.+[+~]" ); + } + + // Support: Firefox <=3.6 - 5 only + // Old Firefox doesn't throw on a badly-escaped identifier. + el.querySelectorAll( "\\\f" ); + rbuggyQSA.push( "[\\r\\n\\f]" ); + } ); + + assert( function( el ) { + el.innerHTML = "" + + ""; + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement( "input" ); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( el.querySelectorAll( "[name=d]" ).length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE9-11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + docElem.appendChild( el ).disabled = true; + if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: Opera 10 - 11 only + // Opera 10-11 does not throw on post-comma invalid pseudos + el.querySelectorAll( "*,:x" ); + rbuggyQSA.push( ",.*:" ); + } ); + } + + if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector ) ) ) ) { + + assert( function( el ) { + + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( el, "*" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( el, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + } ); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + ) ); + } : + function( a, b ) { + if ( b ) { + while ( ( b = b.parentNode ) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { + + // Choose the first element that is related to our preferred document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( a == document || a.ownerDocument == preferredDoc && + contains( preferredDoc, a ) ) { + return -1; + } + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( b == document || b.ownerDocument == preferredDoc && + contains( preferredDoc, b ) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + return a == document ? -1 : + b == document ? 1 : + /* eslint-enable eqeqeq */ + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( ( cur = cur.parentNode ) ) { + ap.unshift( cur ); + } + cur = b; + while ( ( cur = cur.parentNode ) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[ i ] === bp[ i ] ) { + i++; + } + + return i ? + + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[ i ], bp[ i ] ) : + + // Otherwise nodes in our document sort first + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + ap[ i ] == preferredDoc ? -1 : + bp[ i ] == preferredDoc ? 1 : + /* eslint-enable eqeqeq */ + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + setDocument( elem ); + + if ( support.matchesSelector && documentIsHTML && + !nonnativeSelectorCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch ( e ) { + nonnativeSelectorCache( expr, true ); + } + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( context.ownerDocument || context ) != document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( elem.ownerDocument || elem ) != document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; +}; + +Sizzle.escape = function( sel ) { + return ( sel + "" ).replace( rcssescape, fcssescape ); +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + + // If no nodeType, this is expected to be an array + while ( ( node = elem[ i++ ] ) ) { + + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[ 1 ] = match[ 1 ].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[ 3 ] = ( match[ 3 ] || match[ 4 ] || + match[ 5 ] || "" ).replace( runescape, funescape ); + + if ( match[ 2 ] === "~=" ) { + match[ 3 ] = " " + match[ 3 ] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[ 1 ] = match[ 1 ].toLowerCase(); + + if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { + + // nth-* requires argument + if ( !match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[ 4 ] = +( match[ 4 ] ? + match[ 5 ] + ( match[ 6 ] || 1 ) : + 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); + match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); + + // other types prohibit arguments + } else if ( match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[ 6 ] && match[ 2 ]; + + if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[ 3 ] ) { + match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + + // Get excess from tokenize (recursively) + ( excess = tokenize( unquoted, true ) ) && + + // advance to the next closing parenthesis + ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { + + // excess is a negative index + match[ 0 ] = match[ 0 ].slice( 0, excess ); + match[ 2 ] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { + return true; + } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + ( pattern = new RegExp( "(^|" + whitespace + + ")" + className + "(" + whitespace + "|$)" ) ) && classCache( + className, function( elem ) { + return pattern.test( + typeof elem.className === "string" && elem.className || + typeof elem.getAttribute !== "undefined" && + elem.getAttribute( "class" ) || + "" + ); + } ); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + /* eslint-disable max-len */ + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + /* eslint-enable max-len */ + + }; + }, + + "CHILD": function( type, what, _argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, _context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( ( node = node[ dir ] ) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( ( node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + + // Use previously-cached element index if available + if ( useCache ) { + + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + + // Use the same loop as above to seek `elem` from the start + while ( ( node = ++nodeIndex && node && node[ dir ] || + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || + ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction( function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[ i ] ); + seed[ idx ] = !( matches[ idx ] = matched[ i ] ); + } + } ) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + + // Potentially complex pseudos + "not": markFunction( function( selector ) { + + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction( function( seed, matches, _context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( ( elem = unmatched[ i ] ) ) { + seed[ i ] = !( matches[ i ] = elem ); + } + } + } ) : + function( elem, _context, xml ) { + input[ 0 ] = elem; + matcher( input, null, xml, results ); + + // Don't keep the element (issue #299) + input[ 0 ] = null; + return !results.pop(); + }; + } ), + + "has": markFunction( function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + } ), + + "contains": markFunction( function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; + }; + } ), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + + // lang value must be a valid identifier + if ( !ridentifier.test( lang || "" ) ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( ( elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); + return false; + }; + } ), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && + ( !document.hasFocus || document.hasFocus() ) && + !!( elem.type || elem.href || ~elem.tabIndex ); + }, + + // Boolean properties + "enabled": createDisabledPseudo( false ), + "disabled": createDisabledPseudo( true ), + + "checked": function( elem ) { + + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return ( nodeName === "input" && !!elem.checked ) || + ( nodeName === "option" && !!elem.selected ); + }, + + "selected": function( elem ) { + + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + // eslint-disable-next-line no-unused-expressions + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos[ "empty" ]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( ( attr = elem.getAttribute( "type" ) ) == null || + attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo( function() { + return [ 0 ]; + } ), + + "last": createPositionalPseudo( function( _matchIndexes, length ) { + return [ length - 1 ]; + } ), + + "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + } ), + + "even": createPositionalPseudo( function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "odd": createPositionalPseudo( function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? + argument + length : + argument > length ? + length : + argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ) + } +}; + +Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || ( match = rcomma.exec( soFar ) ) ) { + if ( match ) { + + // Don't consume trailing commas as valid + soFar = soFar.slice( match[ 0 ].length ) || soFar; + } + groups.push( ( tokens = [] ) ); + } + + matched = false; + + // Combinators + if ( ( match = rcombinators.exec( soFar ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + + // Cast descendant combinators to space + type: match[ 0 ].replace( rtrim, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || + ( match = preFilters[ type ]( match ) ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[ i ].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", + doneName = done++; + + return combinator.first ? + + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + return false; + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || ( elem[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || + ( outerCache[ elem.uniqueID ] = {} ); + + if ( skip && skip === elem.nodeName.toLowerCase() ) { + elem = elem[ dir ] || elem; + } else if ( ( oldCache = uniqueCache[ key ] ) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return ( newCache[ 2 ] = oldCache[ 2 ] ); + } else { + + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ key ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { + return true; + } + } + } + } + } + return false; + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[ i ]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[ 0 ]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[ i ], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( ( elem = unmatched[ i ] ) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction( function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( + selector || "*", + context.nodeType ? [ context ] : context, + [] + ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( ( elem = temp[ i ] ) ) { + matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) ) { + + // Restore matcherIn since elem is not yet a final match + temp.push( ( matcherIn[ i ] = elem ) ); + } + } + postFinder( null, ( matcherOut = [] ), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) && + ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { + + seed[ temp ] = !( results[ temp ] = elem ); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + } ); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[ 0 ].type ], + implicitRelative = leadingRelative || Expr.relative[ " " ], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + ( checkContext = context ).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { + matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; + } else { + matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[ j ].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens + .slice( 0, i - 1 ) + .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), + + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), + len = elems.length; + + if ( outermost ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + outermostContext = context == document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( !context && elem.ownerDocument != document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( ( matcher = elementMatchers[ j++ ] ) ) { + if ( matcher( elem, context || document, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + + // They will have gone through all possible matchers + if ( ( elem = !matcher && elem ) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( ( matcher = setMatchers[ j++ ] ) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !( unmatched[ i ] || setMatched[ i ] ) ) { + setMatched[ i ] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[ i ] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( + selector, + matcherFromGroupMatchers( elementMatchers, setMatchers ) + ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( ( selector = compiled.selector || selector ) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[ 0 ] = match[ 0 ].slice( 0 ); + if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { + + context = ( Expr.find[ "ID" ]( token.matches[ 0 ] + .replace( runescape, funescape ), context ) || [] )[ 0 ]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[ i ]; + + // Abort if we hit a combinator + if ( Expr.relative[ ( type = token.type ) ] ) { + break; + } + if ( ( find = Expr.find[ type ] ) ) { + + // Search, expanding context for leading sibling combinators + if ( ( seed = find( + token.matches[ 0 ].replace( runescape, funescape ), + rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || + context + ) ) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert( function( el ) { + + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; +} ); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert( function( el ) { + el.innerHTML = ""; + return el.firstChild.getAttribute( "href" ) === "#"; +} ) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + } ); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert( function( el ) { + el.innerHTML = ""; + el.firstChild.setAttribute( "value", "" ); + return el.firstChild.getAttribute( "value" ) === ""; +} ) ) { + addHandle( "value", function( elem, _name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + } ); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert( function( el ) { + return el.getAttribute( "disabled" ) == null; +} ) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; + } + } ); +} + +return Sizzle; + +} )( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; +jQuery.escapeSelector = Sizzle.escape; + + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +}; +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + + + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) !== not; + } ); + } + + // Single element + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + } + + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); + } + + // Filtered directly for both simple and complex selectors + return jQuery.filter( qualifier, elements, not ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, ret, + len = this.length, + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + ret = this.pushStack( [] ); + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + return len > 1 ? jQuery.uniqueSort( ret ) : ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { + + // Inject the element directly into the jQuery object + this[ 0 ] = elem; + this.length = 1; + } + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // Methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter( function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + targets = typeof selectors !== "string" && jQuery( selectors ); + + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within the set + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // Index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, _i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, _i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, _i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + if ( elem.contentDocument != null && + + // Support: IE 11+ + // elements with no `data` attribute has an object + // `contentDocument` with a `null` prototype. + getProto( elem.contentDocument ) ) { + + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.uniqueSort( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && toType( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + "catch": function( fn ) { + return promise.then( null, fn ); + }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( _i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.stackTrace ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the stack, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getStackHook ) { + process.stackTrace = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 5 ]; + + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( + function() { + + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, + + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[ 3 - i ][ 3 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock, + + // progress_handlers.lock + tuples[ 0 ][ 3 ].lock + ); + } + + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); + return this; + }; + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, + + // count of unprocessed arguments + i = remaining, + + // subordinate fulfillment data + resolveContexts = Array( i ), + resolveValues = slice.call( arguments ), + + // the master Deferred + master = jQuery.Deferred(), + + // subordinate callback factory + updateFunc = function( i ) { + return function( value ) { + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + master.resolveWith( resolveContexts, resolveValues ); + } + }; + }; + + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, + !remaining ); + + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( master.state() === "pending" || + isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return master.then(); + } + } + + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); + } + + return master.promise(); + } +} ); + + +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + +jQuery.Deferred.exceptionHook = function( error, stack ) { + + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); + } +}; + + + + +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; + + + + +// The deferred used on DOM ready +var readyList = jQuery.Deferred(); + +jQuery.fn.ready = function( fn ) { + + readyList + .then( fn ) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + } +} ); + +jQuery.ready.then = readyList.then; + +// The ready event handler and self cleanup method +function completed() { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + jQuery.ready(); +} + +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + +} else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( toType( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, _key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + if ( chainable ) { + return elems; + } + + // Gets + if ( bulk ) { + return fn.call( elems ); + } + + return len ? fn( elems[ 0 ], key ) : emptyGet; +}; + + +// Matches dashed string for camelizing +var rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g; + +// Used by camelCase as callback to replace() +function fcamelCase( _all, letter ) { + return letter.toUpperCase(); +} + +// Convert dashed to camelCase; used by the css and data modules +// Support: IE <=9 - 11, Edge 12 - 15 +// Microsoft forgot to hump their vendor prefix (#9572) +function camelCase( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); +} +var acceptData = function( owner ) { + + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + + + +function Data() { + this.expando = jQuery.expando + Data.uid++; +} + +Data.uid = 1; + +Data.prototype = { + + cache: function( owner ) { + + // Check if the owner object already has a cache + var value = owner[ this.expando ]; + + // If not, create one + if ( !value ) { + value = {}; + + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return an empty object. + if ( acceptData( owner ) ) { + + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } + } + } + + return value; + }, + set: function( owner, data, value ) { + var prop, + cache = this.cache( owner ); + + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if ( typeof data === "string" ) { + cache[ camelCase( data ) ] = value; + + // Handle: [ owner, { properties } ] args + } else { + + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ camelCase( prop ) ] = data[ prop ]; + } + } + return cache; + }, + get: function( owner, key ) { + return key === undefined ? + this.cache( owner ) : + + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; + }, + access: function( owner, key, value ) { + + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ( ( key && typeof key === "string" ) && value === undefined ) ) { + + return this.get( owner, key ); + } + + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, + cache = owner[ this.expando ]; + + if ( cache === undefined ) { + return; + } + + if ( key !== undefined ) { + + // Support array or space separated string of keys + if ( Array.isArray( key ) ) { + + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( camelCase ); + } else { + key = camelCase( key ); + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); + } + + i = key.length; + + while ( i-- ) { + delete cache[ key[ i ] ]; + } + } + + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { + + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; + } + } + }, + hasData: function( owner ) { + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); + } +}; +var dataPriv = new Data(); + +var dataUser = new Data(); + + + +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /[A-Z]/g; + +function getData( data ) { + if ( data === "true" ) { + return true; + } + + if ( data === "false" ) { + return false; + } + + if ( data === "null" ) { + return null; + } + + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } + + if ( rbrace.test( data ) ) { + return JSON.parse( data ); + } + + return data; +} + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = getData( data ); + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + dataUser.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend( { + hasData: function( elem ) { + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return dataUser.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + dataUser.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. + _data: function( elem, name, data ) { + return dataPriv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + dataPriv.remove( elem, name ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = dataUser.get( elem ); + + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE 11 only + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + dataPriv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + dataUser.set( this, key ); + } ); + } + + return access( this, function( value ) { + var data; + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, key ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each( function() { + + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each( function() { + dataUser.remove( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = dataPriv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // Clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // Not public - generate a queueHooks object, or return the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // Ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var documentElement = document.documentElement; + + + + var isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ); + }, + composed = { composed: true }; + + // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only + // Check attachment across shadow DOM boundaries when possible (gh-3504) + // Support: iOS 10.0-10.2 only + // Early iOS 10 versions support `attachShadow` but not `getRootNode`, + // leading to errors. We need to check for `getRootNode`. + if ( documentElement.getRootNode ) { + isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ) || + elem.getRootNode( composed ) === elem.ownerDocument; + }; + } +var isHiddenWithinTree = function( elem, el ) { + + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && + + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + isAttached( elem ) && + + jQuery.css( elem, "display" ) === "none"; + }; + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, scale, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = elem.nodeType && + ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2; + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + while ( maxIterations-- ) { + + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). + jQuery.style( elem, prop, initialInUnit + unit ); + if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { + maxIterations = 0; + } + initialInUnit = initialInUnit / scale; + + } + + initialInUnit = initialInUnit * 2; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +var defaultDisplayMap = {}; + +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; + + if ( display ) { + return display; + } + + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); + + temp.parentNode.removeChild( temp ); + + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; + + return display; +} + +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; + + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); + +var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); + + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // Support: IE <=9 only + // IE <=9 replaces "; + support.option = !!div.lastChild; +} )(); + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting or other required elements. + thead: [ 1, "", "
" ], + col: [ 2, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + _default: [ 0, "", "" ] +}; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// Support: IE <=9 only +if ( !support.option ) { + wrapMap.optgroup = wrapMap.option = [ 1, "" ]; +} + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, attached, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( toType( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + attached = isAttached( elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( attached ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +var + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE <=9 - 11+ +// focus() and blur() are asynchronous, except when they are no-op. +// So expect focus to be synchronous when the element is already active, +// and blur to be synchronous when the element is not already active. +// (focus and blur are always synchronous in other supported browsers, +// this just defines when we can count on it). +function expectSync( elem, type ) { + return ( elem === safeActiveElement() ) === ( type === "focus" ); +} + +// Support: IE <=9 only +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Only attach events to objects that accept data + if ( !acceptData( elem ) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = Object.create( null ); + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( nativeEvent ) { + + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( nativeEvent ), + + handlers = ( + dataPriv.get( this, "events" ) || Object.create( null ) + )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // If the event is namespaced, then each handler is only invoked if it is + // specially universal or its namespaces are a superset of the event's. + if ( !event.rnamespace || handleObj.namespace === false || + event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, handleObj, sel, matchedHandlers, matchedSelectors, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); + } + } + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this; + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, + + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); + } + } ); + }, + + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + click: { + + // Utilize native event to ensure correct state for checkable inputs + setup: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Claim the first handler + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + // dataPriv.set( el, "click", ... ) + leverageNative( el, "click", returnTrue ); + } + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Force setup before triggering a click + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + leverageNative( el, "click" ); + } + + // Return non-false to allow normal event-path propagation + return true; + }, + + // For cross-browser consistency, suppress native .click() on links + // Also prevent it if we're currently inside a leveraged native-event stack + _default: function( event ) { + var target = event.target; + return rcheckableType.test( target.type ) && + target.click && nodeName( target, "input" ) && + dataPriv.get( target, "click" ) || + nodeName( target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +// Ensure the presence of an event listener that handles manually-triggered +// synthetic events by interrupting progress until reinvoked in response to +// *native* events that it fires directly, ensuring that state changes have +// already occurred before other listeners are invoked. +function leverageNative( el, type, expectSync ) { + + // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add + if ( !expectSync ) { + if ( dataPriv.get( el, type ) === undefined ) { + jQuery.event.add( el, type, returnTrue ); + } + return; + } + + // Register the controller as a special universal handler for all event namespaces + dataPriv.set( el, type, false ); + jQuery.event.add( el, type, { + namespace: false, + handler: function( event ) { + var notAsync, result, + saved = dataPriv.get( this, type ); + + if ( ( event.isTrigger & 1 ) && this[ type ] ) { + + // Interrupt processing of the outer synthetic .trigger()ed event + // Saved data should be false in such cases, but might be a leftover capture object + // from an async native handler (gh-4350) + if ( !saved.length ) { + + // Store arguments for use when handling the inner native event + // There will always be at least one argument (an event object), so this array + // will not be confused with a leftover capture object. + saved = slice.call( arguments ); + dataPriv.set( this, type, saved ); + + // Trigger the native event and capture its result + // Support: IE <=9 - 11+ + // focus() and blur() are asynchronous + notAsync = expectSync( this, type ); + this[ type ](); + result = dataPriv.get( this, type ); + if ( saved !== result || notAsync ) { + dataPriv.set( this, type, false ); + } else { + result = {}; + } + if ( saved !== result ) { + + // Cancel the outer synthetic event + event.stopImmediatePropagation(); + event.preventDefault(); + return result.value; + } + + // If this is an inner synthetic event for an event with a bubbling surrogate + // (focus or blur), assume that the surrogate already propagated from triggering the + // native event and prevent that from happening again here. + // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the + // bubbling surrogate propagates *after* the non-bubbling base), but that seems + // less bad than duplication. + } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { + event.stopPropagation(); + } + + // If this is a native event triggered above, everything is now in order + // Fire an inner synthetic event with the original arguments + } else if ( saved.length ) { + + // ...and capture the result + dataPriv.set( this, type, { + value: jQuery.event.trigger( + + // Support: IE <=9 - 11+ + // Extend with the prototype to reset the above stopImmediatePropagation() + jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), + saved.slice( 1 ), + this + ) + } ); + + // Abort handling of the native event + event.stopImmediatePropagation(); + } + } + } ); +} + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || Date.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + code: true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + + which: function( event ) { + var button = event.button; + + // Add which for key events + if ( event.which == null && rkeyEvent.test( event.type ) ) { + return event.charCode != null ? event.charCode : event.keyCode; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { + if ( button & 1 ) { + return 1; + } + + if ( button & 2 ) { + return 3; + } + + if ( button & 4 ) { + return 2; + } + + return 0; + } + + return event.which; + } +}, jQuery.event.addProp ); + +jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { + jQuery.event.special[ type ] = { + + // Utilize native event if possible so blur/focus sequence is correct + setup: function() { + + // Claim the first handler + // dataPriv.set( this, "focus", ... ) + // dataPriv.set( this, "blur", ... ) + leverageNative( this, type, expectSync ); + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function() { + + // Force setup before trigger + leverageNative( this, type ); + + // Return non-false to allow normal event-path propagation + return true; + }, + + delegateType: delegateType + }; +} ); + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + + // Support: IE <=10 - 11, Edge 12 - 13 only + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { + + return jQuery( elem ).children( "tbody" )[ 0 ] || elem; + } + + return elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { + elem.type = elem.type.slice( 5 ); + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.get( src ); + events = pdataOld.events; + + if ( events ) { + dataPriv.remove( dest, "handle events" ); + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = flat( args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + valueIsFunction = isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( valueIsFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( valueIsFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl && !node.noModule ) { + jQuery._evalUrl( node.src, { + nonce: node.nonce || node.getAttribute( "nonce" ) + }, doc ); + } + } else { + DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && isAttached( node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html; + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = isAttached( elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); + +var getStyles = function( elem ) { + + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; + +var swap = function( elem, options, callback ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + +var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + container.style.cssText = "position:absolute;left:-11111px;width:60px;" + + "margin-top:1px;padding:0;border:0"; + div.style.cssText = + "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + + "margin:auto;border:1px;padding:1px;" + + "width:60%;top:1%"; + documentElement.appendChild( container ).appendChild( div ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; + + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 + // Some styles come back with percentage values, even though they shouldn't + div.style.right = "60%"; + pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; + + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; + + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + // Support: Chrome <=64 + // Don't get tricked when zoom affects offsetWidth (gh-4029) + div.style.position = "absolute"; + scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + function roundPixelMeasures( measure ) { + return Math.round( parseFloat( measure ) ); + } + + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, + reliableTrDimensionsVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + jQuery.extend( support, { + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelBoxStyles: function() { + computeStyleTests(); + return pixelBoxStylesVal; + }, + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + }, + scrollboxSize: function() { + computeStyleTests(); + return scrollboxSizeVal; + }, + + // Support: IE 9 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Behavior in IE 9 is more subtle than in newer versions & it passes + // some versions of this test; make sure not to make it pass there! + reliableTrDimensions: function() { + var table, tr, trChild, trStyle; + if ( reliableTrDimensionsVal == null ) { + table = document.createElement( "table" ); + tr = document.createElement( "tr" ); + trChild = document.createElement( "div" ); + + table.style.cssText = "position:absolute;left:-11111px"; + tr.style.height = "1px"; + trChild.style.height = "9px"; + + documentElement + .appendChild( table ) + .appendChild( tr ) + .appendChild( trChild ); + + trStyle = window.getComputedStyle( tr ); + reliableTrDimensionsVal = parseInt( trStyle.height ) > 3; + + documentElement.removeChild( table ); + } + return reliableTrDimensionsVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !isAttached( elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + + +function addGetHookIf( conditionFn, hookFn ) { + + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} + + +var cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style, + vendorProps = {}; + +// Return a vendor-prefixed property or undefined +function vendorPropName( name ) { + + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} + +// Return a potentially-mapped jQuery.cssProps or vendor prefixed property +function finalPropName( name ) { + var final = jQuery.cssProps[ name ] || vendorProps[ name ]; + + if ( final ) { + return final; + } + if ( name in emptyStyle ) { + return name; + } + return vendorProps[ name ] = vendorPropName( name ) || name; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }; + +function setPositiveNumber( _elem, value, subtract ) { + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? + + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} + +function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { + var i = dimension === "width" ? 1 : 0, + extra = 0, + delta = 0; + + // Adjustment may not be necessary + if ( box === ( isBorderBox ? "border" : "content" ) ) { + return 0; + } + + for ( ; i < 4; i += 2 ) { + + // Both box models exclude margin + if ( box === "margin" ) { + delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); + } + + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if ( !isBorderBox ) { + + // Add padding + delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // For "border" or "margin", add border + if ( box !== "padding" ) { + delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + + // But still keep track of it otherwise + } else { + extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" + } else { + + // For "content", subtract padding + if ( box === "content" ) { + delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // For "content" or "padding", subtract border + if ( box !== "margin" ) { + delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + // Account for positive content-box scroll gutter when requested by providing computedVal + if ( !isBorderBox && computedVal >= 0 ) { + + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max( 0, Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + computedVal - + delta - + extra - + 0.5 + + // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter + // Use an explicit zero to avoid NaN (gh-3964) + ) ) || 0; + } + + return delta; +} + +function getWidthOrHeight( elem, dimension, extra ) { + + // Start with computed style + var styles = getStyles( elem ), + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). + // Fake content-box until we know it's needed to know the true value. + boxSizingNeeded = !support.boxSizingReliable() || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox, + + val = curCSS( elem, dimension, styles ), + offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); + + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if ( rnumnonpx.test( val ) ) { + if ( !extra ) { + return val; + } + val = "auto"; + } + + + // Support: IE 9 - 11 only + // Use offsetWidth/offsetHeight for when box sizing is unreliable. + // In those cases, the computed value can be trusted to be border-box. + if ( ( !support.boxSizingReliable() && isBorderBox || + + // Support: IE 10 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Interestingly, in some cases IE 9 doesn't suffer from this issue. + !support.reliableTrDimensions() && nodeName( elem, "tr" ) || + + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + val === "auto" || + + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + + // Make sure the element is visible & connected + elem.getClientRects().length ) { + + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // Where available, offsetWidth/offsetHeight approximate border box dimensions. + // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the + // retrieved value as a content box dimension. + valueIsBorderBox = offsetProp in elem; + if ( valueIsBorderBox ) { + val = elem[ offsetProp ]; + } + } + + // Normalize "" and auto + val = parseFloat( val ) || 0; + + // Adjust for the element's box model + return ( val + + boxModelAdjustment( + elem, + dimension, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles, + + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val + ) + ) + "px"; +} + +jQuery.extend( { + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "animationIterationCount": true, + "columnCount": true, + "fillOpacity": true, + "flexGrow": true, + "flexShrink": true, + "fontWeight": true, + "gridArea": true, + "gridColumn": true, + "gridColumnEnd": true, + "gridColumnStart": true, + "gridRow": true, + "gridRowEnd": true, + "gridRowStart": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: {}, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // Convert "+=" or "-=" to relative numbers (#7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + + // Fixes bug #9237 + type = "number"; + } + + // Make sure that null and NaN values aren't set (#7116) + if ( value == null || value !== value ) { + return; + } + + // If a number was passed in, add the unit (except for certain CSS properties) + // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append + // "px" to a few hardcoded values. + if ( type === "number" && !isCustomProp ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); + } + + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } + } + + } else { + + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ); + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } + + return val; + } +} ); + +jQuery.each( [ "height", "width" ], function( _i, dimension ) { + jQuery.cssHooks[ dimension ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); + } + }, + + set: function( elem, value, extra ) { + var matches, + styles = getStyles( elem ), + + // Only read styles.position if the test has a chance to fail + // to avoid forcing a reflow. + scrollboxSizeBuggy = !support.scrollboxSize() && + styles.position === "absolute", + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) + boxSizingNeeded = scrollboxSizeBuggy || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + subtract = extra ? + boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) : + 0; + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if ( isBorderBox && scrollboxSizeBuggy ) { + subtract -= Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + parseFloat( styles[ dimension ] ) - + boxModelAdjustment( elem, dimension, "border", false, styles ) - + 0.5 + ); + } + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ dimension ] = value; + value = jQuery.css( elem, dimension ); + } + + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); + +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( prefix !== "margin" ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); + +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); + + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && ( + jQuery.cssHooks[ tween.prop ] || + tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; + }, + _default: "swing" +}; + +jQuery.fx = Tween.prototype.init; + +// Back compat <1.8 extension point +jQuery.fx.step = {}; + + + + +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; + +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } + + jQuery.fx.tick(); + } +} + +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = Date.now() ); +} + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { + + // We're done with this property + return tween; + } + } +} + +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); + + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always( function() { + + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } + + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 15 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); + } + } + + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { + + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } + } +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { + + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; + } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + result.stop.bind( result ); + } + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); + + return animation; +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + + tweener: function( props, callback ) { + if ( isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, + + prefilters: [ defaultPrefilter ], + + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !isFunction( easing ) && easing + }; + + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { + + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() + + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue ) { + this.queue( type || "fx", [] ); + } + + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // Enable finishing flag on private data + data.finish = true; + + // Empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // Turn off finishing flag + delete data.finish; + } ); + } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); + +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); + +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; + + fxNow = Date.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; + +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { + return; + } + + inProgress = true; + schedule(); +}; + +jQuery.fx.stop = function() { + inProgress = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 +}; + + +// Based off of the plugin by Clint Helfers, with permission. +// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; + + +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); + + input.type = "checkbox"; + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); + + +var boolHook, + attrHandle = jQuery.expr.attrHandle; + +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); + +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } + + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } + + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } + } +} ); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; + +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; + + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); + + if ( !isXML ) { + + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); + + + + +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; + +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); + +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + return ( elem[ name ] = value ); + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }; +} + +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); + + + + + // Strip and collapse whitespace according to HTML spec + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } + + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +function classesToArray( value ) { + if ( Array.isArray( value ) ) { + return value; + } + if ( typeof value === "string" ) { + return value.match( rnothtmlwhite ) || []; + } + return []; +} + +jQuery.fn.extend( { + addClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) > -1 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isValidValue = type === "string" || Array.isArray( value ); + + if ( typeof stateVal === "boolean" && isValidValue ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); + } + + return this.each( function() { + var className, i, self, classNames; + + if ( isValidValue ) { + + // Toggle individual class names + i = 0; + self = jQuery( this ); + classNames = classesToArray( value ); + + while ( ( className = classNames[ i++ ] ) ) { + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } + } + } ); + }, + + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; + } + } + + return false; + } +} ); + + + + +var rreturn = /\r/g; + +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, valueIsFunction, + elem = this[ 0 ]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; + } + + return; + } + + valueIsFunction = isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( valueIsFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + } ); + } +} ); + +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { + + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + + // Support: IE <=10 - 11 only + // option.text throws exceptions (#14686, #14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +} ); + +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); + + + + +// Return jQuery for attributes-only inclusion + + +support.focusin = "onfocusin" in window; + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + stopPropagationCallback = function( e ) { + e.stopPropagation(); + }; + +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = lastElement = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + lastElement = cur; + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( + dataPriv.get( cur, "events" ) || Object.create( null ) + )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + + if ( event.isPropagationStopped() ) { + lastElement.addEventListener( type, stopPropagationCallback ); + } + + elem[ type ](); + + if ( event.isPropagationStopped() ) { + lastElement.removeEventListener( type, stopPropagationCallback ); + } + + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); + + jQuery.event.trigger( e, null, elem ); + } + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +// Support: Firefox <=44 +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + + // Handle: regular nodes (via `this.ownerDocument`), window + // (via `this.document`) & document (via `this`). + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + dataPriv.remove( doc, fix ); + + } else { + dataPriv.access( doc, fix, attaches ); + } + } + }; + } ); +} +var location = window.location; + +var nonce = { guid: Date.now() }; + +var rquery = ( /\?/ ); + + + +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) { + xml = undefined; + } + + if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; +}; + + +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && toType( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + if ( a == null ) { + return ""; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ) + .filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ) + .map( function( _i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, + rhash = /#.*$/, + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), + + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + originAnchor.href = location.href; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( isFunction( func ) ) { + + // For each dataType in the dataTypeExpression + while ( ( dataType = dataTypes[ i++ ] ) ) { + + // Prepend if requested + if ( dataType[ 0 ] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); + + // Otherwise append + } else { + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + } ); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} + +jQuery.extend( { + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: "GET", + isLocal: rlocalProtocol.test( location.protocol ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + 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" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": JSON.parse, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + + // URL without anti-cache param + cacheURL, + + // Response headers + responseHeadersString, + responseHeaders, + + // timeout handle + timeoutTimer, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + + // To know if global events are to be dispatched + fireGlobals, + + // Loop variable + i, + + // uncached part of the url + uncached, + + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + + // Callbacks context + callbackContext = s.context || s, + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + + // Status-dependent callbacks + statusCode = s.statusCode || {}, + + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + + // Default abort message + strAbort = "canceled", + + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( completed ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() + " " ] = + ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) + .concat( match[ 2 ] ); + } + } + match = responseHeaders[ key.toLowerCase() + " " ]; + } + return match == null ? null : match.join( ", " ); + }, + + // Raw string + getAllResponseHeaders: function() { + return completed ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( completed == null ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ); + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; + + // A cross-domain request is in order when the origin doesn't match the current origin. + if ( s.crossDomain == null ) { + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 15 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( completed ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available and should be processed, append data to url + if ( s.data && ( s.processData || typeof s.data === "string" ) ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add or update anti-cache param if needed + if ( s.cache === false ) { + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + + uncached; + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + + // Abort if not done already and return + return jqXHR.abort(); + } + + // Aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + completed = false; + transport.send( requestHeaders, done ); + } catch ( e ) { + + // Rethrow post-completion exceptions + if ( completed ) { + throw e; + } + + // Propagate others as results + done( -1, e ); + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Ignore repeat invocations + if ( completed ) { + return; + } + + completed = true; + + // Clear timeout if it exists + if ( timeoutTimer ) { + window.clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Use a noop converter for missing script + if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) { + s.converters[ "text script" ] = function() {}; + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader( "Last-Modified" ); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader( "etag" ); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + + // Extract error from statusText and normalize for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +} ); + +jQuery.each( [ "get", "post" ], function( _i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + + // Shift arguments if data argument was omitted + if ( isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + +jQuery.ajaxPrefilter( function( s ) { + var i; + for ( i in s.headers ) { + if ( i.toLowerCase() === "content-type" ) { + s.contentType = s.headers[ i ] || ""; + } + } +} ); + + +jQuery._evalUrl = function( url, options, doc ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + + // Only evaluate the response if it is successful (gh-4126) + // dataFilter is not invoked for failure responses, so using it instead + // of the default converter is kludgy but it works. + converters: { + "text script": function() {} + }, + dataFilter: function( response ) { + jQuery.globalEval( response, options, doc ); + } + } ); +}; + + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); + } + + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var htmlIsFunction = isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; + } +} ); + + +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; + + + + +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; + +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.ontimeout = + xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // #14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; + } + } + }, + + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +} ); + + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + +// Install script dataType +jQuery.ajaxSetup( { + accepts: { + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /\b(?:java|ecma)script\b/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +} ); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +} ); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + + // This transport only deals with cross domain or forced-by-attrs requests + if ( s.crossDomain || s.scriptAttrs ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery( " + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

ExpireTimeOption

+
+
+
ExpireTimeOption: “never” or datetime
+
+
+
+
+

PermissionOption

+
+
+
PermissionOption: Literal[“write”, “read”, “full”, “deny”]
+
+
+
+
+

TokenDataList

+
+

Attributes:

+
+
+
token: GenericToken
+
name: str
+
type: str
+
permission: PermissionOption
+
serie_number: Optional[str]
+
last_authorization: Optional[datetime]
+
verification_code: Optional[str]
+
expire_time: ExpireTimeOption
+
ref_id: str
+
created_at: datetime
+
created_by: Optional[str]
+
+
+
+
+
+

Query

+
+

Attributes:

+
+
+
page: Optional[int]
+
amount: Optional[int]
+
fields: Optional[list[str]]
+
filter: Optional[any]
+
orderBy: Optional[list[“asc” or “desc”]]
+
+
+
+
Example:
+
    orderBy = {
+        "page": 1,
+        "fields": ["id", "name"],
+        "filter": {"name": "test"},
+        "amount": 20,
+        "orderBy": ["name": "asc"]
+    }
+
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 59f4366..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= poetry run sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index dc1312a..0000000 --- a/docs/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.https://www.sphinx-doc.org/ - exit /b 1 -) - -if "%1" == "" goto help - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index 30148d1..0000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,64 +0,0 @@ -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -import os -import sys - -sys.path.insert(0, os.path.abspath("../..")) - - -# -- Project information ----------------------------------------------------- - -project = "" -copyright = "2022, Tago LLC" -author = "Tago LLC" - - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - "sphinx.ext.todo", - "sphinx.ext.viewcode", - "sphinx.ext.autodoc", - "sphinx.ext.napoleon", - "sphinx.ext.intersphinx", -] - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -html_logo = "https://assets.tago.io/tagoio/sdk.png" -html_favicon = "https://assets.tago.io/tagoio/favicon.ico" -html_title = "TagoIO SDK for Python" -html_show_sphinx = False -html_search_language = "en" - -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = [] - -# -- Options for HTML output ------------------------------------------------- -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = "alabaster" - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] diff --git a/genindex.html b/genindex.html new file mode 100644 index 0000000..cf57705 --- /dev/null +++ b/genindex.html @@ -0,0 +1,111 @@ + + + + + + + + Index — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + +

Index

+ +
+ +
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..977dd46 --- /dev/null +++ b/index.html @@ -0,0 +1,266 @@ + + + + + + + + + Documentation — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Documentation

+
+

Installation

+
pip install tagoio-sdk
+
+
+
+
+

Quick Example

+

If you have any questions, feel free to check our Help Center.

+
+

Insert Device Data

+
from tagoio_sdk import Device
+
+myDevice = Device({ "token": "my_device_token" })
+result = myDevice.sendData({
+    "variable": "temperature",
+    "unit": "F",
+    "value": 55,
+    "time": "2015-11-03 13:44:33",
+    "location": { "lat": 42.2974279, "lng": -85.628292 },
+})
+
+
+
+
+

Edit Device Data

+
from tagoio_sdk import Device
+
+myDevice = Device({"token": "my_device_token"})
+result = myDevice.editData(
+    {
+        "id": "id_of_the_data_item",
+        "value": "123",
+        "time": "2022-04-01 12:34:56",
+        "location": {"lat": 42.2974279, "lng": -85.628292},
+    }
+)
+
+
+
+
+
+

Development Commands

+
poetry install
+poetry run pytest tests/
+poetry run flake8 src
+
+
+
+
+

License

+

TagoIO SDK for Python is released under the [Apache-2.0 License]

+ +
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/objects.inv b/objects.inv new file mode 100644 index 0000000..75f93fd Binary files /dev/null and b/objects.inv differ diff --git a/poetry.lock b/poetry.lock deleted file mode 100644 index 110945d..0000000 --- a/poetry.lock +++ /dev/null @@ -1,1333 +0,0 @@ -# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. - -[[package]] -name = "aiohttp" -version = "3.8.4" -description = "Async http client/server framework (asyncio)" -category = "main" -optional = false -python-versions = ">=3.6" -files = [ - {file = "aiohttp-3.8.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5ce45967538fb747370308d3145aa68a074bdecb4f3a300869590f725ced69c1"}, - {file = "aiohttp-3.8.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b744c33b6f14ca26b7544e8d8aadff6b765a80ad6164fb1a430bbadd593dfb1a"}, - {file = "aiohttp-3.8.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1a45865451439eb320784918617ba54b7a377e3501fb70402ab84d38c2cd891b"}, - {file = "aiohttp-3.8.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a86d42d7cba1cec432d47ab13b6637bee393a10f664c425ea7b305d1301ca1a3"}, - {file = "aiohttp-3.8.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee3c36df21b5714d49fc4580247947aa64bcbe2939d1b77b4c8dcb8f6c9faecc"}, - {file = "aiohttp-3.8.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:176a64b24c0935869d5bbc4c96e82f89f643bcdf08ec947701b9dbb3c956b7dd"}, - {file = "aiohttp-3.8.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c844fd628851c0bc309f3c801b3a3d58ce430b2ce5b359cd918a5a76d0b20cb5"}, - {file = "aiohttp-3.8.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5393fb786a9e23e4799fec788e7e735de18052f83682ce2dfcabaf1c00c2c08e"}, - {file = "aiohttp-3.8.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e4b09863aae0dc965c3ef36500d891a3ff495a2ea9ae9171e4519963c12ceefd"}, - {file = "aiohttp-3.8.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:adfbc22e87365a6e564c804c58fc44ff7727deea782d175c33602737b7feadb6"}, - {file = "aiohttp-3.8.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:147ae376f14b55f4f3c2b118b95be50a369b89b38a971e80a17c3fd623f280c9"}, - {file = "aiohttp-3.8.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:eafb3e874816ebe2a92f5e155f17260034c8c341dad1df25672fb710627c6949"}, - {file = "aiohttp-3.8.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c6cc15d58053c76eacac5fa9152d7d84b8d67b3fde92709195cb984cfb3475ea"}, - {file = "aiohttp-3.8.4-cp310-cp310-win32.whl", hash = "sha256:59f029a5f6e2d679296db7bee982bb3d20c088e52a2977e3175faf31d6fb75d1"}, - {file = "aiohttp-3.8.4-cp310-cp310-win_amd64.whl", hash = "sha256:fe7ba4a51f33ab275515f66b0a236bcde4fb5561498fe8f898d4e549b2e4509f"}, - {file = "aiohttp-3.8.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3d8ef1a630519a26d6760bc695842579cb09e373c5f227a21b67dc3eb16cfea4"}, - {file = "aiohttp-3.8.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b3f2e06a512e94722886c0827bee9807c86a9f698fac6b3aee841fab49bbfb4"}, - {file = "aiohttp-3.8.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3a80464982d41b1fbfe3154e440ba4904b71c1a53e9cd584098cd41efdb188ef"}, - {file = "aiohttp-3.8.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b631e26df63e52f7cce0cce6507b7a7f1bc9b0c501fcde69742130b32e8782f"}, - {file = "aiohttp-3.8.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f43255086fe25e36fd5ed8f2ee47477408a73ef00e804cb2b5cba4bf2ac7f5e"}, - {file = "aiohttp-3.8.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4d347a172f866cd1d93126d9b239fcbe682acb39b48ee0873c73c933dd23bd0f"}, - {file = "aiohttp-3.8.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3fec6a4cb5551721cdd70473eb009d90935b4063acc5f40905d40ecfea23e05"}, - {file = "aiohttp-3.8.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80a37fe8f7c1e6ce8f2d9c411676e4bc633a8462844e38f46156d07a7d401654"}, - {file = "aiohttp-3.8.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d1e6a862b76f34395a985b3cd39a0d949ca80a70b6ebdea37d3ab39ceea6698a"}, - {file = "aiohttp-3.8.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:cd468460eefef601ece4428d3cf4562459157c0f6523db89365202c31b6daebb"}, - {file = "aiohttp-3.8.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:618c901dd3aad4ace71dfa0f5e82e88b46ef57e3239fc7027773cb6d4ed53531"}, - {file = "aiohttp-3.8.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:652b1bff4f15f6287550b4670546a2947f2a4575b6c6dff7760eafb22eacbf0b"}, - {file = "aiohttp-3.8.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80575ba9377c5171407a06d0196b2310b679dc752d02a1fcaa2bc20b235dbf24"}, - {file = "aiohttp-3.8.4-cp311-cp311-win32.whl", hash = "sha256:bbcf1a76cf6f6dacf2c7f4d2ebd411438c275faa1dc0c68e46eb84eebd05dd7d"}, - {file = "aiohttp-3.8.4-cp311-cp311-win_amd64.whl", hash = "sha256:6e74dd54f7239fcffe07913ff8b964e28b712f09846e20de78676ce2a3dc0bfc"}, - {file = "aiohttp-3.8.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:880e15bb6dad90549b43f796b391cfffd7af373f4646784795e20d92606b7a51"}, - {file = "aiohttp-3.8.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb96fa6b56bb536c42d6a4a87dfca570ff8e52de2d63cabebfd6fb67049c34b6"}, - {file = "aiohttp-3.8.4-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4a6cadebe132e90cefa77e45f2d2f1a4b2ce5c6b1bfc1656c1ddafcfe4ba8131"}, - {file = "aiohttp-3.8.4-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f352b62b45dff37b55ddd7b9c0c8672c4dd2eb9c0f9c11d395075a84e2c40f75"}, - {file = "aiohttp-3.8.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ab43061a0c81198d88f39aaf90dae9a7744620978f7ef3e3708339b8ed2ef01"}, - {file = "aiohttp-3.8.4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9cb1565a7ad52e096a6988e2ee0397f72fe056dadf75d17fa6b5aebaea05622"}, - {file = "aiohttp-3.8.4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:1b3ea7edd2d24538959c1c1abf97c744d879d4e541d38305f9bd7d9b10c9ec41"}, - {file = "aiohttp-3.8.4-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:7c7837fe8037e96b6dd5cfcf47263c1620a9d332a87ec06a6ca4564e56bd0f36"}, - {file = "aiohttp-3.8.4-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:3b90467ebc3d9fa5b0f9b6489dfb2c304a1db7b9946fa92aa76a831b9d587e99"}, - {file = "aiohttp-3.8.4-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:cab9401de3ea52b4b4c6971db5fb5c999bd4260898af972bf23de1c6b5dd9d71"}, - {file = "aiohttp-3.8.4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:d1f9282c5f2b5e241034a009779e7b2a1aa045f667ff521e7948ea9b56e0c5ff"}, - {file = "aiohttp-3.8.4-cp36-cp36m-win32.whl", hash = "sha256:5e14f25765a578a0a634d5f0cd1e2c3f53964553a00347998dfdf96b8137f777"}, - {file = "aiohttp-3.8.4-cp36-cp36m-win_amd64.whl", hash = "sha256:4c745b109057e7e5f1848c689ee4fb3a016c8d4d92da52b312f8a509f83aa05e"}, - {file = "aiohttp-3.8.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:aede4df4eeb926c8fa70de46c340a1bc2c6079e1c40ccf7b0eae1313ffd33519"}, - {file = "aiohttp-3.8.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ddaae3f3d32fc2cb4c53fab020b69a05c8ab1f02e0e59665c6f7a0d3a5be54f"}, - {file = "aiohttp-3.8.4-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4eb3b82ca349cf6fadcdc7abcc8b3a50ab74a62e9113ab7a8ebc268aad35bb9"}, - {file = "aiohttp-3.8.4-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9bcb89336efa095ea21b30f9e686763f2be4478f1b0a616969551982c4ee4c3b"}, - {file = "aiohttp-3.8.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c08e8ed6fa3d477e501ec9db169bfac8140e830aa372d77e4a43084d8dd91ab"}, - {file = "aiohttp-3.8.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c6cd05ea06daca6ad6a4ca3ba7fe7dc5b5de063ff4daec6170ec0f9979f6c332"}, - {file = "aiohttp-3.8.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7a00a9ed8d6e725b55ef98b1b35c88013245f35f68b1b12c5cd4100dddac333"}, - {file = "aiohttp-3.8.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:de04b491d0e5007ee1b63a309956eaed959a49f5bb4e84b26c8f5d49de140fa9"}, - {file = "aiohttp-3.8.4-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:40653609b3bf50611356e6b6554e3a331f6879fa7116f3959b20e3528783e699"}, - {file = "aiohttp-3.8.4-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:dbf3a08a06b3f433013c143ebd72c15cac33d2914b8ea4bea7ac2c23578815d6"}, - {file = "aiohttp-3.8.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:854f422ac44af92bfe172d8e73229c270dc09b96535e8a548f99c84f82dde241"}, - {file = "aiohttp-3.8.4-cp37-cp37m-win32.whl", hash = "sha256:aeb29c84bb53a84b1a81c6c09d24cf33bb8432cc5c39979021cc0f98c1292a1a"}, - {file = "aiohttp-3.8.4-cp37-cp37m-win_amd64.whl", hash = "sha256:db3fc6120bce9f446d13b1b834ea5b15341ca9ff3f335e4a951a6ead31105480"}, - {file = "aiohttp-3.8.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:fabb87dd8850ef0f7fe2b366d44b77d7e6fa2ea87861ab3844da99291e81e60f"}, - {file = "aiohttp-3.8.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:91f6d540163f90bbaef9387e65f18f73ffd7c79f5225ac3d3f61df7b0d01ad15"}, - {file = "aiohttp-3.8.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d265f09a75a79a788237d7f9054f929ced2e69eb0bb79de3798c468d8a90f945"}, - {file = "aiohttp-3.8.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d89efa095ca7d442a6d0cbc755f9e08190ba40069b235c9886a8763b03785da"}, - {file = "aiohttp-3.8.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4dac314662f4e2aa5009977b652d9b8db7121b46c38f2073bfeed9f4049732cd"}, - {file = "aiohttp-3.8.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe11310ae1e4cd560035598c3f29d86cef39a83d244c7466f95c27ae04850f10"}, - {file = "aiohttp-3.8.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ddb2a2026c3f6a68c3998a6c47ab6795e4127315d2e35a09997da21865757f8"}, - {file = "aiohttp-3.8.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e75b89ac3bd27d2d043b234aa7b734c38ba1b0e43f07787130a0ecac1e12228a"}, - {file = "aiohttp-3.8.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6e601588f2b502c93c30cd5a45bfc665faaf37bbe835b7cfd461753068232074"}, - {file = "aiohttp-3.8.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a5d794d1ae64e7753e405ba58e08fcfa73e3fad93ef9b7e31112ef3c9a0efb52"}, - {file = "aiohttp-3.8.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:a1f4689c9a1462f3df0a1f7e797791cd6b124ddbee2b570d34e7f38ade0e2c71"}, - {file = "aiohttp-3.8.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:3032dcb1c35bc330134a5b8a5d4f68c1a87252dfc6e1262c65a7e30e62298275"}, - {file = "aiohttp-3.8.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8189c56eb0ddbb95bfadb8f60ea1b22fcfa659396ea36f6adcc521213cd7b44d"}, - {file = "aiohttp-3.8.4-cp38-cp38-win32.whl", hash = "sha256:33587f26dcee66efb2fff3c177547bd0449ab7edf1b73a7f5dea1e38609a0c54"}, - {file = "aiohttp-3.8.4-cp38-cp38-win_amd64.whl", hash = "sha256:e595432ac259af2d4630008bf638873d69346372d38255774c0e286951e8b79f"}, - {file = "aiohttp-3.8.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5a7bdf9e57126dc345b683c3632e8ba317c31d2a41acd5800c10640387d193ed"}, - {file = "aiohttp-3.8.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:22f6eab15b6db242499a16de87939a342f5a950ad0abaf1532038e2ce7d31567"}, - {file = "aiohttp-3.8.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7235604476a76ef249bd64cb8274ed24ccf6995c4a8b51a237005ee7a57e8643"}, - {file = "aiohttp-3.8.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ea9eb976ffdd79d0e893869cfe179a8f60f152d42cb64622fca418cd9b18dc2a"}, - {file = "aiohttp-3.8.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:92c0cea74a2a81c4c76b62ea1cac163ecb20fb3ba3a75c909b9fa71b4ad493cf"}, - {file = "aiohttp-3.8.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:493f5bc2f8307286b7799c6d899d388bbaa7dfa6c4caf4f97ef7521b9cb13719"}, - {file = "aiohttp-3.8.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0a63f03189a6fa7c900226e3ef5ba4d3bd047e18f445e69adbd65af433add5a2"}, - {file = "aiohttp-3.8.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:10c8cefcff98fd9168cdd86c4da8b84baaa90bf2da2269c6161984e6737bf23e"}, - {file = "aiohttp-3.8.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bca5f24726e2919de94f047739d0a4fc01372801a3672708260546aa2601bf57"}, - {file = "aiohttp-3.8.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:03baa76b730e4e15a45f81dfe29a8d910314143414e528737f8589ec60cf7391"}, - {file = "aiohttp-3.8.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:8c29c77cc57e40f84acef9bfb904373a4e89a4e8b74e71aa8075c021ec9078c2"}, - {file = "aiohttp-3.8.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:03543dcf98a6619254b409be2d22b51f21ec66272be4ebda7b04e6412e4b2e14"}, - {file = "aiohttp-3.8.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:17b79c2963db82086229012cff93ea55196ed31f6493bb1ccd2c62f1724324e4"}, - {file = "aiohttp-3.8.4-cp39-cp39-win32.whl", hash = "sha256:34ce9f93a4a68d1272d26030655dd1b58ff727b3ed2a33d80ec433561b03d67a"}, - {file = "aiohttp-3.8.4-cp39-cp39-win_amd64.whl", hash = "sha256:41a86a69bb63bb2fc3dc9ad5ea9f10f1c9c8e282b471931be0268ddd09430b04"}, - {file = "aiohttp-3.8.4.tar.gz", hash = "sha256:bf2e1a9162c1e441bf805a1fd166e249d574ca04e03b34f97e2928769e91ab5c"}, -] - -[package.dependencies] -aiosignal = ">=1.1.2" -async-timeout = ">=4.0.0a3,<5.0" -attrs = ">=17.3.0" -charset-normalizer = ">=2.0,<4.0" -frozenlist = ">=1.1.1" -multidict = ">=4.5,<7.0" -yarl = ">=1.0,<2.0" - -[package.extras] -speedups = ["Brotli", "aiodns", "cchardet"] - -[[package]] -name = "aiosignal" -version = "1.3.1" -description = "aiosignal: a list of registered asynchronous callbacks" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17"}, - {file = "aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc"}, -] - -[package.dependencies] -frozenlist = ">=1.1.0" - -[[package]] -name = "alabaster" -version = "0.7.13" -description = "A configurable sidebar-enabled Sphinx theme" -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"}, - {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, -] - -[[package]] -name = "async-timeout" -version = "4.0.2" -description = "Timeout context manager for asyncio programs" -category = "main" -optional = false -python-versions = ">=3.6" -files = [ - {file = "async-timeout-4.0.2.tar.gz", hash = "sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15"}, - {file = "async_timeout-4.0.2-py3-none-any.whl", hash = "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c"}, -] - -[[package]] -name = "atomicwrites" -version = "1.4.1" -description = "Atomic file writes." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, -] - -[[package]] -name = "attrs" -version = "22.2.0" -description = "Classes Without Boilerplate" -category = "main" -optional = false -python-versions = ">=3.6" -files = [ - {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"}, - {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"}, -] - -[package.extras] -cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"] -dev = ["attrs[docs,tests]"] -docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope.interface"] -tests = ["attrs[tests-no-zope]", "zope.interface"] -tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy (>=0.971,<0.990)", "mypy (>=0.971,<0.990)", "pympler", "pympler", "pytest (>=4.3.0)", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-mypy-plugins", "pytest-xdist[psutil]", "pytest-xdist[psutil]"] - -[[package]] -name = "babel" -version = "2.12.1" -description = "Internationalization utilities" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "Babel-2.12.1-py3-none-any.whl", hash = "sha256:b4246fb7677d3b98f501a39d43396d3cafdc8eadb045f4a31be01863f655c610"}, - {file = "Babel-2.12.1.tar.gz", hash = "sha256:cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455"}, -] - -[[package]] -name = "bidict" -version = "0.22.1" -description = "The bidirectional mapping library for Python." -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "bidict-0.22.1-py3-none-any.whl", hash = "sha256:6ef212238eb884b664f28da76f33f1d28b260f665fc737b413b287d5487d1e7b"}, - {file = "bidict-0.22.1.tar.gz", hash = "sha256:1e0f7f74e4860e6d0943a05d4134c63a2fad86f3d4732fb265bd79e4e856d81d"}, -] - -[package.extras] -docs = ["furo", "sphinx", "sphinx-copybutton"] -lint = ["pre-commit"] -test = ["hypothesis", "pytest", "pytest-benchmark[histogram]", "pytest-cov", "pytest-xdist", "sortedcollections", "sortedcontainers", "sphinx"] - -[[package]] -name = "black" -version = "22.12.0" -description = "The uncompromising code formatter." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"}, - {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"}, - {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"}, - {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"}, - {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"}, - {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"}, - {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"}, - {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"}, - {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"}, - {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"}, - {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"}, - {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"}, -] - -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -pathspec = ">=0.9.0" -platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} -typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] - -[[package]] -name = "certifi" -version = "2022.12.7" -description = "Python package for providing Mozilla's CA Bundle." -category = "main" -optional = false -python-versions = ">=3.6" -files = [ - {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"}, - {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"}, -] - -[[package]] -name = "charset-normalizer" -version = "3.0.1" -description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" -optional = false -python-versions = "*" -files = [ - {file = "charset-normalizer-3.0.1.tar.gz", hash = "sha256:ebea339af930f8ca5d7a699b921106c6e29c617fe9606fa7baa043c1cdae326f"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:88600c72ef7587fe1708fd242b385b6ed4b8904976d5da0893e31df8b3480cb6"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c75ffc45f25324e68ab238cb4b5c0a38cd1c3d7f1fb1f72b5541de469e2247db"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:db72b07027db150f468fbada4d85b3b2729a3db39178abf5c543b784c1254539"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62595ab75873d50d57323a91dd03e6966eb79c41fa834b7a1661ed043b2d404d"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ff6f3db31555657f3163b15a6b7c6938d08df7adbfc9dd13d9d19edad678f1e8"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:772b87914ff1152b92a197ef4ea40efe27a378606c39446ded52c8f80f79702e"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70990b9c51340e4044cfc394a81f614f3f90d41397104d226f21e66de668730d"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:292d5e8ba896bbfd6334b096e34bffb56161c81408d6d036a7dfa6929cff8783"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:2edb64ee7bf1ed524a1da60cdcd2e1f6e2b4f66ef7c077680739f1641f62f555"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:31a9ddf4718d10ae04d9b18801bd776693487cbb57d74cc3458a7673f6f34639"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:44ba614de5361b3e5278e1241fda3dc1838deed864b50a10d7ce92983797fa76"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:12db3b2c533c23ab812c2b25934f60383361f8a376ae272665f8e48b88e8e1c6"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c512accbd6ff0270939b9ac214b84fb5ada5f0409c44298361b2f5e13f9aed9e"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-win32.whl", hash = "sha256:502218f52498a36d6bf5ea77081844017bf7982cdbe521ad85e64cabee1b608b"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:601f36512f9e28f029d9481bdaf8e89e5148ac5d89cffd3b05cd533eeb423b59"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0298eafff88c99982a4cf66ba2efa1128e4ddaca0b05eec4c456bbc7db691d8d"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a8d0fc946c784ff7f7c3742310cc8a57c5c6dc31631269876a88b809dbeff3d3"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:87701167f2a5c930b403e9756fab1d31d4d4da52856143b609e30a1ce7160f3c"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14e76c0f23218b8f46c4d87018ca2e441535aed3632ca134b10239dfb6dadd6b"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0c0a590235ccd933d9892c627dec5bc7511ce6ad6c1011fdf5b11363022746c1"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c7fe7afa480e3e82eed58e0ca89f751cd14d767638e2550c77a92a9e749c317"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:79909e27e8e4fcc9db4addea88aa63f6423ebb171db091fb4373e3312cb6d603"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8ac7b6a045b814cf0c47f3623d21ebd88b3e8cf216a14790b455ea7ff0135d18"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:72966d1b297c741541ca8cf1223ff262a6febe52481af742036a0b296e35fa5a"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:f9d0c5c045a3ca9bedfc35dca8526798eb91a07aa7a2c0fee134c6c6f321cbd7"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:5995f0164fa7df59db4746112fec3f49c461dd6b31b841873443bdb077c13cfc"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4a8fcf28c05c1f6d7e177a9a46a1c52798bfe2ad80681d275b10dcf317deaf0b"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:761e8904c07ad053d285670f36dd94e1b6ab7f16ce62b9805c475b7aa1cffde6"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-win32.whl", hash = "sha256:71140351489970dfe5e60fc621ada3e0f41104a5eddaca47a7acb3c1b851d6d3"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:9ab77acb98eba3fd2a85cd160851816bfce6871d944d885febf012713f06659c"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:84c3990934bae40ea69a82034912ffe5a62c60bbf6ec5bc9691419641d7d5c9a"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:74292fc76c905c0ef095fe11e188a32ebd03bc38f3f3e9bcb85e4e6db177b7ea"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c95a03c79bbe30eec3ec2b7f076074f4281526724c8685a42872974ef4d36b72"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f4c39b0e3eac288fedc2b43055cfc2ca7a60362d0e5e87a637beac5d801ef478"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:df2c707231459e8a4028eabcd3cfc827befd635b3ef72eada84ab13b52e1574d"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:93ad6d87ac18e2a90b0fe89df7c65263b9a99a0eb98f0a3d2e079f12a0735837"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:59e5686dd847347e55dffcc191a96622f016bc0ad89105e24c14e0d6305acbc6"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:cd6056167405314a4dc3c173943f11249fa0f1b204f8b51ed4bde1a9cd1834dc"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:083c8d17153ecb403e5e1eb76a7ef4babfc2c48d58899c98fcaa04833e7a2f9a"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:f5057856d21e7586765171eac8b9fc3f7d44ef39425f85dbcccb13b3ebea806c"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:7eb33a30d75562222b64f569c642ff3dc6689e09adda43a082208397f016c39a"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-win32.whl", hash = "sha256:95dea361dd73757c6f1c0a1480ac499952c16ac83f7f5f4f84f0658a01b8ef41"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:eaa379fcd227ca235d04152ca6704c7cb55564116f8bc52545ff357628e10602"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3e45867f1f2ab0711d60c6c71746ac53537f1684baa699f4f668d4c6f6ce8e14"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cadaeaba78750d58d3cc6ac4d1fd867da6fc73c88156b7a3212a3cd4819d679d"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:911d8a40b2bef5b8bbae2e36a0b103f142ac53557ab421dc16ac4aafee6f53dc"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:503e65837c71b875ecdd733877d852adbc465bd82c768a067badd953bf1bc5a3"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a60332922359f920193b1d4826953c507a877b523b2395ad7bc716ddd386d866"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:16a8663d6e281208d78806dbe14ee9903715361cf81f6d4309944e4d1e59ac5b"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:a16418ecf1329f71df119e8a65f3aa68004a3f9383821edcb20f0702934d8087"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:9d9153257a3f70d5f69edf2325357251ed20f772b12e593f3b3377b5f78e7ef8"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:02a51034802cbf38db3f89c66fb5d2ec57e6fe7ef2f4a44d070a593c3688667b"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:2e396d70bc4ef5325b72b593a72c8979999aa52fb8bcf03f701c1b03e1166918"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:11b53acf2411c3b09e6af37e4b9005cba376c872503c8f28218c7243582df45d"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-win32.whl", hash = "sha256:0bf2dae5291758b6f84cf923bfaa285632816007db0330002fa1de38bfcb7154"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:2c03cc56021a4bd59be889c2b9257dae13bf55041a3372d3295416f86b295fb5"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:024e606be3ed92216e2b6952ed859d86b4cfa52cd5bc5f050e7dc28f9b43ec42"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4b0d02d7102dd0f997580b51edc4cebcf2ab6397a7edf89f1c73b586c614272c"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:358a7c4cb8ba9b46c453b1dd8d9e431452d5249072e4f56cfda3149f6ab1405e"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81d6741ab457d14fdedc215516665050f3822d3e56508921cc7239f8c8e66a58"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8b8af03d2e37866d023ad0ddea594edefc31e827fee64f8de5611a1dbc373174"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9cf4e8ad252f7c38dd1f676b46514f92dc0ebeb0db5552f5f403509705e24753"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e696f0dd336161fca9adbb846875d40752e6eba585843c768935ba5c9960722b"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c22d3fe05ce11d3671297dc8973267daa0f938b93ec716e12e0f6dee81591dc1"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:109487860ef6a328f3eec66f2bf78b0b72400280d8f8ea05f69c51644ba6521a"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:37f8febc8ec50c14f3ec9637505f28e58d4f66752207ea177c1d67df25da5aed"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:f97e83fa6c25693c7a35de154681fcc257c1c41b38beb0304b9c4d2d9e164479"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:a152f5f33d64a6be73f1d30c9cc82dfc73cec6477ec268e7c6e4c7d23c2d2291"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:39049da0ffb96c8cbb65cbf5c5f3ca3168990adf3551bd1dee10c48fce8ae820"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-win32.whl", hash = "sha256:4457ea6774b5611f4bed5eaa5df55f70abde42364d498c5134b7ef4c6958e20e"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:e62164b50f84e20601c1ff8eb55620d2ad25fb81b59e3cd776a1902527a788af"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8eade758719add78ec36dc13201483f8e9b5d940329285edcd5f70c0a9edbd7f"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8499ca8f4502af841f68135133d8258f7b32a53a1d594aa98cc52013fff55678"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3fc1c4a2ffd64890aebdb3f97e1278b0cc72579a08ca4de8cd2c04799a3a22be"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00d3ffdaafe92a5dc603cb9bd5111aaa36dfa187c8285c543be562e61b755f6b"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c2ac1b08635a8cd4e0cbeaf6f5e922085908d48eb05d44c5ae9eabab148512ca"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f6f45710b4459401609ebebdbcfb34515da4fc2aa886f95107f556ac69a9147e"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ae1de54a77dc0d6d5fcf623290af4266412a7c4be0b1ff7444394f03f5c54e3"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3b590df687e3c5ee0deef9fc8c547d81986d9a1b56073d82de008744452d6541"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab5de034a886f616a5668aa5d098af2b5385ed70142090e2a31bcbd0af0fdb3d"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9cb3032517f1627cc012dbc80a8ec976ae76d93ea2b5feaa9d2a5b8882597579"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:608862a7bf6957f2333fc54ab4399e405baad0163dc9f8d99cb236816db169d4"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0f438ae3532723fb6ead77e7c604be7c8374094ef4ee2c5e03a3a17f1fca256c"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:356541bf4381fa35856dafa6a965916e54bed415ad8a24ee6de6e37deccf2786"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-win32.whl", hash = "sha256:39cf9ed17fe3b1bc81f33c9ceb6ce67683ee7526e65fde1447c772afc54a1bb8"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:0a11e971ed097d24c534c037d298ad32c6ce81a45736d31e0ff0ad37ab437d59"}, - {file = "charset_normalizer-3.0.1-py3-none-any.whl", hash = "sha256:7e189e2e1d3ed2f4aebabd2d5b0f931e883676e51c7624826e0a4e5fe8a0bf24"}, -] - -[[package]] -name = "click" -version = "8.1.3" -description = "Composable command line interface toolkit" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, - {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - -[[package]] -name = "colorama" -version = "0.4.6" -description = "Cross-platform colored terminal text." -category = "dev" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] - -[[package]] -name = "docutils" -version = "0.17.1" -description = "Docutils -- Python Documentation Utilities" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -files = [ - {file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"}, - {file = "docutils-0.17.1.tar.gz", hash = "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"}, -] - -[[package]] -name = "flake8" -version = "4.0.1" -description = "the modular source code checker: pep8 pyflakes and co" -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"}, - {file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"}, -] - -[package.dependencies] -mccabe = ">=0.6.0,<0.7.0" -pycodestyle = ">=2.8.0,<2.9.0" -pyflakes = ">=2.4.0,<2.5.0" - -[[package]] -name = "flake8-annotations" -version = "2.9.1" -description = "Flake8 Type Annotation Checks" -category = "dev" -optional = false -python-versions = ">=3.7,<4.0" -files = [ - {file = "flake8-annotations-2.9.1.tar.gz", hash = "sha256:11f09efb99ae63c8f9d6b492b75fe147fbc323179fddfe00b2e56eefeca42f57"}, - {file = "flake8_annotations-2.9.1-py3-none-any.whl", hash = "sha256:a4385158a7a9fc8af1d8820a2f4c8d03387997006a83f5f8bfe5bc6085bdf88a"}, -] - -[package.dependencies] -attrs = ">=21.4" -flake8 = ">=3.7" - -[[package]] -name = "flake8-black" -version = "0.3.6" -description = "flake8 plugin to call black as a code style validator" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "flake8-black-0.3.6.tar.gz", hash = "sha256:0dfbca3274777792a5bcb2af887a4cad72c72d0e86c94e08e3a3de151bb41c34"}, - {file = "flake8_black-0.3.6-py3-none-any.whl", hash = "sha256:fe8ea2eca98d8a504f22040d9117347f6b367458366952862ac3586e7d4eeaca"}, -] - -[package.dependencies] -black = ">=22.1.0" -flake8 = ">=3" -tomli = {version = "*", markers = "python_version < \"3.11\""} - -[package.extras] -develop = ["build", "twine"] - -[[package]] -name = "frozenlist" -version = "1.3.3" -description = "A list-like structure which implements collections.abc.MutableSequence" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "frozenlist-1.3.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ff8bf625fe85e119553b5383ba0fb6aa3d0ec2ae980295aaefa552374926b3f4"}, - {file = "frozenlist-1.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dfbac4c2dfcc082fcf8d942d1e49b6aa0766c19d3358bd86e2000bf0fa4a9cf0"}, - {file = "frozenlist-1.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b1c63e8d377d039ac769cd0926558bb7068a1f7abb0f003e3717ee003ad85530"}, - {file = "frozenlist-1.3.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7fdfc24dcfce5b48109867c13b4cb15e4660e7bd7661741a391f821f23dfdca7"}, - {file = "frozenlist-1.3.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2c926450857408e42f0bbc295e84395722ce74bae69a3b2aa2a65fe22cb14b99"}, - {file = "frozenlist-1.3.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1841e200fdafc3d51f974d9d377c079a0694a8f06de2e67b48150328d66d5483"}, - {file = "frozenlist-1.3.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f470c92737afa7d4c3aacc001e335062d582053d4dbe73cda126f2d7031068dd"}, - {file = "frozenlist-1.3.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:783263a4eaad7c49983fe4b2e7b53fa9770c136c270d2d4bbb6d2192bf4d9caf"}, - {file = "frozenlist-1.3.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:924620eef691990dfb56dc4709f280f40baee568c794b5c1885800c3ecc69816"}, - {file = "frozenlist-1.3.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ae4dc05c465a08a866b7a1baf360747078b362e6a6dbeb0c57f234db0ef88ae0"}, - {file = "frozenlist-1.3.3-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:bed331fe18f58d844d39ceb398b77d6ac0b010d571cba8267c2e7165806b00ce"}, - {file = "frozenlist-1.3.3-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:02c9ac843e3390826a265e331105efeab489ffaf4dd86384595ee8ce6d35ae7f"}, - {file = "frozenlist-1.3.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:9545a33965d0d377b0bc823dcabf26980e77f1b6a7caa368a365a9497fb09420"}, - {file = "frozenlist-1.3.3-cp310-cp310-win32.whl", hash = "sha256:d5cd3ab21acbdb414bb6c31958d7b06b85eeb40f66463c264a9b343a4e238642"}, - {file = "frozenlist-1.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:b756072364347cb6aa5b60f9bc18e94b2f79632de3b0190253ad770c5df17db1"}, - {file = "frozenlist-1.3.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b4395e2f8d83fbe0c627b2b696acce67868793d7d9750e90e39592b3626691b7"}, - {file = "frozenlist-1.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:14143ae966a6229350021384870458e4777d1eae4c28d1a7aa47f24d030e6678"}, - {file = "frozenlist-1.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5d8860749e813a6f65bad8285a0520607c9500caa23fea6ee407e63debcdbef6"}, - {file = "frozenlist-1.3.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23d16d9f477bb55b6154654e0e74557040575d9d19fe78a161bd33d7d76808e8"}, - {file = "frozenlist-1.3.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eb82dbba47a8318e75f679690190c10a5e1f447fbf9df41cbc4c3afd726d88cb"}, - {file = "frozenlist-1.3.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9309869032abb23d196cb4e4db574232abe8b8be1339026f489eeb34a4acfd91"}, - {file = "frozenlist-1.3.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a97b4fe50b5890d36300820abd305694cb865ddb7885049587a5678215782a6b"}, - {file = "frozenlist-1.3.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c188512b43542b1e91cadc3c6c915a82a5eb95929134faf7fd109f14f9892ce4"}, - {file = "frozenlist-1.3.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:303e04d422e9b911a09ad499b0368dc551e8c3cd15293c99160c7f1f07b59a48"}, - {file = "frozenlist-1.3.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:0771aed7f596c7d73444c847a1c16288937ef988dc04fb9f7be4b2aa91db609d"}, - {file = "frozenlist-1.3.3-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:66080ec69883597e4d026f2f71a231a1ee9887835902dbe6b6467d5a89216cf6"}, - {file = "frozenlist-1.3.3-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:41fe21dc74ad3a779c3d73a2786bdf622ea81234bdd4faf90b8b03cad0c2c0b4"}, - {file = "frozenlist-1.3.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f20380df709d91525e4bee04746ba612a4df0972c1b8f8e1e8af997e678c7b81"}, - {file = "frozenlist-1.3.3-cp311-cp311-win32.whl", hash = "sha256:f30f1928162e189091cf4d9da2eac617bfe78ef907a761614ff577ef4edfb3c8"}, - {file = "frozenlist-1.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:a6394d7dadd3cfe3f4b3b186e54d5d8504d44f2d58dcc89d693698e8b7132b32"}, - {file = "frozenlist-1.3.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8df3de3a9ab8325f94f646609a66cbeeede263910c5c0de0101079ad541af332"}, - {file = "frozenlist-1.3.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0693c609e9742c66ba4870bcee1ad5ff35462d5ffec18710b4ac89337ff16e27"}, - {file = "frozenlist-1.3.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cd4210baef299717db0a600d7a3cac81d46ef0e007f88c9335db79f8979c0d3d"}, - {file = "frozenlist-1.3.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:394c9c242113bfb4b9aa36e2b80a05ffa163a30691c7b5a29eba82e937895d5e"}, - {file = "frozenlist-1.3.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6327eb8e419f7d9c38f333cde41b9ae348bec26d840927332f17e887a8dcb70d"}, - {file = "frozenlist-1.3.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e24900aa13212e75e5b366cb9065e78bbf3893d4baab6052d1aca10d46d944c"}, - {file = "frozenlist-1.3.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3843f84a6c465a36559161e6c59dce2f2ac10943040c2fd021cfb70d58c4ad56"}, - {file = "frozenlist-1.3.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:84610c1502b2461255b4c9b7d5e9c48052601a8957cd0aea6ec7a7a1e1fb9420"}, - {file = "frozenlist-1.3.3-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:c21b9aa40e08e4f63a2f92ff3748e6b6c84d717d033c7b3438dd3123ee18f70e"}, - {file = "frozenlist-1.3.3-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:efce6ae830831ab6a22b9b4091d411698145cb9b8fc869e1397ccf4b4b6455cb"}, - {file = "frozenlist-1.3.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:40de71985e9042ca00b7953c4f41eabc3dc514a2d1ff534027f091bc74416401"}, - {file = "frozenlist-1.3.3-cp37-cp37m-win32.whl", hash = "sha256:180c00c66bde6146a860cbb81b54ee0df350d2daf13ca85b275123bbf85de18a"}, - {file = "frozenlist-1.3.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9bbbcedd75acdfecf2159663b87f1bb5cfc80e7cd99f7ddd9d66eb98b14a8411"}, - {file = "frozenlist-1.3.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:034a5c08d36649591be1cbb10e09da9f531034acfe29275fc5454a3b101ce41a"}, - {file = "frozenlist-1.3.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ba64dc2b3b7b158c6660d49cdb1d872d1d0bf4e42043ad8d5006099479a194e5"}, - {file = "frozenlist-1.3.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:47df36a9fe24054b950bbc2db630d508cca3aa27ed0566c0baf661225e52c18e"}, - {file = "frozenlist-1.3.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:008a054b75d77c995ea26629ab3a0c0d7281341f2fa7e1e85fa6153ae29ae99c"}, - {file = "frozenlist-1.3.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:841ea19b43d438a80b4de62ac6ab21cfe6827bb8a9dc62b896acc88eaf9cecba"}, - {file = "frozenlist-1.3.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e235688f42b36be2b6b06fc37ac2126a73b75fb8d6bc66dd632aa35286238703"}, - {file = "frozenlist-1.3.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca713d4af15bae6e5d79b15c10c8522859a9a89d3b361a50b817c98c2fb402a2"}, - {file = "frozenlist-1.3.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ac5995f2b408017b0be26d4a1d7c61bce106ff3d9e3324374d66b5964325448"}, - {file = "frozenlist-1.3.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a4ae8135b11652b08a8baf07631d3ebfe65a4c87909dbef5fa0cdde440444ee4"}, - {file = "frozenlist-1.3.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4ea42116ceb6bb16dbb7d526e242cb6747b08b7710d9782aa3d6732bd8d27649"}, - {file = "frozenlist-1.3.3-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:810860bb4bdce7557bc0febb84bbd88198b9dbc2022d8eebe5b3590b2ad6c842"}, - {file = "frozenlist-1.3.3-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:ee78feb9d293c323b59a6f2dd441b63339a30edf35abcb51187d2fc26e696d13"}, - {file = "frozenlist-1.3.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:0af2e7c87d35b38732e810befb9d797a99279cbb85374d42ea61c1e9d23094b3"}, - {file = "frozenlist-1.3.3-cp38-cp38-win32.whl", hash = "sha256:899c5e1928eec13fd6f6d8dc51be23f0d09c5281e40d9cf4273d188d9feeaf9b"}, - {file = "frozenlist-1.3.3-cp38-cp38-win_amd64.whl", hash = "sha256:7f44e24fa70f6fbc74aeec3e971f60a14dde85da364aa87f15d1be94ae75aeef"}, - {file = "frozenlist-1.3.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2b07ae0c1edaa0a36339ec6cce700f51b14a3fc6545fdd32930d2c83917332cf"}, - {file = "frozenlist-1.3.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ebb86518203e12e96af765ee89034a1dbb0c3c65052d1b0c19bbbd6af8a145e1"}, - {file = "frozenlist-1.3.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5cf820485f1b4c91e0417ea0afd41ce5cf5965011b3c22c400f6d144296ccbc0"}, - {file = "frozenlist-1.3.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c11e43016b9024240212d2a65043b70ed8dfd3b52678a1271972702d990ac6d"}, - {file = "frozenlist-1.3.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8fa3c6e3305aa1146b59a09b32b2e04074945ffcfb2f0931836d103a2c38f936"}, - {file = "frozenlist-1.3.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:352bd4c8c72d508778cf05ab491f6ef36149f4d0cb3c56b1b4302852255d05d5"}, - {file = "frozenlist-1.3.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:65a5e4d3aa679610ac6e3569e865425b23b372277f89b5ef06cf2cdaf1ebf22b"}, - {file = "frozenlist-1.3.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1e2c1185858d7e10ff045c496bbf90ae752c28b365fef2c09cf0fa309291669"}, - {file = "frozenlist-1.3.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f163d2fd041c630fed01bc48d28c3ed4a3b003c00acd396900e11ee5316b56bb"}, - {file = "frozenlist-1.3.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:05cdb16d09a0832eedf770cb7bd1fe57d8cf4eaf5aced29c4e41e3f20b30a784"}, - {file = "frozenlist-1.3.3-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:8bae29d60768bfa8fb92244b74502b18fae55a80eac13c88eb0b496d4268fd2d"}, - {file = "frozenlist-1.3.3-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:eedab4c310c0299961ac285591acd53dc6723a1ebd90a57207c71f6e0c2153ab"}, - {file = "frozenlist-1.3.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3bbdf44855ed8f0fbcd102ef05ec3012d6a4fd7c7562403f76ce6a52aeffb2b1"}, - {file = "frozenlist-1.3.3-cp39-cp39-win32.whl", hash = "sha256:efa568b885bca461f7c7b9e032655c0c143d305bf01c30caf6db2854a4532b38"}, - {file = "frozenlist-1.3.3-cp39-cp39-win_amd64.whl", hash = "sha256:cfe33efc9cb900a4c46f91a5ceba26d6df370ffddd9ca386eb1d4f0ad97b9ea9"}, - {file = "frozenlist-1.3.3.tar.gz", hash = "sha256:58bcc55721e8a90b88332d6cd441261ebb22342e238296bb330968952fbb3a6a"}, -] - -[[package]] -name = "idna" -version = "3.4" -description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" -optional = false -python-versions = ">=3.5" -files = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, -] - -[[package]] -name = "imagesize" -version = "1.4.1" -description = "Getting image size from png/jpeg/jpeg2000/gif file" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, - {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, -] - -[[package]] -name = "importlib-metadata" -version = "6.0.0" -description = "Read metadata from Python packages" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "importlib_metadata-6.0.0-py3-none-any.whl", hash = "sha256:7efb448ec9a5e313a57655d35aa54cd3e01b7e1fbcf72dce1bf06119420f5bad"}, - {file = "importlib_metadata-6.0.0.tar.gz", hash = "sha256:e354bedeb60efa6affdcc8ae121b73544a7aa74156d047311948f6d711cd378d"}, -] - -[package.dependencies] -zipp = ">=0.5" - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -perf = ["ipython"] -testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"] - -[[package]] -name = "iniconfig" -version = "2.0.0" -description = "brain-dead simple config-ini parsing" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, - {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, -] - -[[package]] -name = "isort" -version = "5.12.0" -description = "A Python utility / library to sort Python imports." -category = "dev" -optional = false -python-versions = ">=3.8.0" -files = [ - {file = "isort-5.12.0-py3-none-any.whl", hash = "sha256:f84c2818376e66cf843d497486ea8fed8700b340f308f076c6fb1229dff318b6"}, - {file = "isort-5.12.0.tar.gz", hash = "sha256:8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504"}, -] - -[package.extras] -colors = ["colorama (>=0.4.3)"] -pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"] -plugins = ["setuptools"] -requirements-deprecated-finder = ["pip-api", "pipreqs"] - -[[package]] -name = "jinja2" -version = "3.1.2" -description = "A very fast and expressive template engine." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, - {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, -] - -[package.dependencies] -MarkupSafe = ">=2.0" - -[package.extras] -i18n = ["Babel (>=2.7)"] - -[[package]] -name = "markupsafe" -version = "2.1.2" -description = "Safely add untrusted strings to HTML/XML markup." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:665a36ae6f8f20a4676b53224e33d456a6f5a72657d9c83c2aa00765072f31f7"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:340bea174e9761308703ae988e982005aedf427de816d1afe98147668cc03036"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22152d00bf4a9c7c83960521fc558f55a1adbc0631fbb00a9471e097b19d72e1"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28057e985dace2f478e042eaa15606c7efccb700797660629da387eb289b9323"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca244fa73f50a800cf8c3ebf7fd93149ec37f5cb9596aa8873ae2c1d23498601"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d9d971ec1e79906046aa3ca266de79eac42f1dbf3612a05dc9368125952bd1a1"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e007132af78ea9df29495dbf7b5824cb71648d7133cf7848a2a5dd00d36f9ff"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7313ce6a199651c4ed9d7e4cfb4aa56fe923b1adf9af3b420ee14e6d9a73df65"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-win32.whl", hash = "sha256:c4a549890a45f57f1ebf99c067a4ad0cb423a05544accaf2b065246827ed9603"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-win_amd64.whl", hash = "sha256:835fb5e38fd89328e9c81067fd642b3593c33e1e17e2fdbf77f5676abb14a156"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2ec4f2d48ae59bbb9d1f9d7efb9236ab81429a764dedca114f5fdabbc3788013"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:608e7073dfa9e38a85d38474c082d4281f4ce276ac0010224eaba11e929dd53a"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:65608c35bfb8a76763f37036547f7adfd09270fbdbf96608be2bead319728fcd"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2bfb563d0211ce16b63c7cb9395d2c682a23187f54c3d79bfec33e6705473c6"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:da25303d91526aac3672ee6d49a2f3db2d9502a4a60b55519feb1a4c7714e07d"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:9cad97ab29dfc3f0249b483412c85c8ef4766d96cdf9dcf5a1e3caa3f3661cf1"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:085fd3201e7b12809f9e6e9bc1e5c96a368c8523fad5afb02afe3c051ae4afcc"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1bea30e9bf331f3fef67e0a3877b2288593c98a21ccb2cf29b74c581a4eb3af0"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-win32.whl", hash = "sha256:7df70907e00c970c60b9ef2938d894a9381f38e6b9db73c5be35e59d92e06625"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-win_amd64.whl", hash = "sha256:e55e40ff0cc8cc5c07996915ad367fa47da6b3fc091fdadca7f5403239c5fec3"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a6e40afa7f45939ca356f348c8e23048e02cb109ced1eb8420961b2f40fb373a"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cf877ab4ed6e302ec1d04952ca358b381a882fbd9d1b07cccbfd61783561f98a"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63ba06c9941e46fa389d389644e2d8225e0e3e5ebcc4ff1ea8506dce646f8c8a"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f1cd098434e83e656abf198f103a8207a8187c0fc110306691a2e94a78d0abb2"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:55f44b440d491028addb3b88f72207d71eeebfb7b5dbf0643f7c023ae1fba619"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a6f2fcca746e8d5910e18782f976489939d54a91f9411c32051b4aab2bd7c513"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0b462104ba25f1ac006fdab8b6a01ebbfbce9ed37fd37fd4acd70c67c973e460"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-win32.whl", hash = "sha256:7668b52e102d0ed87cb082380a7e2e1e78737ddecdde129acadb0eccc5423859"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6d6607f98fcf17e534162f0709aaad3ab7a96032723d8ac8750ffe17ae5a0666"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a806db027852538d2ad7555b203300173dd1b77ba116de92da9afbc3a3be3eed"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a4abaec6ca3ad8660690236d11bfe28dfd707778e2442b45addd2f086d6ef094"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f03a532d7dee1bed20bc4884194a16160a2de9ffc6354b3878ec9682bb623c54"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4cf06cdc1dda95223e9d2d3c58d3b178aa5dacb35ee7e3bbac10e4e1faacb419"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:22731d79ed2eb25059ae3df1dfc9cb1546691cc41f4e3130fe6bfbc3ecbbecfa"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f8ffb705ffcf5ddd0e80b65ddf7bed7ee4f5a441ea7d3419e861a12eaf41af58"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8db032bf0ce9022a8e41a22598eefc802314e81b879ae093f36ce9ddf39ab1ba"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2298c859cfc5463f1b64bd55cb3e602528db6fa0f3cfd568d3605c50678f8f03"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-win32.whl", hash = "sha256:50c42830a633fa0cf9e7d27664637532791bfc31c731a87b202d2d8ac40c3ea2"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-win_amd64.whl", hash = "sha256:bb06feb762bade6bf3c8b844462274db0c76acc95c52abe8dbed28ae3d44a147"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:99625a92da8229df6d44335e6fcc558a5037dd0a760e11d84be2260e6f37002f"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8bca7e26c1dd751236cfb0c6c72d4ad61d986e9a41bbf76cb445f69488b2a2bd"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40627dcf047dadb22cd25ea7ecfe9cbf3bbbad0482ee5920b582f3809c97654f"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40dfd3fefbef579ee058f139733ac336312663c6706d1163b82b3003fb1925c4"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:090376d812fb6ac5f171e5938e82e7f2d7adc2b629101cec0db8b267815c85e2"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2e7821bffe00aa6bd07a23913b7f4e01328c3d5cc0b40b36c0bd81d362faeb65"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c0a33bc9f02c2b17c3ea382f91b4db0e6cde90b63b296422a939886a7a80de1c"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b8526c6d437855442cdd3d87eede9c425c4445ea011ca38d937db299382e6fa3"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-win32.whl", hash = "sha256:137678c63c977754abe9086a3ec011e8fd985ab90631145dfb9294ad09c102a7"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-win_amd64.whl", hash = "sha256:0576fe974b40a400449768941d5d0858cc624e3249dfd1e0c33674e5c7ca7aed"}, - {file = "MarkupSafe-2.1.2.tar.gz", hash = "sha256:abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d"}, -] - -[[package]] -name = "mccabe" -version = "0.6.1" -description = "McCabe checker, plugin for flake8" -category = "dev" -optional = false -python-versions = "*" -files = [ - {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, - {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, -] - -[[package]] -name = "multidict" -version = "6.0.4" -description = "multidict implementation" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b1a97283e0c85772d613878028fec909f003993e1007eafa715b24b377cb9b8"}, - {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eeb6dcc05e911516ae3d1f207d4b0520d07f54484c49dfc294d6e7d63b734171"}, - {file = "multidict-6.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d6d635d5209b82a3492508cf5b365f3446afb65ae7ebd755e70e18f287b0adf7"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c048099e4c9e9d615545e2001d3d8a4380bd403e1a0578734e0d31703d1b0c0b"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea20853c6dbbb53ed34cb4d080382169b6f4554d394015f1bef35e881bf83547"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:16d232d4e5396c2efbbf4f6d4df89bfa905eb0d4dc5b3549d872ab898451f569"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36c63aaa167f6c6b04ef2c85704e93af16c11d20de1d133e39de6a0e84582a93"}, - {file = "multidict-6.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:64bdf1086b6043bf519869678f5f2757f473dee970d7abf6da91ec00acb9cb98"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:43644e38f42e3af682690876cff722d301ac585c5b9e1eacc013b7a3f7b696a0"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7582a1d1030e15422262de9f58711774e02fa80df0d1578995c76214f6954988"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:ddff9c4e225a63a5afab9dd15590432c22e8057e1a9a13d28ed128ecf047bbdc"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ee2a1ece51b9b9e7752e742cfb661d2a29e7bcdba2d27e66e28a99f1890e4fa0"}, - {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a2e4369eb3d47d2034032a26c7a80fcb21a2cb22e1173d761a162f11e562caa5"}, - {file = "multidict-6.0.4-cp310-cp310-win32.whl", hash = "sha256:574b7eae1ab267e5f8285f0fe881f17efe4b98c39a40858247720935b893bba8"}, - {file = "multidict-6.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dcbb0906e38440fa3e325df2359ac6cb043df8e58c965bb45f4e406ecb162cc"}, - {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0dfad7a5a1e39c53ed00d2dd0c2e36aed4650936dc18fd9a1826a5ae1cad6f03"}, - {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:64da238a09d6039e3bd39bb3aee9c21a5e34f28bfa5aa22518581f910ff94af3"}, - {file = "multidict-6.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ff959bee35038c4624250473988b24f846cbeb2c6639de3602c073f10410ceba"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01a3a55bd90018c9c080fbb0b9f4891db37d148a0a18722b42f94694f8b6d4c9"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c5cb09abb18c1ea940fb99360ea0396f34d46566f157122c92dfa069d3e0e982"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:666daae833559deb2d609afa4490b85830ab0dfca811a98b70a205621a6109fe"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11bdf3f5e1518b24530b8241529d2050014c884cf18b6fc69c0c2b30ca248710"}, - {file = "multidict-6.0.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d18748f2d30f94f498e852c67d61261c643b349b9d2a581131725595c45ec6c"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:458f37be2d9e4c95e2d8866a851663cbc76e865b78395090786f6cd9b3bbf4f4"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b1a2eeedcead3a41694130495593a559a668f382eee0727352b9a41e1c45759a"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7d6ae9d593ef8641544d6263c7fa6408cc90370c8cb2bbb65f8d43e5b0351d9c"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5979b5632c3e3534e42ca6ff856bb24b2e3071b37861c2c727ce220d80eee9ed"}, - {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:dcfe792765fab89c365123c81046ad4103fcabbc4f56d1c1997e6715e8015461"}, - {file = "multidict-6.0.4-cp311-cp311-win32.whl", hash = "sha256:3601a3cece3819534b11d4efc1eb76047488fddd0c85a3948099d5da4d504636"}, - {file = "multidict-6.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:81a4f0b34bd92df3da93315c6a59034df95866014ac08535fc819f043bfd51f0"}, - {file = "multidict-6.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:67040058f37a2a51ed8ea8f6b0e6ee5bd78ca67f169ce6122f3e2ec80dfe9b78"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:853888594621e6604c978ce2a0444a1e6e70c8d253ab65ba11657659dcc9100f"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:39ff62e7d0f26c248b15e364517a72932a611a9b75f35b45be078d81bdb86603"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:af048912e045a2dc732847d33821a9d84ba553f5c5f028adbd364dd4765092ac"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1e8b901e607795ec06c9e42530788c45ac21ef3aaa11dbd0c69de543bfb79a9"}, - {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62501642008a8b9871ddfccbf83e4222cf8ac0d5aeedf73da36153ef2ec222d2"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:99b76c052e9f1bc0721f7541e5e8c05db3941eb9ebe7b8553c625ef88d6eefde"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:509eac6cf09c794aa27bcacfd4d62c885cce62bef7b2c3e8b2e49d365b5003fe"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:21a12c4eb6ddc9952c415f24eef97e3e55ba3af61f67c7bc388dcdec1404a067"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:5cad9430ab3e2e4fa4a2ef4450f548768400a2ac635841bc2a56a2052cdbeb87"}, - {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ab55edc2e84460694295f401215f4a58597f8f7c9466faec545093045476327d"}, - {file = "multidict-6.0.4-cp37-cp37m-win32.whl", hash = "sha256:5a4dcf02b908c3b8b17a45fb0f15b695bf117a67b76b7ad18b73cf8e92608775"}, - {file = "multidict-6.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:6ed5f161328b7df384d71b07317f4d8656434e34591f20552c7bcef27b0ab88e"}, - {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5fc1b16f586f049820c5c5b17bb4ee7583092fa0d1c4e28b5239181ff9532e0c"}, - {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1502e24330eb681bdaa3eb70d6358e818e8e8f908a22a1851dfd4e15bc2f8161"}, - {file = "multidict-6.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b692f419760c0e65d060959df05f2a531945af31fda0c8a3b3195d4efd06de11"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45e1ecb0379bfaab5eef059f50115b54571acfbe422a14f668fc8c27ba410e7e"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddd3915998d93fbcd2566ddf9cf62cdb35c9e093075f862935573d265cf8f65d"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:59d43b61c59d82f2effb39a93c48b845efe23a3852d201ed2d24ba830d0b4cf2"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc8e1d0c705233c5dd0c5e6460fbad7827d5d36f310a0fadfd45cc3029762258"}, - {file = "multidict-6.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6aa0418fcc838522256761b3415822626f866758ee0bc6632c9486b179d0b52"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6748717bb10339c4760c1e63da040f5f29f5ed6e59d76daee30305894069a660"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4d1a3d7ef5e96b1c9e92f973e43aa5e5b96c659c9bc3124acbbd81b0b9c8a951"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4372381634485bec7e46718edc71528024fcdc6f835baefe517b34a33c731d60"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:fc35cb4676846ef752816d5be2193a1e8367b4c1397b74a565a9d0389c433a1d"}, - {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:4b9d9e4e2b37daddb5c23ea33a3417901fa7c7b3dee2d855f63ee67a0b21e5b1"}, - {file = "multidict-6.0.4-cp38-cp38-win32.whl", hash = "sha256:e41b7e2b59679edfa309e8db64fdf22399eec4b0b24694e1b2104fb789207779"}, - {file = "multidict-6.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:d6c254ba6e45d8e72739281ebc46ea5eb5f101234f3ce171f0e9f5cc86991480"}, - {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:16ab77bbeb596e14212e7bab8429f24c1579234a3a462105cda4a66904998664"}, - {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc779e9e6f7fda81b3f9aa58e3a6091d49ad528b11ed19f6621408806204ad35"}, - {file = "multidict-6.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ceef517eca3e03c1cceb22030a3e39cb399ac86bff4e426d4fc6ae49052cc60"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:281af09f488903fde97923c7744bb001a9b23b039a909460d0f14edc7bf59706"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:52f2dffc8acaba9a2f27174c41c9e57f60b907bb9f096b36b1a1f3be71c6284d"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b41156839806aecb3641f3208c0dafd3ac7775b9c4c422d82ee2a45c34ba81ca"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5e3fc56f88cc98ef8139255cf8cd63eb2c586531e43310ff859d6bb3a6b51f1"}, - {file = "multidict-6.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8316a77808c501004802f9beebde51c9f857054a0c871bd6da8280e718444449"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f70b98cd94886b49d91170ef23ec5c0e8ebb6f242d734ed7ed677b24d50c82cf"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bf6774e60d67a9efe02b3616fee22441d86fab4c6d335f9d2051d19d90a40063"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:e69924bfcdda39b722ef4d9aa762b2dd38e4632b3641b1d9a57ca9cd18f2f83a"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:6b181d8c23da913d4ff585afd1155a0e1194c0b50c54fcfe286f70cdaf2b7176"}, - {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:52509b5be062d9eafc8170e53026fbc54cf3b32759a23d07fd935fb04fc22d95"}, - {file = "multidict-6.0.4-cp39-cp39-win32.whl", hash = "sha256:27c523fbfbdfd19c6867af7346332b62b586eed663887392cff78d614f9ec313"}, - {file = "multidict-6.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:33029f5734336aa0d4c0384525da0387ef89148dc7191aae00ca5fb23d7aafc2"}, - {file = "multidict-6.0.4.tar.gz", hash = "sha256:3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49"}, -] - -[[package]] -name = "mypy-extensions" -version = "1.0.0" -description = "Type system extensions for programs checked with the mypy type checker." -category = "dev" -optional = false -python-versions = ">=3.5" -files = [ - {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, - {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, -] - -[[package]] -name = "packaging" -version = "23.0" -description = "Core utilities for Python packages" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "packaging-23.0-py3-none-any.whl", hash = "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2"}, - {file = "packaging-23.0.tar.gz", hash = "sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"}, -] - -[[package]] -name = "pathspec" -version = "0.11.0" -description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pathspec-0.11.0-py3-none-any.whl", hash = "sha256:3a66eb970cbac598f9e5ccb5b2cf58930cd8e3ed86d393d541eaf2d8b1705229"}, - {file = "pathspec-0.11.0.tar.gz", hash = "sha256:64d338d4e0914e91c1792321e6907b5a593f1ab1851de7fc269557a21b30ebbc"}, -] - -[[package]] -name = "platformdirs" -version = "3.0.0" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "platformdirs-3.0.0-py3-none-any.whl", hash = "sha256:b1d5eb14f221506f50d6604a561f4c5786d9e80355219694a1b244bcd96f4567"}, - {file = "platformdirs-3.0.0.tar.gz", hash = "sha256:8a1228abb1ef82d788f74139988b137e78692984ec7b08eaa6c65f1723af28f9"}, -] - -[package.extras] -docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] - -[[package]] -name = "pluggy" -version = "1.0.0" -description = "plugin and hook calling mechanisms for python" -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, - {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, -] - -[package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] - -[[package]] -name = "py" -version = "1.11.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -files = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] - -[[package]] -name = "pycodestyle" -version = "2.8.0" -description = "Python style guide checker" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -files = [ - {file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"}, - {file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"}, -] - -[[package]] -name = "pyflakes" -version = "2.4.0" -description = "passive checker of Python programs" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "pyflakes-2.4.0-py2.py3-none-any.whl", hash = "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e"}, - {file = "pyflakes-2.4.0.tar.gz", hash = "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"}, -] - -[[package]] -name = "pygments" -version = "2.14.0" -description = "Pygments is a syntax highlighting package written in Python." -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "Pygments-2.14.0-py3-none-any.whl", hash = "sha256:fa7bd7bd2771287c0de303af8bfdfc731f51bd2c6a47ab69d117138893b82717"}, - {file = "Pygments-2.14.0.tar.gz", hash = "sha256:b3ed06a9e8ac9a9aae5a6f5dbe78a8a58655d17b43b93c078f094ddc476ae297"}, -] - -[package.extras] -plugins = ["importlib-metadata"] - -[[package]] -name = "pytest" -version = "6.2.5" -description = "pytest: simple powerful testing with Python" -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, - {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, -] - -[package.dependencies] -atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} -attrs = ">=19.2.0" -colorama = {version = "*", markers = "sys_platform == \"win32\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -py = ">=1.8.2" -toml = "*" - -[package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] - -[[package]] -name = "python-dateutil" -version = "2.8.2" -description = "Extensions to the standard Python datetime module" -category = "main" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -files = [ - {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, - {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, -] - -[package.dependencies] -six = ">=1.5" - -[[package]] -name = "python-engineio" -version = "4.3.4" -description = "Engine.IO server and client for Python" -category = "main" -optional = false -python-versions = ">=3.6" -files = [ - {file = "python-engineio-4.3.4.tar.gz", hash = "sha256:d8d8b072799c36cadcdcc2b40d2a560ce09797ab3d2d596b2ad519a5e4df19ae"}, - {file = "python_engineio-4.3.4-py3-none-any.whl", hash = "sha256:7454314a529bba20e745928601ffeaf101c1b5aca9a6c4e48ad397803d10ea0c"}, -] - -[package.extras] -asyncio-client = ["aiohttp (>=3.4)"] -client = ["requests (>=2.21.0)", "websocket-client (>=0.54.0)"] - -[[package]] -name = "python-socketio" -version = "5.7.2" -description = "Socket.IO server and client for Python" -category = "main" -optional = false -python-versions = ">=3.6" -files = [ - {file = "python-socketio-5.7.2.tar.gz", hash = "sha256:92395062d9db3c13d30e7cdedaa0e1330bba78505645db695415f9a3c628d097"}, - {file = "python_socketio-5.7.2-py3-none-any.whl", hash = "sha256:d9a9f047e6fdd306c852fbac36516f4b495c2096f8ad9ceb8803b8e5ff5622e3"}, -] - -[package.dependencies] -aiohttp = {version = ">=3.4", optional = true, markers = "extra == \"asyncio_client\""} -bidict = ">=0.21.0" -python-engineio = ">=4.3.0" - -[package.extras] -asyncio-client = ["aiohttp (>=3.4)"] -client = ["requests (>=2.21.0)", "websocket-client (>=0.54.0)"] - -[[package]] -name = "requests" -version = "2.28.2" -description = "Python HTTP for Humans." -category = "main" -optional = false -python-versions = ">=3.7, <4" -files = [ - {file = "requests-2.28.2-py3-none-any.whl", hash = "sha256:64299f4909223da747622c030b781c0d7811e359c37124b4bd368fb8c6518baa"}, - {file = "requests-2.28.2.tar.gz", hash = "sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf"}, -] - -[package.dependencies] -certifi = ">=2017.4.17" -charset-normalizer = ">=2,<4" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<1.27" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] - -[[package]] -name = "requests-mock" -version = "1.10.0" -description = "Mock out responses from the requests package" -category = "dev" -optional = false -python-versions = "*" -files = [ - {file = "requests-mock-1.10.0.tar.gz", hash = "sha256:59c9c32419a9fb1ae83ec242d98e889c45bd7d7a65d48375cc243ec08441658b"}, - {file = "requests_mock-1.10.0-py2.py3-none-any.whl", hash = "sha256:2fdbb637ad17ee15c06f33d31169e71bf9fe2bdb7bc9da26185be0dd8d842699"}, -] - -[package.dependencies] -requests = ">=2.3,<3" -six = "*" - -[package.extras] -fixture = ["fixtures"] -test = ["fixtures", "mock", "purl", "pytest", "requests-futures", "sphinx", "testrepository (>=0.0.18)", "testtools"] - -[[package]] -name = "six" -version = "1.16.0" -description = "Python 2 and 3 compatibility utilities" -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] - -[[package]] -name = "snowballstemmer" -version = "2.2.0" -description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "dev" -optional = false -python-versions = "*" -files = [ - {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, - {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, -] - -[[package]] -name = "sphinx" -version = "4.5.0" -description = "Python documentation generator" -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "Sphinx-4.5.0-py3-none-any.whl", hash = "sha256:ebf612653238bcc8f4359627a9b7ce44ede6fdd75d9d30f68255c7383d3a6226"}, - {file = "Sphinx-4.5.0.tar.gz", hash = "sha256:7bf8ca9637a4ee15af412d1a1d9689fec70523a68ca9bb9127c2f3eeb344e2e6"}, -] - -[package.dependencies] -alabaster = ">=0.7,<0.8" -babel = ">=1.3" -colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""} -docutils = ">=0.14,<0.18" -imagesize = "*" -importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} -Jinja2 = ">=2.3" -packaging = "*" -Pygments = ">=2.0" -requests = ">=2.5.0" -snowballstemmer = ">=1.1" -sphinxcontrib-applehelp = "*" -sphinxcontrib-devhelp = "*" -sphinxcontrib-htmlhelp = ">=2.0.0" -sphinxcontrib-jsmath = "*" -sphinxcontrib-qthelp = "*" -sphinxcontrib-serializinghtml = ">=1.1.5" - -[package.extras] -docs = ["sphinxcontrib-websupport"] -lint = ["docutils-stubs", "flake8 (>=3.5.0)", "isort", "mypy (>=0.931)", "types-requests", "types-typed-ast"] -test = ["cython", "html5lib", "pytest", "pytest-cov", "typed-ast"] - -[[package]] -name = "sphinxcontrib-applehelp" -version = "1.0.4" -description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" -category = "dev" -optional = false -python-versions = ">=3.8" -files = [ - {file = "sphinxcontrib-applehelp-1.0.4.tar.gz", hash = "sha256:828f867945bbe39817c210a1abfd1bc4895c8b73fcaade56d45357a348a07d7e"}, - {file = "sphinxcontrib_applehelp-1.0.4-py3-none-any.whl", hash = "sha256:29d341f67fb0f6f586b23ad80e072c8e6ad0b48417db2bde114a4c9746feb228"}, -] - -[package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] -test = ["pytest"] - -[[package]] -name = "sphinxcontrib-devhelp" -version = "1.0.2" -description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." -category = "dev" -optional = false -python-versions = ">=3.5" -files = [ - {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, - {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, -] - -[package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] -test = ["pytest"] - -[[package]] -name = "sphinxcontrib-htmlhelp" -version = "2.0.1" -description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -category = "dev" -optional = false -python-versions = ">=3.8" -files = [ - {file = "sphinxcontrib-htmlhelp-2.0.1.tar.gz", hash = "sha256:0cbdd302815330058422b98a113195c9249825d681e18f11e8b1f78a2f11efff"}, - {file = "sphinxcontrib_htmlhelp-2.0.1-py3-none-any.whl", hash = "sha256:c38cb46dccf316c79de6e5515e1770414b797162b23cd3d06e67020e1d2a6903"}, -] - -[package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] -test = ["html5lib", "pytest"] - -[[package]] -name = "sphinxcontrib-jsmath" -version = "1.0.1" -description = "A sphinx extension which renders display math in HTML via JavaScript" -category = "dev" -optional = false -python-versions = ">=3.5" -files = [ - {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, - {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, -] - -[package.extras] -test = ["flake8", "mypy", "pytest"] - -[[package]] -name = "sphinxcontrib-qthelp" -version = "1.0.3" -description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." -category = "dev" -optional = false -python-versions = ">=3.5" -files = [ - {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, - {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, -] - -[package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] -test = ["pytest"] - -[[package]] -name = "sphinxcontrib-serializinghtml" -version = "1.1.5" -description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." -category = "dev" -optional = false -python-versions = ">=3.5" -files = [ - {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, - {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, -] - -[package.extras] -lint = ["docutils-stubs", "flake8", "mypy"] -test = ["pytest"] - -[[package]] -name = "toml" -version = "0.10.2" -description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] - -[[package]] -name = "tomli" -version = "2.0.1" -description = "A lil' TOML parser" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, -] - -[[package]] -name = "typing-extensions" -version = "4.5.0" -description = "Backported and Experimental Type Hints for Python 3.7+" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"}, - {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"}, -] - -[[package]] -name = "urllib3" -version = "1.26.14" -description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" -files = [ - {file = "urllib3-1.26.14-py2.py3-none-any.whl", hash = "sha256:75edcdc2f7d85b137124a6c3c9fc3933cdeaa12ecb9a6a959f22797a0feca7e1"}, - {file = "urllib3-1.26.14.tar.gz", hash = "sha256:076907bf8fd355cde77728471316625a4d2f7e713c125f51953bb5b3eecf4f72"}, -] - -[package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] -secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] -socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] - -[[package]] -name = "yarl" -version = "1.8.2" -description = "Yet another URL library" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "yarl-1.8.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:bb81f753c815f6b8e2ddd2eef3c855cf7da193b82396ac013c661aaa6cc6b0a5"}, - {file = "yarl-1.8.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:47d49ac96156f0928f002e2424299b2c91d9db73e08c4cd6742923a086f1c863"}, - {file = "yarl-1.8.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3fc056e35fa6fba63248d93ff6e672c096f95f7836938241ebc8260e062832fe"}, - {file = "yarl-1.8.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:58a3c13d1c3005dbbac5c9f0d3210b60220a65a999b1833aa46bd6677c69b08e"}, - {file = "yarl-1.8.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:10b08293cda921157f1e7c2790999d903b3fd28cd5c208cf8826b3b508026996"}, - {file = "yarl-1.8.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de986979bbd87272fe557e0a8fcb66fd40ae2ddfe28a8b1ce4eae22681728fef"}, - {file = "yarl-1.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c4fcfa71e2c6a3cb568cf81aadc12768b9995323186a10827beccf5fa23d4f8"}, - {file = "yarl-1.8.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae4d7ff1049f36accde9e1ef7301912a751e5bae0a9d142459646114c70ecba6"}, - {file = "yarl-1.8.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:bf071f797aec5b96abfc735ab97da9fd8f8768b43ce2abd85356a3127909d146"}, - {file = "yarl-1.8.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:74dece2bfc60f0f70907c34b857ee98f2c6dd0f75185db133770cd67300d505f"}, - {file = "yarl-1.8.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:df60a94d332158b444301c7f569659c926168e4d4aad2cfbf4bce0e8fb8be826"}, - {file = "yarl-1.8.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:63243b21c6e28ec2375f932a10ce7eda65139b5b854c0f6b82ed945ba526bff3"}, - {file = "yarl-1.8.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cfa2bbca929aa742b5084fd4663dd4b87c191c844326fcb21c3afd2d11497f80"}, - {file = "yarl-1.8.2-cp310-cp310-win32.whl", hash = "sha256:b05df9ea7496df11b710081bd90ecc3a3db6adb4fee36f6a411e7bc91a18aa42"}, - {file = "yarl-1.8.2-cp310-cp310-win_amd64.whl", hash = "sha256:24ad1d10c9db1953291f56b5fe76203977f1ed05f82d09ec97acb623a7976574"}, - {file = "yarl-1.8.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2a1fca9588f360036242f379bfea2b8b44cae2721859b1c56d033adfd5893634"}, - {file = "yarl-1.8.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f37db05c6051eff17bc832914fe46869f8849de5b92dc4a3466cd63095d23dfd"}, - {file = "yarl-1.8.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:77e913b846a6b9c5f767b14dc1e759e5aff05502fe73079f6f4176359d832581"}, - {file = "yarl-1.8.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0978f29222e649c351b173da2b9b4665ad1feb8d1daa9d971eb90df08702668a"}, - {file = "yarl-1.8.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:388a45dc77198b2460eac0aca1efd6a7c09e976ee768b0d5109173e521a19daf"}, - {file = "yarl-1.8.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2305517e332a862ef75be8fad3606ea10108662bc6fe08509d5ca99503ac2aee"}, - {file = "yarl-1.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42430ff511571940d51e75cf42f1e4dbdded477e71c1b7a17f4da76c1da8ea76"}, - {file = "yarl-1.8.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3150078118f62371375e1e69b13b48288e44f6691c1069340081c3fd12c94d5b"}, - {file = "yarl-1.8.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c15163b6125db87c8f53c98baa5e785782078fbd2dbeaa04c6141935eb6dab7a"}, - {file = "yarl-1.8.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4d04acba75c72e6eb90745447d69f84e6c9056390f7a9724605ca9c56b4afcc6"}, - {file = "yarl-1.8.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:e7fd20d6576c10306dea2d6a5765f46f0ac5d6f53436217913e952d19237efc4"}, - {file = "yarl-1.8.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:75c16b2a900b3536dfc7014905a128a2bea8fb01f9ee26d2d7d8db0a08e7cb2c"}, - {file = "yarl-1.8.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6d88056a04860a98341a0cf53e950e3ac9f4e51d1b6f61a53b0609df342cc8b2"}, - {file = "yarl-1.8.2-cp311-cp311-win32.whl", hash = "sha256:fb742dcdd5eec9f26b61224c23baea46c9055cf16f62475e11b9b15dfd5c117b"}, - {file = "yarl-1.8.2-cp311-cp311-win_amd64.whl", hash = "sha256:8c46d3d89902c393a1d1e243ac847e0442d0196bbd81aecc94fcebbc2fd5857c"}, - {file = "yarl-1.8.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:ceff9722e0df2e0a9e8a79c610842004fa54e5b309fe6d218e47cd52f791d7ef"}, - {file = "yarl-1.8.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f6b4aca43b602ba0f1459de647af954769919c4714706be36af670a5f44c9c1"}, - {file = "yarl-1.8.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1684a9bd9077e922300ecd48003ddae7a7474e0412bea38d4631443a91d61077"}, - {file = "yarl-1.8.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ebb78745273e51b9832ef90c0898501006670d6e059f2cdb0e999494eb1450c2"}, - {file = "yarl-1.8.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3adeef150d528ded2a8e734ebf9ae2e658f4c49bf413f5f157a470e17a4a2e89"}, - {file = "yarl-1.8.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57a7c87927a468e5a1dc60c17caf9597161d66457a34273ab1760219953f7f4c"}, - {file = "yarl-1.8.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:efff27bd8cbe1f9bd127e7894942ccc20c857aa8b5a0327874f30201e5ce83d0"}, - {file = "yarl-1.8.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a783cd344113cb88c5ff7ca32f1f16532a6f2142185147822187913eb989f739"}, - {file = "yarl-1.8.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:705227dccbe96ab02c7cb2c43e1228e2826e7ead880bb19ec94ef279e9555b5b"}, - {file = "yarl-1.8.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:34c09b43bd538bf6c4b891ecce94b6fa4f1f10663a8d4ca589a079a5018f6ed7"}, - {file = "yarl-1.8.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:a48f4f7fea9a51098b02209d90297ac324241bf37ff6be6d2b0149ab2bd51b37"}, - {file = "yarl-1.8.2-cp37-cp37m-win32.whl", hash = "sha256:0414fd91ce0b763d4eadb4456795b307a71524dbacd015c657bb2a39db2eab89"}, - {file = "yarl-1.8.2-cp37-cp37m-win_amd64.whl", hash = "sha256:d881d152ae0007809c2c02e22aa534e702f12071e6b285e90945aa3c376463c5"}, - {file = "yarl-1.8.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5df5e3d04101c1e5c3b1d69710b0574171cc02fddc4b23d1b2813e75f35a30b1"}, - {file = "yarl-1.8.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7a66c506ec67eb3159eea5096acd05f5e788ceec7b96087d30c7d2865a243918"}, - {file = "yarl-1.8.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2b4fa2606adf392051d990c3b3877d768771adc3faf2e117b9de7eb977741229"}, - {file = "yarl-1.8.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1e21fb44e1eff06dd6ef971d4bdc611807d6bd3691223d9c01a18cec3677939e"}, - {file = "yarl-1.8.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:93202666046d9edadfe9f2e7bf5e0782ea0d497b6d63da322e541665d65a044e"}, - {file = "yarl-1.8.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fc77086ce244453e074e445104f0ecb27530d6fd3a46698e33f6c38951d5a0f1"}, - {file = "yarl-1.8.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64dd68a92cab699a233641f5929a40f02a4ede8c009068ca8aa1fe87b8c20ae3"}, - {file = "yarl-1.8.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1b372aad2b5f81db66ee7ec085cbad72c4da660d994e8e590c997e9b01e44901"}, - {file = "yarl-1.8.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e6f3515aafe0209dd17fb9bdd3b4e892963370b3de781f53e1746a521fb39fc0"}, - {file = "yarl-1.8.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:dfef7350ee369197106805e193d420b75467b6cceac646ea5ed3049fcc950a05"}, - {file = "yarl-1.8.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:728be34f70a190566d20aa13dc1f01dc44b6aa74580e10a3fb159691bc76909d"}, - {file = "yarl-1.8.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:ff205b58dc2929191f68162633d5e10e8044398d7a45265f90a0f1d51f85f72c"}, - {file = "yarl-1.8.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:baf211dcad448a87a0d9047dc8282d7de59473ade7d7fdf22150b1d23859f946"}, - {file = "yarl-1.8.2-cp38-cp38-win32.whl", hash = "sha256:272b4f1599f1b621bf2aabe4e5b54f39a933971f4e7c9aa311d6d7dc06965165"}, - {file = "yarl-1.8.2-cp38-cp38-win_amd64.whl", hash = "sha256:326dd1d3caf910cd26a26ccbfb84c03b608ba32499b5d6eeb09252c920bcbe4f"}, - {file = "yarl-1.8.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f8ca8ad414c85bbc50f49c0a106f951613dfa5f948ab69c10ce9b128d368baf8"}, - {file = "yarl-1.8.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:418857f837347e8aaef682679f41e36c24250097f9e2f315d39bae3a99a34cbf"}, - {file = "yarl-1.8.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ae0eec05ab49e91a78700761777f284c2df119376e391db42c38ab46fd662b77"}, - {file = "yarl-1.8.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:009a028127e0a1755c38b03244c0bea9d5565630db9c4cf9572496e947137a87"}, - {file = "yarl-1.8.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3edac5d74bb3209c418805bda77f973117836e1de7c000e9755e572c1f7850d0"}, - {file = "yarl-1.8.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:da65c3f263729e47351261351b8679c6429151ef9649bba08ef2528ff2c423b2"}, - {file = "yarl-1.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ef8fb25e52663a1c85d608f6dd72e19bd390e2ecaf29c17fb08f730226e3a08"}, - {file = "yarl-1.8.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bcd7bb1e5c45274af9a1dd7494d3c52b2be5e6bd8d7e49c612705fd45420b12d"}, - {file = "yarl-1.8.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:44ceac0450e648de86da8e42674f9b7077d763ea80c8ceb9d1c3e41f0f0a9951"}, - {file = "yarl-1.8.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:97209cc91189b48e7cfe777237c04af8e7cc51eb369004e061809bcdf4e55220"}, - {file = "yarl-1.8.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:48dd18adcf98ea9cd721a25313aef49d70d413a999d7d89df44f469edfb38a06"}, - {file = "yarl-1.8.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:e59399dda559688461762800d7fb34d9e8a6a7444fd76ec33220a926c8be1516"}, - {file = "yarl-1.8.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d617c241c8c3ad5c4e78a08429fa49e4b04bedfc507b34b4d8dceb83b4af3588"}, - {file = "yarl-1.8.2-cp39-cp39-win32.whl", hash = "sha256:cb6d48d80a41f68de41212f3dfd1a9d9898d7841c8f7ce6696cf2fd9cb57ef83"}, - {file = "yarl-1.8.2-cp39-cp39-win_amd64.whl", hash = "sha256:6604711362f2dbf7160df21c416f81fac0de6dbcf0b5445a2ef25478ecc4c778"}, - {file = "yarl-1.8.2.tar.gz", hash = "sha256:49d43402c6e3013ad0978602bf6bf5328535c48d192304b91b97a3c6790b1562"}, -] - -[package.dependencies] -idna = ">=2.0" -multidict = ">=4.0" - -[[package]] -name = "zipp" -version = "3.15.0" -description = "Backport of pathlib-compatible object wrapper for zip files" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"}, - {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] - -[metadata] -lock-version = "2.0" -python-versions = "^3.9" -content-hash = "5242222e74cd36e28d4de250a3e0ed239c8ebed9ae5b402e4f7e6663f7f030e2" diff --git a/poetry.toml b/poetry.toml deleted file mode 100755 index 53b35d3..0000000 --- a/poetry.toml +++ /dev/null @@ -1,3 +0,0 @@ -[virtualenvs] -create = true -in-project = true diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 598ee0a..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,62 +0,0 @@ -[tool.poetry] -name = "tagoio-sdk" -version = "4.2.0" -description = "Official Python SDK for TagoIO" -authors = ["Tago LLC "] -license = "Apache License" -readme = "README.md" -homepage = "https://tago.io/" -repository = "https://github.com/tago-io/sdk-python/" -documentation = "https://py.sdk.tago.io/" -keywords = ["tagoio", "iot", "analysis", "tago", "sensor", "device"] -classifiers = [ - "Development Status :: 5 - Production/Stable", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3 :: Only", - "Topic :: Software Development :: Libraries :: Python Modules", -] -packages = [ - { include = "tagoio_sdk", from = "src" } -] -# include = [ - # { path = "poetry.lock", format = "sdist" } - # { path = "tests", format = "sdist" } -# ] - -[tool.poetry.dependencies] -python = "^3.9" -requests = "2.28.2" -python-dateutil = "^2.8.2" -python-socketio = {extras = ["asyncio_client"], version = "^5.7.2"} -aiohttp = "^3.8.4" - -[tool.poetry.dev-dependencies] -pytest = "^6.2.5" -flake8 = "^4.0.1" -isort = "^5.10.1" -black = "^22.3.0" -flake8-annotations = "^2.9.0" -Sphinx = "^4.5.0" -flake8-black = "^0.3.2" -requests_mock = "^1.9.3" - -[tool.isort] -py_version = 37 -profile = "black" -force_single_line = true -combine_as_imports = true -lines_between_types = 1 -lines_after_imports = 2 -src_paths = ["src", "tests"] -extend_skip = ["setup.py"] - -[tool.black] -target-version = ['py37'] -preview = true -force-exclude = ''' -.*/setup\.py$ -''' - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/search.html b/search.html new file mode 100644 index 0000000..aec827f --- /dev/null +++ b/search.html @@ -0,0 +1,130 @@ + + + + + + + + Search — TagoIO SDK for Python + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Search

+ + + + +

+ Searching for multiple words only shows matches that contain + all words. +

+ + +
+ + + +
+ + + +
+ +
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/searchindex.js b/searchindex.js new file mode 100644 index 0000000..d310b33 --- /dev/null +++ b/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({docnames:["Device/Device_Type","Device/index","Resources/Account/Account_type","Resources/Account/index","Resources/Billing/Billing_Type","Resources/Billing/index","Resources/Buckets/index","Resources/Dashboards/Dashboard_Type","Resources/Dashboards/index","Resources/Devices/Devices_Type","Resources/Devices/index","Resources/IntegrationNetwork/IntegrationNetwork_Type","Resources/IntegrationNetwork/index","Resources/Profile/index","Resources/Run/Run_Types","Resources/Run/index","Resources/index","Services/Attachment_Type","Services/Email_Type","Services/MQTT_Type","Services/Notification_Type","Services/Pdf_Type","Services/SMS_Type","Services/index","common/Common_Type","index"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":5,"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.ext.intersphinx":1,"sphinx.ext.todo":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["Device/Device_Type.rst","Device/index.rst","Resources/Account/Account_type.rst","Resources/Account/index.rst","Resources/Billing/Billing_Type.rst","Resources/Billing/index.rst","Resources/Buckets/index.rst","Resources/Dashboards/Dashboard_Type.rst","Resources/Dashboards/index.rst","Resources/Devices/Devices_Type.rst","Resources/Devices/index.rst","Resources/IntegrationNetwork/IntegrationNetwork_Type.rst","Resources/IntegrationNetwork/index.rst","Resources/Profile/index.rst","Resources/Run/Run_Types.rst","Resources/Run/index.rst","Resources/index.rst","Services/Attachment_Type.rst","Services/Email_Type.rst","Services/MQTT_Type.rst","Services/Notification_Type.rst","Services/Pdf_Type.rst","Services/SMS_Type.rst","Services/index.rst","common/Common_Type.rst","index.rst"],objects:{},objnames:{},objtypes:{},terms:{"0":[9,21,23,25],"01":[1,25],"03":[1,25],"04":[1,25],"1":[1,9,10,14,16,21,23,24],"10":1,"11":[1,21,25],"12":[1,25],"123":[1,25],"13":[1,21,25],"2":[21,25],"20":[10,14,24],"2015":[1,25],"2022":[1,25],"2974279":[1,25],"3":14,"33":[1,25],"34":[1,25],"36":9,"42":[1,25],"434434434434":23,"44":[1,25],"5":21,"55":[1,25],"5599999999999":22,"56":[1,25],"628292":[1,25],"64":14,"8":[14,21],"85":[1,25],"case":11,"class":[16,21],"default":[9,10,11,14,21],"do":1,"enum":0,"float":[0,4,7,9,14,18,19,21],"function":1,"import":[1,3,5,6,10,13,16,23,25],"int":[0,4,7,9,14,18,19,21,24],"long":5,"new":[4,8,10],"public":[8,11],"return":[3,5,9,10,14],"switch":11,"throw":5,"true":[1,10,14],A:9,If:[1,5,9,14,18,21,25],In:1,It:9,On:15,The:[5,8,9,14],To:[16,23],With:21,_dataqueryfirstlast:0,about:[1,6,8,12,13],accept:[4,9,20,21],accord:9,account:[4,5,6,8,10,12,13,15,16,23,25],accountinfo:3,acs_url:14,action:10,actionschedul:14,actiontriggerbydata:14,actiontriggerbymqtt:14,actiontriggerbyresourc:14,activ:[2,4,7,9,14],ad:9,add:[1,4,5,23],addon:4,address:[14,18],admin:18,advanc:11,after:14,alertdangerbackground:14,alertinfobackground:14,alertwarningbackground:14,all:[3,5,10,13,14,21],alloc:[4,5],allow:18,allow_shar:7,allow_tag:7,alwai:7,always_clos:7,always_open:7,amount:[4,5,7,9,10,16,21,24,25],amount_du:4,an:[1,5,8,9,10,14,16,18],analysi:[4,8,23],analysis_id:20,analysis_run:7,analysisextern:14,analysisid:8,analysisintern:14,ani:[0,1,7,8,10,11,20,21,23,24,25],anyth:1,apach:25,api:[0,14],ar:[4,14],archiv:[18,23],archivefil:23,arrai:[1,5,9],asc:[9,10,24],ascend:0,attach:[18,25],attempt:4,attempt_count:4,attribut:[0,2,4,7,9,11,14,17,18,19,20,21,22,24],auth_bg_opac:14,auth_bg_src:14,auth_bg_typ:14,auth_form_opac:14,authent:[2,14],avail:[4,5],avg:7,await:4,back:18,background:[7,21],background_color:14,banner_url:11,base64:[17,21,23],base:14,being:[4,14],between:[9,21],bg_color:20,bill:[16,25],billingeditresourcealloc:5,billingeditsubscript:5,binari:21,block:2,blueprint_device_behavior:7,blueprint_selector_behavior:7,bodi:[18,20],bool:[0,1,2,4,7,9,10,11,14,19,20,21],bottom:21,bucket:[1,7,13,16,19,23,25],bucket_id:9,bucket_nam:7,bucketid:6,buffer_s:14,button:[8,20,23],button_cancel_background_color:14,button_cancel_text_color:14,button_confirm_background_color:14,button_confirm_text_color:14,buttondang:14,buttondangertext:14,buttondefault:14,buttondefaulttext:14,buttondis:14,buttondisabledtext:14,buttoniconlabel:14,buttonprimari:14,buttonprimarytext:14,buttons_autodis:20,buttons_en:20,buttonsuccess:14,buttonsuccesstext:14,buttonwarn:14,buttonwarningtext:14,call:18,can:[14,18,23],center:25,certif:14,chang:[4,5],check:[14,25],chunk:9,chunk_period:9,chunk_retent:9,close:7,code:[4,9],color:[7,14,20],com:14,compani:[2,14],configobj:10,configur:[9,10,14,15],configuration_param:9,configurationparam:10,connector:[7,9],connector_nam:7,connector_pars:9,consol:23,consoleservic:25,contain:[8,20,23],content:[17,21,23],coordin:0,copi:14,count:7,countri:2,coupon:[4,5],cover:20,creat:[15,16,18,25],createcustomdomain:[16,25],created_at:[0,2,7,9,10,11,14,24],created_bi:24,creation:9,css:21,current:[1,4,14,21],current_valu:14,custom:[14,15,21],custom_dn:4,customdomaincr:15,customdomaindata:15,cycl:4,dai:9,dashboard:[16,23,25],dashboardcreateinfo:8,dashboardid:8,dashboardobj:8,data:[1,5,6,7,8,9,10,14,15,23],data_record:4,dataqueri:[1,10],datastoragetyp:9,date:[0,4,9,14,21,23],datetim:[2,7,9,11,14,23,24],decimal_separ:2,declar:21,delet:[1,15,16,20,25],deletecustomdomain:[16,25],deletedata:25,deni:24,desc:[9,10,24],descend:0,descript:[9,11],desir:14,detail:[0,4,15],determin:0,develop:2,devic:[5,7,8,14,16,23],device_id:9,device_paramet:11,devicecreateinfo:10,deviceeditinfo:10,deviceid:10,deviceinputoutput1dai:14,deviceinputoutput3dai:14,deviceinputoutput3hour:14,deviceinputoutput6hour:14,deviceinputoutputrest:14,deviceobj:10,devicequeri:10,dict:[4,7,14,18,20],differ:0,displai:[7,21],displayheaderfoot:21,divis:9,dn:14,dns_email_1:14,dns_email_2:14,dns_email_3:14,dns_page:14,dns_ssl:14,document:[18,21],documentation_url:11,doe:14,doesn:5,domain:[14,15],dottedbord:14,dropdown:11,dropdownacc:14,dropdownbackground:14,due:4,duplic:[16,25],e:[14,18,21],each:[1,4,5],edit:[1,5,7,15,16],editalloc:[16,25],editdata:25,editsubscript:[16,25],either:14,els:1,email:[2,4,7,14,25],email_domain:14,emailwithhtml:23,emailwithrawtext:23,emailwithtempl:23,empti:[10,21],emptydevicedata:[16,25],enabl:14,encod:14,end:[4,18],end_dat:7,endpoint:14,entity_id:14,env:[1,16,23],error:[4,14],exampl:[1,3,5,6,10,13,14,16,18,22,23,24],exce:5,exist:[5,14],expir:[8,9,14],expire_d:14,expire_tim:[7,9,11,14,24],expiretim:8,expiretimeopt:[7,8,9,11,14],f:[1,7,25],fail:4,fals:[10,14,21,23],favicon:14,feel:25,field:[9,10,24],file:21,file_storag:4,filenam:[18,21],fill:20,filter:[7,9,10,24],first:14,first_insert:0,first_item:0,first_loc:0,first_valu:0,firstnam:14,fit:[20,21],flake8:25,floatingsidebartitl:14,flow:14,follow:21,footer:21,footerbackground:14,footertempl:21,format:[14,21],formcontrolbord:14,free:[4,5,25],free_account:7,from:[1,3,4,5,6,8,9,10,13,14,16,21,23,25],from_nam:18,full:[9,24],g:21,gaugeempti:14,gaugefil:14,gaugeprimarytext:14,gaugesecondarytext:14,gener:[8,9,10,18,21,23],genericid:[1,2,4,6,7,8,9,10,11,12,13,14,19,20],generictoken:[7,9,10,14,24],get:[1,3,5,6,8,10,12,13,15,20],getcustomdomain:[16,25],getdata:25,getdevicedata:[16,25],getparamet:25,getpric:[16,25],getpublickei:[16,25],getsubscript:[16,25],github:25,give:21,go:23,graphic:21,group:[0,11],group_bi:7,ha:[4,5,14],have:[5,25],header:[8,21],headertempl:21,height:[7,21],help:[11,25],here:14,hexcolor:20,hide:11,hold:0,hour:14,href:14,html:[18,21,23],http:18,humid:1,icon:20,icon_url:11,iconradioselect:14,iconradiosubtitl:14,iconurl:14,id:[0,1,2,4,5,6,7,8,9,10,11,13,14,15,20,24,25],id_of_the_data_item:[1,25],ident:14,identif:[1,8,12,13],identifi:7,idp_metadata:14,imag:11,image_url:20,immut:9,imut:9,includ:9,inclus:9,info:[16,25],inform:[1,3,4,5,6,8,12,13,14,15],informationicon:14,inject:21,input:[4,9],inputbackground:14,inputbackgroundreadonli:14,inputerror:14,inputforeground:14,inputforegroundreadonli:14,insid:1,inspect:9,inspected_at:9,instanc:25,integ:9,integr:[14,16,25],intern:14,invalid:5,invoic:4,invoice_url:4,io:[18,23],ip:14,issuer:14,item:[1,9],itself:18,javascript:9,john:18,json:23,kei:[7,9,14],label:[7,11,20,21],landscap:21,languag:[2,14],last:[1,4,9],last_access:7,last_author:[9,24],last_input:[7,9],last_insert:0,last_item:[0,1],last_loc:0,last_login:[2,14],last_output:9,last_retent:9,last_valu:0,last_whats_new:2,lastnam:14,lat:[1,25],left:21,legaci:9,letter:21,lightbord:14,limit:[4,5],limitalert:14,link:14,list:[0,1,4,7,8,9,10,11,12,14,16,20,24,25],listanalysisrel:[16,25],listdevic:[16,25],listdevicesrel:[16,25],listdevicetokenqueri:10,listnavcolor:14,listnetwork:[16,25],listtitlelabel:14,liter:24,lng:[1,25],load:14,local:18,locat:[0,1,8,21,25],log:23,login:14,loginbutton:14,loginbuttontext:14,loginforeground:14,loginform:14,logo:14,logo_irl:11,logo_url:11,mail:[14,18],main:11,manag:[3,5,6,8,10,12,13,15],map:[14,15],mark:1,markup:21,mask:11,match:14,max:7,mean:21,messag:[4,5,18,19,20,22,23],metadata:[0,14,15],method:20,middlewar:[9,11],middleware_endpoint:11,middleware_url:14,min:7,minimum_dist:14,minimum_interv:14,mobil:4,modalcontain:14,modaloverlai:14,modifi:[1,8,10],modul:16,month:[9,14],more:[4,5],more_than_on:7,mqtt:25,mqttdata:23,must:21,mutabl:[1,9],my:18,my_device_id:23,my_device_token:[1,25],myclien:[18,23],mycompani:14,mydevic:[1,25],mydeviceid:10,name:[0,2,4,7,9,10,11,14,17,18,21,23,24],navbar:14,navbarbetadeveloperbord:14,navbarbutton:14,navbardropdownbord:14,navbardropdownopt:14,navbardropdownoptionbord:14,navbartext:14,navdescript:14,necessari:1,need:[5,14,16],network:[7,9,16,25],network_id:9,network_nam:7,networkid:12,never:[8,9,24],new_label:8,newslett:[2,14],none:[4,9,14,21],notif:25,notificationbuttonamount:14,notificationbuttonamounttext:14,notificationcr:23,notificationfilterbackground:14,notificationfoot:14,notificationitembord:14,notificationitemd:14,notificationitemtextaccept:14,notificationitemunread:14,number:[9,11,21,22,23],object:[1,5,8,9,10,14,16,23],one:[1,4,5,14],onli:[1,4,5,10,14,18],onlyunread:1,ons:[4,5],open:7,oper:5,option:[1,2,4,7,8,9,10,11,13,14,16,18,20,23,24],order:[1,9],orderbi:[9,10,24],ordin:0,orient:21,origin:[7,18],otp:2,our:25,output:[4,9],over:21,overwrit:7,own:[8,9],page:[7,9,10,14,21,24],pagenumb:21,pagerang:21,paid:4,pair:14,paper:21,param:[1,7,9,10,15,18,23],paramet:[1,5,6,8,10,12,13,15,16,18,23],parameter_id:1,parameter_kei:18,parameterid:1,paramid:10,paramlist:[16,25],paramremov:[16,25],paramset:[16,25],pars:[14,18],parse_funct:9,parser:9,pass:[1,5],password:14,past:4,past_du:4,payload:9,payload_decod:11,payload_encod:11,payment:4,payment_error:4,pdf:[21,25],pdfparam:23,pend:5,permiss:[9,10,11,24],permissionopt:[9,11],phone:[2,14,23],pip:25,placehold:14,plan:[2,4,5],poetri:25,point:0,port:14,portal:14,post:20,prefercsspages:21,price:[4,5],primari:14,print:21,printbackground:21,prioriti:21,process:4,profil:[4,5,9,14,15,16,25],profile_id:15,profileid:13,properli:14,properti:[8,10],protocol:14,provid:14,publicpagenavigationbar:14,publish:23,purchas:5,push_notif:4,put:20,pypi:25,pytest:25,python:25,qo:[19,23],qty:[0,7],quarter:9,queri:[0,1,7,10,12,13,15],queryobj:[10,12,13],queryparam:[1,10],question:25,randomli:9,rang:[9,21],raw:18,read:[1,9,20,24],realtim:7,receiv:23,record:14,recur:4,redirect:20,ref:20,ref_id:[23,24],refus:20,regener:15,regeneratecustomdomain:[16,25],region:[1,16,23],relat:[4,8],releas:25,relev:14,remov:10,render:21,replac:[8,10],repositori:25,request:9,requir:[9,11,14],require_devices_access:11,resolvebucketnam:[9,10],resourc:[3,4,5,6,7,10,13,25],respons:[4,14,21],result:[1,3,5,6,10,13,25],retain:[9,19,23],retent:9,retri:4,retriev:10,right:21,rout:14,run:[8,16,18,25],run_us:4,runsamleditinfo:15,runwidgetheaderbuttonanalysi:[16,25],s:[1,4,5,8,9,14,15],same:[5,14,21],saml:[14,15],scale:[4,21],scope:8,sdk:25,search:10,second:14,secur:14,send:[1,8,22,23],send_invoic:2,senddata:25,sent:[9,10,18],sentstatu:10,seri:0,serial:9,serie_numb:[9,11,24],servic:[4,5,14,15,25],set:[1,9,15,16,21],setparameterasread:25,setup:[7,8],share:23,share_profil:20,should:[9,21],show:23,sidebaraccessselect:14,sidebaraccountselect:14,sidebaractionselect:14,sidebaranalysisselect:14,sidebarbackground:14,sidebarbillingselect:14,sidebarbucketselect:14,sidebardashboardselect:14,sidebardeviceselect:14,sidebarexploreselect:14,sidebarfileselect:14,sidebarforegroundicon:14,sidebarforegroundtext:14,sidebarhomeselect:14,sidebaritem:14,sidebarribbon:14,sidebarrunselect:14,sidebarsepar:14,sidebarseparatorforeground:14,sidebaruserselect:14,sign:15,signup_logo:14,signup_logo_opt:14,signup_method:14,singl:15,size:21,skip:0,sm:[2,4,14,25],smsdata:23,snakebuttonoutlin:14,src:25,ssl:14,sso_saml_act:14,ssosamledit:[16,25],ssosamlinfo:[16,25],stale:14,start:[4,9],start_dat:7,starter:4,statu:14,still:4,storag:9,store:9,str:[0,1,2,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],string:[14,21],stripe:4,stripe_id:2,sub_titl:14,subdomain:14,subject:[14,18,23],subscript:[4,5],success:5,sum:[5,7],summari:[16,25],svg_color:20,svg_url:20,svgtagofont:14,svgtagoiohol:14,switchdisabledbackground:14,switchslid:14,t:5,tab:7,tabbackground:14,tablabelbord:14,tag:[7,9,14],tag_kei:7,tago:[18,23],tagoio:[1,5,14,25],tagoio_sdk:[1,3,5,6,10,13,16,23,25],tagorun:[15,18],tagsobj:[7,9,14],take:21,target:14,temperatur:[1,23,25],templat:[18,21],test:[23,24,25],text:[11,14,18],text_color:14,than:5,them:21,theme:[7,14],thi:14,third:14,thousand_separ:2,tier:4,time:[0,1,5,8,9,23,25],timestamp:[0,4,14],timezon:[2,7,14],titl:[20,21,23],togeth:18,token:[1,7,8,9,10,11,13,14,16,23,24,25],tokencr:[16,25],tokendata:10,tokendelet:[16,25],tokenlist:[16,25],tokenparam:10,too:23,tooltipcontain:14,tooltiptext:14,top:21,topic:[19,23],total:21,totalpag:21,translat:14,trial:4,trial_end:4,trigger:20,tupl:9,type:[1,23,24],under:25,union:[4,7,14,18],unit:[0,1,21,25],unpars:14,unread:1,up:[16,23],upcom:4,upcoming_invoice_tot:4,updat:[4,5,9,15],updated_at:[2,4,7,9,14],upload:23,url:[4,7,14,18,20,21,23],us:[0,1,5,9,14,18,21,23],usa:[1,16,23],user_view_welcom:2,uuid:11,valid:[9,21,23],valu:[0,1,4,7,9,14,21,25],variabl:[0,1,7,10,18,25],verif:9,verification_cod:[9,11,24],verticaltabitem:14,verticaltabitembord:14,view:7,visibl:[7,9],wa:[4,14],webpag:21,week:9,what:21,when:[4,8,9,14],whether:[4,14],which:21,widget:8,widget_id:7,widgetcardbackground:14,widgeticonsacc:14,widgeticonsbackground:14,widgeticonscolor:14,widgeticonsfooterbas:14,widgeticonsfooterpremium:14,widgetid:8,width:[7,21],without:21,write:[9,24],x:7,xml:14,y:7,year:14,yet:14,you:[16,18,23,25],your:[8,13]},titles:["Device Type","Device","Account Type","Account","Billing Type","Billing","Buckets","Dashboards Type","Dashboards","Devices Type","Devices","Integration Network Type","Integration Network","Profile","Run Type","Run","Resources","Attachment Type","Email Type","MQTT Type","Notification Type","Notification Type","SMS Type","Services","ExpireTimeOption","Documentation"],titleterms:{account:[2,3],accountinfo:2,accountopt:2,amount:6,analysisrel:7,archivefil:17,arrang:7,attach:[17,23],attachmentopt:18,bill:[4,5],billingaddon:4,billingaddonpric:4,billingallservicepric:4,billingeditresourcealloc:4,billingeditsubscript:4,billingpaymenterror:4,billingpaymentpastdu:4,billingplan:4,billingplanpric:4,billingpric:4,billingprofileeditresourcealloc:4,billingprofileresourcealloc:4,billingresourceallocationservic:4,billingservic:4,billingservicepric:4,billingservicesubscript:4,billingsubscript:4,billingsubscriptionaddon:4,billingsubscriptionservic:4,blueprint_devic:7,bucket:[6,9],command:25,condit:7,configurationparam:9,consoleservic:23,creat:[8,10],createcustomdomain:15,current_cycl:4,customdomaincr:14,customdomaindnsrecord:14,customdomaininfo:14,customdomainrespons:14,dashboard:[7,8],dashboardcreateinfo:7,dashboardinfo:7,data:[0,25],dataqueri:0,dataquerydefault:0,dataqueryfirstlast:0,delet:[8,10],deletecustomdomain:15,deletedata:1,develop:25,devic:[0,1,9,10,25],devicecreateinfo:9,devicecreateinfobas:9,devicecreateinfobasicimut:9,devicecreateinfobasicmut:9,devicecreateinfoimmut:9,devicecreateinfomut:9,devicecreaterespons:9,deviceeditinfo:9,deviceinfo:9,deviceinfolist:9,devicelistitem:9,devicenetworktoken:11,devicequeri:9,deviceresourceview:7,devicesrel:7,devicetokendatalist:9,document:25,duplic:8,edit:[8,10,25],editalloc:5,editdata:1,editdatamodel:7,editdeviceresourc:7,editresourceopt:7,editsubscript:5,email:[18,23],email_templ:14,emailbas:18,emailhtml:18,emailrawtext:18,emailwithhtml:18,emailwithrawtext:18,emailwithtempl:18,emptydevicedata:10,exampl:25,expiretimeopt:24,feature_devicewifisetup:14,feature_geoloc:14,filter_condit:7,getcustomdomain:15,getdata:1,getdatamodel:7,getdevicedata:10,getparamet:1,getpric:5,getpublickei:8,getsubscript:5,icon:7,ideviceparamet:11,idp:14,info:[1,3,6,8,10,12,13],insert:25,instal:25,instanc:[1,16,23],integr:[11,12],licens:25,list:13,listanalysisrel:8,listdevic:10,listdevicesrel:8,listdevicetokenqueri:9,listnetwork:12,locationgeojson:0,loginasuseropt:14,loginrespons:14,margin:21,mqtt:[19,23],mqttdata:19,network:[11,12],networkcreateinfo:11,networkinfo:11,notif:[20,21,23],notificationbutton:20,notificationcr:20,notificationiconimag:20,notificationiconsvg:20,notificationtriggeranalysi:20,notificationtriggerhttp:20,notificationtriggerprofil:20,option:[19,21],otp:14,paramlist:10,paramremov:10,paramset:10,pdf:23,pdfparam:21,permissionopt:24,postdatamodel:7,profil:13,publickeyrespons:7,queri:24,quick:25,regeneratecustomdomain:15,resourc:16,run:[14,15],runinfo:14,runsamleditinfo:14,runsamlinfo:14,runwidgetheaderbuttonanalysi:8,samlattributemap:14,senddata:1,serial_numb:11,servic:23,setparameterasread:1,share:7,sidebar_button:14,signup_field:14,sm:[22,23],smsdata:22,sp:14,ssosamledit:15,ssosamlinfo:15,summari:13,templateopt:18,themeopt:14,tokencr:10,tokendata:[9,11],tokendatalist:24,tokendelet:10,tokenlist:[10,13],type:[0,2,4,7,9,11,14,17,18,19,20,21,22],typeddict:14,usercreateinfo:14,userinfo:14,widgetdata:7,widgetdeviceresourc:7,widgetinfo:7,widgetoverwrit:7,widgetoverwriteopt:7,widgetresourc:7}}) \ No newline at end of file diff --git a/src/tagoio_sdk/__init__.py b/src/tagoio_sdk/__init__.py deleted file mode 100644 index 1b4e355..0000000 --- a/src/tagoio_sdk/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -__version__ = "4.1.1" - -from .modules.Analysis.Analysis import Analysis -from .modules.Device.Device import Device -from .modules.Resources.AccountDeprecated import AccountDeprecated as Account -from .modules.Resources.Resources import Resources -from .modules.Services.Services import Services diff --git a/src/tagoio_sdk/common/Common_Type.py b/src/tagoio_sdk/common/Common_Type.py deleted file mode 100644 index 2ad3a6f..0000000 --- a/src/tagoio_sdk/common/Common_Type.py +++ /dev/null @@ -1,114 +0,0 @@ -from datetime import datetime -from typing import Literal, TypedDict, Union, Optional - -GenericID = str -"""ID used on TagoIO, string with 24 character""" - - -Base64 = str - -GenericToken = str -"""Token used on TagoIO, string with 36 characters""" - -ExpireTimeOption = "never" or datetime - -PermissionOption = Literal["write", "read", "full", "deny"] - - -class TokenCreateResponse(TypedDict): - token: GenericToken - expire_date: ExpireTimeOption - permission: PermissionOption - - -class TagsObj(TypedDict): - key: str - value: str - - -class LocationGeoJSON(TypedDict): - type: Literal["Point"] - coordinates: list[str] - - -class LocationLatLng(TypedDict): - lat: float - lng: float - - -class Data(TypedDict): - """A bird with a flight speed exceeding that of an unladen swallow. - - Attributes: - id Data ID. - device ID of the device holding the data. - variable Name of the variable for the data. - value Data value - """ - - id: str - device: str - variable: str - value: Union[str, float, int, bool] - group: str - unit: str - location: LocationGeoJSON - metadata: any - time: datetime - created_at: datetime - - -class TokenDataList(TypedDict): - token: GenericToken - name: str - type: str - permission: PermissionOption - serie_number: Optional[str] - last_authorization: Optional[datetime] - verification_code: Optional[str] - expire_time: ExpireTimeOption - ref_id: str - created_at: datetime - created_by: Optional[str] - - -class TokenData(TypedDict): - name: str - expire_time: Optional[ExpireTimeOption] - permission: PermissionOption - serie_number: Optional[str] - verification_code: Optional[str] - middleware: Optional[str] - - -class Query(TypedDict): - """Query object for pagination - - Args: - page (Optional[int]): 1 - - amount (Optional[int]): ["id", "name"] - - fields (Optional[list[str]]): {"name": "test"} - - filter (Optional[any]): 20 - - orderBy (Optional[list[Literal["asc", "desc"]]]): ["name": "asc"] - - Example: - ```python - { - "page": 1, - "fields": ["id", "name"], - "filter": {"name": "test"}, - "amount": 20, - "orderBy": ["name": "asc"] - } - ``` - """ - - page: Optional[int] - amount: Optional[int] - fields: Optional[list[str]] - filter: Optional[any] - orderBy: Optional[list[Literal["asc", "desc"]]] diff --git a/src/tagoio_sdk/common/tagoio_module.py b/src/tagoio_sdk/common/tagoio_module.py deleted file mode 100644 index 06fa709..0000000 --- a/src/tagoio_sdk/common/tagoio_module.py +++ /dev/null @@ -1,35 +0,0 @@ -from typing import TypedDict - -from tagoio_sdk.infrastructure.api_request import RequestParams, apiRequest -from tagoio_sdk.regions import Regions, getConnectionURI - - -class DoRequestParams(RequestParams): - url: None - - -class GenericModuleParams(TypedDict): - token: str - region: Regions - - -class TagoIOModule(object): - def __init__(self, params: GenericModuleParams) -> None: - self.token = params.get("token") - self.region = params.get("region") - self.validateParams() - pass - - def validateParams(self) -> None: - if self.token is None: - raise Exception("Token is invalid") - pass - - def doRequest(self, params: DoRequestParams) -> dict[str, any]: - url = getConnectionURI(self.region)["api"] - return apiRequest({**params, "url": url, "headers": {"token": self.token}}) - - @staticmethod - def doRequestAnonymous(params: DoRequestParams, region: Regions) -> dict[str, any]: - url = getConnectionURI(region)["api"] - return apiRequest({**params, "url": url, "headers": {}}) diff --git a/src/tagoio_sdk/config.py b/src/tagoio_sdk/config.py deleted file mode 100644 index 1c7e77f..0000000 --- a/src/tagoio_sdk/config.py +++ /dev/null @@ -1,11 +0,0 @@ -import os - -tagoSDKconfig = { - "requestAttempts": int(os.environ.get("TAGOIO_REQUEST_ATTEMPTS") or 5), - "requestTimeout": 60, # seconds - "socketOpts": { - "reconnectionDelay": 10, # seconds - "reconnection": True, - "transports": ["websocket"], - }, -} diff --git a/src/tagoio_sdk/infrastructure/api_request.py b/src/tagoio_sdk/infrastructure/api_request.py deleted file mode 100644 index 196bc95..0000000 --- a/src/tagoio_sdk/infrastructure/api_request.py +++ /dev/null @@ -1,107 +0,0 @@ -import json -import os -import platform -import time -from typing import Literal, Optional, TypedDict - -import requests - -from tagoio_sdk import __version__, config - - -class RequestParams(TypedDict): - method: Literal["post", "get", "put", "delete"] - url: str - path: str - headers: dict[str, str] - body: Optional[any] - params: Optional[any] - headers: Optional[any] - - -class TagoIORequestError(Exception): - """Exception raised for TagoIO API errors. - - Attributes: - message -- explanation of the error - """ - - def __init__(self, message: str = "Internal Error"): - self.message = message - super().__init__(self.message) - - -def getUserAgent() -> str: - systemBanner = "(External; Python/{} {})".format( - platform.python_version(), platform.platform() - ) - banner = ( - "(Running at TagoIO)" - if os.environ.get("T_ANALYSIS_CONTEXT") is not None - else systemBanner - ) - - banner = "TagoIO-SDK|Python|{} {}".format(__version__, banner) - return banner - - -class ResultHandlerResponse(TypedDict): - data: Optional[any] - error: Optional[str] - - -def resultHandler(req: requests.Response) -> ResultHandlerResponse: - responseJson = req.json() - - if responseJson.get("status") is False or ( - req.status_code >= 400 and req.status_code < 500 - ): - return {"error": responseJson.get("message")} - - return {"data": responseJson.get("result")} - - -def apiRequest(requestParams: RequestParams) -> dict[str, any]: - sessionHTTP = requests.Session() - sessionHTTP.headers.update( - { - **requestParams["headers"], - "user-agent": getUserAgent(), - "content-type": "application/json", - } - ) - - url = "{}{}".format(requestParams["url"], requestParams["path"]) - dataBody = json.dumps(requestParams.get("body"), default=str) - if dataBody == "null": - dataBody = None - - def request() -> ResultHandlerResponse: - return resultHandler( - sessionHTTP.request( - method=requestParams["method"], - url=url, - data=dataBody, - params=requestParams.get("params"), - timeout=config.tagoSDKconfig["requestTimeout"], - ) - ) - - result = None - resulterror = None - for _ in range(config.tagoSDKconfig["requestAttempts"]): - try: - resultBack = request() - if resultBack.get("error") is not None: - resulterror = resultBack.get("error") - else: - result = resultBack.get("data") - break - except Exception as e: - resulterror = str(e.args[0].reason) - time.sleep(1.5) - - if result is None: - raise TagoIORequestError(resulterror) - - return result diff --git a/src/tagoio_sdk/infrastructure/api_socket.py b/src/tagoio_sdk/infrastructure/api_socket.py deleted file mode 100644 index 1bd5266..0000000 --- a/src/tagoio_sdk/infrastructure/api_socket.py +++ /dev/null @@ -1,34 +0,0 @@ -import socketio - -from tagoio_sdk import config -from tagoio_sdk.common.tagoio_module import GenericModuleParams -from tagoio_sdk.regions import getConnectionURI - -socketOptions = config.tagoSDKconfig["socketOpts"] - - -class APISocket: - def __init__(self, params: GenericModuleParams) -> None: - url = getConnectionURI(params.get("region"))["realtime"] - URLRealtime = "{}{}{}".format(url, "?token=", params.get("token")) - self.realtimeURL = URLRealtime - - sio = socketio.AsyncClient( - reconnection=socketOptions["reconnection"], - reconnection_delay=socketOptions["reconnectionDelay"], - ) - self.sio = sio - - async def connect(self) -> socketio.AsyncClient: - await self.sio.connect( - url=self.realtimeURL, transports=socketOptions["transports"] - ) - await self.sio.wait() - - -channels = { - "notification": "notification::data", - "analysisConsole": "analysis::console", - "analysisTrigger": "analysis::trigger", - "bucketData": "bucket::data", -} diff --git a/src/tagoio_sdk/modules/Analysis/Analysis.py b/src/tagoio_sdk/modules/Analysis/Analysis.py deleted file mode 100644 index 1eb06a0..0000000 --- a/src/tagoio_sdk/modules/Analysis/Analysis.py +++ /dev/null @@ -1,111 +0,0 @@ -import json -import os -from typing import Callable, Optional - -from tagoio_sdk.common.tagoio_module import TagoIOModule -from tagoio_sdk.modules.Services import Services - -T_ANALYSIS_CONTEXT = os.environ.get("T_ANALYSIS_CONTEXT") or None - -if T_ANALYSIS_CONTEXT is None: - import asyncio - - from tagoio_sdk.infrastructure.api_socket import APISocket - - loop = asyncio.new_event_loop() - asyncio.set_event_loop(loop) - - -class Analysis(TagoIOModule): - def init(self, analysis: Callable): - self._analysis = analysis - - if T_ANALYSIS_CONTEXT is None: - self.__localRuntime() - else: - self.__runOnTagoIO() - - def __runOnTagoIO(self): - def context(): - pass - - setattr(context, "log", print) - setattr(context, "token", os.environ["T_ANALYSIS_TOKEN"]) - setattr(context, "analysis_id", os.environ["T_ANALYSIS_ID"]) - try: - setattr(context, "environment", json.loads(os.environ["T_ANALYSIS_ENV"])) - except: - setattr(context, "environment", []) - - try: - data = json.loads(os.environ["T_ANALYSIS_DATA"]) - except: - data = [] - - self._analysis(context, data) - - # TODO: Fix any - def __runLocal(self, environment: any, data: any, analysis_id: any, token: any): - def log(*args: any): - print(*args) - Services.Services({"token": token}).console.log(str(args)[1:][:-2]) - - def context(): - pass - - setattr(context, "log", log) - setattr(context, "token", token) - setattr(context, "environment", environment) - setattr(context, "analysis_id", analysis_id) - - self._analysis(context, data or []) - - def __localRuntime(self): - tagoSocket = APISocket({"region": self.region, "token": self.token}) - sio = tagoSocket.sio - - async def connectSocket(): - def ready(analysisObj: any): # TODO: Fix any - print( - "Analysis [{AnalysisName}] Started.\n".format( - AnalysisName=analysisObj["name"] - ) - ) - - def connect(): - print("Connected to TagoIO, Getting analysis information...") - - def disconnect(): - print("\nDisconnected from TagoIO.\n\n") - - def error(e: any): - print("Connection error", e) - - def analysisTrigger(scope: any): - self.__runLocal( - scope["environment"], - scope["data"], - scope["analysis_id"], - scope["token"], - ) - - sio.on("ready", ready) - sio.on("error", error) - sio.on("connect", connect) - sio.on("disconnect", disconnect) - sio.on("analysis::trigger", analysisTrigger) - - await tagoSocket.connect() - - try: - loop.run_until_complete(connectSocket()) - except RuntimeError: - pass - - @staticmethod - def use(analysis: Callable, params: Optional[str] = {"token": "unknown"}): - if not os.environ.get("T_ANALYSIS_TOKEN"): - os.environ["T_ANALYSIS_TOKEN"] = params.get("token") - Analysis(params).init(analysis) - else: - Analysis({"token": os.environ["T_ANALYSIS_TOKEN"]}).init(analysis) diff --git a/src/tagoio_sdk/modules/Analysis/Analysis_Type.py b/src/tagoio_sdk/modules/Analysis/Analysis_Type.py deleted file mode 100644 index d7e73b2..0000000 --- a/src/tagoio_sdk/modules/Analysis/Analysis_Type.py +++ /dev/null @@ -1 +0,0 @@ -AnalysisEnvironment = dict[str, str] diff --git a/src/tagoio_sdk/modules/Device/Device.py b/src/tagoio_sdk/modules/Device/Device.py deleted file mode 100644 index 68af55a..0000000 --- a/src/tagoio_sdk/modules/Device/Device.py +++ /dev/null @@ -1,196 +0,0 @@ -from datetime import datetime -from typing import Optional, Union - -from tagoio_sdk.common.Common_Type import Data, GenericID -from tagoio_sdk.common.tagoio_module import TagoIOModule -from tagoio_sdk.modules.Device.Device_Type import DataQuery, DeviceInfo -from tagoio_sdk.modules.Resources.Device_Type import ConfigurationParams -from tagoio_sdk.modules.Utils.dateParser import dateParserList - - -class Device(TagoIOModule): - """ - The Device object contain a device - - :param TagoIOModule: - """ - - def info(self) -> DeviceInfo: - """ - Get information about the current device - - :example: - - myDevice = Device({ "token": "my_device_token" }) - - result = myDevice.info() - - :rtype: DeviceInfo - """ - result = self.doRequest({"path": "/info", "method": "get"}) - return result - - def sendData(self, data: Union[Data, list[Data]]) -> str: - """ - Send data to device - - :param Union[Data, list[Data]] data: An array or one object with data to be send to - TagoIO using device token - - :example: - - myDevice = Device({ "token": "my_device_token" }) - - result = myDevice.sendData({ - "variable": "temperature", - "unit": "F", - "value": 55, - "time": "2015-11-03 13:44:33", - "location": { "lat": 42.2974279, "lng": -85.628292 }, - }) - - :rtype: str - """ - result = self.doRequest({"path": "/data", "method": "post", "body": data}) - return result - - def getData(self, queryParams: DataQuery = None) -> list[Data]: - """ - Get data from TagoIO Device. - - :param DataQuery queryParams: Object with query params - - :example: - - myDevice = Device({ "token": "my_device_token" }) - - result = myDevice.getData({ - "query": "last_item", - "variable": "humidity", - }) - - :rtype: list[Data] - """ - result = self.doRequest( - {"path": "/data", "method": "get", "params": queryParams} - ) - - if isinstance(result, int): - result = [ - Data( - id="none", - origin="?", - time=datetime.now(), - value=result, - variable="?", - ) - ] - return result - - result = dateParserList(result, ["time"]) - return result - - def editData(self, data: Union[Data, list[Data]]) -> str: - """ - Edit data in a Mutable-type device. - - :param Union[Data, list[Data]] data: Array or object with the data to be edited, - each object with the data's ID. - - :example: - - myDevice = Device({"token": "my_device_token"}) - - result = myDevice.editData( - { - "id": "id_of_the_data_item", - "value": "123", - "time": "2022-04-01 12:34:56", - "location": {"lat": 42.2974279, "lng": -85.628292}, - } - ) - - :return: Success message with the amount of data items updated. - - :rtype: str - """ - result = self.doRequest( - { - "path": "/data", - "method": "PUT", - "body": data, - } - ) - return result - - def deleteData(self, queryParams: Optional[DataQuery] = None) -> str: - """ - Delete data from device - - :param DataQuery queryParams: Object with query params - - :example: - - myDevice = Device({ "token": "my_device_token" }); - - result = myDevice.deleteData({ - "query": "last_item", - "variable": "humidity", - "value": 10 - }); - - :rtype: str - """ - if queryParams is None: - queryParams = {"query": "last_item"} - - result = self.doRequest( - {"path": "/data", "method": "DELETE", "params": queryParams} - ) - return result - - def getParameters(self, onlyUnRead: bool = False) -> list[ConfigurationParams]: - """ - Get parameters from device - - :param bool onlyUnRead: set true to get only unread parameters - - :example: - - myDevice = Device({ "token": "my_device_token" }) - - result = myDevice.getParameters() - - :rtype: list[ConfigurationParams] - """ - params = {} - - if onlyUnRead is True: - params["sent_status"] = "true" - - result = self.doRequest( - {"path": "/device/params", "method": "GET", "params": params} - ) - return result - - def setParameterAsRead(self, parameterID: GenericID) -> str: - """ - Mark parameter as read - - :param GenericID parameterID: Parameter identification - - :example: - - myDevice = Device({ "token": "my_device_token" }) - - result = myDevice.setParameterAsRead(parameterID="parameter_id") - - :rtype: str - """ - result = self.doRequest( - { - "path": f"/device/params/{parameterID}", - "method": "PUT", - } - ) - return result diff --git a/src/tagoio_sdk/modules/Device/Device_Type.py b/src/tagoio_sdk/modules/Device/Device_Type.py deleted file mode 100644 index 1014975..0000000 --- a/src/tagoio_sdk/modules/Device/Device_Type.py +++ /dev/null @@ -1,39 +0,0 @@ -from typing import Literal, Optional, TypedDict, Union - - -class DeviceInfo(TypedDict): - id: str - profile: str - name: Optional[str] - description: Optional[str] - visible: Optional[bool] - - -class DataQueryBase(TypedDict): - variables: Union[str, list[str]] - groups: Union[str, list[str]] - ids: Union[str, list[str]] - - -class DataQueryDefault(DataQueryBase): - query: Literal["default"] - qty: int - details: bool - ordination: Literal["descending", "ascending"] - skip: int - - -class DataQueryFirstLast(DataQueryBase): - query: Literal[ - "last_item", - "last_value", - "last_location", - "last_insert", - "first_item", - "first_value", - "first_location", - "first_insert", - ] - - -DataQuery = Union[DataQueryDefault, DataQueryFirstLast] diff --git a/src/tagoio_sdk/modules/Resources/Account.py b/src/tagoio_sdk/modules/Resources/Account.py deleted file mode 100644 index 928f2da..0000000 --- a/src/tagoio_sdk/modules/Resources/Account.py +++ /dev/null @@ -1,23 +0,0 @@ -from tagoio_sdk.common.tagoio_module import TagoIOModule -from tagoio_sdk.modules.Resources.Account_Types import AccountInfo -from tagoio_sdk.modules.Utils.dateParser import dateParser - - -class Account(TagoIOModule): - def info(self) -> AccountInfo: - """ - Gets all account information. - """ - - result = self.doRequest( - { - "path": "/account", - "method": "GET", - } - ) - result = dateParser(result, ["created_at", "updated_at", "last_login"]) - - if result.get("options"): - result["options"] = dateParser(result["options"], ["last_whats_new"]) - - return result diff --git a/src/tagoio_sdk/modules/Resources/AccountDeprecated.py b/src/tagoio_sdk/modules/Resources/AccountDeprecated.py deleted file mode 100644 index d52477d..0000000 --- a/src/tagoio_sdk/modules/Resources/AccountDeprecated.py +++ /dev/null @@ -1,35 +0,0 @@ -from tagoio_sdk.common.tagoio_module import GenericModuleParams - -from .Account import Account -from .Billing import Billing -from .Buckets import Buckets -from .Dashboards import Dashboards -from .Devices import Devices -from .Integration import Integration -from .Profile import Profile -from .Run import Run - - -class AccountDeprecated(Account): - """ - @internal - @deprecated Moved to Resources. - * Resources().account.info() Relies on Access Manage Permissions - * Resources(token="TOKEN").account.info() Relies on Analysis/Profile Token - """ - - def __init__(self, params: GenericModuleParams): - self.buckets = Buckets(params) - """@deprecated moved to Resources().buckets""" - self.dashboards = Dashboards(params) - """@deprecated moved to Resources().dashboards""" - self.devices = Devices(params) - """@deprecated moved to Resources().devices""" - self.billing = Billing(params) - """@deprecated moved to Resources().billing""" - self.integration = Integration(params) - """@deprecated moved to Resources().integration""" - self.run = Run(params) - """@deprecated moved to Resources().run""" - self.profiles = Profile(params) - """@deprecated moved to Resources().profiles""" diff --git a/src/tagoio_sdk/modules/Resources/Account_Types.py b/src/tagoio_sdk/modules/Resources/Account_Types.py deleted file mode 100644 index 301d738..0000000 --- a/src/tagoio_sdk/modules/Resources/Account_Types.py +++ /dev/null @@ -1,41 +0,0 @@ -from datetime import datetime -from typing import Optional, TypedDict - -from tagoio_sdk.common.Common_Type import GenericID - - -class AccountOptions(TypedDict): - user_view_welcome: bool - decimal_separator: str - thousand_separator: str - last_whats_new: Optional[datetime] - - -class AccountOpt(TypedDict): - authenticator: bool - sms: bool - email: bool - - -class AccountInfo(TypedDict): - active: bool - name: str - email: str - country: Optional[str] - timezone: str - company: Optional[str] - newsletter: Optional[bool] - developer: Optional[bool] - blocked: bool - id: GenericID - language: str - last_login: Optional[datetime] - options: AccountOptions - phone: Optional[str] - send_invoice: bool - stripe_id: Optional[str] - type: str - plan: str - created_at: datetime - updated_at: datetime - otp: Optional[AccountOpt] diff --git a/src/tagoio_sdk/modules/Resources/Billing.py b/src/tagoio_sdk/modules/Resources/Billing.py deleted file mode 100644 index 4c31dc8..0000000 --- a/src/tagoio_sdk/modules/Resources/Billing.py +++ /dev/null @@ -1,85 +0,0 @@ -from tagoio_sdk.common.tagoio_module import TagoIOModule -from tagoio_sdk.modules.Resources.Billing_Type import ( - BillingEditResourceAllocation, - BillingEditSubscription, - BillingPrices, - BillingSubscription, -) - - -class Billing(TagoIOModule): - def getPrices(self) -> BillingPrices: - """ - Get pricing for plans, services and add-ons. - """ - result = self.doRequest( - { - "path": "/pricing", - "method": "GET", - } - ) - return result - - def getSubscription(self) -> BillingSubscription: - """ - Get the account subscription information. - """ - result = self.doRequest( - { - "path": "/account/subscription", - "method": "GET", - } - ) - return result - - def editSubscription(self, subscription: BillingEditSubscription) -> None: - """ - Edit an account's subscription to change plan, services or add-ons. - - Only one of either `plan`, `services`, or `addons` can be in `subscription`. - - :param BillingEditSubscription subscription: Object with updates to subscription. - - :throws: If the subscription has a pending operation. - :throws: If updating more than one of plan, services and add-ons at the same time. - :throws: If purchasing add-ons or changing service limits on the Free plan. - :throws: If using an invalid coupon. - """ - result = self.doRequest( - { - "path": "/account/subscription", - "method": "POST", - "body": subscription, - } - ) - return result - - def editAllocation(self, allocation: BillingEditResourceAllocation) -> str: - """ - Edit the resource allocation for the profiles in an account. - - The resource allocation array doesn't need to have an object for - each of the account's profiles, - as long as the sum of the allocated amounts for the services doesn't - exceed the account's service limit. - - The resource allocation object for a profile doesn't need to have all the services. - - :param BillingEditResourceAllocation allocation: Array with the resource allocation - - :throws: If passed an object that is not an allocation array. - :throws: If the account only has one profile. - :throws: If one of the profile IDs in the allocation array doesn't exist in the account. - :throws: If the allocated amount for one of the services exceeds the available amount. - - :returns: Success message. - """ - - result = self.doRequest( - { - "path": "/account/allocation", - "method": "POST", - "body": allocation, - } - ) - return result diff --git a/src/tagoio_sdk/modules/Resources/Billing_Type.py b/src/tagoio_sdk/modules/Resources/Billing_Type.py deleted file mode 100644 index d591103..0000000 --- a/src/tagoio_sdk/modules/Resources/Billing_Type.py +++ /dev/null @@ -1,212 +0,0 @@ -from typing import Literal, Optional, TypedDict, Union - -from tagoio_sdk.common.Common_Type import GenericID - -BillingPlan = Literal["free", "starter", "scale"] - -BillingAddOn = Literal["mobile", "custom_dns"] - -BillingService = Literal[ - "input", - "output", - "analysis", - "data_records", - "sms", - "email", - "run_users", - "push_notification", - "file_storage", -] - - -class BillingServicePrice(TypedDict): - amount: Union[int, float] - """ - Amount available in the service tier. - """ - price: Union[int, float] - """ - Price for the service tier. - """ - - -BillingAllServicePrices = dict[BillingService, list[BillingServicePrice]] - - -class BillingPlanPrices(TypedDict): - name: BillingPlan - """ - Plan name. - """ - price: Union[int, float] - """ - Plan price. - """ - - -BillingPlanPrices = list[BillingPlanPrices] - - -class BillingAddOnPrices(TypedDict): - name: BillingAddOn - """ - Add-on name. - """ - price: Union[int, float] - """ - Add-on price. - """ - - -BillingAddOnPrices = list[BillingAddOnPrices] - - -class BillingPrices(TypedDict): - plans: BillingPlanPrices - """ - Prices for each plan. - """ - addons: BillingAddOnPrices - """ - Prices for each add-on. - """ - BillingAllServicePrices: BillingAllServicePrices - - -class current_cycle(TypedDict): - start: str - """ - Date when the current cycle started. - """ - end: str - """ - Date when the current cycle ends. - """ - - -class BillingServiceSubscription(TypedDict): - limit: Union[int, float] - - -BillingSubscriptionServices = dict[BillingService, BillingServiceSubscription] - -BillingSubscriptionAddOns = dict[BillingAddOn, list[GenericID]] - - -class BillingPaymentError(TypedDict): - message: Union[str, None] - """ - Payment error message. - """ - details: Union[str, None] - """ - More details on the payment error. - """ - - -class BillingPaymentPastDue(TypedDict): - amount_due: Union[int, float] - """ - Amount due that was not paid in a recurring payment. - """ - attempt_count: Union[int, float] - """ - Amount of attempts for the retried recurring payment. - """ - invoice_url: str - """ - URL for the invoice related to the failed recurring payment. - """ - - -class BillingSubscription(TypedDict): - account: GenericID - """ - Account ID. - """ - plan: BillingPlan - """ - Account plan. - """ - services: BillingSubscriptionServices - """ - Limits for each service in the account's subscription. - """ - addons: BillingSubscriptionAddOns - """ - Add-ons in the account's subscription. - """ - current_cycle: current_cycle - """ - Current cycle for the account's subscription. - """ - processing: bool - """ - Whether changes are still being processed and awaiting response from Stripe. - """ - payment_error: Optional[BillingPaymentError] - """ - Payment errors in the account's subscription. - """ - past_due: Optional[BillingPaymentPastDue] - """ - Past due information for recurring payment errors. - """ - upcoming_invoice_total: Union[int, float] - """ - Value of the upcoming invoice. - """ - trial_end: Union[str, None] - """ - Timestamp when the trial for the subscription ends if the subscription has a trial active. - """ - - -class BillingEditSubscription(TypedDict): - plan: Optional[BillingPlan] - """ - New account plan. - - Only one of `plan`, `services` and `addons` is accepted. - """ - services: Optional[BillingSubscriptionServices] - """ - New limits for each service in the account's subscription. - - Only one of `plan`, `services` and `addons` is accepted. - """ - addons: Optional[BillingSubscriptionAddOns] - """ - Only one of `plan`, `services` and `addons` is accepted. - New add-ons in the account's subscription. - """ - coupon: Optional[str] - """ - Coupon code. - """ - - -BillingResourceAllocationServices = dict[BillingService, Union[int, float]] - - -class BillingProfileResourceAllocation(TypedDict): - profile: GenericID - """ - Profile ID. - """ - updated_at: str - """ - Timestamp when the resource allocation for the profile was last updated. - """ - BillingResourceAllocationServices: BillingResourceAllocationServices - - -class BillingProfileEditResourceAllocation(TypedDict): - profile: Optional[GenericID] - """ - Profile ID. - """ - BillingResourceAllocationServices: Optional[BillingResourceAllocationServices] - - -BillingEditResourceAllocation = list[BillingProfileEditResourceAllocation] diff --git a/src/tagoio_sdk/modules/Resources/Buckets.py b/src/tagoio_sdk/modules/Resources/Buckets.py deleted file mode 100644 index 63f30f1..0000000 --- a/src/tagoio_sdk/modules/Resources/Buckets.py +++ /dev/null @@ -1,34 +0,0 @@ -from typing import Union - -from tagoio_sdk.common.Common_Type import GenericID -from tagoio_sdk.common.tagoio_module import TagoIOModule -from tagoio_sdk.modules.Utils.dateParser import dateParser - - -class Buckets(TagoIOModule): - def info(self, bucketID: GenericID) -> str: - """ - Gets information about the bucket - :param GenericID bucketID: Bucket ID - """ - result = self.doRequest( - { - "path": f"/bucket/{bucketID}", - "method": "GET", - } - ) - result = dateParser(result, ["created_at", "updated_at"]) - return result - - def amount(self, bucketID: GenericID) -> Union[int, float]: - """ - Get Amount of data on the Bucket - :param GenericID bucketID: Bucket ID - """ - result = self.doRequest( - { - "path": f"/bucket/{bucketID}/data_amount", - "method": "GET", - } - ) - return result diff --git a/src/tagoio_sdk/modules/Resources/Buckets_Type.py b/src/tagoio_sdk/modules/Resources/Buckets_Type.py deleted file mode 100644 index 1815d18..0000000 --- a/src/tagoio_sdk/modules/Resources/Buckets_Type.py +++ /dev/null @@ -1,35 +0,0 @@ -from datetime import datetime -from typing import Literal, Optional, TypedDict, Union - -from tagoio_sdk.common.Common_Type import GenericID, TagsObj - -DataStorageType = Literal["immutable", "mutable", "legacy"] - - -class ExportBucketOption(TypedDict): - start_date: Optional[datetime] - end_date: Optional[datetime] - - -class BucketDeviceInfo(TypedDict): - id: GenericID - name: str - - -class BucketCreateInfo(TypedDict): - name: str - """ - A name for the bucket. - """ - description: Optional[Union[str, None]] - """ - Set if the bucket will be visible or not. Default True. - """ - visible: Optional[bool] - """ - Set if the bucket will be visible or not. Default True. - """ - tags: Optional[list[TagsObj]] - """ - An array of tags. - """ diff --git a/src/tagoio_sdk/modules/Resources/Dashboards.py b/src/tagoio_sdk/modules/Resources/Dashboards.py deleted file mode 100644 index 8769ede..0000000 --- a/src/tagoio_sdk/modules/Resources/Dashboards.py +++ /dev/null @@ -1,229 +0,0 @@ -from typing import Optional, TypedDict - -from tagoio_sdk.common.Common_Type import ExpireTimeOption, GenericID, Query -from tagoio_sdk.common.tagoio_module import TagoIOModule -from tagoio_sdk.modules.Resources.Dashboards_Type import ( - AnalysisRelated, - DashboardCreateInfo, - DashboardInfo, - DevicesRelated, - PublicKeyResponse, -) -from tagoio_sdk.modules.Utils.dateParser import dateParser, dateParserList - - -class Dashboards(TagoIOModule): - def listDashboard(self, queryObj: Query = {}) -> list[DashboardInfo]: - """ - Retrieves a list with all dashboards from the account - - :default: - - queryObj: { - "page": 1, - "fields": ["id", "name"], - "filter": {}, - "amount": 20, - "orderBy": "label,asc", - } - - :param queryObj Search query params - """ - - if "orderBy" in queryObj: - firstArgument = queryObj["orderBy"][0] - secondArgument = queryObj["orderBy"][1] - orderBy = f"{firstArgument},{secondArgument}" - else: - orderBy = "label,asc" - - result = self.doRequest( - { - "path": "/dashboard", - "method": "GET", - "params": { - "page": queryObj.get("page") or 1, - "fields": queryObj.get("fields") or ["id", "name"], - "filter": queryObj.get("filter") or {}, - "amount": queryObj.get("amount") or 20, - "orderBy": orderBy, - }, - } - ) - - result = dateParserList(result, ["created_at", "updated_at", "last_access"]) - return result - - class dashboard(TypedDict): - dashboard: GenericID - - def create(self, dashboardObj: DashboardCreateInfo) -> dashboard: - """ - Create dashboard - - :param dashboardObj Dashboard object - """ - result = self.doRequest( - { - "path": "/dashboard", - "method": "POST", - "body": dashboardObj, - } - ) - - return result - - def edit(self, dashboardID: GenericID, dashboardObj: DashboardInfo) -> str: - """ - Modify any property of the dashboards - - :param dashboardID Dashboard identification - :param dashboardObj Dashboard Object with data to be replaced - """ - result = self.doRequest( - { - "path": f"/dashboard/{dashboardID}", - "method": "PUT", - "body": { - dashboardObj, - }, - } - ) - - return result - - def delete(self, dashboardID: GenericID) -> str: - """ - Deletes an dashboard from the account - - :param dashboardID Dashboard identification - """ - result = self.doRequest( - { - "path": f"/dashboard/{dashboardID}", - "method": "DELETE", - } - ) - - return result - - def info(self, dashboardID: GenericID) -> DashboardInfo: - """ - Gets information about the dashboard - - :param dashboardID Dashboard identification - """ - result = self.doRequest( - { - "path": f"/dashboard/{dashboardID}", - "method": "GET", - } - ) - - result = dateParser(result, ["created_at", "updated_at", "last_access"]) - return result - - class duplicate(TypedDict): - dashboard_id: str - message: str - - class dashboardObj(TypedDict): - setup: Optional[any] - new_label: Optional[str] - - def duplicate( - self, dashboardID: GenericID, dashboardObj: Optional[dashboardObj] = None - ) -> duplicate: - """ - Duplicate the dashboard to your own account - - :param dashboardID Dashboard identification - :param dashboardObj Object with data of the duplicate dashboard - """ - result = self.doRequest( - { - "path": f"/dashboard/{dashboardID}/duplicate", - "method": "POST", - "body": dashboardObj, - } - ) - - return result - - def getPublicKey( - self, dashboardID: GenericID, expireTime: ExpireTimeOption = "never" - ) -> PublicKeyResponse: - """ - Generate a new public token for the dashboard - - :param dashboardID Dashboard identification - :param expireTime Time when token will expire - """ - result = self.doRequest( - { - "path": f"/dashboard/{dashboardID}/share/public", - "method": "GET", - "params": { - "expire_time": expireTime, - }, - } - ) - - result = dateParser(result, ["expire_time"]) - - return result - - def listDevicesRelated(self, dashboardID: GenericID) -> list[DevicesRelated]: - """ - Get list of devices related with dashboard - - :param dashboardID Dashboard identification - """ - result = self.doRequest( - { - "path": f"/dashboard/{dashboardID}/devices", - "method": "GET", - } - ) - - return result - - def listAnalysisRelated(self, dashboardID: GenericID) -> list[AnalysisRelated]: - """ - Get list of analysis related with a dashboard - - :param dashboardID Dashboard identification - """ - result = self.doRequest( - { - "path": f"/dashboard/{dashboardID}/analysis", - "method": "GET", - } - ) - - return result - - def runWidgetHeaderButtonAnalysis( - self, - analysisID: GenericID, - dashboardID: GenericID, - widgetID: GenericID, - scope: Optional[any] = {}, - ) -> str: - """ - Runs an analysis located in a widget's header button - - :param analysisID The id of the analysis to run - :param dashboardID The id of the dashboard that contains the widget - :param widgetID The id of the widget that contains the header button - :param scope Data to send to the analysis - """ - result = self.doRequest( - { - "path": f"/analysis/{analysisID}/run/{dashboardID}/{widgetID}", - "method": "POST", - "body": scope, - } - ) - - return result diff --git a/src/tagoio_sdk/modules/Resources/Dashboards_Type.py b/src/tagoio_sdk/modules/Resources/Dashboards_Type.py deleted file mode 100644 index b516a02..0000000 --- a/src/tagoio_sdk/modules/Resources/Dashboards_Type.py +++ /dev/null @@ -1,189 +0,0 @@ -from datetime import datetime -from typing import Literal, Optional, TypedDict, Union - -from tagoio_sdk.common.Common_Type import ( - ExpireTimeOption, - GenericID, - GenericToken, - TagsObj, -) -from tagoio_sdk.modules.Resources.Buckets_Type import BucketDeviceInfo - - -class Arrangement(TypedDict): - widget_id: str - x: Union[int, float] - y: Union[int, float] - width: Union[int, float] - height: Union[int, float] - tab: Optional[str] - - -class DashboardCreateInfo(TypedDict): - label: str - arrangement: list[Arrangement] - tags: list[TagsObj] - visible: bool - - -class icon(TypedDict): - url: str - color: Optional[str] - - -class conditions(TypedDict): - key: str - value: str - - -class filter_conditions(TypedDict): - blueprint_device: str - tag_key: str - type: str - - -class shared(TypedDict): - id: str - email: str - name: str - free_account: bool - allow_tags: bool - expire_time: str - allow_share: bool - - -class blueprint_devices(TypedDict): - conditions: list[conditions] - name: str - id: str - label: str - filter_conditions: list[filter_conditions] - theme: any - setup: any - - -class DashboardInfo(TypedDict): - id: GenericID - created_at: datetime - updated_at: datetime - last_access: datetime - group_by: list - tabs: list - icon: icon - background: any - type: str - blueprint_device_behavior: Literal["more_than_one", "always"] - blueprint_selector_behavior: Literal[ - "open", "closed", "always_open", "always_closed" - ] - blueprint_devices: blueprint_devices - theme: any - setup: any - shared: shared - - -class WidgetData(TypedDict): - origin: GenericID - qty: Optional[Union[int, float]] - timezone: Optional[str] - variables: Optional[str] - bucket: Optional[GenericID] - query: Optional[Literal["min", "max", "count", "avg", "sum"]] - start_date: Optional[Union[datetime, str]] - end_date: Optional[Union[datetime, str]] - overwrite: Optional[bool] - - -class WidgetResource(TypedDict): - filter: list[TagsObj] - - -DeviceResourceView = Literal[ - f"tags.{str}", - f"param.{str}", - "name", - "id", - "bucket_name", - "network_name", - "connector_name", - "connector", - "network", - "bucket", - "last_input", - "created_at", - "active", -] - - -class WidgetDeviceResource(TypedDict): - type: Literal["device"] - view: DeviceResourceView - editable: Literal["name", f"tags.{str}", f"param.{str}"] - - -class EditDeviceResource(TypedDict): - device: GenericID - name: Optional[str] - active: Optional[bool] - edit: dict[str, Union[str, bool]] - - -class EditResourceOptions(TypedDict): - identifier: Optional[str] - - -class WidgetInfo(TypedDict): - analysis_run: Optional[GenericID] - dashboard: Optional[GenericID] - display: any - data: Optional[list[WidgetData]] - resource: Optional[list[WidgetDeviceResource]] - id: Optional[GenericID] - label: str - realtime: Optional[bool] - type: str - - -class DevicesRelated(BucketDeviceInfo): - bucket: GenericID - - -class AnalysisRelated(TypedDict): - id: GenericID - name: str - - -class PostDataModel(TypedDict): - origin: GenericID - variable: str - - -class blueprint_devices(TypedDict): - origin: GenericID - id: GenericID - bucket: Optional[GenericID] - - -class widgetOverwrite(TypedDict): - start_date: Optional[any] - end_date: Optional[any] - timezone: Optional[any] - - -class GetDataModel(TypedDict): - overwrite: Optional[widgetOverwrite] - blueprint_devices: Optional[list[blueprint_devices]] - page: Optional[Union[int, float]] - amount: Optional[Union[int, float]] - - -class PublicKeyResponse(TypedDict): - token: GenericToken - expire_time: ExpireTimeOption - - -EditDataModel = PostDataModel and {id: GenericID} - -PublicKeyResponse = PublicKeyResponse - -widgetOverwriteOptions = Literal["start_date", "end_date", "timezone"] diff --git a/src/tagoio_sdk/modules/Resources/Device_Type.py b/src/tagoio_sdk/modules/Resources/Device_Type.py deleted file mode 100644 index 9873742..0000000 --- a/src/tagoio_sdk/modules/Resources/Device_Type.py +++ /dev/null @@ -1,489 +0,0 @@ -from datetime import datetime -from typing import Literal, Optional, TypedDict, Union - -from tagoio_sdk.common.Common_Type import ( - ExpireTimeOption, - GenericID, - GenericToken, - PermissionOption, - TagsObj, -) -from tagoio_sdk.modules.Resources.Buckets_Type import DataStorageType - - -class bucket(TypedDict): - id: GenericID - name: str - - -class DeviceInfo(TypedDict): - id: GenericID - """ - Device ID. - """ - type: DataStorageType - """ - Device's data storage (bucket) type. - """ - profile: GenericID - """ - ID of the profile that owns the device. - """ - bucket: bucket - """ - Bucket storing the device's data. - """ - last_output: datetime or None - """ - Date for the device's last output. - """ - last_input: datetime or None - """ - Date for the device's last input. - """ - updated_at: datetime - """ - Date for the device's last update. - """ - created_at: datetime - """ - Date for the device's creation. - """ - inspected_at: datetime or None - """ - Date for the device's last inspection. - """ - last_retention: datetime or None - """ - Date for the device's last data retention. - """ - - -class DeviceInfoList(TypedDict): - id: GenericID - """ - Device ID. - """ - type: DataStorageType - """ - Device's data storage (bucket) type. - """ - profile: GenericID - """ - ID of the profile that owns the device. - """ - last_output: datetime or None - """ - Date for the device's last output. - """ - last_input: datetime or None - """ - Date for the device's last input. - """ - updated_at: datetime - """ - Date for the device's last update. - """ - created_at: datetime - """ - Date for the device's creation. - """ - inspected_at: datetime or None - """ - Date for the device's last inspection. - """ - last_retention: datetime or None - """ - Date for the device's last data retention. - """ - bucket: GenericID - - -class DeviceQuery(TypedDict): - page: Union[int, float] - """ - Page of list starting from 1 - """ - amount: Union[int, float] - """ - Amount of items will return. - """ - fields: list[ - Literal[ - "id", - "type", - "profile", - "last_output", - "last_input", - "updated_at", - "created_at", - "inspected_at", - "last_retention", - ] - ] - """ - Array of field names. - """ - filter: DeviceInfo - """ - Filter object. - """ - orderBy: list[ - Literal[ - "name", - "visible", - "active", - "last_input", - "last_output", - "created_at", - "updated_at", - "asc", - "desc", - ] - ] - """ - Tuple with a field and an order - """ - resolveBucketName: Optional[bool] - - -DeviceListItem = DeviceInfoList - - -class ConfigurationParams(TypedDict): - sent: bool - key: str - value: str - id: Optional[str] - - -class DeviceCreateResponse(TypedDict): - device_id: GenericID - bucket_id: GenericID - token: GenericToken - - -class DeviceCreateInfoBasic(TypedDict): - name: str - """ - Device name. - """ - connector: GenericID - """ - Connector ID. - """ - network: GenericID - """ - Network ID. - """ - type: Optional[DataStorageType] - """ - Device's data storage (bucket) type. - - :default: "legacy" - """ - description: Optional[str or None] - """ - Description of the device. - """ - active: Optional[bool] - """ - Set if the device will be active. - """ - visible: Optional[bool] - """ - Set if the device will be visible. - """ - configuration_params: Optional[list[ConfigurationParams]] - """ - An array of configuration params - """ - tags: Optional[list[TagsObj]] - """ - An array of tags - """ - serie_number: Optional[str] - """ - Device serial number. - """ - connector_parse: Optional[bool] - """ - If device will use connector parser - """ - parse_function: Optional[str] - """ - Javascript code for use as payload parser - """ - - -class DeviceCreateInfoBasicMutable(TypedDict): - name: str - """ - Device name. - """ - connector: GenericID - """ - Connector ID. - """ - network: GenericID - """ - Network ID. - """ - type: Literal["mutable"] - """ - Device's data storage (bucket) type. - - :default: "legacy" - """ - description: str or None - """ - Description of the device. - """ - active: bool - """ - Set if the device will be active. - """ - visible: bool - """ - Set if the device will be visible. - """ - configuration_params: list[ConfigurationParams] - """ - An array of configuration params - """ - tags: list[TagsObj] - """ - An array of tags - """ - serie_number: str - """ - Device serial number. - """ - connector_parse: bool - """ - If device will use connector parser - """ - parse_function: str - """ - Javascript code for use as payload parser - """ - - -class DeviceCreateInfoBasicImutable(TypedDict): - name: str - """ - Device name. - """ - connector: GenericID - """ - Connector ID. - """ - network: GenericID - """ - Network ID. - """ - type: Literal["imutable"] - """ - Device's data storage (bucket) type. - - :default: "legacy" - """ - description: str or None - """ - Description of the device. - """ - active: bool - """ - Set if the device will be active. - """ - visible: bool - """ - Set if the device will be visible. - """ - configuration_params: list[ConfigurationParams] - """ - An array of configuration params - """ - tags: list[TagsObj] - """ - An array of tags - """ - serie_number: str - """ - Device serial number. - """ - connector_parse: bool - """ - If device will use connector parser - """ - parse_function: str - """ - Javascript code for use as payload parser - """ - chunk_period: Literal["day", "week", "month", "quarter"] - """ - Chunk division to retain data in the device. - - Required for Immutable devices. - """ - chunk_retention: Union[int, float] - """ - Amount of chunks to retain data according to the `chunk_period`. - - Integer between in the range of 0 to 36 (inclusive). - - Required for Immutable devices. - """ - - -DeviceCreateInfoMutable = DeviceCreateInfoBasicMutable - -DeviceCreateInfoImmutable = DeviceCreateInfoBasicImutable - -DeviceCreateInfo = DeviceCreateInfoMutable or DeviceCreateInfoImmutable - - -class DeviceEditInfo(TypedDict): - name: str - """ - Device name. - """ - connector: GenericID - """ - Connector ID. - """ - network: GenericID - """ - Network ID. - """ - description: str or None - """ - Description of the device. - """ - active: bool - """ - Set if the device will be active. - """ - visible: bool - """ - Set if the device will be visible. - """ - configuration_params: list[ConfigurationParams] - """ - An array of configuration params - """ - tags: list[TagsObj] - """ - An array of tags - """ - serie_number: str - """ - Device serial number. - """ - connector_parse: bool - """ - If device will use connector parser - """ - parse_function: str - """ - Javascript code for use as payload parser - """ - chunk_retention: Union[int, float] - """ - Amount of chunks to retain data according to the `chunk_period`. - - Integer between in the range of 0 to 36 (inclusive). - - Required for Immutable devices. - """ - - -DeviceEditInfo = DeviceEditInfo - - -class TokenData(TypedDict): - name: str - """ - A name for the token. - """ - expire_time: ExpireTimeOption - """ - The time for when the token should expire. - It will be randomly generated if not included. - Accepts “never” as value. - """ - permission: PermissionOption - """ - Token permission should be 'write', 'read' or 'full'. - """ - serie_number: Optional[str] - """ - [optional] The serial number of the device. - """ - verification_code: Optional[str] - """ - [optional] Verification code to validate middleware requests. - """ - middleware: Optional[str] - """ - [optional] Middleware or type of the device that will be added. - """ - - -class DeviceTokenDataList(TypedDict): - token: GenericToken - device_id: GenericID - network_id: GenericID - name: str - permission: PermissionOption - serie_number: str or None - last_authorization: str or None - expire_time: ExpireTimeOption - created_at: str - - -class ListDeviceTokenQuery(TypedDict): - page: Union[int, float] - """ - Page of list starting from 1 - """ - amount: Union[int, float] - """ - Amount of items will return. - """ - fields: list[ - Literal[ - "token", - "device_id", - "network_id", - "name", - "permission", - "serie_number", - "last_authorization", - "expire_time", - "created_at", - ] - ] - """ - Array of field names. - """ - filter: DeviceTokenDataList - """ - Filter object. - """ - orderBy: Optional[ - list[ - Literal[ - "name", - "permission", - "serie_number", - "last_authorization", - "created_at", - "asc", - "desc", - ] - ] - ] - """ - Tuple with a field and an order - """ diff --git a/src/tagoio_sdk/modules/Resources/Devices.py b/src/tagoio_sdk/modules/Resources/Devices.py deleted file mode 100644 index 00b0b94..0000000 --- a/src/tagoio_sdk/modules/Resources/Devices.py +++ /dev/null @@ -1,340 +0,0 @@ -from typing import Optional - -from tagoio_sdk.common.Common_Type import ( - Data, - GenericID, - GenericToken, - TokenCreateResponse, -) -from tagoio_sdk.common.tagoio_module import TagoIOModule -from tagoio_sdk.modules.Device.Device_Type import DataQuery, DeviceInfo -from tagoio_sdk.modules.Resources.Device_Type import ( - ConfigurationParams, - DeviceCreateInfo, - DeviceCreateResponse, - DeviceEditInfo, - DeviceListItem, - DeviceQuery, - DeviceTokenDataList, - ListDeviceTokenQuery, - TokenData, -) -from tagoio_sdk.modules.Utils.dateParser import dateParser, dateParserList - - -class Devices(TagoIOModule): - def listDevice(self, queryObj: DeviceQuery = {}) -> list[DeviceListItem]: - """ - Retrieves a list with all devices from the account - - :default: - - queryObj: { - "page": 1, - "fields": ["id", "name"], - "filter": {}, - "amount": 20, - "orderBy": "name,asc", - "resolveBucketName": false - } - - :param DeviceQuery queryObj: Search query params - """ - if "orderBy" in queryObj: - firstArgument = queryObj["orderBy"][0] - seccondArgument = queryObj["orderBy"][1] - orderBy = f"{firstArgument},{seccondArgument}" - else: - orderBy = "name,asc" - - result = self.doRequest( - { - "path": "/device", - "method": "GET", - "params": { - "page": queryObj.get("page") or 1, - "fields": queryObj.get("fields") or ["id", "name"], - "filter": queryObj.get("filter") or {}, - "amount": queryObj.get("amount") or 20, - "orderBy": orderBy, - "resolveBucketName": queryObj.get("resolveBucketName") or False, - }, - } - ) - - result = dateParserList( - result, - [ - "last_input", - "last_output", - "updated_at", - "created_at", - "inspected_at", - ], - ) - - return result - - def create(self, deviceObj: DeviceCreateInfo) -> DeviceCreateResponse: - """ - Generates and retrieves a new action from the Device - - :param DeviceCreateInfo deviceObj: Object data to create new device - """ - result = self.doRequest( - { - "path": "/device", - "method": "POST", - "body": deviceObj, - } - ) - return result - - def edit(self, deviceID: GenericID, deviceObj: DeviceEditInfo) -> str: - """ - Modify any property of the device - - :param GenericID deviceID: Device ID - - :param DeviceEditInfo deviceObj: Device object with fields to replace - """ - result = self.doRequest( - { - "path": f"/device/{deviceID}", - "method": "PUT", - "body": deviceObj, - } - ) - return result - - def delete(self, deviceID: GenericID) -> str: - """ - Deletes an device from the account - - :param GenericID deviceID: Device ID - """ - result = self.doRequest( - { - "path": f"/device/{deviceID}", - "method": "DELETE", - } - ) - return result - - def info(self, deviceID: GenericID) -> DeviceInfo: - """ - Get Info of the Device - - :param GenericID deviceID: Device ID - """ - result = self.doRequest( - { - "path": f"/device/{deviceID}", - "method": "GET", - } - ) - - result = dateParser( - result, - [ - "last_input", - "last_output", - "updated_at", - "created_at", - "inspected_at", - "last_retention", - ], - ) - return result - - def paramSet( - self, - deviceID: GenericID, - configObj: ConfigurationParams, - paramID: Optional[GenericID] = None, - ) -> list[ConfigurationParams]: - """ - Create or edit param for the Device - - :param deviceID Device ID - - :param configObj Configuration Data - - :param paramID Parameter ID - """ - result = self.doRequest( - { - "path": f"/device/{deviceID}/params", - "method": "POST", - "body": { - "id": paramID, - "key": configObj["key"], - "sent": configObj["sent"], - "value": configObj["value"], - }, - } - ) - return result - - def paramList( - self, deviceID: GenericID, sentStatus: bool = None - ) -> list[ConfigurationParams]: - """ - List Params for the Device - - :param GenericID deviceID: Device ID - - :param bool sentStatus: True return only sent=true, False return only sent=false - """ - result = self.doRequest( - { - "path": f"/device/{deviceID}/params", - "method": "GET", - "params": {"sent_status": sentStatus}, - } - ) - return result - - def paramRemove(self, deviceID: GenericID, paramID: GenericID) -> str: - """ - Remove param for the Device - - :param GenericID deviceID: Device ID - - :param GenericID paramID: Parameter ID - """ - result = self.doRequest( - { - "path": f"/device/{deviceID}/params/{paramID}", - "method": "DELETE", - } - ) - return result - - def tokenList( - self, - deviceID: GenericID, - queryObj: ListDeviceTokenQuery = {}, - ) -> list[DeviceTokenDataList]: - """ - Retrieves a list of all tokens - - :default: - - queryObj: { - "page": 1, - "fields": ["name", "token", "permission"], - "filter": {}, - "amount": 20, - "orderBy": "created_at,desc", - } - - :param GenericID deviceID: Device ID - - :param ListDeviceTokenQuery queryObj: Search query params - """ - - if "orderBy" in queryObj: - firstArgument = queryObj["orderBy"][0] - secondArgument = queryObj["orderBy"][1] - orderBy = f"{firstArgument},{secondArgument}" - else: - orderBy = "created_at,desc" - - result = self.doRequest( - { - "path": f"/device/token/{deviceID}", - "method": "GET", - "params": { - "page": queryObj.get("page") or 1, - "fields": queryObj.get("fields") or ["name", "token", "permission"], - "filter": queryObj.get("filter") or {}, - "amount": queryObj.get("amount") or 20, - "orderBy": orderBy, - }, - } - ) - result = dateParserList( - result, ["created_at", "last_authorization", "expire_time"] - ) - - return result - - def tokenCreate( - self, deviceID: GenericID, tokenParams: TokenData - ) -> TokenCreateResponse: - """ - Generates and retrieves a new token - - :param deviceID: Device ID - - :param tokenParams: Params for new token - """ - result = self.doRequest( - { - "path": "/device/token", - "method": "POST", - "body": {"device": deviceID, "tokenParams": tokenParams}, - } - ) - result = dateParserList(result, ["expire_date"]) - return result - - def tokenDelete(self, token: GenericToken) -> str: - """ - Delete a token - - :param GenericToken token: Token - """ - result = self.doRequest( - { - "path": f"/device/token/{token}", - "method": "DELETE", - } - ) - return result - - def getDeviceData( - self, deviceId: GenericID, queryParams: DataQuery = {} - ) -> list[Data]: - """ - Get data from all variables in the device. - - :param deviceId: Device ID. - - :param queryParams: Query parameters to filter the results. - - :rtype: Array with the data values stored in the device. - - :example: - - myDevice = Account({ "token": "my_device_token" }) - - result = myAccount.devices.getDeviceData( - "Device Id", {"variables": "location"} - ) - """ - result = self.doRequest( - { - "path": f"/device/{deviceId}/data", - "method": "GET", - "params": queryParams, - } - ) - return dateParserList(result, ["time", "created_at"]) - - def emptyDeviceData(self, deviceId: GenericID) -> str: - """ - Empty all data in a device. - - :param GenericID deviceId: Device ID. - - :rtype: Success message. - """ - result = self.doRequest( - { - "path": f"/device/{deviceId}/empty", - "method": "POST", - } - ) - return result diff --git a/src/tagoio_sdk/modules/Resources/Integration.py b/src/tagoio_sdk/modules/Resources/Integration.py deleted file mode 100644 index 126a8a8..0000000 --- a/src/tagoio_sdk/modules/Resources/Integration.py +++ /dev/null @@ -1,7 +0,0 @@ -from tagoio_sdk.common.tagoio_module import GenericModuleParams, TagoIOModule -from tagoio_sdk.modules.Resources.IntegrationNetwork import Networks - - -class Integration(TagoIOModule): - def __init__(self, params: GenericModuleParams): - self.networks = Networks(params) diff --git a/src/tagoio_sdk/modules/Resources/IntegrationNetwork.py b/src/tagoio_sdk/modules/Resources/IntegrationNetwork.py deleted file mode 100644 index 3538ac2..0000000 --- a/src/tagoio_sdk/modules/Resources/IntegrationNetwork.py +++ /dev/null @@ -1,63 +0,0 @@ -from tagoio_sdk.common.Common_Type import GenericID, Query -from tagoio_sdk.common.tagoio_module import TagoIOModule -from tagoio_sdk.modules.Resources.IntegrationNetworkType import NetworkInfo - - -class Networks(TagoIOModule): - def listNetwork(self, queryObj: Query = {}) -> list[NetworkInfo]: - """ - Retrieves a list with all networks from the account - - :default: - fields: ["id", "name"] - - :param fields Fields to be returned - """ - - if "orderBy" in queryObj: - firstArgument = queryObj["orderBy"][0] - secondArgument = queryObj["orderBy"][1] - orderBy = f"{firstArgument},{secondArgument}" - else: - orderBy = "name,asc" - - result = self.doRequest( - { - "path": "/integration/network", - "method": "GET", - "params": { - "page": queryObj.get("page") or 1, - "fields": queryObj.get("fields") or ["id", "name"], - "filter": queryObj.get("filter") or {}, - "amount": queryObj.get("amount") or 20, - "orderBy": orderBy, - }, - } - ) - - return result - - def info( - self, networkID: GenericID, fields: NetworkInfo = ["id", "name"] - ) -> NetworkInfo: - """ - Retrieves the information of the network. - - :default: - fields: ["id", "name"] - - :param networkID Network ID - :param fields Fields to be returned - """ - - result = self.doRequest( - { - "path": f"/integration/network/{networkID}", - "method": "GET", - "params": { - "fields": fields, - }, - } - ) - - return result diff --git a/src/tagoio_sdk/modules/Resources/IntegrationNetworkType.py b/src/tagoio_sdk/modules/Resources/IntegrationNetworkType.py deleted file mode 100644 index 1e96d7a..0000000 --- a/src/tagoio_sdk/modules/Resources/IntegrationNetworkType.py +++ /dev/null @@ -1,62 +0,0 @@ -import uuid -from datetime import datetime -from typing import Literal, Optional, TypedDict - -from tagoio_sdk.common.Common_Type import GenericID - - -class serial_number(TypedDict): - mask: Optional[str] - label: Optional[str] - image: Optional[str] - case: Optional[str] - help: Optional[str] - required: bool - - -class IDeviceParameters(TypedDict): - name: Optional[str] - label: Optional[str] - type: Optional[Literal["text", "dropdown", "switch", "number"]] - default: Optional[any] - group: Optional[Literal["default", "main", "advanced", "hide"]] - options: Optional[list[any]] - - -class NetworkCreateInfo(TypedDict): - name: Optional[str] - description: Optional[str] - logo_url: Optional[str] - icon_url: Optional[str] - banner_url: Optional[str] - device_parameters: Optional[list[IDeviceParameters]] - middleware_endpoint: Optional[str] - payload_encoder: Optional[str] - payload_decoder: Optional[str] - public: Optional[bool] - documentation_url: Optional[str] - serial_number: Optional[serial_number] - require_devices_access: Optional[bool] - - -class NetworkInfo(NetworkCreateInfo): - id: GenericID - name: Optional[str] - description: Optional[str] - logo_url: Optional[str] - icon_url: Optional[str] - banner_url: Optional[str] - device_parameters: Optional[list[IDeviceParameters]] - middleware_endpoint: Optional[str] - payload_encoder: Optional[str] - payload_decoder: Optional[str] - public: Optional[bool] - documentation_url: Optional[str] - serial_number: Optional[serial_number] - - -class DeviceNetworkToken(TypedDict): - token: uuid.UUID - network: GenericID - name: str - crated_at: datetime diff --git a/src/tagoio_sdk/modules/Resources/Notification_Type.py b/src/tagoio_sdk/modules/Resources/Notification_Type.py deleted file mode 100644 index 15a9d04..0000000 --- a/src/tagoio_sdk/modules/Resources/Notification_Type.py +++ /dev/null @@ -1,65 +0,0 @@ -from datetime import datetime -from typing import Any, Literal, Optional, TypedDict, Union - -from tagoio_sdk.common.Common_Type import GenericID - -HexColor = str - - -class NotificationTriggerAnalysis(TypedDict): - analysis_id: GenericID - - -class NotificationTriggerHTTP(TypedDict): - url: str - method: Literal["POST", "GET", "PUT", "DELETE", "REDIRECT"] - body: dict[str, Any] - - -class NotificationTriggerProfile(TypedDict): - share_profile: Literal["accept", "refuse"] - - -class NotificationButton(TypedDict): - id: str - label: str - color: Optional[str] - triggers: Union[ - NotificationTriggerAnalysis, - NotificationTriggerHTTP, - list[NotificationTriggerProfile], - ] - - -class NotificationIconImage(TypedDict): - image_url: str - bg_color: Optional[HexColor] - fit: Optional[Literal["fill", "contain", "cover"]] - - -class NotificationIconSVG(TypedDict): - svg_url: str - svg_color: Optional[HexColor] - bg_color: Optional[HexColor] - - -class NotificationCreate(TypedDict): - title: str - message: str - read: Optional[bool] - icon: Optional[Union[NotificationIconSVG, NotificationIconImage]] - buttons: Optional[list[NotificationButton]] - buttons_enabled: Optional[bool] - buttons_autodisable: Optional[bool] - - -class NotificationInfoBasic(TypedDict): - id: GenericID - created_at: datetime - - -class NotificationcreateReturn(TypedDict): - id: GenericID - - -NotificationInfo = NotificationInfoBasic and NotificationCreate diff --git a/src/tagoio_sdk/modules/Resources/Profile.py b/src/tagoio_sdk/modules/Resources/Profile.py deleted file mode 100644 index e1992d3..0000000 --- a/src/tagoio_sdk/modules/Resources/Profile.py +++ /dev/null @@ -1,94 +0,0 @@ -from typing import List, Optional - -from tagoio_sdk.common.Common_Type import GenericID, Query, TokenDataList -from tagoio_sdk.common.tagoio_module import TagoIOModule -from tagoio_sdk.modules.Resources.Profile_Type import ( - ProfileInfo, - ProfileListInfo, - ProfileSummary, -) -from tagoio_sdk.modules.Utils.dateParser import dateParser, dateParserList - - -class Profile(TagoIOModule): - """ - Manage profiles in account be sure to use an - account token with “write” permissions when - using functions like create, edit and delete. - """ - - def info(self, profileID: GenericID) -> ProfileInfo: - """ - Get Profile info - :param: profileID Profile identification - """ - result = self.doRequest( - { - "path": f"/profile/{profileID}", - "method": "GET", - } - ) - - if result.get("info"): - result["info"] = dateParser(result["info"], ["created_at", "updated_at"]) - return result - - def list(self) -> list[ProfileListInfo]: - """ - Lists all the profiles in your account - """ - result = self.doRequest( - { - "path": "/profile", - "method": "GET", - } - ) - return result - - def summary(self, profileID: GenericID) -> ProfileSummary: - """ - Gets profile summary - :param: profileID Profile identification - """ - result = self.doRequest( - { - "path": f"/profile/{profileID}/summary", - "method": "GET", - } - ) - return result - - def tokenList( - self, profileID: GenericID, queryObj: Optional[Query] = {} - ) -> List[TokenDataList]: - """ - Lists all the tokens in your account - :param: profileID Profile identification - """ - - if "orderBy" in queryObj: - firstArgument = queryObj["orderBy"][0] - secondArgument = queryObj["orderBy"][1] - orderBy = f"{firstArgument},{secondArgument}" - else: - orderBy = "created_at, asc" - - result = self.doRequest( - { - "path": f"/profile/{profileID}/token", - "method": "GET", - "params": { - "page": queryObj.get("page") or 1, - "fields": queryObj.get("fields") or ["name", "token", "permission"], - "filter": queryObj.get("filter") or {}, - "amount": queryObj.get("amount") or 20, - "orderBy": orderBy, - }, - } - ) - - result = dateParserList( - result, ["last_authorization", "expire_time", "created_at"] - ) - - return result diff --git a/src/tagoio_sdk/modules/Resources/Profile_Type.py b/src/tagoio_sdk/modules/Resources/Profile_Type.py deleted file mode 100644 index c86158c..0000000 --- a/src/tagoio_sdk/modules/Resources/Profile_Type.py +++ /dev/null @@ -1,85 +0,0 @@ -from datetime import datetime -from typing import TypedDict, Union - -from tagoio_sdk.common.Common_Type import GenericID - - -class ProfileListInfo(TypedDict): - id: GenericID - name: str - logo_url: str - - -class ProfileLimit(TypedDict): - input: Union[int, float] - output: Union[int, float] - sms: Union[int, float] - email: Union[int, float] - analysis: Union[int, float] - data_records: Union[int, float] - run_users: Union[int, float] - push_notification: Union[int, float] - file_storage: Union[int, float] - - -class ProfileAddOns(TypedDict): - custom_dns: bool - """ - Whether the profile has the Custom Domain add-on purchased. - """ - mobile: bool - """ - Whether the profile has the Custom Mobile App add-on purchased. - """ - - -class info(TypedDict): - id: GenericID - account: GenericID - name: str - logo_url: str - banner_url: str - created_at: datetime - updated_at: datetime - - -class ProfileInfo(TypedDict): - info: info - allocation: ProfileLimit - addons: ProfileAddOns - account_plan: str - - -class amount(TypedDict): - device: Union[int, float] - bucket: Union[int, float] - dashboard: Union[int, float] - dashboard_shared: Union[int, float] - analysis: Union[int, float] - action: Union[int, float] - am: Union[int, float] - run_users: Union[int, float] - dictionary: Union[int, float] - connectors: Union[int, float] - networks: Union[int, float] - tcore: Union[int, float] - - -class limit_used(TypedDict): - input: Union[int, float] - output: Union[int, float] - analysis: Union[int, float] - sms: Union[int, float] - email: Union[int, float] - data_records: Union[int, float] - run_users: Union[int, float] - push_notification: Union[int, float] - file_storage: Union[int, float] - tcore: Union[int, float] - - -class ProfileSummary(TypedDict): - limit: ProfileLimit - amount: amount - limit_used: limit_used - addons: ProfileAddOns diff --git a/src/tagoio_sdk/modules/Resources/Resources.py b/src/tagoio_sdk/modules/Resources/Resources.py deleted file mode 100644 index 3382104..0000000 --- a/src/tagoio_sdk/modules/Resources/Resources.py +++ /dev/null @@ -1,27 +0,0 @@ -import os -from typing import Optional - -from tagoio_sdk.common.tagoio_module import TagoIOModule, GenericModuleParams -from .Billing import Billing -from .Buckets import Buckets -from .Dashboards import Dashboards -from .Devices import Devices -from .Profile import Profile -from .Run import Run -from .Integration import Integration -from .Account import Account - - -class Resources(TagoIOModule): - def __init__(self, params: Optional[GenericModuleParams] = None): - if params is None: - params = {"token": os.environ.get("T_ANALYSIS_TOKEN")} - super().__init__(params) - self.billing = Billing(params) - self.buckets = Buckets(params) - self.dashboards = Dashboards(params) - self.devices = Devices(params) - self.profile = Profile(params) - self.run = Run(params) - self.integration = Integration(params) - self.account = Account(params) diff --git a/src/tagoio_sdk/modules/Resources/Run.py b/src/tagoio_sdk/modules/Resources/Run.py deleted file mode 100644 index 446ad0e..0000000 --- a/src/tagoio_sdk/modules/Resources/Run.py +++ /dev/null @@ -1,297 +0,0 @@ -from typing import Optional, TypedDict - -from tagoio_sdk.common.Common_Type import GenericID, Query -from tagoio_sdk.common.tagoio_module import TagoIOModule -from tagoio_sdk.modules.Resources.Notification_Type import ( - NotificationCreate, - NotificationcreateReturn, - NotificationInfo, -) -from tagoio_sdk.modules.Resources.Run_Type import ( - CustomDomainCreate, - CustomDomainInfo, - LoginAsUserOptions, - LoginResponse, - RunInfo, - RunSAMLEditInfo, - RunSAMLInfo, - UserCreateInfo, - UserInfo, -) -from tagoio_sdk.modules.Utils.dateParser import dateParser, dateParserList - - -class Run(TagoIOModule): - """ - Manage services in account - Be sure to use an account token with “write” permissions when using - functions like create, edit and delete. - """ - - def info(self) -> RunInfo: - result = self.doRequest( - { - "path": "/run", - "method": "GET", - } - ) - - return result - - def edit(self, data: RunInfo) -> str: - result = self.doRequest( - { - "path": "/run", - "method": "PUT", - "body": data, - } - ) - - return result - - def listUsers(self, query: Query) -> list[UserInfo]: - if "orderBy" in query: - firstArgument = query["orderBy"][0] - secondArgument = query["orderBy"][1] - orderBy = f"{firstArgument},{secondArgument}" - else: - orderBy = "name,asc" - - result = self.doRequest( - { - "path": "/run/users", - "method": "GET", - "params": { - "page": query.get("page") or 1, - "fields": query.get("fields") or ["id", "name"], - "filter": query.get("filter") or {}, - "amount": query.get("amount") or 20, - "orderBy": orderBy, - }, - } - ) - result = dateParserList(result, ["created_at", "updated_at", "last_login"]) - - return result - - def userInfo(self, userID: GenericID) -> UserInfo: - result = self.doRequest( - { - "path": f"/run/users/{userID}", - "method": "GET", - } - ) - - result = dateParser(result, ["created_at", "updated_at", "last_login"]) - - return result - - def userCreate(self, data: UserCreateInfo) -> str: - result = self.doRequest( - { - "path": "/run/users", - "method": "POST", - "body": data, - } - ) - - return result - - def userEdit(self, userID: GenericID, data: UserInfo) -> str: - result = self.doRequest( - { - "path": f"/run/users/{userID}", - "method": "PUT", - "body": data, - } - ) - - return result - - def userDelete(self, userID: GenericID) -> str: - result = self.doRequest( - { - "path": f"/run/users/{userID}", - "method": "DELETE", - } - ) - - return result - - def loginAsUser( - self, userID: GenericID, options: Optional[LoginAsUserOptions] - ) -> LoginResponse: - result = self.doRequest( - { - "path": f"/run/users/{userID}/login", - "params": options, - "method": "GET", - } - ) - - result = dateParser(result, ["expire_date"]) - - return result - - class emailData(TypedDict): - subject: str - body: str - - def emailTest(self, data: emailData) -> str: - result = self.doRequest( - { - "path": "/run/email_test", - "method": "POST", - "body": data, - } - ) - - return result - - def notificationList(self, userID: GenericID) -> list[NotificationInfo]: - result = self.doRequest( - { - "path": f"/run/notification/{userID}", - "method": "GET", - } - ) - - return result - - def notificationCreate( - self, userID: GenericID, data: NotificationCreate - ) -> NotificationcreateReturn: - result = self.doRequest( - { - "path": "/run/notification/", - "method": "POST", - "body": { - "run_user": userID, - "data": data, - }, - } - ) - - return result - - def notificationEdit( - self, notificationID: GenericID, data: NotificationCreate - ) -> str: - result = self.doRequest( - { - "path": f"/run/notification/{notificationID}", - "method": "PUT", - "body": data, - } - ) - - return result - - def notificationDelete(self, notificationID: GenericID) -> str: - result = self.doRequest( - { - "path": f"/run/notification/{notificationID}", - "method": "DELETE", - } - ) - - return result - - def ssoSAMLInfo(self) -> RunSAMLInfo: - """ - Get the SAML Single Sign-On information for the account's RUN. - """ - - result = self.doRequest( - { - "path": "/run/sso/saml", - "method": "GET", - } - ) - - return result - - def ssoSAMLEdit(self, data: RunSAMLEditInfo) -> str: - """ - Edit the SAML Single Sign-On metadata and mappings for the account's RUN. - :param: data Updated data for a RUN's SAML Single Sign-On configuration. - """ - - result = self.doRequest( - { - "path": "/run/sso/saml", - "method": "PUT", - "body": data, - } - ) - - return result - - def createCustomDomain( - self, profile_id: str, customDomainData: CustomDomainCreate - ) -> str: - """ - Create a TagoRUN custom domain for the profile. - :param: profile_id ID of the profile - :param: customDomainData query params - :returns: Success message. - """ - - result = self.doRequest( - { - "path": f"/run/customdomain/{profile_id}", - "body": customDomainData, - "method": "POST", - } - ) - - return result - - def getCustomDomain(self, profile_id: str) -> CustomDomainInfo: - """ - set details of TagoRun custom domain for the profile. - :param: profile_id ID of the profile - :returns: Data for the profile's custom DNS configuration. - """ - - result = self.doRequest( - { - "path": f"/run/customdomain/{profile_id}", - "method": "GET", - } - ) - - parsedResult = dateParser(result, ["created_at"]) - - return parsedResult - - def deleteCustomDomain(self, profile_id: str) -> str: - """ - delete a TagoRUN custom domain for the profile. - :param: profile_id ID of the profile - :returns: Success message. - """ - - result = self.doRequest( - { - "path": f"/run/customdomain/{profile_id}", - "method": "DELETE", - } - ) - return result - - def regenerateCustomDomain(self, profile_id: str) -> str: - """ - Regenerate a TagoRUN custom domain for the profile. - :param: profile_id ID of the profile - :returns: Success message. - """ - - result = self.doRequest( - { - "path": f"/run/customdomain/regenerate/{profile_id}", - "method": "PUT", - } - ) - - return result diff --git a/src/tagoio_sdk/modules/Resources/Run_Type.py b/src/tagoio_sdk/modules/Resources/Run_Type.py deleted file mode 100644 index ceaa3c4..0000000 --- a/src/tagoio_sdk/modules/Resources/Run_Type.py +++ /dev/null @@ -1,505 +0,0 @@ -from datetime import datetime -from typing import Dict, Literal, Optional, TypedDict, Union - -from tagoio_sdk.common.Common_Type import ( - ExpireTimeOption, - GenericID, - GenericToken, - TagsObj, -) - -ThemeOption = Literal[ - "actionSchedule", - "actionTriggerByData", - "actionTriggerByResource", - "actionTriggerByMQTT", - "alertDangerBackground", - "alertInfoBackground", - "alertWarningBackground", - "analysisExternal", - "analysisInternal", - "buttonDanger", - "buttonDangerText", - "buttonDefault", - "buttonDefaultText", - "buttonDisabled", - "buttonDisabledText", - "buttonIconLabel", - "buttonPrimary", - "buttonPrimaryText", - "buttonSuccess", - "buttonSuccessText", - "buttonWarning", - "buttonWarningText", - "deviceInputOutput1Day", - "deviceInputOutput3Days", - "deviceInputOutput3Hours", - "deviceInputOutput6Hours", - "deviceInputOutputRest", - "dottedBorder", - "dropdownAccent", - "dropdownBackground", - "floatingSidebarTitle", - "footerBackground", - "formControlBorder", - "gaugeEmpty", - "gaugeFill", - "gaugePrimaryText", - "gaugeSecondaryText", - "iconRadioSelected", - "iconRadioSubTitle", - "informationIcon", - "inputBackground", - "inputBackgroundReadOnly", - "inputError", - "inputForeground", - "inputForegroundReadOnly", - "lightBorder", - "limitAlert", - "link", - "listNavColor", - "listTitleLabel", - "loading", - "loginButton", - "loginButtonText", - "loginForeground", - "loginForm", - "modalContainer", - "modalOverlay", - "navbar", - "navbarBetaDeveloperBorder", - "navbarButton", - "navbarDropdownBorder", - "navbarDropdownOption", - "navbarDropdownOptionBorder", - "navbarText", - "navDescription", - "notificationButtonAmount", - "notificationButtonAmountText", - "notificationFilterBackground", - "notificationFooter", - "notificationItemBorder", - "notificationItemDate", - "notificationItemTextAccepted", - "notificationItemUnread", - "primary", - "publicPageNavigationBar", - "sidebarAccessSelected", - "sidebarAccountSelected", - "sidebarActionSelected", - "sidebarAnalysisSelected", - "sidebarBackground", - "sidebarBillingSelected", - "sidebarBucketSelected", - "sidebarDashboardSelected", - "sidebarDeviceSelected", - "sidebarExploreSelected", - "sidebarFileSelected", - "sidebarForegroundIcon", - "sidebarForegroundText", - "sidebarHomeSelected", - "sidebarItem", - "sidebarRibbon", - "sidebarRunSelected", - "sidebarSeparator", - "sidebarSeparatorForeground", - "sidebarUserSelected", - "snakeButtonOutline", - "svgTagoFont", - "svgTagoIOHole", - "switchDisabledBackground", - "switchSlider", - "tabBackground", - "tabLabelBorder", - "tooltipContainer", - "tooltipText", - "verticalTabItem", - "verticalTabItemBorder", - "widgetCardBackground", - "widgetIconsAccent", - "widgetIconsBackground", - "widgetIconsColor", - "widgetIconsFooterBasic", - "widgetIconsFooterPremium", - "auth_bg_opacity", - "auth_bg_src", - "auth_bg_type", - "auth_form_opacity", -] - - -class sidebar_buttons(TypedDict): - color: str - href: str - iconUrl: str - text: str - type: str - - -class signup_fields(TypedDict): - name: str - placeholder: str - required: bool - type: str - - -class feature_devicewifisetup(TypedDict): - background_color: str - button_cancel_background_color: str - button_cancel_text_color: str - button_confirm_background_color: str - button_confirm_text_color: str - enabled: bool - ip: str - language: str - name: str - port: str - protocol: str - text_color: str - translations: Dict[str, object] - - -class email_templates(TypedDict): - subject: str - value: str - - -class feature_geolocation(TypedDict): - buffer_size: Union[int, float] - device: Union[str, None] - enabled: bool - middleware_url: str - minimum_distance: Union[int, float] - minimum_interval: Union[int, float] - target: str - - -class otp(TypedDict): - authenticator: bool - sms: bool - email: bool - - -class RunInfo(TypedDict): - profile: GenericID - active: bool - name: str - sub_title: str - url: str - email_domain: Union[str, None] - signup_method: str - favicon: Union[str, None] - logo: Union[str, None] - signup_logo: Union[str, None] - signup_logo_options: object - sidebar_buttons: list[sidebar_buttons] - signup_fields: list[signup_fields] - email_templates: Dict[str, email_templates] - feature_devicewifisetup: feature_devicewifisetup - feature_geolocation: feature_geolocation - theme: ThemeOption - integration: object - sso_saml_active: bool - security: Dict[str, otp] - - -class UserCreateInfo(TypedDict): - name: str - email: str - password: str - timezone: str - company: Optional[str] - phone: Optional[str] - language: Optional[str] - tags: Optional[list[TagsObj]] - active: Optional[bool] - - -class UserInfo(TypedDict): - name: str - email: str - timezone: str - company: Optional[str] - phone: Optional[str] - language: Optional[str] - tags: Optional[list[TagsObj]] - active: Optional[bool] - id: GenericID - profile: GenericID - active: bool - newsletter: bool - last_login: Union[datetime, None] - created_at: datetime - updated_at: datetime - options: object - tags: list[TagsObj] - - -class LoginResponse(TypedDict): - token: GenericToken - expire_date: ExpireTimeOption - - -class LoginAsUserOptions(TypedDict): - expire_time: Optional[str] - """ - Date to expire the login token. - - :example: - 3 months", "1 year", "20 hours" - - :default: "8 hours" - """ - - -class SAMLAttributeMappings(TypedDict): - email: str - firstName: str - lastName: Optional[str] - phone: Optional[str] - company: Optional[str] - language: Optional[str] - timezone: Optional[str] - tags: Dict[str, str] - - -class sp(TypedDict): - entity_id: str - acs_url: str - metadata: str - - -class idp(TypedDict): - issuer: str - - -class RunSAMLInfo(TypedDict): - sp: sp - """ - Information for TagoIO's API routes to use as a Service Provider in SAML authentication flows. - """ - - idp: idp - """ - Relevant information from the Identity Provider's metadata after being parsed by TagoIO. - """ - - mapping: SAMLAttributeMappings - """ - Attribute mappings for the Identity Provider's attributes to the attributes used in TagoIO. - """ - - -class RunSAMLEditInfo(TypedDict): - idp_metadata: Optional[str] - """ - Identity Provider's XML metadata encoded in a base 64 string. - """ - - mapping: SAMLAttributeMappings - """ - Attribute mappings for the Identity Provider's attributes to the attributes used in TagoIO. - """ - - -class CustomDomainDnsRecord(TypedDict): - status: bool - """ - Status for the DNS record check. - - When `true`, the DNS record is properly configured with the provided key and value. - When `false`, the DNS record is either not yet configured or the `key` exists but the - value in the DNS record does not match the `value` provided. - """ - - type: str - """ - Type of the DNS record. - """ - - key: str - """ - Key for key-value pair in the DNS record. - """ - - value: str - """ - Value for the key-value pair the DNS record. - """ - - current_value: Optional[str] - """ - Current value in the provider's record for the DNS record's `key`. - - Only returned when the DNS record has the matching `key` configured. - - When `status` is `true`, the value here will be the same as the one in `value`. - When `status` is `false`, the value here can is either stale or there was an error - opying the provided `value` in the DNS provider's record. - """ - - -class CustomDomainResponse(TypedDict): - """ - Type for the Custom Domain response from the API, unparsed. - - :internal - """ - - active: bool - """ - Whether the custom domain is active. - - This is only `true` when all the required DNS records are properly configured in the DNS - provider. - """ - - domain: str - """ - Configured domain for the RUN. - """ - - subdomain: str - """ - Configured subdomain for the RUN. - """ - - email: str - """ - Mailing address for the RUN with custom domain. - """ - - dns_ssl: CustomDomainDnsRecord - """ - DNS record for the SSL certificate. - The information in this record needs to be configured in the DNS provider for the custom domain. - """ - - dns_page: CustomDomainDnsRecord - """ - DNS record for the page endpoint. - - The information in this record needs to be configured in the DNS provider for the custom domain. - """ - - dns_email_1: CustomDomainDnsRecord - """ - First DNS record for the e-mail. - - The information in this record needs to be configured in the DNS provider for the custom domain. - """ - - dns_email_2: CustomDomainDnsRecord - """ - Second DNS record for the e-mail. - - The information in this record needs to be configured in the DNS provider for the custom domain. - """ - - dns_email_3: CustomDomainDnsRecord - """ - Third DNS record for the e-mail. - - The information in this record needs to be configured in the DNS provider for the custom domain. - """ - - created_at: str - """ - Timestamp (in string format) for when the custom domain was configured. - """ - - -class CustomDomainInfo(TypedDict): - """ - Type for the Custom Domain information in a profile's RUN. - """ - - active: bool - """ - Whether the custom domain is active. - - This is only `true` when all the required DNS records are properly configured in the DNS - provider. - """ - - domain: str - """ - Configured domain for the RUN. - """ - - subdomain: str - """ - Configured subdomain for the RUN. - """ - - email: str - """ - Mailing address for the RUN with custom domain. - """ - - dns_ssl: CustomDomainDnsRecord - """ - DNS record for the SSL certificate. - The information in this record needs to be configured in the DNS provider for the custom domain. - """ - - dns_page: CustomDomainDnsRecord - """ - DNS record for the page endpoint. - - The information in this record needs to be configured in the DNS provider for the custom domain. - """ - - dns_email_1: CustomDomainDnsRecord - """ - First DNS record for the e-mail. - - The information in this record needs to be configured in the DNS provider for the custom domain. - """ - - dns_email_2: CustomDomainDnsRecord - """ - Second DNS record for the e-mail. - - The information in this record needs to be configured in the DNS provider for the custom domain. - """ - - dns_email_3: CustomDomainDnsRecord - """ - Third DNS record for the e-mail. - - The information in this record needs to be configured in the DNS provider for the custom domain. - """ - - created_at: datetime - """ - Timestamp for when the custom domain was configured. - """ - - -class CustomDomainCreate(TypedDict): - """ - Type for the data required to configure a profile's RUN Custom Domain. - """ - - domain: str - """ - Domain for the RUN's custom domain. - - If the desired custom domain is `portal.mycompany.com`, this will be `"mycompany.com"`. - """ - - subdomain: str - """ - Subdomain for the RUN's custom domain. - - If the desired custom domain is `portal.mycompany.com`, this will be `"portal"`. - """ - - email: str - """ - Mailing address for the RUN with custom domain. - - If the desired custom domain is `portal.mycompany.com`, this can be either - `"portal.mycompany.com"` or `"mycompany.com"`. - """ diff --git a/src/tagoio_sdk/modules/Services/Attachment.py b/src/tagoio_sdk/modules/Services/Attachment.py deleted file mode 100644 index a199f8d..0000000 --- a/src/tagoio_sdk/modules/Services/Attachment.py +++ /dev/null @@ -1,31 +0,0 @@ -from typing import TypedDict - -from tagoio_sdk.common.Common_Type import Base64 -from tagoio_sdk.common.tagoio_module import TagoIOModule - - -class ArchiveFile(TypedDict): - name: str - content: Base64 - type: str - - -class Attachment(TagoIOModule): - def upload(self, archive: ArchiveFile) -> str: - """ - Send Attachment - - :param ArchiveFile archive: Archive JSON Object - """ - result = self.doRequest( - { - "path": "/analysis/services/attachment/upload", - "method": "POST", - "body": { - "archive": archive["content"], - "filename": archive["name"], - "type": archive["type"], - }, - } - ) - return result diff --git a/src/tagoio_sdk/modules/Services/Console.py b/src/tagoio_sdk/modules/Services/Console.py deleted file mode 100644 index 9cf68f7..0000000 --- a/src/tagoio_sdk/modules/Services/Console.py +++ /dev/null @@ -1,22 +0,0 @@ -from datetime import datetime - -from tagoio_sdk.common.tagoio_module import TagoIOModule - - -class ConsoleService(TagoIOModule): - """ - Log message in analysis console - - :param message: Log message - :param time: Date of message - """ - - def log(self, message: str, timestamp: datetime = datetime.now()) -> str: - result = self.doRequest( - { - "path": "/analysis/services/console/send", - "method": "POST", - "body": {"message": message, "timestamp": timestamp}, - } - ) - return result diff --git a/src/tagoio_sdk/modules/Services/Email.py b/src/tagoio_sdk/modules/Services/Email.py deleted file mode 100644 index 7f47949..0000000 --- a/src/tagoio_sdk/modules/Services/Email.py +++ /dev/null @@ -1,120 +0,0 @@ -import warnings -from typing import Any, Optional, TypedDict, Union - -from tagoio_sdk.common.tagoio_module import TagoIOModule - - -class AttachmentOptions(TypedDict): - archive: str - """ - Archive itself - """ - filename: str - """ - Name for the archive - """ - - -class TemplateOptions(TypedDict): - name: str - """ - Template name - - You can create an e-mail template on TagoRUN options at https://admin.tago.io/run - """ - params: Optional[dict[str, Union[int, float]]] - """ - Parameters to parse on Template - - You can use that parameter as local variable using $PARAMETER_KEY$ - - :example: params = { name: 'John' } - - will be $name$ on template document - """ - - -class EmailBase(TypedDict): - to: str - """ - E-mail address to be sent - - :example: "myclien@tago.io" - """ - from_name: Optional[str] - """ - Name of origin - - :example: "My Run" - """ - subject: str - """ - Subject of the e-mail - - only allow with message or html - """ - attachment: Optional[AttachmentOptions] - """ - Attachment for the e-mail - """ - - -class EmailRawText(TypedDict): - message: str - """ - Message in raw text for email body - """ - - -class EmailHTML(TypedDict): - html: str - """ - HTML email body - """ - - -class EmailWithTemplate(TypedDict): - to: str - """ - E-mail address to be sent - - :example: "myclien@tago.io" - """ - from_name: Optional[str] - """ - Name of origin - - :example: "My Run" - """ - attachment: Optional[AttachmentOptions] - """ - Attachment for the e-mail - """ - template: Optional[TemplateOptions] - """ - Use TagoRUN E-Mail Template - - Tip: If you use template together with attachment the - back-end will generate a parameter called 'URL'; - """ - - -EmailWithHTML = Union[EmailBase, EmailHTML] -EmailWithRawText = Union[EmailBase, EmailRawText] - - -class Email(TagoIOModule): - def send( - self, email: Union[Any, EmailWithRawText, EmailWithHTML, EmailWithTemplate] - ) -> str: - if email.get("html") and email.get("message"): - warnings.warn("HTML field will overwrite message field") - - result = self.doRequest( - { - "path": "/analysis/services/email/send", - "method": "POST", - "body": email, - } - ) - return result diff --git a/src/tagoio_sdk/modules/Services/MQTT.py b/src/tagoio_sdk/modules/Services/MQTT.py deleted file mode 100644 index 96f2252..0000000 --- a/src/tagoio_sdk/modules/Services/MQTT.py +++ /dev/null @@ -1,33 +0,0 @@ -from typing import Optional, TypedDict, Union - -from tagoio_sdk.common.Common_Type import GenericID -from tagoio_sdk.common.tagoio_module import TagoIOModule - - -class options(TypedDict): - retain: Optional[bool] - qos: Optional[Union[int, float]] - - -class MQTTData(TypedDict): - topic: str - message: str - bucket: GenericID - options: Optional[options] - - -class MQTT(TagoIOModule): - def publish(self, mqtt: MQTTData) -> str: - result = self.doRequest( - { - "path": "/analysis/services/mqtt/publish", - "method": "POST", - "body": { - "topic": mqtt["topic"], - "message": mqtt["message"], - "bucket": mqtt["bucket"], - "options": mqtt["options"], - }, - } - ) - return result diff --git a/src/tagoio_sdk/modules/Services/Notification.py b/src/tagoio_sdk/modules/Services/Notification.py deleted file mode 100644 index dc8a99e..0000000 --- a/src/tagoio_sdk/modules/Services/Notification.py +++ /dev/null @@ -1,23 +0,0 @@ -from tagoio_sdk.common.tagoio_module import TagoIOModule -from tagoio_sdk.modules.Resources.Notification_Type import NotificationCreate - - -class Notification(TagoIOModule): - def send(self, notification: NotificationCreate) -> str: - """ - Send Notification - - You can add ref_id from a bucket or dashboard, if it is valid it will show up a button Go To - Dashboard Any account with share of the dashboard/bucket will receive too. - - :param NotificationCreate notification: Notification Object - """ - result = self.doRequest( - { - "path": "/analysis/services/notification/send", - "method": "POST", - "body": notification, - } - ) - - return result diff --git a/src/tagoio_sdk/modules/Services/PDF.py b/src/tagoio_sdk/modules/Services/PDF.py deleted file mode 100644 index d0f7a31..0000000 --- a/src/tagoio_sdk/modules/Services/PDF.py +++ /dev/null @@ -1,136 +0,0 @@ -from typing import Optional, TypedDict, Union - -import requests - -from tagoio_sdk.common.tagoio_module import TagoIOModule - - -class PDFResult(TypedDict): - status: bool - result: str - - -class margin(TypedDict): - top: Optional[Union[str, int, float]] - """ - Top margin, accepts values labeled with units. Defaults to `0`. - """ - - right: Optional[Union[str, int, float]] - """ - Right margin, accepts values labeled with units. Defaults to `0`. - """ - - bottom: Optional[Union[str, int, float]] - """ - Bottom margin, accepts values labeled with units. Defaults to `0`. - """ - - left: Optional[Union[str, int, float]] - """ - Left margin, accepts values labeled with units. Defaults to `0`. - """ - - -class options(TypedDict): - """ - PDF Custom Options - """ - - displayHeaderFooter: Optional[bool] - """ - Display header and footer. Defaults to `false`. - """ - footerTemplate: Optional[str] - """ - HTML template for the print footer. Should use the same format as the `headerTemplate`. - """ - format: Optional[str] - """ - Paper format. If set, takes priority over `width` or `height` options. Defaults to 'Letter'. - """ - headerTemplate: Optional[str] - """ - HTML template for the print header. Should be valid HTML markup with following classes used - to inject printing values - - into them: - - `'date'` formatted print date - - `'title'` document title - - `'url'` document location - - `'pageNumber'` current page number - - `'totalPages'` total pages in the document - """ - height: Optional[Union[str, int, float]] - """ - Paper height, accepts values labeled with units. - """ - landscape: Optional[bool] - """ - Paper orientation. Defaults to `false`. - """ - margin: Optional[margin] - """ - Paper margins, defaults to none. - """ - pageRanges: Optional[str] - """ - Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print - all pages. - """ - preferCSSPageSize: Optional[bool] - """ - Give any CSS `@page` size declared in the page priority over what is - declared in `width` and `height` or `format`options. - Defaults to `false`, which will scale the content to fit the paper size. - """ - printBackground: Optional[bool] - """ - Print background graphics. Defaults to `false`. - """ - scale: Optional[Union[int, float]] - """ - Scale of the webpage rendering. Defaults to `1`. Scale amount must be between 0.1 and 2. - """ - width: Optional[Union[str, int, float]] - """ - Paper width, accepts values labeled with units. - """ - - -class PDFParams(TypedDict): - html: Optional[str] - """ - HTML as string - """ - base64: Optional[str] - """ - HTML on base64 format - """ - fileName: Optional[str] - """ - File name of pdf - Without filename, it will generate base64 response - With filename it will generate pdf binary - """ - url: Optional[str] - """ - Generate pdf from URL - """ - options: Optional[options] - """ - PDF Custom Options - """ - - -class PDFService(TagoIOModule): - def generate(self, params: PDFParams) -> PDFResult: - """ - Generate a PDF from html, url or base64 - """ - result = requests.post( - "https://pdf.middleware.tago.io", - json=params, - headers={"token": self.token}, - ) - return result diff --git a/src/tagoio_sdk/modules/Services/SMS.py b/src/tagoio_sdk/modules/Services/SMS.py deleted file mode 100644 index fdfa20d..0000000 --- a/src/tagoio_sdk/modules/Services/SMS.py +++ /dev/null @@ -1,31 +0,0 @@ -from typing import TypedDict - -from tagoio_sdk.common.tagoio_module import TagoIOModule - - -class SMSData(TypedDict): - to: str - """ - Number to send SMS, Example: +5599999999999 - """ - message: str - """ - Message to be send - """ - - -class SMS(TagoIOModule): - def send(self, sms: SMSData) -> str: - """ - Send SMS to phone number - - :param SMSData sms: SMS Object - """ - result = self.doRequest( - { - "path": "/analysis/services/sms/send", - "method": "POST", - "body": sms, - } - ) - return result diff --git a/src/tagoio_sdk/modules/Services/Services.py b/src/tagoio_sdk/modules/Services/Services.py deleted file mode 100644 index 90756b0..0000000 --- a/src/tagoio_sdk/modules/Services/Services.py +++ /dev/null @@ -1,24 +0,0 @@ -from typing import Optional - -from tagoio_sdk.common.tagoio_module import GenericModuleParams, TagoIOModule -from tagoio_sdk.modules.Services.Attachment import Attachment -from tagoio_sdk.modules.Services.Console import ConsoleService -from tagoio_sdk.modules.Services.Email import Email -from tagoio_sdk.modules.Services.MQTT import MQTT -from tagoio_sdk.modules.Services.Notification import Notification -from tagoio_sdk.modules.Services.PDF import PDFService -from tagoio_sdk.modules.Services.SMS import SMS -from tagoio_sdk.params import get_params - - -class Services(TagoIOModule): - def __init__(self, params: Optional[GenericModuleParams] = None): - self.params = get_params(params) - super().__init__(self.params) - self.sms = SMS(self.params) - self.console = ConsoleService(self.params) - self.email = Email(self.params) - self.MQTT = MQTT(self.params) - self.Notification = Notification(self.params) - self.Attachment = Attachment(self.params) - self.PDF = PDFService(self.params) diff --git a/src/tagoio_sdk/modules/Utils/dateParser.py b/src/tagoio_sdk/modules/Utils/dateParser.py deleted file mode 100644 index 4cdca52..0000000 --- a/src/tagoio_sdk/modules/Utils/dateParser.py +++ /dev/null @@ -1,24 +0,0 @@ -from contextlib import suppress -from typing import TypeVar - -import dateutil.parser - -T = TypeVar("T") - - -def dateParser(target: T, parameters: list[str]) -> T: - for parameter in parameters: - value = target.get(parameter) or None - if isinstance(value, str) and value and value != "never": - parsedDate = None - with suppress(KeyError): - parsedDate = dateutil.parser.parse(value, ignoretz=True) - if parsedDate is not None: - target[parameter] = parsedDate - - return target - - -def dateParserList(target: list[T], parameters: list[str]) -> list[T]: - result = list(map(lambda x: dateParser(x, parameters), target)) - return result diff --git a/src/tagoio_sdk/modules/Utils/envToJson.py b/src/tagoio_sdk/modules/Utils/envToJson.py deleted file mode 100644 index bf54e8d..0000000 --- a/src/tagoio_sdk/modules/Utils/envToJson.py +++ /dev/null @@ -1,17 +0,0 @@ -from functools import reduce - -from tagoio_sdk.modules.Analysis.Analysis_Type import AnalysisEnvironment - - -def envToJson(environment: list[AnalysisEnvironment]) -> AnalysisEnvironment: - """ - Convert Environment Array to Object - - Note: It will replace duplicate keys for the last one - - :param AnalysisEnvironment environment Array of environment - items from TagoIO - """ - return reduce( - lambda key, value: {**key, value["key"]: value["value"]}, environment, {} - ) diff --git a/src/tagoio_sdk/modules/Utils/getDevice.py b/src/tagoio_sdk/modules/Utils/getDevice.py deleted file mode 100644 index 86390b2..0000000 --- a/src/tagoio_sdk/modules/Utils/getDevice.py +++ /dev/null @@ -1,23 +0,0 @@ -from tagoio_sdk.modules.Device.Device import Device -from tagoio_sdk.modules.Resources.AccountDeprecated import AccountDeprecated as Account -from tagoio_sdk.modules.Utils.getTokenByName import getTokenByName - - -def getDevice(account: Account, device_id: str) -> Device: - """ - Get the TagoIO Device instanced class from a device id - @deprecated Use the Resources.devices methods instead - """ - if (isinstance(account, Account)) is False: - raise ValueError( - "The parameter 'account' must be an instance of a TagoIO Account." - ) - - token = getTokenByName(account, device_id) - - if token is None: - raise ValueError(f"Token not found for the device id {device_id}") - - device = Device({"token": token}) - - return device diff --git a/src/tagoio_sdk/modules/Utils/getTokenByName.py b/src/tagoio_sdk/modules/Utils/getTokenByName.py deleted file mode 100644 index e3f6369..0000000 --- a/src/tagoio_sdk/modules/Utils/getTokenByName.py +++ /dev/null @@ -1,57 +0,0 @@ -from typing import Optional - -from tagoio_sdk.modules.Resources.AccountDeprecated import AccountDeprecated as Account - - -def getTokenByName( - account: Account, deviceID: str, names: Optional[list[str] or str] = None -) -> str: - """ - :param Account account: Account instance - - :param str deviceID: Id of device - - :param list[str] or str names: Array of names of the token, if null will return the first token - found - @deprecated Use the Resources.devices.tokenList method instead - """ - if (isinstance(account, Account)) is False: - raise ValueError( - "The parameter 'account' must be an instance of a TagoIO Account." - ) - - tokens = account.devices.tokenList( - deviceID, - { - "page": 1, - "amount": 20, - "fields": [ - "name", - "token", - "permission", - "created_at", - "last_authorization", - ], - "filter": {}, - }, - ) - - if tokens is None or len(tokens) == 0: - return None - - if names is None: - return tokens[0]["token"] - - names = names if isinstance(names, list) else [names] - - if len(names) == 0: - return tokens[0]["token"] - - for token in tokens: - if token["name"] == names[0]: - token = token - - if token is None or "token" not in token: - raise ValueError(f"Can't find Token for {deviceID} in {names}") - - return token["token"] diff --git a/src/tagoio_sdk/modules/Utils/sendDownlink.py b/src/tagoio_sdk/modules/Utils/sendDownlink.py deleted file mode 100644 index a907c19..0000000 --- a/src/tagoio_sdk/modules/Utils/sendDownlink.py +++ /dev/null @@ -1,139 +0,0 @@ -import requests -from typing import Union - -from tagoio_sdk.modules.Resources.AccountDeprecated import AccountDeprecated as Account -from tagoio_sdk.modules.Resources.Resources import Resources -from tagoio_sdk.modules.Resources.Device_Type import ( - ConfigurationParams, - DeviceTokenDataList, -) -from tagoio_sdk.modules.Utils.utilsType import DownlinkOptions - - -def getDeviceToken( - resource: Union[Account, Resources], device_id: str -) -> DeviceTokenDataList: - """Get the token of a device. - - Returns: - str: token of the device - """ - device_tokens = resource.devices.tokenList( - device_id, - { - "page": 1, - "fields": ["name", "serie_number", "last_authorization"], - "amount": 10, - }, - ) - - if not device_tokens: - raise TypeError("Device doesn't have any token.") - - for token in device_tokens: - if ( - token["serie_number"] is not None - and token["last_authorization"] is not None - ): - return token - - raise TypeError( - "Can't perform the downlink. Wait for at least 1 uplink from the NS to use" - " this operation." - ) - - -def getNetworkId(resource: Union[Account, Resources], device_id: str) -> str: - """Get the network id of a device. - - Returns: - str: network id of the device - """ - device = resource.devices.info(device_id) - if not device.get("network"): - raise ValueError("Device is not using a network.") - - return device["network"] - - -def getMiddlewareEndpoint(resource: Union[Account, Resources], network_id: str) -> str: - """Get the middleware endpoint of a device. - - Returns: - str: middleware endpoint of the device - """ - network = resource.integration.networks.info( - network_id, ["id", "middleware_endpoint", "name"] - ) - if not network.get("middleware_endpoint"): - raise TypeError("This device network doesn't support downlinks.") - - return network["middleware_endpoint"] - - -def getDownlinkParams( - resource: Union[Account, Resources], device_id: str -) -> list[ConfigurationParams] | list[None]: - """Get the downlink parameters of a device. - - Returns: - str: downlink parameters of the device - """ - params = resource.devices.paramList(deviceID=device_id) - downlink_param = list(filter(lambda param: param["key"] == "downlink", params)) - - return downlink_param - - -def putParamInDevice( - resource: Union[Account, Resources], device_id: str, param_obj: ConfigurationParams -) -> None: - """Put the downlink parameter in the device.""" - - resource.devices.paramSet(deviceID=device_id, configObj=param_obj) - - -def sendDownlink( - resource: Union[Account, Resources], device_id: str, dn_options: DownlinkOptions -) -> str: - """Perform downlink to a device using official TagoIO support. - - Args: - resource (Account or Resources): resource TagoIO SDK Account or Resources instanced class - device_id (str): device_id id of your device - dn_options (DownlinkOptions): dn_options downlink parameter options. - """ - if not isinstance(resource, Account) and not isinstance(resource, Resources): - raise TypeError( - "The parameter 'account' must be an instance of a TagoIO Resources." - ) - - token = getDeviceToken(resource=resource, device_id=device_id) - network_id = getNetworkId(resource=resource, device_id=device_id) - middleware_endpoint = getMiddlewareEndpoint( - resource=resource, network_id=network_id - ) - downlink_param = getDownlinkParams(resource=resource, device_id=device_id) - param_obj = { - "id": downlink_param[0]["id"] if downlink_param else None, - "key": "downlink", - "value": str(dn_options["payload"]), - "sent": False, - } - putParamInDevice(resource=resource, device_id=device_id, param_obj=param_obj) - - data = { - "device": token["serie_number"], - "authorization": token["last_authorization"], - "payload": dn_options["payload"], - "port": dn_options["port"], - } - - result = requests.post(f"https://{middleware_endpoint}/downlink", data) - - if result.status_code in range(400, 500): - raise TypeError( - f"Downlink failed with status {result.status_code}: {result.text}" - ) - - return f"Downlink accepted with status code - {result.status_code}" diff --git a/src/tagoio_sdk/modules/Utils/utilsType.py b/src/tagoio_sdk/modules/Utils/utilsType.py deleted file mode 100644 index 29ac546..0000000 --- a/src/tagoio_sdk/modules/Utils/utilsType.py +++ /dev/null @@ -1,10 +0,0 @@ -from typing import TypedDict, Optional - - -HexadecimalPayload = str - - -class DownlinkOptions(TypedDict): - payload: HexadecimalPayload - port: str - confirmed: Optional[bool] diff --git a/src/tagoio_sdk/params.py b/src/tagoio_sdk/params.py deleted file mode 100644 index f23a305..0000000 --- a/src/tagoio_sdk/params.py +++ /dev/null @@ -1,10 +0,0 @@ -import os -from typing import Optional - -from tagoio_sdk.common.tagoio_module import GenericModuleParams - - -def get_params(params: Optional[GenericModuleParams] = None) -> GenericModuleParams: - if params is None: - params = {"token": os.environ.get("T_ANALYSIS_TOKEN")} - return params diff --git a/src/tagoio_sdk/regions.py b/src/tagoio_sdk/regions.py deleted file mode 100644 index 9998c8c..0000000 --- a/src/tagoio_sdk/regions.py +++ /dev/null @@ -1,46 +0,0 @@ -import os -from contextlib import suppress -from typing import Literal, TypedDict - - -class RegionDefinition(TypedDict): - api: str - realtime: str - - -noRegionWarning = False - -regionsDefinition = { - "usa-1": {"api": "https://api.tago.io", "realtime": "wss://realtime.tago.io"}, - "env": None, # ? process object should be on trycatch. -} - -Regions = Literal["usa-1", "env"] - - -def getConnectionURI(region: Regions) -> RegionDefinition: - value = None - with suppress(KeyError): - value = regionsDefinition[region] - - if value is not None: - return value - - if region is not None and region != "env": - raise Exception("> TagoIO-SDK: Invalid region {}.".format(region)) - - try: - api = os.environ.get("TAGOIO_API") or "" - realtime = os.environ.get("TAGOIO_REALTIME") or "" - - if api == "" and region != "env": - raise Exception("Invalid Env") - - return {"api": api, "realtime": realtime} - except: - global noRegionWarning - if noRegionWarning is False: - print("> TagoIO-SDK: No region or env defined, using fallback as usa-1.") - noRegionWarning = True - - return regionsDefinition["usa-1"] diff --git a/tests/AccountDeprecated/test_account.py b/tests/AccountDeprecated/test_account.py deleted file mode 100644 index 15f18b3..0000000 --- a/tests/AccountDeprecated/test_account.py +++ /dev/null @@ -1,67 +0,0 @@ -from requests_mock.mocker import Mocker - -from tagoio_sdk.modules.Resources.Account import Account -from tagoio_sdk.modules.Resources.Account_Types import AccountInfo - - -def mockAccountInfo() -> list[AccountInfo]: - return { - "status": True, - "result": { - "active": True, - "blocked": False, - "created_at": "2023-02-21T15:17:35.759Z", - "email": "email@test.com", - "id": "test_id", - "language": "en", - "last_login": "2023-03-07T01:43:45.950Z", - "name": "Tester Test", - "newsletter": False, - "options": { - "quickstart": { - "finished_tasks": [ - "actions", - "devices", - "dashboards", - "deploy", - "access", - "explore", - ], - "finished_percentage": 86, - }, - "last_whats_new": "2022-06-16T15:00:00.001Z", - "decimal_separator": ".", - "user_view_welcome": True, - "thousand_separator": ",", - }, - "phone": None, - "plan": "free", - "send_invoice": False, - "stripe_id": "test_stripe_id", - "timezone": "America/Sao_Paulo", - "type": "user", - "updated_at": "2023-03-24T17:43:47.916Z", - "otp": {}, - "survey": { - "PLAN_TO_USE_TAGOIO": True, - "SECTORS_INDUSTRY_IN": True, - "WHICH_TYPE_BUSINESS": True, - }, - "company": "tago.io", - "country": "Brazil", - }, - } - - -def testAccountMethodInfo(requests_mock: Mocker) -> None: - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - - requests_mock.get("https://api.tago.io/account", json=mockAccountInfo()) - - tokenFake = {"token": "fake_token"} - response = Account(params=tokenFake).info() - - assert response["email"] == mockAccountInfo()["result"]["email"] - assert isinstance(response, dict) diff --git a/tests/AccountDeprecated/test_device.py b/tests/AccountDeprecated/test_device.py deleted file mode 100644 index 7af521e..0000000 --- a/tests/AccountDeprecated/test_device.py +++ /dev/null @@ -1,134 +0,0 @@ -from requests_mock.mocker import Mocker - -from src.tagoio_sdk.modules.Device.Device import Device -from tests.conftest import (mockBodyCreateDevice, mockConfigurationParams, - mockDeviceInfo, mockReturnGetData) - - -def testDeviceMethodInfo(requests_mock: Mocker, mockDeviceInfo: mockDeviceInfo): - """ - :param requests_mock are a plugin of pytest to mock the requests. - :param mockDeviceInfo is a fixture to return the object DeviceInfo. - """ - - requests_mock.get( - "https://api.tago.io/info", json={"status": True, "result": mockDeviceInfo} - ) - - tokenFake = {"token": "fake_token"} - response = Device(params=tokenFake).info() - - assert response == mockDeviceInfo - assert isinstance(response, dict) - - -def testDeviceMethodSendData( - requests_mock: Mocker, mockBodyCreateDevice: mockBodyCreateDevice -): - """ - :param requests_mock are a plugin of pytest to mock the requests. - :param mockBodyCreateDevice is a fixture to return the object Data. - """ - - requests_mock.post( - "https://api.tago.io/data", json={"status": True, "result": "1 Data Added"} - ) - - tokenFake = {"token": "fake_token"} - response = Device(params=tokenFake).sendData(data=mockBodyCreateDevice) - - assert response == "1 Data Added" - assert isinstance(response, str) - - -def testDeviceMethodGetData( - requests_mock: Mocker, mockReturnGetData: mockReturnGetData -): - """ - :param requests_mock are a plugin of pytest to mock the requests. - :param mockReturnGetData is a fixture to return the object Data. - """ - - requests_mock.get( - "https://api.tago.io/data", json={"status": True, "result": mockReturnGetData} - ) - - tokenFake = {"token": "fake_token"} - response = Device(params=tokenFake).getData() - - assert len(response) == 10 - assert isinstance(response, list) - assert isinstance(response[0], dict) - - -def testDeviceMethodEditData(requests_mock: Mocker): - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - - requests_mock.put( - "https://api.tago.io/data", json={"status": True, "result": "1 item(s) updated"} - ) - - tokenFake = {"token": "fake_token"} - response = Device(params=tokenFake).editData(data=[{"id": "fake_id", "value": 66}]) - - assert response == "1 item(s) updated" - assert isinstance(response, str) - - -def testDeviceMethodDeleteData(requests_mock: Mocker): - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - - requests_mock.delete( - "https://api.tago.io/data", json={"status": True, "result": "1 Data Removed"} - ) - - tokenFake = {"token": "fake_token"} - response = Device(params=tokenFake).deleteData(queryParams=None) - - assert response == "1 Data Removed" - assert isinstance(response, str) - - -def testDeviceMethodGetParameters( - requests_mock: Mocker, - mockConfigurationParams: mockConfigurationParams, -): - """ - :param requests_mock are a plugin of pytest to mock the requests. - :param mockConfigurationParams is a fixture to return the object ConfigurationParams. - """ - - requests_mock.get( - "https://api.tago.io/device/params", - json={"status": True, "result": [mockConfigurationParams]}, - ) - - tokenFake = {"token": "fake_token"} - response = Device(params=tokenFake).getParameters() - - assert response[0] == mockConfigurationParams - assert isinstance(response, list) - assert isinstance(response[0], dict) - - -def testDeviceMethodSetParameterAsRead(requests_mock: Mocker): - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - - requests_mock.put( - "https://api.tago.io/device/params/63f66cf4b26aff0009cd2a2e", - json={"status": True, "result": "Params Successfully Updated"}, - ) - - tokenFake = {"token": "fake_token"} - response = Device(params=tokenFake).setParameterAsRead( - parameterID="63f66cf4b26aff0009cd2a2e" - ) - - assert response == "Params Successfully Updated" - assert isinstance(response, str) diff --git a/tests/AccountDeprecated/test_integration_network.py b/tests/AccountDeprecated/test_integration_network.py deleted file mode 100644 index 35e4516..0000000 --- a/tests/AccountDeprecated/test_integration_network.py +++ /dev/null @@ -1,39 +0,0 @@ -from requests_mock.mocker import Mocker - -from src.tagoio_sdk.modules.Resources.IntegrationNetwork import Networks -from tests.conftest import mockListNetwork, mockNetworkInfo - - -def testNetworksMethodListNetworks( - requests_mock: Mocker, mockListNetwork: mockListNetwork -): - """ - :param requests_mock are a plugin of pytest to mock the requests. - :param mockListNetwork is a fixture to return list of NetworkInfo. - """ - - requests_mock.get("https://api.tago.io/integration/network", json=mockListNetwork) - - tokenFake = {"token": "fake_token"} - response = Networks(params=tokenFake).listNetwork(queryObj={"amount": 100}) - - assert response == mockListNetwork["result"] - assert isinstance(response, list) - assert isinstance(response[0], dict) - - -def testNetworksMethodInfo(requests_mock: Mocker, mockNetworkInfo: mockNetworkInfo): - """ - :param requests_mock are a plugin of pytest to mock the requests. - :param mockNetworkInfo is a fixture to return the object NetworkInfo. - """ - networkID = "fake_network_id" - requests_mock.get( - f"https://api.tago.io/integration/network/{networkID}", json=mockNetworkInfo - ) - - tokenFake = {"token": "fake_token"} - response = Networks(params=tokenFake).info(networkID=networkID) - - assert response == mockNetworkInfo["result"] - assert isinstance(response, dict) diff --git a/tests/AccountDeprecated/test_profile.py b/tests/AccountDeprecated/test_profile.py deleted file mode 100644 index 3a33a59..0000000 --- a/tests/AccountDeprecated/test_profile.py +++ /dev/null @@ -1,186 +0,0 @@ -from requests_mock.mocker import Mocker - -from tagoio_sdk.common.Common_Type import TokenDataList -from tagoio_sdk.modules.Resources.Profile import Profile -from tagoio_sdk.modules.Resources.Profile_Type import (ProfileInfo, - ProfileSummary) - - -def mockProfileInfo() -> ProfileInfo: - return { - "status": True, - "result": { - "info": { - "id": "profile_id", - "account": "account_profile_id", - "name": "tago.io", - "logo_url": None, - "banner_url": None, - "created_at": "2023-02-21T15:17:35.880Z", - "updated_at": "2023-02-21T15:17:35.880Z", - }, - "allocation": { - "input": 1000000, - "output": 3000000, - "analysis": 3000, - "data_records": 800000, - "sms": 10, - "email": 100, - "run_users": 10, - "push_notification": 100, - "file_storage": 200, - }, - "account_plan": "free", - "addons": {"custom_dns": False, "mobile": False}, - }, - } - - -def mockListProfileInfo() -> list[ProfileInfo]: - return { - "status": True, - "result": [ - {"id": "profile_id", "name": "tago.io", "logo_url": None}, - { - "account": "account_profile_id", - "profile": "profile_profile_id", - "id": "profile_id", - "name": "DeltaTrak Test", - "logo_url": None, - "from_share": True, - }, - ], - } - - -def mockProfileSummary() -> ProfileSummary: - return { - "status": True, - "result": { - "amount": { - "device": 3, - "bucket": 3, - "dashboard": 3, - "analysis": 4, - "action": 1, - "am": 0, - "run_users": 0, - "dictionary": 0, - "connectors": 0, - "networks": 0, - "tcore": 0, - "tcore_cluster": 0, - }, - "limit": { - "analysis": 3000, - "data_records": 800000, - "email": 100, - "input": 1000000, - "output": 3000000, - "sms": 10, - "run_users": 10, - "push_notification": 100, - "file_storage": 200, - "tcore": 1, - }, - "limit_used": { - "input": 23379, - "output": 5161, - "analysis": 2.17, - "sms": 10, - "email": 14, - "data_records": 0, - "run_users": 0, - "push_notification": 0, - "file_storage": 0.58, - "tcore": 0, - "tcore_cluster": 0, - }, - "tago_run": "profile_id.tago.run", - "addons": {"custom_dns": False, "mobile": False}, - }, - } - - -def mockTokenDataList() -> list[TokenDataList]: - return { - "status": True, - "result": [ - { - "name": "Token Name", - "permission": "full", - "token": "token_profile_id", - "expire_time": "2023-06-07T01:43:45.951Z", - "created_at": "2023-03-07T01:43:45.952Z", - }, - { - "name": "Token Name", - "permission": "full", - "token": "token_profile_id", - "expire_time": None, - "created_at": "2023-02-24T18:09:33.731Z", - }, - ], - } - - -def testProfileMethodInfo(requests_mock: Mocker) -> None: - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - - requests_mock.get("https://api.tago.io/profile/profile_id", json=mockProfileInfo()) - - tokenFake = {"token": "fake_token"} - response = Profile(params=tokenFake).info(profileID="profile_id") - - assert response["allocation"] == mockProfileInfo()["result"]["allocation"] - assert isinstance(response, dict) - - -def testProfileMethodList(requests_mock: Mocker) -> None: - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - - requests_mock.get("https://api.tago.io/profile", json=mockListProfileInfo()) - - tokenFake = {"token": "fake_token"} - response = Profile(params=tokenFake).list() - - assert response == mockListProfileInfo()["result"] - assert isinstance(response, list) - assert isinstance(response[1], dict) - - -def testProfileMethodSummary(requests_mock: Mocker) -> None: - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - - requests_mock.get( - "https://api.tago.io/profile/profile_id/summary", json=mockProfileSummary() - ) - - tokenFake = {"token": "fake_token"} - response = Profile(params=tokenFake).summary(profileID="profile_id") - - assert response == mockProfileSummary()["result"] - assert isinstance(response, dict) - - -def testProfileMethodTokenList(requests_mock: Mocker) -> None: - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - - requests_mock.get( - "https://api.tago.io/profile/profile_id/token", json=mockTokenDataList() - ) - - tokenFake = {"token": "fake_token"} - response = Profile(params=tokenFake).tokenList(profileID="profile_id") - - assert response[1]["token"] == mockTokenDataList()["result"][1]["token"] - assert isinstance(response, list) - assert isinstance(response[1], dict) diff --git a/tests/Utils/test_env_to_json.py b/tests/Utils/test_env_to_json.py deleted file mode 100644 index 60e7239..0000000 --- a/tests/Utils/test_env_to_json.py +++ /dev/null @@ -1,19 +0,0 @@ -from tagoio_sdk.modules.Utils.envToJson import envToJson - -CONTEXT_ENVIRONMENT = [ - {"key": "account_token", "value": "test_token"}, - {"key": "device_token", "value": "test_token"}, - {"key": "input", "value": "95"}, - {"key": "output", "value": "95"}, -] - - -def test_env_to_json(): - """Test envToJson function.""" - expected = { - "account_token": "test_token", - "device_token": "test_token", - "input": "95", - "output": "95", - } - assert envToJson(CONTEXT_ENVIRONMENT) == expected diff --git a/tests/Utils/test_send_downlink.py b/tests/Utils/test_send_downlink.py deleted file mode 100644 index 59edd36..0000000 --- a/tests/Utils/test_send_downlink.py +++ /dev/null @@ -1,287 +0,0 @@ -import pytest -from requests_mock.mocker import Mocker - -from tagoio_sdk.modules.Resources.AccountDeprecated import AccountDeprecated as Account -from tagoio_sdk.modules.Resources.Device_Type import ( - ConfigurationParams, - DeviceTokenDataList, -) -from tagoio_sdk.modules.Utils.sendDownlink import ( - getDeviceToken, - getDownlinkParams, - getMiddlewareEndpoint, - getNetworkId, - sendDownlink, -) - - -def mockDeviceToken() -> list[DeviceTokenDataList]: - """Mock to return the list of DeviceTokenDataList.""" - return { - "status": True, - "result": [ - { - "name": "Default", - "serie_number": "0000000000000000", - "last_authorization": "2023-03-02T17:51:31.361Z", - }, - { - "name": "Test", - "serie_number": None, - "last_authorization": None, - }, - ], - } - - -def mockConfigurationParams() -> list[ConfigurationParams]: - """Mock to return the list of ConfigurationParams.""" - return { - "status": True, - "result": [ - { - "id": "6400fcf41f1ee8000913e6df", - "key": "123", - "value": "213", - "sent": False, - }, - { - "id": "64020577ad714b00093b9b20", - "key": "downlink", - "value": "test", - "sent": False, - }, - ], - } - - -def testMethodGetDeviceTokenSuccessfully(requests_mock: Mocker): - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - deviceID = "fake_device_id" - params_url = ( - "?page=1&fields=name&fields=serie_number&fields=last_authorization&amount=10" - ) - requests_mock.get( - f"https://api.tago.io/device/token/{deviceID}{params_url}", - json=mockDeviceToken(), - ) - - my_account = Account({"token": "fake_token"}) - response = getDeviceToken(resource=my_account, device_id=deviceID) - - assert response["name"] == mockDeviceToken()["result"][0]["name"] - assert response["serie_number"] == mockDeviceToken()["result"][0]["serie_number"] - assert isinstance(response, dict) - - -def testMethodGetDeviceTokenFail(requests_mock: Mocker): - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - deviceID = "fake_device_id" - params_url = ( - "?page=1&fields=name&fields=serie_number&fields=last_authorization&amount=10" - ) - requests_mock.get( - f"https://api.tago.io/device/token/{deviceID}{params_url}", - json={"status": True, "result": []}, - ) - - my_account = Account({"token": "fake_token"}) - with pytest.raises(TypeError): - getDeviceToken(resource=my_account, device_id=deviceID) - - -def testMethodGetNetworkIdSuccessfully(requests_mock: Mocker): - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - deviceID = "fake_device_id" - requests_mock.get( - f"https://api.tago.io/device/{deviceID}", - json={"status": True, "result": {"network": "fake_network_id"}}, - ) - - my_account = Account({"token": "fake_token"}) - response = getNetworkId(resource=my_account, device_id=deviceID) - - assert response == "fake_network_id" - assert isinstance(response, str) - - -def testMethodGetNetworkIdFail(requests_mock: Mocker): - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - deviceID = "fake_device_id" - requests_mock.get( - f"https://api.tago.io/device/{deviceID}", - json={"status": True, "result": {}}, - ) - - my_account = Account({"token": "fake_token"}) - with pytest.raises(ValueError): - getNetworkId(resource=my_account, device_id=deviceID) - - -def testMethodGetMiddlewareEndpointSuccessfully(requests_mock: Mocker): - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - networkID = "fake_network_id" - requests_mock.get( - f"https://api.tago.io/integration/network/{networkID}", - json={"status": True, "result": {"middleware_endpoint": "fake_endpoint"}}, - ) - - my_account = Account({"token": "fake_token"}) - response = getMiddlewareEndpoint(resource=my_account, network_id=networkID) - - assert response == "fake_endpoint" - assert isinstance(response, str) - - -def testMethodGetMiddlewareEndpointFail(requests_mock: Mocker): - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - networkID = "fake_network_id" - requests_mock.get( - f"https://api.tago.io/integration/network/{networkID}", - json={"status": True, "result": {}}, - ) - - my_account = Account({"token": "fake_token"}) - with pytest.raises(TypeError): - getMiddlewareEndpoint(resource=my_account, network_id=networkID) - - -def testMethodGetDownlinkParamsSuccessfully(requests_mock: Mocker): - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - deviceID = "fake_device_id" - requests_mock.get( - f"https://api.tago.io/device/{deviceID}/params", - json=mockConfigurationParams(), - ) - - my_account = Account({"token": "fake_token"}) - response = getDownlinkParams(resource=my_account, device_id=deviceID) - - assert response[0] == mockConfigurationParams()["result"][1] - assert isinstance(response, list) - assert isinstance(response[0], dict) - - -def testMethodGetDownlinkParamsEmptyList(requests_mock: Mocker): - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - deviceID = "fake_device_id" - requests_mock.get( - f"https://api.tago.io/device/{deviceID}/params", - json={"status": True, "result": []}, - ) - - my_account = Account({"token": "fake_token"}) - response = getDownlinkParams(resource=my_account, device_id=deviceID) - - assert response == [] - - -def testMethodSendDownlinkSuccessfully(requests_mock: Mocker): - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - deviceID = "fake_device_id" - requests_mock.post( - f"https://api.tago.io/device/{deviceID}/params", - json={"status": True, "result": "Params Successfully Updated"}, - ) - params_url = ( - "?page=1&fields=name&fields=serie_number&fields=last_authorization&amount=10" - ) - requests_mock.get( - f"https://api.tago.io/device/token/{deviceID}{params_url}", - json=mockDeviceToken(), - ) - requests_mock.get( - f"https://api.tago.io/device/{deviceID}", - json={"status": True, "result": {"network": "fake_network_id"}}, - ) - requests_mock.get( - f"https://api.tago.io/device/{deviceID}/params", - json=mockConfigurationParams(), - ) - networkID = "fake_network_id" - requests_mock.get( - f"https://api.tago.io/integration/network/{networkID}", - json={"status": True, "result": {"middleware_endpoint": "fake_endpoint"}}, - ) - - requests_mock.post("https://fake_endpoint/downlink", status_code=200) - - my_account = Account({"token": "fake_token"}) - response = sendDownlink( - resource=my_account, - device_id=deviceID, - dn_options={"payload": "test", "port": 123}, - ) - - assert response == "Downlink accepted with status code - 200" - assert isinstance(response, str) - - -def testMethodSendDownlinkFail(requests_mock: Mocker): - """ - :param requests_mock are a plugin of pytest to mock the requests. - """ - deviceID = "fake_device_id" - requests_mock.post( - f"https://api.tago.io/device/{deviceID}/params", - json={"status": True, "result": "Params Successfully Updated"}, - ) - params_url = ( - "?page=1&fields=name&fields=serie_number&fields=last_authorization&amount=10" - ) - requests_mock.get( - f"https://api.tago.io/device/token/{deviceID}{params_url}", - json=mockDeviceToken(), - ) - requests_mock.get( - f"https://api.tago.io/device/{deviceID}", - json={"status": True, "result": {"network": "fake_network_id"}}, - ) - requests_mock.get( - f"https://api.tago.io/device/{deviceID}/params", - json=mockConfigurationParams(), - ) - networkID = "fake_network_id" - requests_mock.get( - f"https://api.tago.io/integration/network/{networkID}", - json={"status": True, "result": {"middleware_endpoint": "fake_endpoint"}}, - ) - - requests_mock.post("https://fake_endpoint/downlink", status_code=422) - - my_account = Account({"token": "fake_token"}) - with pytest.raises(TypeError): - sendDownlink( - resource=my_account, - device_id=deviceID, - dn_options={"payload": "test", "port": 123}, - ) - - -def testMethodSendDownlinkFailWrongInstanceOfAccount(): - my_account = "fake_account" - deviceID = "fake_device_id" - with pytest.raises(TypeError): - sendDownlink( - resource=my_account, - device_id=deviceID, - dn_options={"payload": "test", "port": 123}, - ) diff --git a/tests/conftest.py b/tests/conftest.py deleted file mode 100644 index 167a578..0000000 --- a/tests/conftest.py +++ /dev/null @@ -1,120 +0,0 @@ -import pytest - -from src.tagoio_sdk.common.Common_Type import Data -from src.tagoio_sdk.modules.Device.Device_Type import DeviceInfo -from src.tagoio_sdk.modules.Resources.Device_Type import ConfigurationParams -from src.tagoio_sdk.modules.Resources.IntegrationNetworkType import NetworkInfo - - -@pytest.fixture -def mockNetworkInfo() -> NetworkInfo: - """ - Mock to return the object NetworkInfo. - """ - - return { - "status": True, - "result": { - "id": "5ede22a7427104001c248b08", - "name": "LoRaWAN Activity", - "profile": "5bbcb03b667d7a002e56664b", - "middleware_endpoint": "https://lorawan.tago.io", - }, - } - - -@pytest.fixture -def mockListNetwork() -> list[NetworkInfo]: - """ - Mock to return the list of NetworkInfo. - """ - - return { - "status": True, - "result": [ - {"id": "60af66df0ae39d0012b0bbe9", "name": "AWS IoT"}, - {"id": "5d48632019b67f001c874a6b", "name": "BeWhere"}, - ], - } - - -@pytest.fixture -def mockDeviceInfo() -> DeviceInfo: - """ - Mock to return the object DeviceInfo. - """ - - return { - "status": True, - "result": { - "active": True, - "bucket": {"id": "63f50a69fd802b000ac1aa76", "name": "Device #1"}, - "connector": "5f5a8f3351d4db99c40dece5", - "created_at": "2023-02-21T18:16:09.817Z", - "description": ( - "Connect any device using HTTPS protocol directly to send/get data " - ), - "id": "63f50a69fd802b000ac1aa76", - "last_input": "2023-02-24T11:18:54.116Z", - "name": "Device #1", - "network": "5bbd0d144051a50034cd19fb", - "payload_decoder": None, - "profile": "63f4e08fb26aff0009ab99c0", - "tags": [], - "updated_at": "2023-02-21T18:16:09.817Z", - "visible": True, - "type": "mutable", - "data_retention": "forever", - }, - } - - -@pytest.fixture -def mockBodyCreateDevice() -> Data: - """ - Mock to return the object Data. - """ - - return { - "variable": "temperature", - "unit": "F", - "value": "80", - "time": "2021-01-01T00:00:00.000Z", - "location": {"lat": 42.2974279, "lng": -85.628292}, - } - - -@pytest.fixture -def mockConfigurationParams() -> ConfigurationParams: - """ - Mock to return the object ConfigurationParams. - """ - return { - "id": "fake_id", - "key": "phone", - "value": "fake_value", - "sent": True, - } - - -@pytest.fixture -def mockReturnGetData() -> list[Data]: - """ - Mock to return ten objects of the ConfigurationParams. - """ - - data = [] - - for _ in range(10): - data.append( - { - "id": _, - "variable": "temperature", - "unit": "F", - "value": "80", - "time": "2021-01-01T00:00:00.000Z", - "location": {"lat": 42.2974279, "lng": -85.628292}, - } - ) - - return data