diff --git a/whatsapp-web.js/.editorconfig b/whatsapp-web.js/.editorconfig deleted file mode 100644 index 73c5516..0000000 --- a/whatsapp-web.js/.editorconfig +++ /dev/null @@ -1,8 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 4 -charset = utf-8 -trim_trailing_whitespace = false -insert_final_newline = false \ No newline at end of file diff --git a/whatsapp-web.js/.eslintrc.json b/whatsapp-web.js/.eslintrc.json deleted file mode 100644 index 5b8d731..0000000 --- a/whatsapp-web.js/.eslintrc.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "env": { - "browser": true, - "commonjs": true, - "es6": true, - "node": true - }, - "extends": "eslint:recommended", - "globals": { - "Atomics": "readonly", - "SharedArrayBuffer": "readonly" - }, - "parserOptions": { - "ecmaVersion": 2018 - }, - "rules": { - "indent": [ - "error", - 4 - ], - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "error", - "single" - ], - "semi": [ - "error", - "always" - ] - } -} \ No newline at end of file diff --git a/whatsapp-web.js/.github/stale.yml b/whatsapp-web.js/.github/stale.yml deleted file mode 100644 index bdb3332..0000000 --- a/whatsapp-web.js/.github/stale.yml +++ /dev/null @@ -1,20 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 30 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 7 -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - security - - enhancement - - bug - - WhatsApp Change -# Label to use when marking an issue as stale -staleLabel: stale -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false diff --git a/whatsapp-web.js/.github/workflows/lint.yml b/whatsapp-web.js/.github/workflows/lint.yml deleted file mode 100644 index f822142..0000000 --- a/whatsapp-web.js/.github/workflows/lint.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Lint - -on: - push: - pull_request: - -jobs: - eslint: - name: eslint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: install node v12 - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: npm install - run: npm install - - name: eslint - uses: icrawl/action-eslint@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - job-name: eslint diff --git a/whatsapp-web.js/.gitignore b/whatsapp-web.js/.gitignore deleted file mode 100644 index ad46b30..0000000 --- a/whatsapp-web.js/.gitignore +++ /dev/null @@ -1,61 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -# next.js build output -.next diff --git a/whatsapp-web.js/.jsdoc.json b/whatsapp-web.js/.jsdoc.json deleted file mode 100644 index 4fa7aa6..0000000 --- a/whatsapp-web.js/.jsdoc.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "tags": { - "allowUnknownTags": true, - "dictionaries": ["jsdoc"] - }, - "source": { - "include": ["src", "package.json", "README.md"], - "includePattern": ".js$", - "excludePattern": "(node_modules/|docs)" - }, - "plugins": [ - "plugins/markdown" - ], - "templates": { - "cleverLinks": false, - "monospaceLinks": true, - "useLongnameInNav": false, - "showInheritedInNav": true - }, - "opts": { - "destination": "./docs/", - "encoding": "utf8", - "recurse": true, - "template": "./node_modules/jsdoc-baseline" - } -} \ No newline at end of file diff --git a/whatsapp-web.js/LICENSE b/whatsapp-web.js/LICENSE deleted file mode 100644 index d22267f..0000000 --- a/whatsapp-web.js/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 2019 Pedro S Lopez - - 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/whatsapp-web.js/README.md b/whatsapp-web.js/README.md deleted file mode 100644 index e0ca45a..0000000 --- a/whatsapp-web.js/README.md +++ /dev/null @@ -1,102 +0,0 @@ -[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2025.6](https://img.shields.io/badge/WhatsApp_Web-2.2025.6-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) - -# whatsapp-web.js -A WhatsApp API client that connects through the WhatsApp Web browser app - -It uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked. - -**NOTE:** I can't guarantee you will not be blocked by using this method, although it has worked for me. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldn't be considered totally safe. - -## Installation - -The module is now available on npm! `npm i whatsapp-web.js` - -Please note that Node v10.18.1+ is required due to Puppeteer. - -## Example usage - -```js -const { Client } = require('whatsapp-web.js'); -const client = new Client(); - -client.on('qr', (qr) => { - // Generate and scan this code with your phone - console.log('QR RECEIVED', qr); -}); - -client.on('ready', () => { - console.log('Client is ready!'); -}); - -client.on('message', msg => { - if (msg.body == '!ping') { - msg.reply('pong'); - } -}); - -client.initialize(); -``` - -Take a look at [example.js](https://github.com/pedroslopez/whatsapp-web.js/blob/master/example.js) for another example with more use cases. - -## Supported features - -| Feature | Status | -| ------------- | ------------- | -| Send messages | ✅ | -| Receive messages | ✅ | -| Send media (images/audio/documents) | ✅ | -| Send media (video) | ✅ [(requires google chrome)](https://github.com/pedroslopez/whatsapp-web.js/issues/78#issuecomment-592723583) | -| Send stickers | _pending_ | -| Receive media (images/audio/video/documents) | ✅ | -| Send contact cards | _pending_ | -| Send location | ✅ | -| Receive location | ✅ | -| Message replies | ✅ | -| Join groups by invite | ✅ | -| Get invite for group | ✅ | -| Modify group info (subject, description) | ✅ | -| Add group participants | ✅ | -| Kick group participants | ✅ | -| Promote/demote group participants | ✅ | -| Mention users | ✅ | -| Mute/unmute chats | ✅ | -| Get contact info | ✅ | -| Get profile pictures | ✅ | -| Set user status message | ✅ | - -Something missing? Make an issue and let us know! - -## Links - -* [Reference](https://pedroslopez.me/whatsapp-web.js) -* [Guide](https://waguide.pedroslopez.me/) _(work in progress)_ -* [GitHub](https://github.com/pedroslopez/whatsapp-web.js) - -## Contributing - -Pull requests are welcome! If you see something you'd like to add, please do. For drastic changes, please open an issue first. - -## Donating - -You can support the maintainer of this project through the link below - -[![Support via PayPal](https://cdn.rawgit.com/twolfson/paypal-github-button/1.0.0/dist/button.svg)](https://www.paypal.me/psla/) - -## Disclaimer - -This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp or any of its subsidiaries or its affiliates. The official WhatsApp website can be found at https://whatsapp.com. "WhatsApp" as well as related names, marks, emblems and images are registered trademarks of their respective owners. - -## License - -Copyright 2019 Pedro S Lopez - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this project 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/whatsapp-web.js/docs/._Contact.html b/whatsapp-web.js/docs/._Contact.html deleted file mode 100644 index 4a30fe9..0000000 Binary files a/whatsapp-web.js/docs/._Contact.html and /dev/null differ diff --git a/whatsapp-web.js/docs/._index.html b/whatsapp-web.js/docs/._index.html deleted file mode 100644 index ccd54df..0000000 Binary files a/whatsapp-web.js/docs/._index.html and /dev/null differ diff --git a/whatsapp-web.js/docs/Base.html b/whatsapp-web.js/docs/Base.html deleted file mode 100644 index d1b98f0..0000000 --- a/whatsapp-web.js/docs/Base.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: Base - - - - - - - - -
-
-
-
- -
-
-
-

new Base()

-
-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/BusinessContact.html b/whatsapp-web.js/docs/BusinessContact.html deleted file mode 100644 index 2cc7b43..0000000 --- a/whatsapp-web.js/docs/BusinessContact.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: BusinessContact - - - - - - - - -
-
-
-
- -
-
-

Properties

-
-
-
-
businessProfile
-
-
-
id
-
-
-
isBusiness
-
-
-
isEnterprise
-
-
-
isGroup
-
-
-
-
-
-
-
isMe
-
-
-
isMyContact
-
-
-
isUser
-
-
-
isWAContact
-
-
-
name
-
-
-
-
-
-
-
number
-
-
-
pushname
-
-
-
shortName
-
-
-
-
-
-
-
-

Method

-
-
-
-
getProfilePicUrl()
-
-
-
-
-
-
-
-
-
-
-
-
-

new BusinessContact()

-
-
Extends
-
Contact
-
-
-
-

Properties

-
-

businessProfile

-

The contact's business profile

-
-
-

id -  unknown

-

ID that represents the contact

-
-
Inherited from
-
Contact#id
-
-

isBusiness -  unknown

-

Indicates if the contact is a business contact

-
-
Inherited from
-
Contact#isBusiness
-
-

isEnterprise -  unknown

-

Indicates if the contact is an enterprise contact

-
-
Inherited from
-
Contact#isEnterprise
-
-

isGroup -  unknown

-

Indicates if the contact is a group contact

-
-
Inherited from
-
Contact#isGroup
-
-

isMe -  unknown

-

Indicates if the contact is the current user's contact

-
-
Inherited from
-
Contact#isMe
-
-

isMyContact -  unknown

-

Indicates if the number is saved in the current phone's contacts

-
-
Inherited from
-
Contact#isMyContact
-
-

isUser -  unknown

-

Indicates if the contact is a user contact

-
-
Inherited from
-
Contact#isUser
-
-

isWAContact -  unknown

-

Indicates if the number is registered on WhatsApp

-
-
Inherited from
-
Contact#isWAContact
-
-

name -  unknown

-

The contact's name, as saved by the current user

-
-
Inherited from
-
Contact#name
-
-

number -  unknown

-

Contact's phone number

-
-
Inherited from
-
Contact#number
-
-

pushname -  unknown

-

The name that the contact has configured to be shown publically

-
-
Inherited from
-
Contact#pushname
-
-

shortName -  unknown

-

A shortened version of name

-
-
Inherited from
-
Contact#shortName
-
-
-

Method

-
-
async
-

getProfilePicUrl() → Promise containing string

-

Returns the contact's profile picture URL, if privacy settings allow it

-
-
Inherited from
-
Contact#getProfilePicUrl
-
Returns
-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/Chat.html b/whatsapp-web.js/docs/Chat.html deleted file mode 100644 index 9b8c796..0000000 --- a/whatsapp-web.js/docs/Chat.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: Chat - - - - - - - - -
-
-
-
- -
-
-

Properties

-
-
-
-
archived
-
-
-
id
-
-
-
isGroup
-
-
-
-
-
-
-
isReadOnly
-
-
-
name
-
-
-
timestamp
-
-
-
-
-
-
-
unreadCount
-
-
-
-
-
-
-
-

Methods

- -
-
-
-

new Chat()

-
-
Extends
-
Base
-
-
-
-

Properties

-
-

archived -  boolean

-

Indicates if the Chat is archived

-
-
-

id -  object

-

ID that represents the chat

-
-
-

isGroup -  boolean

-

Indicates if the Chat is a Group Chat

-
-
-

isReadOnly -  boolean

-

Indicates if the Chat is readonly

-
-
-

name -  string

-

Title of the chat

-
-
-

timestamp -  number

-

Unix timestamp for when the chat was created

-
-
-

unreadCount -  number

-

Amount of messages unread

-
-
-
-

Methods

-
-
async
-

archive()

-

Archives this chat

-
-
-
async
-

clearMessages() → Promise containing Boolean

-

Clears all messages from the chat

-
-
Returns
-
-

Promise containing Boolean 

result

-

-
-
-
async
-

clearState()

-

Stops typing or recording in chat immediately.

-
-
-
async
-

delete() → Promise containing Boolean

-

Deletes the chat

-
-
Returns
-
-

Promise containing Boolean 

result

-

-
-
-
async
-

fetchMessages(searchOptions) → Promise containing Array of Message

-

Loads chat messages, sorted from earliest to latest.

-
-

Parameters

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

searchOptions

-
-

Object

-
-

 

-
-

Options for searching messages. Right now only limit is supported.

-

Values in searchOptions have the following properties:

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

limit

-
-

Number

-
-

Yes

-
-

The amount of messages to return. Note that the actual number of returned messages may be smaller if there aren't enough messages in the conversation. Set this to Infinity to load all messages.

-

Defaults to 50.

-
-
-
-
-
Returns
-
-

Promise containing Array of Message 

-
-
-
async
-

mute(unmuteDate)

-

Mutes this chat until a specified date

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

unmuteDate

-
-

Date

-
-

 

-
-

Date at which the Chat will be unmuted

-
-
-
-
-
async
-

sendMessage(content, options) → Promise containing Message

-

Send a message to this chat

-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

content

-
-

(string, MessageMedia, or Location)

-
-

 

-
-
-

options

-
-

object

-
-

 

-
-
-
-
-
Returns
-
-

Promise containing Message 

Message that was just sent

-

-
-
-
async
-

sendSeen() → Promise containing Boolean

-

Set the message as seen

-
-
Returns
-
-

Promise containing Boolean 

result

-

-
-
-
async
-

sendStateRecording()

-

Simulate recording audio in chat. This will last for 25 seconds.

-
-
-
async
-

sendStateTyping()

-

Simulate typing in chat. This will last for 25 seconds.

-
-
-
async
-

unarchive()

-

un-archives this chat

-
-
-
async
-

unmute()

-

Unmutes this chat

-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/Client.html b/whatsapp-web.js/docs/Client.html deleted file mode 100644 index 0b4c3d8..0000000 --- a/whatsapp-web.js/docs/Client.html +++ /dev/null @@ -1,1361 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: Client - - - - - - - - -
-
-
-
- -
- -
-

Events

-
-
-
-
auth_failure
-
-
-
authenticated
-
-
-
change_battery
-
-
-
change_state
-
-
-
disconnected
-
-
-
group_join
-
-
-
-
-
-
-
group_leave
-
-
-
group_update
-
-
-
media_uploaded
-
-
-
message
-
-
-
message_ack
-
-
-
message_create
-
-
-
-
-
-
-
message_revoke_everyone
-
-
-
message_revoke_me
-
-
-
qr
-
-
-
ready
-
-
-
-
-
-
-
-
-

new Client()

-
-
Extends
-
EventEmitter
-
Fires
-
Client#event:qr
-
Client#event:authenticated
-
Client#event:auth_failure
-
Client#event:ready
-
Client#event:message
-
Client#event:message_ack
-
Client#event:message_create
-
Client#event:message_revoke_me
-
Client#event:message_revoke_everyone
-
Client#event:media_uploaded
-
Client#event:group_join
-
Client#event:group_leave
-
Client#event:group_update
-
Client#event:disconnected
-
Client#event:change_state
-
Client#event:change_battery
-
-
-
-

Methods

-
-
async
-

acceptInvite(inviteCode)

-

Accepts an invitation to join a group

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

inviteCode

-
-

string

-
-

 

-
-

Invitation code

-
-
-
-
-
async
-

archiveChat() → boolean

-

Enables and returns the archive state of the Chat

-
-
Returns
-
-

boolean 

-
-
-
async
-

createGroup(name, participants) → (Object, string, or Object with string properties)

-

Create a new group

-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

name

-
-

string

-
-

 

-
-

group title

-
-

participants

-
-

Array of (Contact or string)

-
-

 

-
-

an array of Contacts or contact IDs to add to the group

-
-
-
-
Returns
-
-

Object 

createRes

-

-
-
-

string 

createRes.gid - ID for the group that was just created

-

-
-
-

Object with string properties 

createRes.missingParticipants - participants that were not added to the group. Keys represent the ID for participant that was not added and its value is a status code that represents the reason why participant could not be added. This is usually 403 if the user's privacy settings don't allow you to add them to groups.

-

-
-
-
async
-

destroy()

-

Closes the client

-
-
-
async
-

getChatById(chatId) → Promise containing Chat

-

Get chat instance by ID

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

chatId

-
-

string

-
-

 

-
-
-
-
-
Returns
-
-

Promise containing Chat 

-
-
-
async
-

getChats() → Promise containing Array of Chat

-

Get all current chat instances

-
-
Returns
-
-

Promise containing Array of Chat 

-
-
-
async
-

getContactById(contactId) → Promise containing Contact

-

Get contact instance by ID

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

contactId

-
-

string

-
-

 

-
-
-
-
-
Returns
-
-

Promise containing Contact 

-
-
-
async
-

getContacts() → Promise containing Array of Contact

-

Get all current contact instances

-
-
Returns
-
-

Promise containing Array of Contact 

-
-
-
async
-

getInviteInfo(inviteCode) → Promise containing object

-

Returns an object with information about the invite code's group

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

inviteCode

-
-

string

-
-

 

-
-
-
-
-
Returns
-
-

Promise containing object 

Invite information

-

-
-
-
async
-

getProfilePicUrl(contactId) → Promise containing string

-

Returns the contact ID's profile picture URL, if privacy settings allow it

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

contactId

-
-

string

-
-

 

-
-

the whatsapp user's ID

-
-
-
-
Returns
-
-

Promise containing string 

-
-
-
async
-

getState() → WAState

-

Gets the current connection state for the client

-
-
Returns
-
-

WAState 

-
-
-
async
-

getWWebVersion()

-

Returns the version of WhatsApp Web currently being run

-
-
Returns
-
-

Promise -

-
-
-
async
-

initialize()

-

Sets up events and requirements, kicks off authentication request

-
-
-
async
-

isRegisteredUser() → Promise containing Boolean

-

Check if a given ID is registered in whatsapp

-
-
Returns
-
-

Promise containing Boolean 

-
-
-
async
-

logout()

-

Logs out the client, closing the current session

-
-
-
async
-

muteChat(chatId, unmuteDate)

-

Mutes the Chat until a specified date

-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

chatId

-
-

string

-
-

 

-
-

ID of the chat that will be muted

-
-

unmuteDate

-
-

Date

-
-

 

-
-

Date when the chat will be unmuted

-
-
-
-
-
async
-

resetState()

-

Force reset of connection state for the client

-
-
-
async
-

sendMessage(chatId, content, options) → Promise containing Message

-

Send a message to a specific chatId

-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

chatId

-
-

string

-
-

 

-
-
-

content

-
-

(string, MessageMedia, or Location)

-
-

 

-
-
-

options

-
-

object

-
-

 

-
-
-
-
-
Returns
-
-

Promise containing Message 

Message that was just sent

-

-
-
-
async
-

sendPresenceAvailable()

-

Marks the client as online

-
-
-
async
-

sendSeen(chatId) → Promise containing boolean

-

Mark as seen for the Chat

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

chatId

-
-

string

-
-

 

-
-
-
-
-
Returns
-
-

Promise containing boolean 

result

-

-
-
-
async
-

setStatus(status)

-

Sets the current user's status message

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

status

-
-

string

-
-

 

-
-

New status message

-
-
-
-
-
async
-

unarchiveChat() → boolean

-

Changes and returns the archive state of the Chat

-
-
Returns
-
-

boolean 

-
-
-
async
-

unmuteChat(chatId)

-

Unmutes the Chat

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

chatId

-
-

string

-
-

 

-
-

ID of the chat that will be unmuted

-
-
-
-
-
-

Events

-
-

auth_failure

-

Emitted when there has been an error while trying to restore an existing session

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

message

-
-

string

-
-

 

-
-
-
-
-
-

authenticated

-

Emitted when authentication is successful

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

session

-
-

object

-
-

 

-
-

Object containing session information. Can be used to restore the session.

-
-
-
-
-

change_battery

-

Emitted when the battery percentage for the attached device changes

-
-

Parameters

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

batteryInfo

-
-

object

-
-

 

-
-

Values in batteryInfo have the following properties:

- - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

battery

-
-

number

-
-

 

-
-

The current battery percentage

-
-

plugged

-
-

boolean

-
-

 

-
-

Indicates if the phone is plugged in (true) or not (false)

-
-
-
-
-
-

change_state

-

Emitted when the connection state changes

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

state

-
-

WAState

-
-

 

-
-

the new connection state

-
-
-
-
-

disconnected

-

Emitted when the client has been disconnected

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

reason

-
-

WAState

-
-

 

-
-

state that caused the disconnect

-
-
-
-
-

group_join

-

Emitted when a user joins the chat via invite link or is added by an admin.

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

notification

-
-

GroupNotification

-
-

 

-
-

GroupNotification with more information about the action

-
-
-
-
-

group_leave

-

Emitted when a user leaves the chat or is removed by an admin.

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

notification

-
-

GroupNotification

-
-

 

-
-

GroupNotification with more information about the action

-
-
-
-
-

group_update

-

Emitted when group settings are updated, such as subject, description or picture.

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

notification

-
-

GroupNotification

-
-

 

-
-

GroupNotification with more information about the action

-
-
-
-
-

media_uploaded

-

Emitted when media has been uploaded for a message sent by the client.

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

message

-
-

Message

-
-

 

-
-

The message with media that was uploaded

-
-
-
-
-

message

-

Emitted when a new message is received.

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

message

-
-

Message

-
-

 

-
-

The message that was received

-
-
-
-
-

message_ack

-

Emitted when an ack event occurrs on message type.

-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

message

-
-

Message

-
-

 

-
-

The message that was affected

-
-

ack

-
-

MessageAck

-
-

 

-
-

The new ACK value

-
-
-
-
-

message_create

-

Emitted when a new message is created, which may include the current user's own messages.

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

message

-
-

Message

-
-

 

-
-

The message that was created

-
-
-
-
-

message_revoke_everyone

-

Emitted when a message is deleted for everyone in the chat.

-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

message

-
-

Message

-
-

 

-
-

The message that was revoked, in its current state. It will not contain the original message's data.

-
-

revoked_msg

-
-

Message

-
-

 

-
-

The message that was revoked, before it was revoked. It will contain the message's original data. - Note that due to the way this data is captured, it may be possible that this param will be undefined.

-

Value can be null.

-
-
-
-
-

message_revoke_me

-

Emitted when a message is deleted by the current user.

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

message

-
-

Message

-
-

 

-
-

The message that was revoked

-
-
-
-
-

qr

-

Emitted when the QR code is received

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

qr

-
-

string

-
-

 

-
-

QR Code

-
-
-
-
-

ready

-

Emitted when the client has initialized and is ready to receive messages.

-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/Client.js.html b/whatsapp-web.js/docs/Client.js.html deleted file mode 100644 index 92488a5..0000000 --- a/whatsapp-web.js/docs/Client.js.html +++ /dev/null @@ -1,715 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: Client.js - - - - - - - - -
-
-
- -
- -
-
'use strict';
-
-const EventEmitter = require('events');
-const puppeteer = require('puppeteer');
-const moduleRaid = require('@pedroslopez/moduleraid/moduleraid');
-const jsQR = require('jsqr');
-
-const Util = require('./util/Util');
-const InterfaceController = require('./util/InterfaceController');
-const { WhatsWebURL, UserAgent, DefaultOptions, Events, WAState } = require('./util/Constants');
-const { ExposeStore, LoadUtils } = require('./util/Injected');
-const ChatFactory = require('./factories/ChatFactory');
-const ContactFactory = require('./factories/ContactFactory');
-const { ClientInfo, Message, MessageMedia, Contact, Location, GroupNotification } = require('./structures');
-/**
- * Starting point for interacting with the WhatsApp Web API
- * @extends {EventEmitter}
- * @fires Client#qr
- * @fires Client#authenticated
- * @fires Client#auth_failure
- * @fires Client#ready
- * @fires Client#message
- * @fires Client#message_ack
- * @fires Client#message_create
- * @fires Client#message_revoke_me
- * @fires Client#message_revoke_everyone
- * @fires Client#media_uploaded
- * @fires Client#group_join
- * @fires Client#group_leave
- * @fires Client#group_update
- * @fires Client#disconnected
- * @fires Client#change_state
- * @fires Client#change_battery
- */
-class Client extends EventEmitter {
-    constructor(options = {}) {
-        super();
-
-        this.options = Util.mergeDefault(DefaultOptions, options);
-
-        this.pupBrowser = null;
-        this.pupPage = null;
-    }
-
-    /**
-     * Sets up events and requirements, kicks off authentication request
-     */
-    async initialize() {
-        const browser = await puppeteer.launch(this.options.puppeteer);
-        const page = (await browser.pages())[0];
-        page.setUserAgent(UserAgent);
-
-        this.pupBrowser = browser;
-        this.pupPage = page;
-        
-        if (this.options.session) {
-            await page.evaluateOnNewDocument(
-                session => {
-                    localStorage.clear();
-                    localStorage.setItem('WABrowserId', session.WABrowserId);
-                    localStorage.setItem('WASecretBundle', session.WASecretBundle);
-                    localStorage.setItem('WAToken1', session.WAToken1);
-                    localStorage.setItem('WAToken2', session.WAToken2);
-                }, this.options.session);
-        }
-
-        await page.goto(WhatsWebURL, {
-            waitUntil: 'load',
-            timeout: 0,
-        });
-        
-        const KEEP_PHONE_CONNECTED_IMG_SELECTOR = '[data-asset-intro-image-light="true"]';
-
-        if (this.options.session) {
-            // Check if session restore was successfull 
-            try {
-                await page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: this.options.authTimeoutMs });
-            } catch (err) {
-                if (err.name === 'TimeoutError') {
-                    /**
-                     * Emitted when there has been an error while trying to restore an existing session
-                     * @event Client#auth_failure
-                     * @param {string} message
-                     */
-                    this.emit(Events.AUTHENTICATION_FAILURE, 'Unable to log in. Are the session details valid?');
-                    browser.close();
-                    if (this.options.restartOnAuthFail) {
-                        // session restore failed so try again but without session to force new authentication
-                        this.options.session = null;
-                        this.initialize();
-                    }
-                    return;
-                }
-
-                throw err;
-            }
-
-        } else {
-            const getQrCode = async () => {
-                // Check if retry button is present
-                var QR_RETRY_SELECTOR = 'div[data-ref] > span > div';
-                var qrRetry = await page.$(QR_RETRY_SELECTOR);
-                if (qrRetry) {
-                    await qrRetry.click();
-                }
-
-                // Wait for QR Code
-
-                const QR_CANVAS_SELECTOR = 'canvas';
-                await page.waitForSelector(QR_CANVAS_SELECTOR, { timeout: this.options.qrTimeoutMs });
-                const qrImgData = await page.$eval(QR_CANVAS_SELECTOR, canvas => [].slice.call(canvas.getContext('2d').getImageData(0, 0, 264, 264).data));
-                const qr = jsQR(qrImgData, 264, 264).data;
-                /**
-                * Emitted when the QR code is received
-                * @event Client#qr
-                * @param {string} qr QR Code
-                */
-                this.emit(Events.QR_RECEIVED, qr);
-            };
-            getQrCode();
-            this._qrRefreshInterval = setInterval(getQrCode, this.options.qrRefreshIntervalMs);
-
-            // Wait for code scan
-            await page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: 0 });
-            clearInterval(this._qrRefreshInterval);
-            this._qrRefreshInterval = undefined;
-
-        }
-
-        await page.evaluate(ExposeStore, moduleRaid.toString());
-
-        // Get session tokens
-        const localStorage = JSON.parse(await page.evaluate(() => {
-            return JSON.stringify(window.localStorage);
-        }));
-
-        const session = {
-            WABrowserId: localStorage.WABrowserId,
-            WASecretBundle: localStorage.WASecretBundle,
-            WAToken1: localStorage.WAToken1,
-            WAToken2: localStorage.WAToken2
-        };
-
-        /**
-         * Emitted when authentication is successful
-         * @event Client#authenticated
-         * @param {object} session Object containing session information. Can be used to restore the session.
-         */
-        this.emit(Events.AUTHENTICATED, session);
-
-        // Check window.Store Injection
-        await page.waitForFunction('window.Store != undefined');
-
-        //Load util functions (serializers, helper functions)
-        await page.evaluate(LoadUtils);
-
-        // Expose client info
-        this.info = new ClientInfo(this, await page.evaluate(() => {
-            return window.Store.Conn.serialize();
-        }));
-
-        // Add InterfaceController
-        this.interface = new InterfaceController(this);
-
-        // Register events
-        await page.exposeFunction('onAddMessageEvent', msg => {
-            if (!msg.isNewMsg) return;
-
-            if (msg.type === 'gp2') {
-                const notification = new GroupNotification(this, msg);
-                if (msg.subtype === 'add' || msg.subtype === 'invite') {
-                    /**
-                     * Emitted when a user joins the chat via invite link or is added by an admin.
-                     * @event Client#group_join
-                     * @param {GroupNotification} notification GroupNotification with more information about the action
-                     */
-                    this.emit(Events.GROUP_JOIN, notification);
-                } else if (msg.subtype === 'remove' || msg.subtype === 'leave') {
-                    /**
-                     * Emitted when a user leaves the chat or is removed by an admin.
-                     * @event Client#group_leave
-                     * @param {GroupNotification} notification GroupNotification with more information about the action
-                     */
-                    this.emit(Events.GROUP_LEAVE, notification);
-                } else {
-                    /**
-                     * Emitted when group settings are updated, such as subject, description or picture.
-                     * @event Client#group_update
-                     * @param {GroupNotification} notification GroupNotification with more information about the action
-                     */
-                    this.emit(Events.GROUP_UPDATE, notification);
-                }
-                return;
-            }
-            
-            const message = new Message(this, msg);
-
-            /**
-             * Emitted when a new message is created, which may include the current user's own messages.
-             * @event Client#message_create
-             * @param {Message} message The message that was created
-             */
-            this.emit(Events.MESSAGE_CREATE, message);
-
-            if (msg.id.fromMe) return;
-
-            /**
-             * Emitted when a new message is received.
-             * @event Client#message
-             * @param {Message} message The message that was received
-             */
-            this.emit(Events.MESSAGE_RECEIVED, message);
-        });
-
-        let last_message;
-
-        await page.exposeFunction('onChangeMessageTypeEvent', (msg) => {
-
-            if (msg.type === 'revoked') {
-                const message = new Message(this, msg);
-                let revoked_msg;
-                if (last_message && msg.id.id === last_message.id.id) {
-                    revoked_msg = new Message(this, last_message);
-                }
-
-                /**
-                 * Emitted when a message is deleted for everyone in the chat.
-                 * @event Client#message_revoke_everyone
-                 * @param {Message} message The message that was revoked, in its current state. It will not contain the original message's data.
-                 * @param {?Message} revoked_msg The message that was revoked, before it was revoked. It will contain the message's original data. 
-                 * Note that due to the way this data is captured, it may be possible that this param will be undefined.
-                 */
-                this.emit(Events.MESSAGE_REVOKED_EVERYONE, message, revoked_msg);
-            }
-
-        });
-
-        await page.exposeFunction('onChangeMessageEvent', (msg) => {
-
-            if (msg.type !== 'revoked') {
-                last_message = msg;
-            }
-
-        });
-
-        await page.exposeFunction('onRemoveMessageEvent', (msg) => {
-
-            if (!msg.isNewMsg) return;
-
-            const message = new Message(this, msg);
-
-            /**
-             * Emitted when a message is deleted by the current user.
-             * @event Client#message_revoke_me
-             * @param {Message} message The message that was revoked
-             */
-            this.emit(Events.MESSAGE_REVOKED_ME, message);
-
-        });
-
-        await page.exposeFunction('onMessageAckEvent', (msg, ack) => {
-
-            const message = new Message(this, msg);
-            
-            /**
-             * Emitted when an ack event occurrs on message type.
-             * @event Client#message_ack
-             * @param {Message} message The message that was affected
-             * @param {MessageAck} ack The new ACK value
-             */
-            this.emit(Events.MESSAGE_ACK, message, ack);
-
-        });
-
-        await page.exposeFunction('onMessageMediaUploadedEvent', (msg) => {
-
-            const message = new Message(this, msg);
-            
-            /**
-             * Emitted when media has been uploaded for a message sent by the client.
-             * @event Client#media_uploaded
-             * @param {Message} message The message with media that was uploaded
-             */
-            this.emit(Events.MEDIA_UPLOADED, message);
-        });
-
-        await page.exposeFunction('onAppStateChangedEvent', (state) => {
-
-            /**
-             * Emitted when the connection state changes
-             * @event Client#change_state
-             * @param {WAState} state the new connection state
-             */
-            this.emit(Events.STATE_CHANGED, state);
-
-            const ACCEPTED_STATES = [WAState.CONNECTED, WAState.OPENING, WAState.PAIRING, WAState.TIMEOUT];
-
-            if(this.options.takeoverOnConflict) {
-                ACCEPTED_STATES.push(WAState.CONFLICT);
-
-                if(state === WAState.CONFLICT) {
-                    setTimeout(() => {
-                        this.pupPage.evaluate(() => window.Store.AppState.takeover());
-                    }, this.options.takeoverTimeoutMs);
-                }
-            }
-
-            if (!ACCEPTED_STATES.includes(state)) {
-                /**
-                 * Emitted when the client has been disconnected
-                 * @event Client#disconnected
-                 * @param {WAState} reason state that caused the disconnect
-                 */
-                this.emit(Events.DISCONNECTED, state);
-                this.destroy();
-            }
-        });
-
-        await page.exposeFunction('onBatteryStateChangedEvent', (state) => {
-            const { battery, plugged } = state;
-
-            if(battery === undefined) return;
-
-            /**
-             * Emitted when the battery percentage for the attached device changes
-             * @event Client#change_battery
-             * @param {object} batteryInfo
-             * @param {number} batteryInfo.battery - The current battery percentage
-             * @param {boolean} batteryInfo.plugged - Indicates if the phone is plugged in (true) or not (false)
-             */
-            this.emit(Events.BATTERY_CHANGED, { battery, plugged });
-        });
-
-        await page.evaluate(() => {
-            window.Store.Msg.on('add', (msg) => { if(msg.isNewMsg) window.onAddMessageEvent(msg); });
-            window.Store.Msg.on('change', (msg) => { window.onChangeMessageEvent(msg); });
-            window.Store.Msg.on('change:type', (msg) => { window.onChangeMessageTypeEvent(msg); });
-            window.Store.Msg.on('change:ack', (msg, ack) => { window.onMessageAckEvent(msg, ack); });
-            window.Store.Msg.on('change:isUnsentMedia', (msg, unsent) => { if(msg.id.fromMe && !unsent) window.onMessageMediaUploadedEvent(msg); });
-            window.Store.Msg.on('remove', (msg) => { if(msg.isNewMsg) window.onRemoveMessageEvent(msg); });
-            window.Store.AppState.on('change:state', (_AppState, state) => { window.onAppStateChangedEvent(state); });
-            window.Store.Conn.on('change:battery', (state) => { window.onBatteryStateChangedEvent(state); });
-        });
-
-        /**
-         * Emitted when the client has initialized and is ready to receive messages.
-         * @event Client#ready
-         */
-        this.emit(Events.READY);
-    }
-
-    /**
-     * Closes the client
-     */
-    async destroy() {
-        if (this._qrRefreshInterval) {
-            clearInterval(this._qrRefreshInterval);
-        }
-        await this.pupBrowser.close();
-    }
-
-    /**
-     * Logs out the client, closing the current session
-     */
-    async logout() {
-        return await this.pupPage.evaluate(() => {
-            return window.Store.AppState.logout();
-        });
-    }
-
-    /**
-     * Returns the version of WhatsApp Web currently being run
-     * @returns Promise<string>
-     */
-    async getWWebVersion() {
-        return await this.pupPage.evaluate(() => {
-            return window.Debug.VERSION;
-        });
-    }
-
-    /**
-     * Mark as seen for the Chat
-     *  @param {string} chatId
-     *  @returns {Promise<boolean>} result
-     * 
-     */
-    async sendSeen(chatId) {
-        const result = await this.pupPage.evaluate(async (chatId) => {
-            return window.WWebJS.sendSeen(chatId);
-
-        }, chatId);
-        return result;
-    }
-
-    /**
-     * Send a message to a specific chatId
-     * @param {string} chatId
-     * @param {string|MessageMedia|Location} content
-     * @param {object} options 
-     * @returns {Promise<Message>} Message that was just sent
-     */
-    async sendMessage(chatId, content, options = {}) {
-        let internalOptions = {
-            linkPreview: options.linkPreview === false ? undefined : true,
-            sendAudioAsVoice: options.sendAudioAsVoice,
-            caption: options.caption,
-            quotedMessageId: options.quotedMessageId,
-            mentionedJidList: Array.isArray(options.mentions) ? options.mentions.map(contact => contact.id._serialized) : []
-        };
-        
-        const sendSeen = typeof options.sendSeen === 'undefined' ? true : options.sendSeen;
-
-        if (content instanceof MessageMedia) {
-            internalOptions.attachment = content;
-            content = '';
-        } else if (options.media instanceof MessageMedia) {
-            internalOptions.attachment = options.media;
-            internalOptions.caption = content;
-            content = '';
-        } else if (content instanceof Location) {
-            internalOptions.location = content;
-            content = '';
-        }
-
-        const newMessage = await this.pupPage.evaluate(async (chatId, message, options, sendSeen) => {
-            const chatWid = window.Store.WidFactory.createWid(chatId);
-            const chat = await window.Store.Chat.find(chatWid);
-
-            if(sendSeen) {
-                window.WWebJS.sendSeen(chatId);
-            }
-
-            const msg = await window.WWebJS.sendMessage(chat, message, options, sendSeen);
-            return msg.serialize();
-        }, chatId, content, internalOptions, sendSeen);
-
-        return new Message(this, newMessage);
-    }
-
-    /**
-     * Get all current chat instances
-     * @returns {Promise<Array<Chat>>}
-     */
-    async getChats() {
-        let chats = await this.pupPage.evaluate(() => {
-            return window.WWebJS.getChats();
-        });
-
-        return chats.map(chat => ChatFactory.create(this, chat));
-    }
-
-    /**
-     * Get chat instance by ID
-     * @param {string} chatId 
-     * @returns {Promise<Chat>}
-     */
-    async getChatById(chatId) {
-        let chat = await this.pupPage.evaluate(chatId => {
-            return window.WWebJS.getChat(chatId);
-        }, chatId);
-
-        return ChatFactory.create(this, chat);
-    }
-
-    /**
-     * Get all current contact instances
-     * @returns {Promise<Array<Contact>>}
-     */
-    async getContacts() {
-        let contacts = await this.pupPage.evaluate(() => {
-            return window.WWebJS.getContacts();
-        });
-
-        return contacts.map(contact => ContactFactory.create(this, contact));
-    }
-
-    /**
-     * Get contact instance by ID
-     * @param {string} contactId
-     * @returns {Promise<Contact>}
-     */
-    async getContactById(contactId) {
-        let contact = await this.pupPage.evaluate(contactId => {
-            return window.WWebJS.getContact(contactId);
-        }, contactId);
-
-        return ContactFactory.create(this, contact);
-    }
-
-    /**
-     * Returns an object with information about the invite code's group
-     * @param {string} inviteCode 
-     * @returns {Promise<object>} Invite information
-     */
-    async getInviteInfo(inviteCode) {
-        return await this.pupPage.evaluate(inviteCode => {
-            return window.Store.Wap.groupInviteInfo(inviteCode);
-        }, inviteCode);
-    }
-
-    /**
-     * Accepts an invitation to join a group
-     * @param {string} inviteCode Invitation code
-     */
-    async acceptInvite(inviteCode) {
-        const chatId = await this.pupPage.evaluate(async inviteCode => {
-            return await window.Store.Invite.sendJoinGroupViaInvite(inviteCode);
-        }, inviteCode);
-
-        return chatId._serialized;
-    }
-
-    /**
-     * Sets the current user's status message
-     * @param {string} status New status message
-     */
-    async setStatus(status) {
-        await this.pupPage.evaluate(async status => {
-            return await window.Store.Wap.sendSetStatus(status);
-        }, status);
-    }
-
-    /**
-     * Gets the current connection state for the client
-     * @returns {WAState} 
-     */
-    async getState() {
-        return await this.pupPage.evaluate(() => {
-            return window.Store.AppState.state;
-        });
-    }
-
-    /**
-     * Marks the client as online
-     */
-    async sendPresenceAvailable() {
-        return await this.pupPage.evaluate(() => {
-            return window.Store.Wap.sendPresenceAvailable();
-        });
-    }
-
-    /**
-     * Enables and returns the archive state of the Chat
-     * @returns {boolean}
-     */
-    async archiveChat(chatId) {
-        return await this.pupPage.evaluate(async chatId => {
-            let chat = await window.Store.Chat.get(chatId);
-            await window.Store.Cmd.archiveChat(chat, true);
-            return chat.archive;
-        }, chatId);
-    }
-
-    /**
-     * Changes and returns the archive state of the Chat
-     * @returns {boolean}
-     */
-    async unarchiveChat(chatId) {
-        return await this.pupPage.evaluate(async chatId => {
-            let chat = await window.Store.Chat.get(chatId);
-            await window.Store.Cmd.archiveChat(chat, false);
-            return chat.archive;
-        }, chatId);
-    }
-
-    /**
-     * Mutes the Chat until a specified date
-     * @param {string} chatId ID of the chat that will be muted
-     * @param {Date} unmuteDate Date when the chat will be unmuted
-     */
-    async muteChat(chatId, unmuteDate) {
-        await this.pupPage.evaluate(async (chatId, timestamp) => {
-            let chat = await window.Store.Chat.get(chatId);
-            await chat.mute.mute(timestamp, !0);
-        }, chatId, unmuteDate.getTime() / 1000);
-    }
-    
-    /**
-     * Unmutes the Chat
-     * @param {string} chatId ID of the chat that will be unmuted
-     */
-    async unmuteChat(chatId) {
-        await this.pupPage.evaluate(async chatId => {
-            let chat = await window.Store.Chat.get(chatId);
-            await window.Store.Cmd.muteChat(chat, false);
-        }, chatId);
-    }
-    
-    /**
-     * Returns the contact ID's profile picture URL, if privacy settings allow it
-     * @param {string} contactId the whatsapp user's ID
-     * @returns {Promise<string>}
-     */
-    async getProfilePicUrl(contactId) {
-        const profilePic = await this.pupPage.evaluate((contactId) => {
-            return window.Store.Wap.profilePicFind(contactId);
-        }, contactId);
-
-        return profilePic ? profilePic.eurl : undefined;
-    }
-
-    /**
-     * Force reset of connection state for the client
-    */
-    async resetState(){
-        await this.pupPage.evaluate(() => {
-            window.Store.AppState.phoneWatchdog.shiftTimer.forceRunNow();
-        });
-    }
-
-    /**
-     * Check if a given ID is registered in whatsapp
-     * @returns {Promise<Boolean>}
-     */
-    async isRegisteredUser(id) {
-        return await this.pupPage.evaluate(async (id) => {
-            let result = await window.Store.Wap.queryExist(id);
-            return result.jid !== undefined;
-        }, id);
-    }
-
-    /**
-     * Create a new group
-     * @param {string} name group title
-     * @param {Array<Contact|string>} participants an array of Contacts or contact IDs to add to the group
-     * @returns {Object} createRes
-     * @returns {string} createRes.gid - ID for the group that was just created
-     * @returns {Object.<string,string>} createRes.missingParticipants - participants that were not added to the group. Keys represent the ID for participant that was not added and its value is a status code that represents the reason why participant could not be added. This is usually 403 if the user's privacy settings don't allow you to add them to groups.
-     */
-    async createGroup(name, participants) {
-        if(!Array.isArray(participants) || participants.length == 0) {
-            throw 'You need to add at least one other participant to the group';
-        }
-
-        if(participants.every(c => c instanceof Contact)) {
-            participants = participants.map(c => c.id._serialized);
-        }
-
-        const createRes = await this.pupPage.evaluate(async (name, participantIds) => {
-            const res = await window.Store.Wap.createGroup(name, participantIds);
-            console.log(res);
-            if(!res.status === 200) {
-                throw 'An error occurred while creating the group!';
-            }
-
-            return res;
-        }, name, participants);
-
-        const missingParticipants = createRes.participants.reduce(((missing, c) => {
-            const id = Object.keys(c)[0];
-            const statusCode = c[id].code;
-            if(statusCode != 200) return Object.assign(missing, {[id]: statusCode});
-            return missing;
-        }), {});
-
-        return { gid: createRes.gid, missingParticipants};
-    }
-
-}
-
-module.exports = Client;
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/ClientInfo.html b/whatsapp-web.js/docs/ClientInfo.html deleted file mode 100644 index aa4b21e..0000000 --- a/whatsapp-web.js/docs/ClientInfo.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: ClientInfo - - - - - - - - -
-
-
-
- -
-
-

Properties

-
-
-
-
me
-
-
-
phone
-
-
-
-
-
-
-
platform
-
-
-
pushname
-
-
-
-
-
-
-
-
-
-

Method

-
-
-
-
getBatteryStatus()
-
-
-
-
-
-
-
-
-
-
-
-
-

new ClientInfo()

-
-
Extends
-
Base
-
-
-
-

Properties

-
-

me -  object

-

Current user ID

-
-
-

phone -  object

-

Information about the phone this client is connected to

-
-

Properties

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

wa_version

-
-

string

-
-

 

-
-

WhatsApp Version running on the phone

-
-

os_version

-
-

string

-
-

 

-
-

OS Version running on the phone (iOS or Android version)

-
-

device_manufacturer

-
-

string

-
-

 

-
-

Device manufacturer

-
-

device_model

-
-

string

-
-

 

-
-

Device model

-
-

os_build_number

-
-

string

-
-

 

-
-

OS build number

-
-
-
-
-

platform -  string

-

Platform the phone is running on

-
-
-

pushname -  string

-

Name configured to be shown in push notifications

-
-
-
-

Method

-
-
async
-

getBatteryStatus() → (object, number, or boolean)

-

Get current battery percentage and charging status for the attached device

-
-
Returns
-
-

object 

batteryStatus

-

-
-
-

number 

batteryStatus.battery - The current battery percentage

-

-
-
-

boolean 

batteryStatus.plugged - Indicates if the phone is plugged in (true) or not (false)

-

-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/Contact.html b/whatsapp-web.js/docs/Contact.html deleted file mode 100644 index 0f29419..0000000 --- a/whatsapp-web.js/docs/Contact.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: Contact - - - - - - - - -
-
-
-
- -
-
-

Properties

-
-
-
-
id
-
-
-
isBusiness
-
-
-
isEnterprise
-
-
-
isGroup
-
-
-
-
-
-
-
isMe
-
-
-
isMyContact
-
-
-
isUser
-
-
-
isWAContact
-
-
-
-
-
-
-
name
-
-
-
number
-
-
-
pushname
-
-
-
shortName
-
-
-
-
-
-
-
-

Method

-
-
-
-
getProfilePicUrl()
-
-
-
-
-
-
-
-
-
-
-
-
-

new Contact()

-
-
Extends
-
Base
-
-
-
-

Properties

-
-

id -  object

-

ID that represents the contact

-
-
-

isBusiness -  boolean

-

Indicates if the contact is a business contact

-
-
-

isEnterprise -  boolean

-

Indicates if the contact is an enterprise contact

-
-
-

isGroup -  boolean

-

Indicates if the contact is a group contact

-
-
-

isMe -  boolean

-

Indicates if the contact is the current user's contact

-
-
-

isMyContact -  boolean

-

Indicates if the number is saved in the current phone's contacts

-
-
-

isUser -  boolean

-

Indicates if the contact is a user contact

-
-
-

isWAContact -  boolean

-

Indicates if the number is registered on WhatsApp

-
-
-

name -  nullable string

-

The contact's name, as saved by the current user

-
-
-

number -  string

-

Contact's phone number

-
-
-

pushname -  string

-

The name that the contact has configured to be shown publically

-
-
-

shortName -  nullable string

-

A shortened version of name

-
-
-
-

Method

-
-
async
-

getProfilePicUrl() → Promise containing string

-

Returns the contact's profile picture URL, if privacy settings allow it

-
-
Returns
-
-

Promise containing string 

-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/GroupChat.html b/whatsapp-web.js/docs/GroupChat.html deleted file mode 100644 index c225721..0000000 --- a/whatsapp-web.js/docs/GroupChat.html +++ /dev/null @@ -1,713 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: GroupChat - - - - - - - - -
-
-
-
- -
-
-

Properties

-
-
-
-
archived
-
-
-
createdAt
-
-
-
description
-
-
-
id
-
-
-
-
-
-
-
isGroup
-
-
-
isReadOnly
-
-
-
name
-
-
-
owner
-
-
-
-
-
-
-
participants
-
-
-
timestamp
-
-
-
unreadCount
-
-
-
-
-
-
- -
-
-

new GroupChat()

-
-
Extends
-
Chat
-
-
-
-

Properties

-
-

archived -  unknown

-

Indicates if the Chat is archived

-
-
Inherited from
-
Chat#archived
-
-

createdAt -  date

-

Gets the date at which the group was created

-
-
-

description -  string

-

Gets the group description

-
-
-

id -  unknown

-

ID that represents the chat

-
-
Inherited from
-
Chat#id
-
-

isGroup -  unknown

-

Indicates if the Chat is a Group Chat

-
-
Inherited from
-
Chat#isGroup
-
-

isReadOnly -  unknown

-

Indicates if the Chat is readonly

-
-
Inherited from
-
Chat#isReadOnly
-
-

name -  unknown

-

Title of the chat

-
-
Inherited from
-
Chat#name
-
-

owner

-

Gets the group owner

-
-
-

participants -  array

-

Gets the group participants

-
-
-

timestamp -  unknown

-

Unix timestamp for when the chat was created

-
-
Inherited from
-
Chat#timestamp
-
-

unreadCount -  unknown

-

Amount of messages unread

-
-
Inherited from
-
Chat#unreadCount
-
-
-

Methods

-
-
async
-

addParticipants(participantIds)

-

Adds a list of participants by ID to the group

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

participantIds

-
-

Array of string

-
-

 

-
-
-
-
-
-
async
-

archive()

-

Archives this chat

-
-
Inherited from
-
Chat#archive
-
-
async
-

clearMessages() → Promise containing Boolean

-

Clears all messages from the chat

-
-
Inherited from
-
Chat#clearMessages
-
Returns
-
-

result

-
-
-
async
-

clearState()

-

Stops typing or recording in chat immediately.

-
-
Inherited from
-
Chat#clearState
-
-
async
-

delete() → Promise containing Boolean

-

Deletes the chat

-
-
Inherited from
-
Chat#delete
-
Returns
-
-

result

-
-
-
async
-

demoteParticipants(participantIds)

-

Demotes participants by IDs to regular users

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

participantIds

-
-

Array of string

-
-

 

-
-
-
-
-
-
async
-

fetchMessages(searchOptions) → Promise containing Array of Message

-

Loads chat messages, sorted from earliest to latest.

-
-

Parameters

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

searchOptions

-
-

 

-
-

 

-
-

Options for searching messages. Right now only limit is supported.

-

Values in searchOptions have the following properties:

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

limit

-
-

 

-
-

Yes

-
-

The amount of messages to return. Note that the actual number of returned messages may be smaller if there aren't enough messages in the conversation. Set this to Infinity to load all messages.

-

Defaults to 50.

-
-
-
-
-
Inherited from
-
Chat#fetchMessages
-
Returns
-
-
-
async
-

getInviteCode()

-

Gets the invite code for a specific group

-
-
-
async
-

leave()

-

Makes the bot leave the group

-
-
-
async
-

mute(unmuteDate)

-

Mutes this chat until a specified date

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

unmuteDate

-
-

 

-
-

 

-
-

Date at which the Chat will be unmuted

-
-
-
-
Inherited from
-
Chat#mute
-
-
async
-

promoteParticipants(participantIds)

-

Promotes participants by IDs to admins

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

participantIds

-
-

Array of string

-
-

 

-
-
-
-
-
-
async
-

removeParticipants(participantIds)

-

Removes a list of participants by ID to the group

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

participantIds

-
-

Array of string

-
-

 

-
-
-
-
-
-
async
-

revokeInvite()

-

Invalidates the current group invite code and generates a new one

-
-
-
async
-

sendMessage(content, options) → Promise containing Message

-

Send a message to this chat

-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

content

-
-

 

-
-

 

-
-
-

options

-
-

 

-
-

 

-
-
-
-
-
Inherited from
-
Chat#sendMessage
-
Returns
-
-

Message that was just sent

-
-
-
async
-

sendSeen() → Promise containing Boolean

-

Set the message as seen

-
-
Inherited from
-
Chat#sendSeen
-
Returns
-
-

result

-
-
-
async
-

sendStateRecording()

-

Simulate recording audio in chat. This will last for 25 seconds.

-
-
Inherited from
-
Chat#sendStateRecording
-
-
async
-

sendStateTyping()

-

Simulate typing in chat. This will last for 25 seconds.

-
-
Inherited from
-
Chat#sendStateTyping
-
-
async
-

setDescription(description)

-

Updates the group description

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

description

-
-

string

-
-

 

-
-
-
-
-
-
async
-

setSubject(subject)

-

Updates the group subject

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

subject

-
-

string

-
-

 

-
-
-
-
-
-
async
-

unarchive()

-

un-archives this chat

-
-
Inherited from
-
Chat#unarchive
-
-
async
-

unmute()

-

Unmutes this chat

-
-
Inherited from
-
Chat#unmute
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/GroupNotification.html b/whatsapp-web.js/docs/GroupNotification.html deleted file mode 100644 index 27ead88..0000000 --- a/whatsapp-web.js/docs/GroupNotification.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: GroupNotification - - - - - - - - -
-
-
-
- -
-
-

Properties

-
-
-
-
author
-
-
-
body
-
-
-
chatId
-
-
-
-
-
-
-
id
-
-
-
recipientIds
-
-
-
timestamp
-
-
-
-
-
-
-
type
-
-
-
-
-
-
-
-

Methods

-
-
-
-
getChat()
-
-
-
getContact()
-
-
-
-
- -
-
-
-
-
-
-

new GroupNotification()

-
-
Extends
-
Base
-
-
-
-

Properties

-
-

author -  string

-

ContactId for the user that produced the GroupNotification.

-
-
-

body -  string

-

Extra content

-
-
-

chatId -  string

-

ID for the Chat that this groupNotification was sent for.

-
-
-

id -  object

-

ID that represents the groupNotification

-
-
-

recipientIds -  Array of string

-

Contact IDs for the users that were affected by this GroupNotification.

-
-
-

timestamp -  number

-

Unix timestamp for when the groupNotification was created

-
-
-

type -  GroupNotificationTypes

-

GroupNotification type

-
-
-
-

Methods

-
-

getChat() → Promise containing Chat

-

Returns the Chat this groupNotification was sent in

-
-
Returns
-
-

Promise containing Chat 

-
-
-

getContact() → Promise containing Contact

-

Returns the Contact this GroupNotification was produced by

-
-
Returns
-
-

Promise containing Contact 

-
-
-
async
-

getRecipients() → Promise containing Array of Contact

-

Returns the Contacts affected by this GroupNotification.

-
-
Returns
-
-

Promise containing Array of Contact 

-
-
-
async
-

reply(content, options) → Promise containing Message

-

Sends a message to the same chat this GroupNotification was produced in.

-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

content

-
-

(string, MessageMedia, or Location)

-
-

 

-
-
-

options

-
-

object

-
-

 

-
-
-
-
-
Returns
-
-

Promise containing Message 

-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/InterfaceController.html b/whatsapp-web.js/docs/InterfaceController.html deleted file mode 100644 index 91de817..0000000 --- a/whatsapp-web.js/docs/InterfaceController.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: InterfaceController - - - - - - - - -
-
-
-
- -
-
-

Methods

- -
-
-
-

new InterfaceController()

-
-
-
-
-

Methods

-
-
async
-

closeRightDrawer()

-

Closes the Right Drawer

-
-
-
async
-

openChatDrawer(chatId)

-

Opens the Chat Drawer

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

chatId

-
-

string

-
-

 

-
-

ID of the chat drawer that will be opened

-
-
-
-
-
async
-

openChatWindow(chatId)

-

Opens the Chat Window

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

chatId

-
-

string

-
-

 

-
-

ID of the chat window that will be opened

-
-
-
-
-
async
-

openMessageDrawer(msgId)

-

Opens the Message Drawer

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

msgId

-
-

string

-
-

 

-
-

ID of the message drawer that will be opened

-
-
-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/Location.html b/whatsapp-web.js/docs/Location.html deleted file mode 100644 index d67935a..0000000 --- a/whatsapp-web.js/docs/Location.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: Location - - - - - - - - -
-
-
-
- -
-
-

Properties

-
-
-
-
description
-
-
-
-
-
-
-
latitude
-
-
-
-
-
-
-
longitude
-
-
-
-
-
-
-
-
-

new Location(latitude, longitude, description)

-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

latitude

-
-

 

-
-

 

-
-
-

longitude

-
-

 

-
-

 

-
-
-

description

-
-

 

-
-

 

-
-

Value can be null.

-
-
-
-
-
-
-

Properties

-
-

description -  nullable string

-

Name for the location

-
-
-

latitude -  number

-

Location latitude

-
-
-

longitude -  number

-

Location longitude

-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/Message.html b/whatsapp-web.js/docs/Message.html deleted file mode 100644 index 8006b87..0000000 --- a/whatsapp-web.js/docs/Message.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: Message - - - - - - - - -
-
-
-
- -
-
-

Properties

-
-
-
-
ack
-
-
-
author
-
-
-
body
-
-
-
broadcast
-
-
-
from
-
-
-
fromMe
-
-
-
-
-
-
-
hasMedia
-
-
-
hasQuotedMsg
-
-
-
id
-
-
-
isForwarded
-
-
-
location
-
-
-
mediaKey
-
-
-
-
-
-
-
mentionedIds
-
-
-
timestamp
-
-
-
to
-
-
-
type
-
-
-
-
-
-
-
-

Methods

-
-
-
-
delete(everyone)
-
-
-
downloadMedia()
-
-
-
getChat()
-
-
-
-
- - -
-
-
-
-

new Message()

-
-
Extends
-
Base
-
-
-
-

Properties

-
-

ack -  MessageAck

-

ACK status for the message

-
-
-

author -  string

-

If the message was sent to a group, this field will contain the user that sent the message.

-
-
-

body -  string

-

Message content

-
-
-

broadcast -  boolean

-

Indicates if the message was a broadcast

-
-
-

from -  string

-

ID for the Chat that this message was sent to, except if the message was sent by the current user.

-
-
-

fromMe -  boolean

-

Indicates if the message was sent by the current user

-
-
-

hasMedia -  boolean

-

Indicates if the message has media available for download

-
-
-

hasQuotedMsg -  boolean

-

Indicates if the message was sent as a reply to another message.

-
-
-

id -  object

-

ID that represents the message

-
-
-

isForwarded -  boolean

-

Indicates if the message was forwarded

-
-
-

location -  Location

-

Location information contained in the message, if the message is type "location"

-
-
-

mediaKey -  string

-

MediaKey that represents the sticker 'ID'

-
-
-

mentionedIds -  Array of string

-

Indicates the mentions in the message body.

-
-
-

timestamp -  number

-

Unix timestamp for when the message was created

-
-
-

to -  string

-

ID for who this message is for.

-

If the message is sent by the current user, it will be the Chat to which the message is being sent. - If the message is sent by another user, it will be the ID for the current user.

-
-
-

type -  MessageTypes

-

Message type

-
-
-
-

Methods

-
-
async
-

delete(everyone)

-

Deletes a message from the chat

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

everyone

-
-

boolean

-
-

 

-
-

If true and the message is sent by the current user, will delete it for everyone in the chat.

-

Value can be null.

-
-
-
-
-
async
-

downloadMedia() → Promise containing MessageMedia

-

Downloads and returns the attatched message media

-
-
Returns
-
-

Promise containing MessageMedia 

-
-
-

getChat() → Promise containing Chat

-

Returns the Chat this message was sent in

-
-
Returns
-
-

Promise containing Chat 

-
-
-

getContact() → Promise containing Contact

-

Returns the Contact this message was sent from

-
-
Returns
-
-

Promise containing Contact 

-
-
-
async
-

getMentions() → Promise containing Array of Contact

-

Returns the Contacts mentioned in this message

-
-
Returns
-
-

Promise containing Array of Contact 

-
-
-
async
-

getQuotedMessage() → Promise containing Message

-

Returns the quoted message, if any

-
-
Returns
-
-

Promise containing Message 

-
-
-
async
-

reply(content, chatId, options) → Promise containing Message

-

Sends a message as a reply to this message. If chatId is specified, it will be sent - through the specified Chat. If not, it will send the message - in the same Chat as the original message was sent.

-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

content

-
-

(string, MessageMedia, or Location)

-
-

 

-
-
-

chatId

-
-

string

-
-

 

-
-

Value can be null.

-
-

options

-
-

object

-
-

 

-
-
-
-
-
Returns
-
-

Promise containing Message 

-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/MessageMedia.html b/whatsapp-web.js/docs/MessageMedia.html deleted file mode 100644 index f9c1e65..0000000 --- a/whatsapp-web.js/docs/MessageMedia.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: MessageMedia - - - - - - - - -
-
-
-
- -
-
-

Properties

-
-
-
-
data
-
-
-
-
-
-
-
filename
-
-
-
-
-
-
-
mimetype
-
-
-
-
-
-
-
-

Method

-
- -
-
-
-
-
-
-
-
-

new MessageMedia(mimetype, data, filename)

-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

mimetype

-
-

 

-
-

 

-
-

MIME type of the attachment

-
-

data

-
-

 

-
-

 

-
-

Base64-encoded data of the file

-
-

filename

-
-

 

-
-

 

-
-

Document file name

-

Value can be null.

-
-
-
-
-
-
-

Properties

-
-

data -  string

-

Base64 encoded data that represents the file

-
-
-

filename -  nullable string

-

Name of the file (for documents)

-
-
-

mimetype -  string

-

MIME type of the attachment

-
-
-
-

Method

-
-
static
-

fromFilePath(filePath) → MessageMedia

-

Creates a MessageMedia instance from a local file path

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

filePath

-
-

string

-
-

 

-
-
-
-
-
Returns
-
-

MessageMedia 

-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/PrivateChat.html b/whatsapp-web.js/docs/PrivateChat.html deleted file mode 100644 index 4057ade..0000000 --- a/whatsapp-web.js/docs/PrivateChat.html +++ /dev/null @@ -1,442 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: PrivateChat - - - - - - - - -
-
-
-
- -
-
-

Properties

-
-
-
-
archived
-
-
-
id
-
-
-
isGroup
-
-
-
-
-
-
-
isReadOnly
-
-
-
name
-
-
-
timestamp
-
-
-
-
-
-
-
unreadCount
-
-
-
-
-
-
-
-

Methods

- -
-
-
-

new PrivateChat()

-
-
Extends
-
Chat
-
-
-
-

Properties

-
-

archived -  unknown

-

Indicates if the Chat is archived

-
-
Inherited from
-
Chat#archived
-
-

id -  unknown

-

ID that represents the chat

-
-
Inherited from
-
Chat#id
-
-

isGroup -  unknown

-

Indicates if the Chat is a Group Chat

-
-
Inherited from
-
Chat#isGroup
-
-

isReadOnly -  unknown

-

Indicates if the Chat is readonly

-
-
Inherited from
-
Chat#isReadOnly
-
-

name -  unknown

-

Title of the chat

-
-
Inherited from
-
Chat#name
-
-

timestamp -  unknown

-

Unix timestamp for when the chat was created

-
-
Inherited from
-
Chat#timestamp
-
-

unreadCount -  unknown

-

Amount of messages unread

-
-
Inherited from
-
Chat#unreadCount
-
-
-

Methods

-
-
async
-

archive()

-

Archives this chat

-
-
Inherited from
-
Chat#archive
-
-
async
-

clearMessages() → Promise containing Boolean

-

Clears all messages from the chat

-
-
Inherited from
-
Chat#clearMessages
-
Returns
-
-

result

-
-
-
async
-

clearState()

-

Stops typing or recording in chat immediately.

-
-
Inherited from
-
Chat#clearState
-
-
async
-

delete() → Promise containing Boolean

-

Deletes the chat

-
-
Inherited from
-
Chat#delete
-
Returns
-
-

result

-
-
-
async
-

fetchMessages(searchOptions) → Promise containing Array of Message

-

Loads chat messages, sorted from earliest to latest.

-
-

Parameters

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

searchOptions

-
-

 

-
-

 

-
-

Options for searching messages. Right now only limit is supported.

-

Values in searchOptions have the following properties:

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

limit

-
-

 

-
-

Yes

-
-

The amount of messages to return. Note that the actual number of returned messages may be smaller if there aren't enough messages in the conversation. Set this to Infinity to load all messages.

-

Defaults to 50.

-
-
-
-
-
Inherited from
-
Chat#fetchMessages
-
Returns
-
-
-
async
-

mute(unmuteDate)

-

Mutes this chat until a specified date

-
-

Parameter

- - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

unmuteDate

-
-

 

-
-

 

-
-

Date at which the Chat will be unmuted

-
-
-
-
Inherited from
-
Chat#mute
-
-
async
-

sendMessage(content, options) → Promise containing Message

-

Send a message to this chat

-
-

Parameters

- - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

content

-
-

 

-
-

 

-
-
-

options

-
-

 

-
-

 

-
-
-
-
-
Inherited from
-
Chat#sendMessage
-
Returns
-
-

Message that was just sent

-
-
-
async
-

sendSeen() → Promise containing Boolean

-

Set the message as seen

-
-
Inherited from
-
Chat#sendSeen
-
Returns
-
-

result

-
-
-
async
-

sendStateRecording()

-

Simulate recording audio in chat. This will last for 25 seconds.

-
-
Inherited from
-
Chat#sendStateRecording
-
-
async
-

sendStateTyping()

-

Simulate typing in chat. This will last for 25 seconds.

-
-
Inherited from
-
Chat#sendStateTyping
-
-
async
-

unarchive()

-

un-archives this chat

-
-
Inherited from
-
Chat#unarchive
-
-
async
-

unmute()

-

Unmutes this chat

-
-
Inherited from
-
Chat#unmute
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/PrivateContact.html b/whatsapp-web.js/docs/PrivateContact.html deleted file mode 100644 index 62bf71e..0000000 --- a/whatsapp-web.js/docs/PrivateContact.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: PrivateContact - - - - - - - - -
-
-
-
- -
-
-

Properties

-
-
-
-
id
-
-
-
isBusiness
-
-
-
isEnterprise
-
-
-
isGroup
-
-
-
-
-
-
-
isMe
-
-
-
isMyContact
-
-
-
isUser
-
-
-
isWAContact
-
-
-
-
-
-
-
name
-
-
-
number
-
-
-
pushname
-
-
-
shortName
-
-
-
-
-
-
-
-

Method

-
-
-
-
getProfilePicUrl()
-
-
-
-
-
-
-
-
-
-
-
-
-

new PrivateContact()

-
-
Extends
-
Contact
-
-
-
-

Properties

-
-

id -  unknown

-

ID that represents the contact

-
-
Inherited from
-
Contact#id
-
-

isBusiness -  unknown

-

Indicates if the contact is a business contact

-
-
Inherited from
-
Contact#isBusiness
-
-

isEnterprise -  unknown

-

Indicates if the contact is an enterprise contact

-
-
Inherited from
-
Contact#isEnterprise
-
-

isGroup -  unknown

-

Indicates if the contact is a group contact

-
-
Inherited from
-
Contact#isGroup
-
-

isMe -  unknown

-

Indicates if the contact is the current user's contact

-
-
Inherited from
-
Contact#isMe
-
-

isMyContact -  unknown

-

Indicates if the number is saved in the current phone's contacts

-
-
Inherited from
-
Contact#isMyContact
-
-

isUser -  unknown

-

Indicates if the contact is a user contact

-
-
Inherited from
-
Contact#isUser
-
-

isWAContact -  unknown

-

Indicates if the number is registered on WhatsApp

-
-
Inherited from
-
Contact#isWAContact
-
-

name -  unknown

-

The contact's name, as saved by the current user

-
-
Inherited from
-
Contact#name
-
-

number -  unknown

-

Contact's phone number

-
-
Inherited from
-
Contact#number
-
-

pushname -  unknown

-

The name that the contact has configured to be shown publically

-
-
Inherited from
-
Contact#pushname
-
-

shortName -  unknown

-

A shortened version of name

-
-
Inherited from
-
Contact#shortName
-
-
-

Method

-
-
async
-

getProfilePicUrl() → Promise containing string

-

Returns the contact's profile picture URL, if privacy settings allow it

-
-
Inherited from
-
Contact#getProfilePicUrl
-
Returns
-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/Util.html b/whatsapp-web.js/docs/Util.html deleted file mode 100644 index 70c7bc7..0000000 --- a/whatsapp-web.js/docs/Util.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Class: Util - - - - - - - - -
-
-
-
- -
-
-
-

new Util()

-
-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/css/baseline.css b/whatsapp-web.js/docs/css/baseline.css deleted file mode 100644 index 090f95a..0000000 --- a/whatsapp-web.js/docs/css/baseline.css +++ /dev/null @@ -1,4 +0,0 @@ -/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ -html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:none;text-decoration:underline dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}legend,td,th{padding:0} -/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ -@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}blockquote,img,pre,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.jsdoc-navbar,.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent;position:relative;min-height:100%}body{font-size:14px;line-height:1.42857143;color:#333;background-color:#fff;font-family:'Noto Serif',serif;margin-bottom:50px;padding-top:75px}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-weight:500;line-height:1.1;color:inherit}.summary-callout .h1,.summary-callout .h2,.summary-callout .h3,.summary-callout .h4,.summary-callout .h5,.summary-callout .h6,.summary-callout h1,.summary-callout h2,.summary-callout h3,.summary-callout h4,.summary-callout h5,.summary-callout h6,.symbol-index-section .h1,.symbol-index-section .h2,.symbol-index-section .h3,.symbol-index-section .h4,.symbol-index-section .h5,.symbol-index-section .h6,.symbol-index-section h1,.symbol-index-section h2,.symbol-index-section h3,.symbol-index-section h4,.symbol-index-section h5,.symbol-index-section h6{font-weight:500;line-height:1.1}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h1,.h2,.h3,.h4,.h5,.h6,.summary-callout .h1,.summary-callout .h2,.summary-callout .h3,.summary-callout .h4,.summary-callout .h5,.summary-callout .h6,.summary-callout h1,.summary-callout h2,.summary-callout h3,.summary-callout h4,.summary-callout h5,.summary-callout h6,.symbol-index-section .h1,.symbol-index-section .h2,.symbol-index-section .h3,.symbol-index-section .h4,.symbol-index-section .h5,.symbol-index-section .h6,.symbol-index-section h1,.symbol-index-section h2,.symbol-index-section h3,.symbol-index-section h4,.symbol-index-section h5,.symbol-index-section h6,h1,h2,h3,h4,h5,h6{margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h4,.summary-callout .h1,.summary-callout .h2,.summary-callout .h3,.summary-callout .h4,.summary-callout .h5,.summary-callout .h6,.summary-callout h1,.summary-callout h2,.summary-callout h3,.summary-callout h4,.summary-callout h5,.summary-callout h6,.symbol-index-section .h1,.symbol-index-section .h2,.symbol-index-section .h3,.symbol-index-section .h4,.symbol-index-section .h5,.symbol-index-section .h6,.symbol-index-section h1,.symbol-index-section h2,.symbol-index-section h3,.symbol-index-section h4,.symbol-index-section h5,.symbol-index-section h6,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left,th{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px}dl,ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-compact dt,.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-compact dd,.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child,td>p:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:"\2014 \00A0"}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:""}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:"\00A0 \2014"}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code,kbd,pre{padding:2px 4px;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}#jsdoc-body-container,#jsdoc-footer-container,#jsdoc-navbar-container,.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.row-no-gutters{margin-right:0;margin-left:0}.row-no-gutters [class*=col-]{padding-right:0;padding-left:0}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}pre code,table{background-color:transparent}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th{padding:8px;line-height:1.42857143;border-top:1px solid #ddd}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th,.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.jsdoc-details-table>tbody+tbody,.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.jsdoc-details-table>tbody>tr:hover,.table-hover>tbody>tr:hover,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset,legend{padding:0;border:0}fieldset{min-width:0;margin:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}input[type=file]{display:block}input[type=range]{display:block;width:100%}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control,select[multiple],select[multiple].input-sm,select[size],textarea.form-control,textarea.input-sm{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}output{padding-top:7px}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.checkbox.disabled label,.form-control[disabled],.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .form-control,fieldset[disabled] .radio label{cursor:not-allowed}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.checkbox-inline,.radio label,.radio-inline{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox label,.radio label{min-height:20px}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px \9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;vertical-align:middle}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.form-group-sm .form-control,.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control,select.input-sm{height:30px;line-height:30px}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.form-group-lg .form-control,.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control,select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg select.form-control,select.input-lg{height:46px;line-height:46px}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);opacity:.65;-webkit-box-shadow:none;box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;background-image:none;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;background-image:none;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;background-image:none;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;background-image:none;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;background-image:none;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;background-image:none;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-sm,.btn-xs{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height,visibility;transition-property:height,visibility;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-timing-function:ease;transition-timing-function:ease}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu,.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-justified>li,.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li>a{margin-bottom:5px;text-align:center}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane,li.jqtree-closed>ul{display:none}.navbar-brand>img,.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative}.jsdoc-navbar,.navbar{min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.jsdoc-navbar,.navbar{border-radius:4px}.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.jsdoc-navbar,.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}@media (min-width:768px){.jsdoc-navbar,.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.jsdoc-navbar,.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}#jsdoc-body-container>.navbar-collapse,#jsdoc-body-container>.navbar-header,#jsdoc-footer-container>.navbar-collapse,#jsdoc-footer-container>.navbar-header,#jsdoc-navbar-container>.navbar-collapse,#jsdoc-navbar-container>.navbar-header,.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.jsdoc-navbar-package-name,.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-right:15px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:8px -15px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.jsdoc-navbar,.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand,.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .btn-link,.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover,a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .btn-link,.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.label{display:inline;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.badge:focus,a.badge:hover,a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1,a.list-group-item-danger .list-group-item-heading,a.list-group-item-info .list-group-item-heading,a.list-group-item-success .list-group-item-heading,a.list-group-item-warning .list-group-item-heading,button.list-group-item-danger .list-group-item-heading,button.list-group-item-info .list-group-item-heading,button.list-group-item-success .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}a.list-group-item,button.list-group-item{color:#555}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.jsdoc-panel,.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.jsdoc-panel-heading,.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.dl-compact dd pre,.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table,dd>p{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body,.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.jsdoc-panel,.panel-default,.well blockquote{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}#jsdoc-body-container:after,#jsdoc-body-container:before,#jsdoc-content:after,#jsdoc-content:before,#jsdoc-footer-container:after,#jsdoc-footer-container:before,#jsdoc-navbar-container:after,#jsdoc-navbar-container:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-compact dd:after,.dl-compact dd:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.jsdoc-navbar:after,.jsdoc-navbar:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.panel-body:after,.panel-body:before,.row:after,.row:before,.summary-callout:after,.summary-callout:before,.summary-content:after,.summary-content:before,.symbol-index-content:after,.symbol-index-content:before,.symbol-index:after,.symbol-index:before{display:table;content:" "}#jsdoc-body-container:after,#jsdoc-content:after,#jsdoc-footer-container:after,#jsdoc-navbar-container:after,.clearfix:after,.container-fluid:after,.container:after,.dl-compact dd:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.jsdoc-navbar:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.panel-body:after,.row:after,.summary-callout:after,.summary-content:after,.symbol-index-content:after,.symbol-index:after,li.jqtree_common{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs,.visible-xs-block{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm,.visible-sm-block{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md,.visible-md-block{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg,.visible-lg-block{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}}.pln{color:#4d4d4c}@media screen{.str{color:#718c00}.kwd{color:#8959a8}.com{color:#8e908c}.typ{color:#4271ae}.lit{color:#f5871f}.clo,.opn,.pun{color:#4d4d4c}.tag{color:#c82829}.atn{color:#f5871f}.atv{color:#3e999f}.dec{color:#f5871f}.var{color:#c82829}.fun{color:#4271ae}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:700}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:700}.lit{color:#044}.clo,.opn,.pun{color:#440}.tag{color:#006;font-weight:700}.atn{color:#404}.atv{color:#060}}ol.linenums{margin-top:0;margin-bottom:0}.jqtree_common{list-style:none}ul.jqtree_common{padding-left:1.5em}.jqtree-title{margin-left:1.5em}.jqtree-title.jqtree-title-folder{margin-left:0}.jqtree-toggler{margin-left:.2em;margin-right:.6em}.jqtree-toggler.jqtree-closed{margin-left:0;margin-right:.45em}.jqtree-toggler:hover{text-decoration:none}.h1,h1{font-family:'Karla',sans-serif;border-bottom:1px solid #eee;font-size:33px;margin-top:40px}.h1+section .h2:first-child,.h1+section h2:first-child,.h2+section .h3:first-child,.h2+section h3:first-child,h1+section .h2:first-child,h1+section h2:first-child,h2+section .h3:first-child,h2+section h3:first-child{margin-top:20px}.h2,h2{border-bottom:1px solid #eee;font-size:28px;margin-top:40px}.h2,.h3,.h4,.h5,.h6,h2,h3,h4,h5,h6{font-family:'Karla',sans-serif}.h3,h3{font-size:21px;margin-top:40px}.h4,.h5,.h6,h4,h5,h6{margin-top:20px}.summary-callout .h1,.summary-callout .h2,.summary-callout .h3,.summary-callout .h4,.summary-callout .h5,.summary-callout .h6,.summary-callout h1,.summary-callout h2,.summary-callout h3,.summary-callout h4,.summary-callout h5,.summary-callout h6,.symbol-index-section .h1,.symbol-index-section .h2,.symbol-index-section .h3,.symbol-index-section .h4,.symbol-index-section .h5,.symbol-index-section .h6,.symbol-index-section h1,.symbol-index-section h2,.symbol-index-section h3,.symbol-index-section h4,.symbol-index-section h5,.symbol-index-section h6{font-family:'Karla',sans-serif;color:#5bc0de;margin-top:20px}.prettyprint.linenums li,code,pre>code{font-family:'Inconsolata',monospace;font-size:100%}.label,dt,th{font-family:'Karla'}.dl-compact dt{text-align:left}.dl-summary-callout dd{margin-bottom:10px}.label{font-size:100%;font-weight:400;padding:.1em .5em;text-transform:uppercase}.label-async{background-color:#c5e1a5}.label-generator{background-color:#9fa8da}.label-package,.label-private,.label-protected,.label-public{background-color:#90caf9}.label-constant,.label-readonly{background-color:#ffab91}.label-kind{background-color:#ffcc80}.label-inner,.label-static{background-color:#a5d6a7}.label-virtual{background-color:#b39ddb}.page-header{border-bottom:0}.prettyprint.linenums li{color:#a8a9a6}.property-type{margin-left:14px}.signature-params,.signature-returns{color:#a8a9a6}.source-link{font-size:11.2px;margin-top:-.75em}.summary-callout,.symbol-index-section{font-size:12.6px}.summary-callout-heading,.symbol-index-section-heading{border-bottom:0}.symbol-classdesc p:first-child,.symbol-description p:first-child{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.symbol-classdesc p:first-child,.symbol-description p:first-child{font-size:21px}}.symbol-detail-labels{font-size:11.2px;margin-bottom:4px;margin-top:40px}.h2+section>.symbol-detail-labels:first-child,h2+section>.symbol-detail-labels:first-child{margin-top:0}.symbol-detail-labels+.h1,.symbol-detail-labels+.h2,.symbol-detail-labels+.h3,.symbol-detail-labels+.h4,.symbol-detail-labels+.h5,.symbol-detail-labels+.h6,.symbol-detail-labels+h1,.symbol-detail-labels+h2,.symbol-detail-labels+h3,.symbol-detail-labels+h4,.symbol-detail-labels+h5,.symbol-detail-labels+h6{margin-top:0}.symbol-index-list>dd{margin-bottom:.75em}.symbol-index-name{text-indent:-1em;margin-left:1em}.symbol-name{font-weight:700}@media (min-width:768px){#jsdoc-body-container>.navbar-collapse,#jsdoc-body-container>.navbar-header,#jsdoc-footer-container>.navbar-collapse,#jsdoc-footer-container>.navbar-header,#jsdoc-navbar-container>.navbar-collapse,#jsdoc-navbar-container>.navbar-header{margin-right:0;margin-left:0}}.jsdoc-footer{position:absolute;bottom:0;width:100%;height:50px;margin:auto;padding:15px;background-color:#f8f8f8;border:1px solid #e7e7e7}.jsdoc-footer p{margin:0;text-align:center}.symbol-index{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}#jsdoc-content,.summary-callout>.navbar-collapse,.summary-callout>.navbar-header,.summary-content,.symbol-index-content,.symbol-index>.navbar-collapse,.symbol-index>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.summary-callout>.navbar-collapse,.summary-callout>.navbar-header,.symbol-index>.navbar-collapse,.symbol-index>.navbar-header{margin-right:0;margin-left:0}}#jsdoc-content-container,.summary-column,.symbol-index-column{position:relative;min-height:1px;padding-right:15px;padding-left:15px}@media (min-width:992px){.summary-column,.symbol-index-column{float:left;width:33.33333333%}}@media (min-width:992px){#jsdoc-content-container{float:left;width:75%;left:25%}}#jsdoc-toc-nav{position:relative;min-height:1px;padding-right:15px;padding-left:15px;font-family:'Karla',sans-serif;margin-top:50px}@media (min-width:992px){#jsdoc-toc-nav{float:left;width:25%;right:75%}}.jsdoc-details-table{width:100%;max-width:100%;margin-bottom:20px}.jsdoc-details-table>thead>tr>th{padding:8px;line-height:1.42857143;border-top:1px solid #ddd}.jsdoc-details-table>tbody>tr>td,.jsdoc-details-table>tbody>tr>th,.jsdoc-details-table>tfoot>tr>td,.jsdoc-details-table>tfoot>tr>th,.jsdoc-details-table>thead>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.jsdoc-details-table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.jsdoc-details-table>caption+thead>tr:first-child>td,.jsdoc-details-table>caption+thead>tr:first-child>th,.jsdoc-details-table>colgroup+thead>tr:first-child>td,.jsdoc-details-table>colgroup+thead>tr:first-child>th,.jsdoc-details-table>thead:first-child>tr:first-child>td,.jsdoc-details-table>thead:first-child>tr:first-child>th{border-top:0}.jsdoc-details-table .table{background-color:#fff}article td,article th{padding:5px 8px 5px 0}.summary-callout{padding:0 1em;margin:1em 0;border:1px solid #eee;border-left-width:1em;border-left-color:#5bc0de;border-radius:3px} \ No newline at end of file diff --git a/whatsapp-web.js/docs/global.html b/whatsapp-web.js/docs/global.html deleted file mode 100644 index 9ef30db..0000000 --- a/whatsapp-web.js/docs/global.html +++ /dev/null @@ -1,1032 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Globals - - - - - - - - -
-
-
-
-

Globals

-
-
-

Properties

-
-
-
-
ChatTypes
-
-
-
Events
-
-
-
GroupNotificationTypes
-
-
-
-
-
-
-
MessageAck
-
-
-
MessageTypes
-
-
-
Status
-
-
-
-
-
-
-
WAState
-
-
-
-
-
-
-
-
-

Properties

-
-
read-only
-

ChatTypes -  string

-

Chat types

-
-

Properties

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

SOLO

-
-

 

-
-

 

-
-
-

GROUP

-
-

 

-
-

 

-
-
-

UNKNOWN

-
-

 

-
-

 

-
-
-
-
-
-
read-only
-

Events -  string

-

Events that can be emitted by the client

-
-

Properties

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

AUTHENTICATED

-
-

 

-
-

 

-
-
-

AUTHENTICATION_FAILURE

-
-

 

-
-

 

-
-
-

READY

-
-

 

-
-

 

-
-
-

MESSAGE_RECEIVED

-
-

 

-
-

 

-
-
-

MESSAGE_CREATE

-
-

 

-
-

 

-
-
-

MESSAGE_REVOKED_EVERYONE

-
-

 

-
-

 

-
-
-

MESSAGE_REVOKED_ME

-
-

 

-
-

 

-
-
-

MESSAGE_ACK

-
-

 

-
-

 

-
-
-

MEDIA_UPLOADED

-
-

 

-
-

 

-
-
-

GROUP_JOIN

-
-

 

-
-

 

-
-
-

GROUP_LEAVE

-
-

 

-
-

 

-
-
-

GROUP_UPDATE

-
-

 

-
-

 

-
-
-

QR_RECEIVED

-
-

 

-
-

 

-
-
-

DISCONNECTED

-
-

 

-
-

 

-
-
-

STATE_CHANGED

-
-

 

-
-

 

-
-
-

BATTERY_CHANGED

-
-

 

-
-

 

-
-
-
-
-
-
read-only
-

GroupNotificationTypes -  string

-

Group notification types

-
-

Properties

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

ADD

-
-

 

-
-

 

-
-
-

INVITE

-
-

 

-
-

 

-
-
-

REMOVE

-
-

 

-
-

 

-
-
-

LEAVE

-
-

 

-
-

 

-
-
-

SUBJECT

-
-

 

-
-

 

-
-
-

DESCRIPTION

-
-

 

-
-

 

-
-
-

PICTURE

-
-

 

-
-

 

-
-
-

ANNOUNCE

-
-

 

-
-

 

-
-
-

RESTRICT

-
-

 

-
-

 

-
-
-
-
-
-
read-only
-

MessageAck -  number

-

Message ACK

-
-

Properties

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

ACK_ERROR

-
-

 

-
-

 

-
-
-

ACK_PENDING

-
-

 

-
-

 

-
-
-

ACK_SERVER

-
-

 

-
-

 

-
-
-

ACK_DEVICE

-
-

 

-
-

 

-
-
-

ACK_READ

-
-

 

-
-

 

-
-
-

ACK_PLAYED

-
-

 

-
-

 

-
-
-
-
-
-
read-only
-

MessageTypes -  string

-

Message types

-
-

Properties

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

TEXT

-
-

 

-
-

 

-
-
-

AUDIO

-
-

 

-
-

 

-
-
-

VOICE

-
-

 

-
-

 

-
-
-

IMAGE

-
-

 

-
-

 

-
-
-

VIDEO

-
-

 

-
-

 

-
-
-

DOCUMENT

-
-

 

-
-

 

-
-
-

STICKER

-
-

 

-
-

 

-
-
-

LOCATION

-
-

 

-
-

 

-
-
-

CONTACT_CARD

-
-

 

-
-

 

-
-
-

CONTACT_CARD_MULTI

-
-

 

-
-

 

-
-
-

REVOKED

-
-

 

-
-

 

-
-
-

UNKNOWN

-
-

 

-
-

 

-
-
-
-
-
-
read-only
-

Status -  number

-

Client status

-
-

Properties

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

INITIALIZING

-
-

 

-
-

 

-
-
-

AUTHENTICATING

-
-

 

-
-

 

-
-
-

READY

-
-

 

-
-

 

-
-
-
-
-
-
read-only
-

WAState -  string

-

WhatsApp state

-
-

Properties

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeOptionalDescription
-

CONFLICT

-
-

 

-
-

 

-
-
-

CONNECTED

-
-

 

-
-

 

-
-
-

DEPRECATED_VERSION

-
-

 

-
-

 

-
-
-

OPENING

-
-

 

-
-

 

-
-
-

PAIRING

-
-

 

-
-

 

-
-
-

PROXYBLOCK

-
-

 

-
-

 

-
-
-

SMB_TOS_BLOCK

-
-

 

-
-

 

-
-
-

TIMEOUT

-
-

 

-
-

 

-
-
-

TOS_BLOCK

-
-

 

-
-

 

-
-
-

UNLAUNCHED

-
-

 

-
-

 

-
-
-

UNPAIRED

-
-

 

-
-

 

-
-
-

UNPAIRED_IDLE

-
-

 

-
-

 

-
-
-
-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/index.html b/whatsapp-web.js/docs/index.html deleted file mode 100644 index 21824f3..0000000 --- a/whatsapp-web.js/docs/index.html +++ /dev/null @@ -1,1999 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Home - - - - - - - - -
-
-
- -
- -
-

npm Depfu WhatsApp_Web 2.2023.2 Discord Chat

-

whatsapp-web.js

-

A WhatsApp API client that connects through the WhatsApp Web browser app

-

It uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked.

-

NOTE: I can't guarantee you will not be blocked by using this method, although it has worked for me. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldn't be considered totally safe.

-

Installation

-

The module is now available on npm! npm i whatsapp-web.js

-

Please note that Node v10.18.1+ is required due to Puppeteer.

-

Example usage

-
const { Client } = require('whatsapp-web.js');
-const client = new Client();
-
-client.on('qr', (qr) => {
-    // Generate and scan this code with your phone
-    console.log('QR RECEIVED', qr);
-});
-
-client.on('ready', () => {
-    console.log('Client is ready!');
-});
-
-client.on('message', msg => {
-    if (msg.body == '!ping') {
-        msg.reply('pong');
-    }
-});
-
-client.initialize();
-
-

Take a look at example.js for another example with more use cases.

-

Supported features

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureStatus
Send messages
Receive messages
Send media (images/audio/documents)
Send media (video)(requires google chrome)
Send stickerspending
Receive media (images/audio/video/documents)
Send contact cardspending
Send location
Receive location
Message replies
Join groups by invite
Get invite for group
Modify group info (subject, description)
Add group participants
Kick group participants
Promote/demote group participants
Mention users
Mute/unmute chats
Get contact info
Get profile pictures
Set user status message
-

Something missing? Make an issue and let us know!

-

Links

- -

Contributing

-

Pull requests are welcome! If you see something you'd like to add, please do. For drastic changes, please open an issue first.

-

Donating

-

You can support the maintainer of this project through the link below

-

Support via PayPal

-

Disclaimer

-

This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp or any of its subsidiaries or its affiliates. The official WhatsApp website can be found at https://whatsapp.com. "WhatsApp" as well as related names, marks, emblems and images are registered trademarks of their respective owners.

-

License

-

Copyright 2019 Pedro S Lopez

-

Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this project 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.

-
-
-
-
-

Base

-
-
-
-
- Base() -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-

Chat

-
-
-
-
- Chat() -
-
-
-
- Chat#archive() -
-
-
-
- Chat#archived -
-
-
-
- Chat#clearMessages() -
-
-
-
- Chat#clearState() -
-
-
-
- Chat#delete() -
-
-
-
- Chat#fetchMessages(searchOptions) -
-
-
-
-
-
-
-
- Chat#id -
-
-
-
- Chat#isGroup -
-
-
-
- Chat#isReadOnly -
-
-
-
- Chat#mute(unmuteDate) -
-
-
-
- Chat#name -
-
-
-
- Chat#sendMessage(content, options) -
-
-
-
- Chat#sendSeen() -
-
-
-
-
-
-
-
- Chat#sendStateRecording() -
-
-
-
- Chat#sendStateTyping() -
-
-
-
- Chat#timestamp -
-
-
-
- Chat#unarchive() -
-
-
-
- Chat#unmute() -
-
-
-
- Chat#unreadCount -
-
-
-
-
-
-
-
-
-
-

ChatTypes

-
-
-
-
- ChatTypes.GROUP -
-
-
-
-
-
-
-
- ChatTypes.SOLO -
-
-
-
-
-
-
-
- ChatTypes.UNKNOWN -
-
-
-
-
-
-
-
-
- -
-
-
-

ClientInfo

-
-
-
-
- ClientInfo() -
-
-
-
- ClientInfo#getBatteryStatus() -
-
-
-
-
-
-
-
- ClientInfo#me -
-
-
-
- ClientInfo#phone -
-
-
-
-
-
-
-
- ClientInfo#platform -
-
-
-
- ClientInfo#pushname -
-
-
-
-
-
-
-
-
-
-

Contact

-
-
-
-
- Contact() -
-
-
-
- Contact#getProfilePicUrl() -
-
-
-
- Contact#id -
-
-
-
- Contact#isBusiness -
-
-
-
- Contact#isEnterprise -
-
-
-
-
-
-
-
- Contact#isGroup -
-
-
-
- Contact#isMe -
-
-
-
- Contact#isMyContact -
-
-
-
- Contact#isUser -
-
-
-
- Contact#isWAContact -
-
-
-
-
-
-
-
- Contact#name -
-
-
-
- Contact#number -
-
-
-
- Contact#pushname -
-
-
-
- Contact#shortName -
-
-
-
-
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-

Location

-
- -
-
-
- Location#latitude -
-
-
-
- Location#longitude -
-
-
-
-
-
-
-
-
-
-
-
-
-
-

Message

-
-
-
-
- Message() -
-
-
-
- Message#ack -
-
-
-
- Message#author -
-
-
-
- Message#body -
-
-
-
- Message#broadcast -
-
-
-
- Message#delete(everyone) -
-
-
-
- Message#downloadMedia() -
-
-
-
- Message#from -
-
-
-
-
- - -
-
-
-
-
-

MessageAck

-
-
-
-
- MessageAck.ACK_DEVICE -
-
-
-
- MessageAck.ACK_ERROR -
-
-
-
-
-
-
-
- MessageAck.ACK_PENDING -
-
-
-
- MessageAck.ACK_PLAYED -
-
-
-
-
-
-
-
- MessageAck.ACK_READ -
-
-
-
- MessageAck.ACK_SERVER -
-
-
-
-
-
-
-
-
-
-

MessageMedia

- -
-
-
-
-

MessageTypes

- -
-
-
- -
-
- -
-
-
-

Status

-
-
-
-
- Status.AUTHENTICATING -
-
-
-
-
-
-
-
- Status.INITIALIZING -
-
-
-
-
-
-
-
- Status.READY -
-
-
-
-
-
-
-
-
-
-

Util

-
-
-
-
- Util() -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

WAState

-
-
-
-
- WAState.CONFLICT -
-
-
-
- WAState.CONNECTED -
-
-
-
- WAState.DEPRECATED_VERSION -
-
-
-
- WAState.OPENING -
-
-
-
-
-
-
-
- WAState.PAIRING -
-
-
-
- WAState.PROXYBLOCK -
-
-
-
- WAState.SMB_TOS_BLOCK -
-
-
-
- WAState.TIMEOUT -
-
-
-
-
-
-
-
- WAState.TOS_BLOCK -
-
-
-
- WAState.UNLAUNCHED -
-
-
-
- WAState.UNPAIRED -
-
-
-
- WAState.UNPAIRED_IDLE -
-
-
-
-
-
-
-
-
-
-
- -
-
- - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/scripts/jquery.min.js b/whatsapp-web.js/docs/scripts/jquery.min.js deleted file mode 100644 index a1c07fd..0000000 --- a/whatsapp-web.js/docs/scripts/jquery.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0Globals","id":"global","children":[]},{"label":"Base","id":"Base","children":[]},{"label":"BusinessContact","id":"BusinessContact","children":[]},{"label":"Chat","id":"Chat","children":[]},{"label":"Client","id":"Client","children":[]},{"label":"ClientInfo","id":"ClientInfo","children":[]},{"label":"Contact","id":"Contact","children":[]},{"label":"GroupChat","id":"GroupChat","children":[]},{"label":"GroupNotification","id":"GroupNotification","children":[]},{"label":"InterfaceController","id":"InterfaceController","children":[]},{"label":"Location","id":"Location","children":[]},{"label":"Message","id":"Message","children":[]},{"label":"MessageMedia","id":"MessageMedia","children":[]},{"label":"PrivateChat","id":"PrivateChat","children":[]},{"label":"PrivateContact","id":"PrivateContact","children":[]},{"label":"Util","id":"Util","children":[]}], - openedIcon: ' ⇣', - saveState: false, - useContextMenu: false - }); - - // add event handlers - // TODO -})(jQuery); diff --git a/whatsapp-web.js/docs/scripts/lang-css.js b/whatsapp-web.js/docs/scripts/lang-css.js deleted file mode 100644 index ddf84e1..0000000 --- a/whatsapp-web.js/docs/scripts/lang-css.js +++ /dev/null @@ -1 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']+)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}\b/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]),PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]),PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); \ No newline at end of file diff --git a/whatsapp-web.js/docs/scripts/linenumber.js b/whatsapp-web.js/docs/scripts/linenumber.js deleted file mode 100644 index bcd7595..0000000 --- a/whatsapp-web.js/docs/scripts/linenumber.js +++ /dev/null @@ -1 +0,0 @@ -!function(){var n,e=0,t=document.getElementsByClassName("prettyprint");t&&t[0]&&(n=(n=(t=t[0].getElementsByTagName("code")[0]).innerHTML.split("\n")).map(function(n){return''+n}),t.innerHTML=n.join("\n"))}(); \ No newline at end of file diff --git a/whatsapp-web.js/docs/scripts/prettify.js b/whatsapp-web.js/docs/scripts/prettify.js deleted file mode 100644 index 44ff5e1..0000000 --- a/whatsapp-web.js/docs/scripts/prettify.js +++ /dev/null @@ -1 +0,0 @@ -var DecorationsT,JobT,SourceSpansT,HACK_TO_FIX_JS_INCLUDE_PL,PR,prettyPrintOne,prettyPrint,IN_GLOBAL_SCOPE=!1;window.PR_SHOULD_USE_CONTINUATION=!0,function(){var T=window,e=["break,continue,do,else,for,if,return,while"],n=[[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],t=[n,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],r=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[n,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],s=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],l="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",i=[e,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],o=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],u=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],c=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,d="str",p="com",f="typ",g="lit",h="pun",P="pln",E="src",m="atv";function L(e,n,t,r,a){if(t){var s={sourceNode:e,pre:1,langExtension:null,numberLines:null,sourceCode:t,spans:null,basePos:n,decorations:null};r(s),a.push.apply(a,s.decorations)}}var v=/\S/;function k(e){for(var n=void 0,t=e.firstChild;t;t=t.nextSibling){var r=t.nodeType;n=1===r?n?e:t:3===r&&v.test(t.nodeValue)?e:n}return n===e?void 0:n}function y(c,w){var S,C={};!function(){for(var e=c.concat(w),n=[],t={},r=0,a=e.length;rp[0]&&(p[1]+1>p[0]&&a.push("-"),a.push(g(p[1])))}return a.push("]"),a.join("")}function s(e){for(var n=e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),t=n.length,r=[],a=0,s=0;a/,null])):n.push([p,/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(t.push([p,/^\/\/[^\r\n]*/,null]),t.push([p,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var a=e.regexLiterals;if(a){var s=1|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+i+")")])}var o=e.types;o&&t.push([f,o]);var u=(""+e.keywords).replace(/^ | $/g,"");u.length&&t.push(["kwd",new RegExp("^(?:"+u.replace(/[\s,]+/g,"|")+")\\b"),null]),n.push([P,/^\s+/,null," \r\n\t "]);var c="^.[^\\s\\w.$@'\"`/\\\\]*";return e.regexLiterals&&(c+="(?!s*/)"),t.push([g,/^@[a-z_$][a-z_$@0-9]*/i,null],[f,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[P,/^[a-z_$][a-z_$@0-9]*/i,null],[g,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[P,/^\\[\s\S]?/,null],[h,new RegExp(c),null]),y(n,t)}var x=b({keywords:[t,a,r,s,l,i,o,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function R(e,n,i){for(var o=/(?:^|\s)nocode(?:\s|$)/,u=/\r\n?|\n/,c=e.ownerDocument,t=c.createElement("li");e.firstChild;)t.appendChild(e.firstChild);var r=[t];function d(e){var n=e.nodeType;if(1!=n||o.test(e.className)){if((3==n||4==n)&&i){var t=e.nodeValue,r=t.match(u);if(r){var a=t.substring(0,r.index);e.nodeValue=a;var s=t.substring(r.index+r[0].length);if(s)e.parentNode.insertBefore(c.createTextNode(s),e.nextSibling);p(e),a||e.parentNode.removeChild(e)}}}else if("br"===e.nodeName)p(e),e.parentNode&&e.parentNode.removeChild(e);else for(var l=e.firstChild;l;l=l.nextSibling)d(l)}function p(e){for(;!e.nextSibling;)if(!(e=e.parentNode))return;for(var n,t=function e(n,t){var r=t?n.cloneNode(!1):n,a=n.parentNode;if(a){var s=e(a,1),l=n.nextSibling;s.appendChild(r);for(var i=l;i;i=l)l=i.nextSibling,s.appendChild(i)}return r}(e.nextSibling,0);(n=t.parentNode)&&1===n.nodeType;)t=n;r.push(t)}for(var a=0;a",s=s.firstChild,r&&R(s,r,!0),$({langExtension:a,numberLines:r,sourceNode:s,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),s.innerHTML}function N(y,e){var n=e||document.body,b=n.ownerDocument||document;function t(e){return n.getElementsByTagName(e)}for(var r=[t("pre"),t("code"),t("xmp")],x=[],a=0;a]*(?:>|$)/],[p,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[h,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),S(y([[P,/^[\s]+/,null," \t\r\n"],[m,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[h,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),S(y([],[[m,/^[\s\S]+/]]),["uq.val"]),S(b({keywords:t,hashComments:!0,cStyleComments:!0,types:c}),["c","cc","cpp","cxx","cyc","m"]),S(b({keywords:"null,true,false"}),["json"]),S(b({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:c}),["cs"]),S(b({keywords:r,cStyleComments:!0}),["java"]),S(b({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),S(b({keywords:i,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),S(b({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),S(b({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),S(b({keywords:s,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),S(b({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),S(y([],[[d,/^[\s\S]+/]]),["regex"]);var _=T.PR={createSimpleLexer:y,registerLangHandler:S,sourceDecorator:b,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:m,PR_COMMENT:p,PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:g,PR_NOCODE:"nocode",PR_PLAIN:P,PR_PUNCTUATION:h,PR_SOURCE:E,PR_STRING:d,PR_TAG:"tag",PR_TYPE:f,prettyPrintOne:IN_GLOBAL_SCOPE?T.prettyPrintOne=C:prettyPrintOne=C,prettyPrint:prettyPrint=IN_GLOBAL_SCOPE?T.prettyPrint=N:prettyPrint=N},O=T.define;"function"==typeof O&&O.amd&&O("google-code-prettify",[],function(){return _})}(); \ No newline at end of file diff --git a/whatsapp-web.js/docs/scripts/scrollanchor.js b/whatsapp-web.js/docs/scripts/scrollanchor.js deleted file mode 100644 index ca0fa4a..0000000 --- a/whatsapp-web.js/docs/scripts/scrollanchor.js +++ /dev/null @@ -1 +0,0 @@ -!function(){function o(n){var o,t,e=document.getElementById(n.replace(/^#/,""));e&&(t=e.getBoundingClientRect(),o=t.top+window.pageYOffset,setTimeout(function(){window.scrollTo(0,o-50)},5))}window.addEventListener("load",function(){var n=window.location.hash;n&&"#"!==n&&o(n),window.addEventListener("hashchange",function(){o(window.location.hash)})})}(); \ No newline at end of file diff --git a/whatsapp-web.js/docs/scripts/tree.jquery.js b/whatsapp-web.js/docs/scripts/tree.jquery.js deleted file mode 100644 index 212bf69..0000000 --- a/whatsapp-web.js/docs/scripts/tree.jquery.js +++ /dev/null @@ -1 +0,0 @@ -!function(o){var n={};function r(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return o[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=o,r.c=n,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(o,n,function(e){return t[e]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=16)}([function(e,t,o){"use strict";var r,n;t.__esModule=!0,(n=r=t.Position||(t.Position={}))[n.Before=1]="Before",n[n.After=2]="After",n[n.Inside=3]="Inside",n[n.None=4]="None";var i={before:r.Before,after:r.After,inside:r.Inside,none:r.None};t.getPositionName=function(e){for(var t in i)if(i.hasOwnProperty(t)&&i[t]===e)return t;return""},t.getPosition=function(e){return i[e]};var s=function(){function n(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=n),this.name="",this.setData(e),this.children=[],this.parent=null,t&&(this.idMapping={},(this.tree=this).nodeClass=o)}return n.prototype.setData=function(e){function t(e){null!=e&&(o.name=e)}var o=this;if(e)if("object"!=typeof e)t(e);else for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];"label"===n?t(r):"children"!==n&&(this[n]=r)}},n.prototype.loadFromData=function(e){this.removeChildren();for(var t=0,o=e;t/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},t.getBoolString=function(e){return e?"true":"false"}},function(e,t){e.exports=jQuery},function(e,t,o){"use strict";t.__esModule=!0;var n=function(){function u(e,t){this.$el=jQuery(e);var o=this.constructor.defaults;this.options=jQuery.extend({},o,t)}return u.register=function(a,e){function d(){return"simple_widget_"+e}function l(e,t){var o=jQuery.data(e,t);return o&&o instanceof u?o:null}jQuery.fn[e]=function(e){for(var t=[],o=1;oo.right||t>o.bottom)return null;for(var n=0,r=this.hitAreas.length;n>1,s=this.hitAreas[i];if(ts.bottom))return s;n=1+i}}return null},e.prototype.mustOpenFolderTimer=function(e){var t=e.node;return t.isFolder()&&!t.is_open&&e.position===a.Position.Inside},e.prototype.updateDropHint=function(){if(this.hoveredArea){this.removeDropHint();var e=this.treeWidget._getNodeElementForNode(this.hoveredArea.node);this.previousGhost=e.addDropHint(this.hoveredArea.position)}},e.prototype.startOpenFolderTimer=function(e){var t=this;this.stopOpenFolderTimer(),this.openFolderTimer=window.setTimeout(function(){t.treeWidget._openNode(e,t.treeWidget.options.slide,function(){t.refresh(),t.updateDropHint()})},this.treeWidget.options.openFolderDelay)},e.prototype.stopOpenFolderTimer=function(){this.openFolderTimer&&(clearTimeout(this.openFolderTimer),this.openFolderTimer=null)},e.prototype.moveItem=function(e){var t=this;if(this.currentItem&&this.hoveredArea&&this.hoveredArea.position!==a.Position.None&&this.canMoveToArea(this.hoveredArea)){var o=this.currentItem.node,n=this.hoveredArea.node,r=this.hoveredArea.position,i=o.parent;r===a.Position.Inside&&(this.hoveredArea.node.is_open=!0);var s=function(){t.treeWidget.tree.moveNode(o,n,r),t.treeWidget.element.empty(),t.treeWidget._refreshElements(null)};this.treeWidget._triggerEvent("tree.move",{move_info:{moved_node:o,target_node:n,position:a.getPositionName(r),previous_parent:i,do_move:s,original_event:e.originalEvent}}).isDefaultPrevented()||s()}},e.prototype.getTreeDimensions=function(){var e=this.treeWidget.element.offset();if(e){var t=this.treeWidget.element,o=t.width()||0,n=t.height()||0,r=e.left+this.treeWidget._getScrollLeft();return{left:r,top:e.top,right:r+o,bottom:e.top+n+16}}return{left:0,top:0,right:0,bottom:0}},e}();t.DragAndDropHandler=r;var d=function(r){function e(e,t,o){var n=r.call(this,e)||this;return n.currentNode=t,n.treeBottom=o,n}return i(e,r),e.prototype.generate=function(){return this.positions=[],this.lastTop=0,this.iterate(),this.generateHitAreas(this.positions)},e.prototype.generateHitAreas=function(e){for(var t=-1,o=[],n=[],r=0,i=e;r'+e+""),this.$element.css("position","absolute"),n.append(this.$element)}return e.prototype.move=function(e,t){this.$element.offset({left:e-this.offsetX,top:t-this.offsetY})},e.prototype.remove=function(){this.$element.remove()},e}()},function(e,t,o){"use strict";t.__esModule=!0;var a=o(1),n=function(){function e(e){this.treeWidget=e,this.openedIconElement=this.createButtonElement(e.options.openedIcon),this.closedIconElement=this.createButtonElement(e.options.closedIcon)}return e.prototype.render=function(e){e&&e.parent?this.renderFromNode(e):this.renderFromRoot()},e.prototype.renderFromRoot=function(){var e=this.treeWidget.element;e.empty(),this.createDomElements(e[0],this.treeWidget.tree.children,!0,1)},e.prototype.renderFromNode=function(e){var t=jQuery(e.element),o=this.createLi(e,e.getLevel());this.attachNodeData(e,o),t.after(o),t.remove(),e.children&&this.createDomElements(o,e.children,!1,e.getLevel()+1)},e.prototype.createDomElements=function(e,t,o,n){var r=this.createUl(o);e.appendChild(r);for(var i=0,s=t;is-20,d=e.pageXn-20,s=e.pageX-o<20;i?t.scrollLeft(o+20):s&&r&&t.scrollLeft(Math.max(o-20,0))}},e}();t.default=n},function(e,t,o){"use strict";t.__esModule=!0;var n=function(){function e(e){this.treeWidget=e,this.clear()}return e.prototype.getSelectedNode=function(){var e=this.getSelectedNodes();return!!e.length&&e[0]},e.prototype.getSelectedNodes=function(){if(this.selectedSingleNode)return[this.selectedSingleNode];var e=[];for(var t in this.selectedNodes)if(this.selectedNodes.hasOwnProperty(t)){var o=this.treeWidget.getNodeById(t);o&&e.push(o)}return e},e.prototype.getSelectedNodesUnder=function(e){if(this.selectedSingleNode)return e.isParentOf(this.selectedSingleNode)?[this.selectedSingleNode]:[];var t=[];for(var o in this.selectedNodes)if(this.selectedNodes.hasOwnProperty(o)){var n=this.treeWidget.getNodeById(o);n&&e.isParentOf(n)&&t.push(n)}return t},e.prototype.isNodeSelected=function(e){return!!e&&(null!=e.id?!!this.selectedNodes[e.id]:!!this.selectedSingleNode&&this.selectedSingleNode.element===e.element)},e.prototype.clear=function(){this.selectedNodes={},this.selectedSingleNode=null},e.prototype.removeFromSelection=function(e,t){var o=this;void 0===t&&(t=!1),null==e.id?this.selectedSingleNode&&e.element===this.selectedSingleNode.element&&(this.selectedSingleNode=null):(delete this.selectedNodes[e.id],t&&e.iterate(function(){return delete o.selectedNodes[e.id],!0}))},e.prototype.addToSelection=function(e){null!=e.id?this.selectedNodes[e.id]=!0:this.selectedSingleNode=e},e}();t.default=n},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});t.__esModule=!0;var i=o(0),s=function(){function e(e,t){this.init(e,t)}return e.prototype.init=function(e,t){this.node=e,this.treeWidget=t,e.element||(e.element=this.treeWidget.element.get(0)),this.$element=jQuery(e.element)},e.prototype.addDropHint=function(e){return this.mustShowBorderDropHint(e)?new l(this.$element,this.treeWidget._getScrollLeft()):new d(this.node,this.$element,e)},e.prototype.select=function(e){var t=this.getLi();t.addClass("jqtree-selected"),t.attr("aria-selected","true");var o=this.getSpan();o.attr("tabindex",this.treeWidget.options.tabIndex),e&&o.focus()},e.prototype.deselect=function(){var e=this.getLi();e.removeClass("jqtree-selected"),e.attr("aria-selected","false");var t=this.getSpan();t.removeAttr("tabindex"),t.blur()},e.prototype.getUl=function(){return this.$element.children("ul:first")},e.prototype.getSpan=function(){return this.$element.children(".jqtree-element").find("span.jqtree-title")},e.prototype.getLi=function(){return this.$element},e.prototype.mustShowBorderDropHint=function(e){return e===i.Position.Inside},e}(),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.open=function(e,t,o){var n=this;if(void 0===t&&(t=!0),void 0===o&&(o="fast"),!this.node.is_open){this.node.is_open=!0;var r=this.getButton();r.removeClass("jqtree-closed"),r.html("");var i=r.get(0);if(i){var s=this.treeWidget.renderer.openedIconElement.cloneNode(!0);i.appendChild(s)}var a=function(){n.getLi().removeClass("jqtree-closed"),n.getSpan().attr("aria-expanded","true"),e&&e(n.node),n.treeWidget._triggerEvent("tree.open",{node:n.node})};t?this.getUl().slideDown(o,a):(this.getUl().show(),a())}},t.prototype.close=function(e,t){var o=this;if(void 0===e&&(e=!0),void 0===t&&(t="fast"),this.node.is_open){this.node.is_open=!1;var n=this.getButton();n.addClass("jqtree-closed"),n.html("");var r=n.get(0);if(r){var i=this.treeWidget.renderer.closedIconElement.cloneNode(!0);r.appendChild(i)}var s=function(){o.getLi().addClass("jqtree-closed"),o.getSpan().attr("aria-expanded","false"),o.treeWidget._triggerEvent("tree.close",{node:o.node})};e?this.getUl().slideUp(t,s):(this.getUl().hide(),s())}},t.prototype.mustShowBorderDropHint=function(e){return!this.node.is_open&&e===i.Position.Inside},t.prototype.getButton=function(){return this.$element.children(".jqtree-element").find("a.jqtree-toggler")},t}(t.NodeElement=s);t.FolderElement=a;var l=function(){function e(e,t){var o=e.children(".jqtree-element"),n=e.width()||0,r=Math.max(n+t-4,0),i=o.outerHeight()||0,s=Math.max(i-4,0);this.$hint=jQuery(''),o.append(this.$hint),this.$hint.css({width:r,height:s})}return e.prototype.remove=function(){this.$hint.remove()},e}();t.BorderDropHint=l;var d=function(){function e(e,t,o){this.$element=t,this.node=e,this.$ghost=jQuery('
  • \n
  • '),o===i.Position.After?this.moveAfter():o===i.Position.Before?this.moveBefore():o===i.Position.Inside&&(e.isFolder()&&e.is_open?this.moveInsideOpenFolder():this.moveInside())}return e.prototype.remove=function(){this.$ghost.remove()},e.prototype.moveAfter=function(){this.$element.after(this.$ghost)},e.prototype.moveBefore=function(){this.$element.before(this.$ghost)},e.prototype.moveInsideOpenFolder=function(){jQuery(this.node.children[0].element).before(this.$ghost)},e.prototype.moveInside=function(){this.$element.after(this.$ghost),this.$ghost.addClass("jqtree-inside")},e}()},,function(e,t,o){e.exports=o(4)}]); \ No newline at end of file diff --git a/whatsapp-web.js/docs/structures_Base.js.html b/whatsapp-web.js/docs/structures_Base.js.html deleted file mode 100644 index 28d9be6..0000000 --- a/whatsapp-web.js/docs/structures_Base.js.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: structures/Base.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -/**
    - * Represents a WhatsApp data structure
    - */
    -class Base {
    -    constructor(client) {
    -        /**
    -         * The client that instantiated this
    -         * @readonly
    -         */
    -        Object.defineProperty(this, 'client', { value: client });
    -    }
    -
    -    _clone() {
    -        return Object.assign(Object.create(this), this);
    -    }
    -    
    -    _patch(data) { return data; }
    -}
    -
    -module.exports = Base;
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/structures_BusinessContact.js.html b/whatsapp-web.js/docs/structures_BusinessContact.js.html deleted file mode 100644 index a49983b..0000000 --- a/whatsapp-web.js/docs/structures_BusinessContact.js.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: structures/BusinessContact.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -const Contact = require('./Contact');
    -
    -/**
    - * Represents a Business Contact on WhatsApp
    - * @extends {Contact}
    - */
    -class BusinessContact extends Contact {
    -    _patch(data) {
    -        /**
    -         * The contact's business profile
    -         */
    -        this.businessProfile = data.businessProfile;
    -
    -        return super._patch(data);
    -    }
    -
    -}
    -
    -module.exports = BusinessContact;
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/structures_Chat.js.html b/whatsapp-web.js/docs/structures_Chat.js.html deleted file mode 100644 index c4cb72a..0000000 --- a/whatsapp-web.js/docs/structures_Chat.js.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: structures/Chat.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -const Base = require('./Base');
    -const Message = require('./Message');
    -
    -/**
    - * Represents a Chat on WhatsApp
    - * @extends {Base}
    - */
    -class Chat extends Base {
    -    constructor(client, data) {
    -        super(client);
    -
    -        if (data) this._patch(data);
    -    }
    -
    -    _patch(data) {
    -        /**
    -         * ID that represents the chat
    -         * @type {object}
    -         */
    -        this.id = data.id;
    -
    -        /**
    -         * Title of the chat
    -         * @type {string}
    -         */
    -        this.name = data.formattedTitle;
    -
    -        /**
    -         * Indicates if the Chat is a Group Chat
    -         * @type {boolean}
    -         */
    -        this.isGroup = data.isGroup;
    -
    -        /**
    -         * Indicates if the Chat is readonly
    -         * @type {boolean}
    -         */
    -        this.isReadOnly = data.isReadOnly;
    -
    -        /**
    -         * Amount of messages unread
    -         * @type {number}
    -         */
    -        this.unreadCount = data.unreadCount;
    -
    -        /**
    -         * Unix timestamp for when the chat was created
    -         * @type {number}
    -         */
    -        this.timestamp = data.t;
    -
    -        /**
    -         * Indicates if the Chat is archived
    -         * @type {boolean}
    -         */
    -        this.archived = data.archive;
    -
    -        return super._patch(data);
    -    }
    -
    -    /**
    -     * Send a message to this chat
    -     * @param {string|MessageMedia|Location} content
    -     * @param {object} options 
    -     * @returns {Promise&lt;Message>} Message that was just sent
    -     */
    -    async sendMessage(content, options) {
    -        return this.client.sendMessage(this.id._serialized, content, options);
    -    }
    -
    -    /**
    -     * Set the message as seen
    -     * @returns {Promise&lt;Boolean>} result
    -     */
    -    async sendSeen() {
    -        return this.client.sendSeen(this.id._serialized);
    -    }
    -
    -    /**
    -     * Clears all messages from the chat
    -     * @returns {Promise&lt;Boolean>} result
    -     */
    -    async clearMessages() {
    -        return this.client.pupPage.evaluate(chatId => {
    -            return window.WWebJS.sendClearChat(chatId);
    -        }, this.id._serialized);
    -    }
    -
    -    /**
    -     * Deletes the chat
    -     * @returns {Promise&lt;Boolean>} result
    -     */
    -    async delete() {
    -        return this.client.pupPage.evaluate(chatId => {
    -            return window.WWebJS.sendDeleteChat(chatId);
    -        }, this.id._serialized);
    -    }
    -
    -    /**
    -     * Archives this chat
    -     */
    -    async archive() {
    -        return this.client.archiveChat(this.id._serialized);
    -    }
    -
    -    /**
    -     * un-archives this chat
    -     */
    -    async unarchive() {
    -        return this.client.unarchiveChat(this.id._serialized);
    -    }
    -
    -    /**
    -     * Mutes this chat until a specified date
    -     * @param {Date} unmuteDate Date at which the Chat will be unmuted
    -     */
    -    async mute(unmuteDate) {
    -        return this.client.muteChat(this.id._serialized, unmuteDate);
    -    }
    -    
    -    /**
    -     * Unmutes this chat
    -     */
    -    async unmute() {
    -        return this.client.unmuteChat(this.id._serialized);
    -    }
    -
    -    /**
    -     * Loads chat messages, sorted from earliest to latest.
    -     * @param {Object} searchOptions Options for searching messages. Right now only limit is supported.
    -     * @param {Number} [searchOptions.limit=50] The amount of messages to return. Note that the actual number of returned messages may be smaller if there aren't enough messages in the conversation. Set this to Infinity to load all messages.
    -     * @returns {Promise&lt;Array&lt;Message>>}
    -     */
    -    async fetchMessages(searchOptions) {
    -        if(!searchOptions || !searchOptions.limit) {
    -            searchOptions = {limit: 50};
    -        }
    -        let messages = await this.client.pupPage.evaluate(async (chatId, limit) => {
    -            const msgFilter = m => !m.isNotification; // dont include notification messages
    -            
    -            const chat = window.Store.Chat.get(chatId);
    -            let msgs = chat.msgs.models.filter(msgFilter);
    -            
    -            while(msgs.length &lt; limit) {
    -                const loadedMessages = await chat.loadEarlierMsgs();
    -                if(!loadedMessages) break;
    -                msgs = [...loadedMessages.filter(msgFilter), ...msgs];
    -            }
    -
    -            msgs.sort((a, b) => (a.t > b.t) ? 1 : -1);
    -            return msgs.splice(msgs.length - limit).map(m => m.serialize());
    -
    -        }, this.id._serialized, searchOptions.limit);
    -
    -        return messages.map(m => new Message(this.client, m));
    -    }
    -   
    -    /**
    -     * Simulate typing in chat. This will last for 25 seconds.
    -     */
    -    async sendStateTyping() {
    -        return this.client.pupPage.evaluate(chatId => {
    -            window.WWebJS.sendChatstate('typing', chatId);
    -            return true;
    -        }, this.id._serialized);
    -    }
    -    
    -    /**
    -     * Simulate recording audio in chat. This will last for 25 seconds.
    -     */
    -    async sendStateRecording() {
    -        return this.client.pupPage.evaluate(chatId => {
    -            window.WWebJS.sendChatstate('recording', chatId);
    -            return true;
    -        }, this.id._serialized);
    -    }
    -    
    -    /**
    -     * Stops typing or recording in chat immediately.
    -     */
    -    async clearState() {
    -        return this.client.pupPage.evaluate(chatId => {
    -            window.WWebJS.sendChatstate('stop', chatId);
    -            return true;
    -        }, this.id._serialized);
    -    }
    -}
    -
    -module.exports = Chat;
    -
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/structures_ClientInfo.js.html b/whatsapp-web.js/docs/structures_ClientInfo.js.html deleted file mode 100644 index 2da9977..0000000 --- a/whatsapp-web.js/docs/structures_ClientInfo.js.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: structures/ClientInfo.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -const Base = require('./Base');
    -
    -/**
    - * Current connection information
    - * @extends {Base}
    - */
    -class ClientInfo extends Base {
    -    constructor(client, data) {
    -        super(client);
    -
    -        if(data) this._patch(data);
    -    }
    -
    -    _patch(data) {
    -        /**
    -         * Name configured to be shown in push notifications
    -         * @type {string}
    -         */
    -        this.pushname = data.pushname;
    -
    -        /**
    -         * Current user ID
    -         * @type {object}
    -         */
    -        this.me = data.me;
    -
    -        /**
    -         * Information about the phone this client is connected to
    -         * @type {object}
    -         * @property {string} wa_version WhatsApp Version running on the phone
    -         * @property {string} os_version OS Version running on the phone (iOS or Android version)
    -         * @property {string} device_manufacturer Device manufacturer
    -         * @property {string} device_model Device model
    -         * @property {string} os_build_number OS build number
    -         */
    -        this.phone = data.phone;
    -
    -        /**
    -         * Platform the phone is running on
    -         * @type {string}
    -         */
    -        this.platform = data.platform;
    -
    -        return super._patch(data);
    -    }
    -
    -    /**
    -     * Get current battery percentage and charging status for the attached device
    -     * @returns {object} batteryStatus
    -     * @returns {number} batteryStatus.battery - The current battery percentage
    -     * @returns {boolean} batteryStatus.plugged - Indicates if the phone is plugged in (true) or not (false)
    -     */
    -    async getBatteryStatus() {
    -        return await this.client.pupPage.evaluate(() => {
    -            const { battery, plugged } = window.Store.Conn;
    -            return { battery, plugged };
    -        });
    -    }
    -
    -}
    -
    -module.exports = ClientInfo;
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/structures_Contact.js.html b/whatsapp-web.js/docs/structures_Contact.js.html deleted file mode 100644 index b9f238e..0000000 --- a/whatsapp-web.js/docs/structures_Contact.js.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: structures/Contact.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -const Base = require('./Base');
    -
    -/**
    - * Represents a Contact on WhatsApp
    - * @extends {Base}
    - */
    -class Contact extends Base {
    -    constructor(client, data) {
    -        super(client);
    -
    -        if(data) this._patch(data);
    -    }
    -
    -    _patch(data) {
    -        /**
    -         * ID that represents the contact
    -         * @type {object}
    -         */
    -        this.id = data.id;
    -
    -        /**
    -         * Contact's phone number
    -         * @type {string}
    -         */
    -        this.number = data.userid;
    -
    -        /**
    -         * Indicates if the contact is a business contact
    -         * @type {boolean}
    -         */
    -        this.isBusiness = data.isBusiness;
    -
    -        /**
    -         * Indicates if the contact is an enterprise contact
    -         * @type {boolean}
    -         */
    -        this.isEnterprise = data.isEnterprise;
    -
    -        this.labels = data.labels;
    -
    -        /**
    -         * The contact's name, as saved by the current user
    -         * @type {?string}
    -         */
    -        this.name = data.name;
    -
    -        /**
    -         * The name that the contact has configured to be shown publically
    -         * @type {string}
    -         */
    -        this.pushname = data.pushname;
    -
    -        this.sectionHeader = data.sectionHeader;
    -
    -        /**
    -         * A shortened version of name
    -         * @type {?string}
    -         */
    -        this.shortName = data.shortName;
    -
    -        this.statusMute = data.statusMute;
    -        this.type = data.type;
    -        this.verifiedLevel = data.verifiedLevel;
    -        this.verifiedName = data.verifiedName;
    -
    -        /**
    -         * Indicates if the contact is the current user's contact
    -         * @type {boolean}
    -         */
    -        this.isMe = data.isMe;
    -
    -        /**
    -         * Indicates if the contact is a user contact
    -         * @type {boolean}
    -         */
    -        this.isUser = data.isUser;
    -
    -        /**
    -         * Indicates if the contact is a group contact
    -         * @type {boolean}
    -         */
    -        this.isGroup = data.isGroup;
    -
    -        /**
    -         * Indicates if the number is registered on WhatsApp
    -         * @type {boolean}
    -         */
    -        this.isWAContact = data.isWAContact;
    -
    -        /**
    -         * Indicates if the number is saved in the current phone's contacts
    -         * @type {boolean}
    -         */
    -        this.isMyContact = data.isMyContact;
    -
    -        return super._patch(data);
    -    }
    -
    -    /**
    -     * Returns the contact's profile picture URL, if privacy settings allow it
    -     * @returns {Promise&lt;string>}
    -     */
    -    async getProfilePicUrl() {
    -        return await this.client.getProfilePicUrl(this.id._serialized);
    -    }
    -    
    -}
    -
    -module.exports = Contact;
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/structures_GroupChat.js.html b/whatsapp-web.js/docs/structures_GroupChat.js.html deleted file mode 100644 index e8fafb0..0000000 --- a/whatsapp-web.js/docs/structures_GroupChat.js.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: structures/GroupChat.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -const Chat = require('./Chat');
    -
    -/**
    - * Represents a Group Chat on WhatsApp
    - * @extends {Chat}
    - */
    -class GroupChat extends Chat {
    -    _patch(data) {
    -        this.groupMetadata = data.groupMetadata;
    -
    -        return super._patch(data);
    -    }
    -
    -    /**
    -     * Gets the group owner
    -     */
    -    get owner() {
    -        return this.groupMetadata.owner;
    -    }
    -    
    -    /**
    -     * Gets the date at which the group was created
    -     * @type {date}
    -     */
    -    get createdAt() {
    -        return new Date(this.groupMetadata.creation * 1000);
    -    }
    -
    -    /** 
    -     * Gets the group description
    -     * @type {string}
    -     */
    -    get description() {
    -        return this.groupMetadata.desc;
    -    }
    -    /**
    -     * Gets the group participants
    -     * @type {array}
    -     */
    -    get participants() {
    -        return this.groupMetadata.participants;
    -    }
    -
    -    /**
    -     * Adds a list of participants by ID to the group
    -     * @param {Array&lt;string>} participantIds 
    -     */
    -    async addParticipants(participantIds) {
    -        return await this.client.pupPage.evaluate((chatId, participantIds) => {
    -            return window.Store.Wap.addParticipants(chatId, participantIds);
    -        }, this.id._serialized, participantIds);
    -    }
    -
    -    /**
    -     * Removes a list of participants by ID to the group
    -     * @param {Array&lt;string>} participantIds 
    -     */
    -    async removeParticipants(participantIds) {
    -        return await this.client.pupPage.evaluate((chatId, participantIds) => {
    -            return window.Store.Wap.removeParticipants(chatId, participantIds);
    -        }, this.id._serialized, participantIds);
    -    }
    -
    -    /**
    -     * Promotes participants by IDs to admins
    -     * @param {Array&lt;string>} participantIds 
    -     */
    -    async promoteParticipants(participantIds) {
    -        return await this.client.pupPage.evaluate((chatId, participantIds) => {
    -            return window.Store.Wap.promoteParticipants(chatId, participantIds);
    -        }, this.id._serialized, participantIds);
    -    }
    -
    -    /**
    -     * Demotes participants by IDs to regular users
    -     * @param {Array&lt;string>} participantIds 
    -     */
    -    async demoteParticipants(participantIds) {
    -        return await this.client.pupPage.evaluate((chatId, participantIds) => {
    -            return window.Store.Wap.demoteParticipants(chatId, participantIds);
    -        }, this.id._serialized, participantIds);
    -    }
    -
    -    /**
    -     * Updates the group subject
    -     * @param {string} subject 
    -     */
    -    async setSubject(subject) {
    -        let res = await this.client.pupPage.evaluate((chatId, subject) => {
    -            return window.Store.Wap.changeSubject(chatId, subject);
    -        }, this.id._serialized, subject);
    -
    -        if(res.status == 200) {
    -            this.name = subject;
    -        }
    -    }
    -
    -    /**
    -     * Updates the group description
    -     * @param {string} description 
    -     */
    -    async setDescription(description) {
    -        let res = await this.client.pupPage.evaluate((chatId, description) => {
    -            let descId = window.Store.GroupMetadata.get(chatId).descId;
    -            return window.Store.Wap.setGroupDescription(chatId, description, window.Store.genId(), descId);
    -        }, this.id._serialized, description);
    -
    -        if (res.status == 200) {
    -            this.groupMetadata.desc = description;
    -        }
    -    }
    -
    -    /**
    -     * Gets the invite code for a specific group
    -     */
    -    async getInviteCode() {
    -        let res = await this.client.pupPage.evaluate(chatId => {
    -            return window.Store.Wap.groupInviteCode(chatId);
    -        }, this.id._serialized);
    -
    -        if (res.status == 200) {
    -            return res.code;
    -        } 
    -
    -        throw new Error('Not authorized');
    -    }
    -    
    -    /**
    -     * Invalidates the current group invite code and generates a new one
    -     */
    -    async revokeInvite() {
    -        return await this.client.pupPage.evaluate(chatId => {
    -            return window.Store.Wap.revokeGroupInvite(chatId);
    -        }, this.id._serialized);
    -    }
    -
    -    /**
    -     * Makes the bot leave the group
    -     */
    -    async leave() {
    -        return await this.client.pupPage.evaluate(chatId => {
    -            return window.Store.Wap.leaveGroup(chatId);
    -        }, this.id._serialized);
    -    }
    -
    -}
    -
    -module.exports = GroupChat;
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/structures_GroupNotification.js.html b/whatsapp-web.js/docs/structures_GroupNotification.js.html deleted file mode 100644 index a2c6a77..0000000 --- a/whatsapp-web.js/docs/structures_GroupNotification.js.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: structures/GroupNotification.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -const Base = require('./Base');
    -
    -/**
    - * Represents a GroupNotification on WhatsApp
    - * @extends {Base}
    - */
    -class GroupNotification extends Base {
    -    constructor(client, data) {
    -        super(client);
    -
    -        if(data) this._patch(data);
    -    }
    -
    -    _patch(data) {
    -        /**
    -         * ID that represents the groupNotification
    -         * @type {object}
    -         */
    -        this.id = data.id;
    -
    -        /**
    -         * Extra content
    -         * @type {string}
    -         */
    -        this.body = data.body || '';
    -
    -        /** 
    -         * GroupNotification type
    -         * @type {GroupNotificationTypes}
    -         */
    -        this.type = data.subtype;
    -        
    -        /**
    -         * Unix timestamp for when the groupNotification was created
    -         * @type {number}
    -         */
    -        this.timestamp = data.t;
    -
    -        /**
    -         * ID for the Chat that this groupNotification was sent for.
    -         * 
    -         * @type {string}
    -         */
    -        this.chatId = typeof (data.from) === 'object' ? data.from._serialized : data.from;
    -
    -        /**
    -         * ContactId for the user that produced the GroupNotification.
    -         * @type {string}
    -         */
    -        this.author = typeof (data.author) === 'object' ? data.author._serialized : data.author;
    -        
    -        /**
    -         * Contact IDs for the users that were affected by this GroupNotification.
    -         * @type {Array&lt;string>}
    -         */
    -        this.recipientIds = [];
    -
    -        if (data.recipients) {
    -            this.recipientIds = data.recipients;
    -        }
    -
    -        return super._patch(data);
    -    }
    -
    -    /**
    -     * Returns the Chat this groupNotification was sent in
    -     * @returns {Promise&lt;Chat>}
    -     */
    -    getChat() {
    -        return this.client.getChatById(this.chatId);
    -    }
    -
    -    /**
    -     * Returns the Contact this GroupNotification was produced by
    -     * @returns {Promise&lt;Contact>}
    -     */
    -    getContact() {
    -        return this.client.getContactById(this.author);
    -    }
    -
    -    /**
    -     * Returns the Contacts affected by this GroupNotification.
    -     * @returns {Promise&lt;Array&lt;Contact>>}
    -     */
    -    async getRecipients() {
    -        return await Promise.all(this.recipientIds.map(async m => await this.client.getContactById(m)));
    -    }
    -
    -    /**
    -     * Sends a message to the same chat this GroupNotification was produced in.
    -     * 
    -     * @param {string|MessageMedia|Location} content 
    -     * @param {object} options
    -     * @returns {Promise&lt;Message>}
    -     */
    -    async reply(content, options={}) {
    -        return this.client.sendMessage(this.chatId, content, options);
    -    }
    -    
    -}
    -
    -module.exports = GroupNotification;
    -
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/structures_Location.js.html b/whatsapp-web.js/docs/structures_Location.js.html deleted file mode 100644 index 1edbebf..0000000 --- a/whatsapp-web.js/docs/structures_Location.js.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: structures/Location.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -/**
    - * Location information
    - */
    -class Location {
    -    /**
    -     * @param {number} latitude
    -     * @param {number} longitude
    -     * @param {?string} description
    -     */
    -    constructor(latitude, longitude, description) {
    -        /**
    -         * Location latitude
    -         * @type {number}
    -         */
    -        this.latitude = latitude;
    -
    -        /**
    -         * Location longitude
    -         * @type {number}
    -         */
    -        this.longitude = longitude;
    -
    -        /**
    -         * Name for the location
    -         * @type {?string}
    -         */
    -        this.description = description;
    -    }
    -}
    -
    -module.exports = Location;
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/structures_Message.js.html b/whatsapp-web.js/docs/structures_Message.js.html deleted file mode 100644 index e6f2dcf..0000000 --- a/whatsapp-web.js/docs/structures_Message.js.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: structures/Message.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -const Base = require('./Base');
    -const MessageMedia = require('./MessageMedia');
    -const Location = require('./Location');
    -const { MessageTypes } = require('../util/Constants');
    -
    -/**
    - * Represents a Message on WhatsApp
    - * @extends {Base}
    - */
    -class Message extends Base {
    -    constructor(client, data) {
    -        super(client);
    -
    -        if(data) this._patch(data);
    -    }
    -
    -    _patch(data) {
    -        /**
    -         * MediaKey that represents the sticker 'ID'
    -         * @type {string}
    -         */
    -        this.mediaKey = data.mediaKey;
    -
    -
    -        /**
    -         * ID that represents the message
    -         * @type {object}
    -         */
    -        this.id = data.id;
    -
    -        /**
    -         * ACK status for the message
    -         * @type {MessageAck}
    -         */
    -        this.ack = data.ack;
    -
    -        /**
    -         * Indicates if the message has media available for download
    -         * @type {boolean}
    -         */
    -        this.hasMedia = data.clientUrl ? true : false;
    -
    -        /**
    -         * Message content
    -         * @type {string}
    -         */
    -        this.body = this.hasMedia ? data.caption || '' : data.body || '';
    -
    -        /** 
    -         * Message type
    -         * @type {MessageTypes}
    -         */
    -        this.type = data.type;
    -
    -        /**
    -         * Unix timestamp for when the message was created
    -         * @type {number}
    -         */
    -        this.timestamp = data.t;
    -
    -        /**
    -         * ID for the Chat that this message was sent to, except if the message was sent by the current user.
    -         * @type {string}
    -         */
    -        this.from = (typeof (data.from) === 'object' &amp;&amp; data.from !== null) ? data.from._serialized : data.from;
    -
    -        /**
    -         * ID for who this message is for.
    -         * 
    -         * If the message is sent by the current user, it will be the Chat to which the message is being sent.
    -         * If the message is sent by another user, it will be the ID for the current user. 
    -         * @type {string}
    -         */
    -        this.to = (typeof (data.to) === 'object' &amp;&amp; data.to !== null) ? data.to._serialized : data.to;
    -
    -        /**
    -         * If the message was sent to a group, this field will contain the user that sent the message.
    -         * @type {string}
    -         */
    -        this.author = (typeof (data.author) === 'object' &amp;&amp; data.author !== null) ? data.author._serialized : data.author;
    -
    -        /**
    -         * Indicates if the message was forwarded
    -         * @type {boolean}
    -         */
    -        this.isForwarded = data.isForwarded;
    -
    -        /**
    -         * Indicates if the message was a broadcast
    -         * @type {boolean}
    -         */
    -        this.broadcast = data.broadcast;
    -
    -        /** 
    -         * Indicates if the message was sent by the current user
    -         * @type {boolean}
    -         */
    -        this.fromMe = data.id.fromMe;
    -        
    -        /**
    -         * Indicates if the message was sent as a reply to another message.
    -         * @type {boolean}
    -         */
    -        this.hasQuotedMsg = data.quotedMsg ? true : false;
    -
    -        /**
    -         * Location information contained in the message, if the message is type "location"
    -         * @type {Location}
    -         */
    -        this.location = data.type === MessageTypes.LOCATION ? new Location(data.lat, data.lng, data.loc) : undefined;
    -
    -        /**
    -         * Indicates the mentions in the message body.
    -         * @type {Array&lt;string>}
    -         */
    -        this.mentionedIds = [];
    -
    -        if (data.mentionedJidList) {
    -            this.mentionedIds = data.mentionedJidList;
    -        }
    -
    -        return super._patch(data);
    -    }
    -
    -    _getChatId() {
    -        return this.fromMe ? this.to : this.from;
    -    }
    -
    -    /**
    -     * Returns the Chat this message was sent in
    -     * @returns {Promise&lt;Chat>}
    -     */
    -    getChat() {
    -        return this.client.getChatById(this._getChatId());
    -    }
    -
    -    /**
    -     * Returns the Contact this message was sent from
    -     * @returns {Promise&lt;Contact>}
    -     */
    -    getContact() {
    -        return this.client.getContactById(this.author || this.from);
    -    }
    -
    -    /**
    -     * Returns the Contacts mentioned in this message
    -     * @returns {Promise&lt;Array&lt;Contact>>}
    -     */
    -    async getMentions() {
    -        return await Promise.all(this.mentionedIds.map(async m => await this.client.getContactById(m)));
    -    }
    -
    -    /**
    -     * Returns the quoted message, if any
    -     * @returns {Promise&lt;Message>}
    -     */
    -    async getQuotedMessage() {
    -        if (!this.hasQuotedMsg) return undefined;
    -
    -        const quotedMsg = await this.client.pupPage.evaluate((msgId) => {
    -            let msg = window.Store.Msg.get(msgId);
    -            return msg.quotedMsgObj().serialize();
    -        }, this.id._serialized);
    -
    -        return new Message(this.client, quotedMsg);
    -    }
    -
    -    /**
    -     * Sends a message as a reply to this message. If chatId is specified, it will be sent 
    -     * through the specified Chat. If not, it will send the message 
    -     * in the same Chat as the original message was sent.
    -     * 
    -     * @param {string|MessageMedia|Location} content 
    -     * @param {?string} chatId 
    -     * @param {object} options
    -     * @returns {Promise&lt;Message>}
    -     */
    -    async reply(content, chatId, options={}) {
    -        if (!chatId) {
    -            chatId = this._getChatId();
    -        }
    -
    -        options = {
    -            ...options,
    -            quotedMessageId: this.id._serialized
    -        };
    -
    -        return this.client.sendMessage(chatId, content, options);
    -    }
    -
    -    /**
    -     * Downloads and returns the attatched message media
    -     * @returns {Promise&lt;MessageMedia>}
    -     */
    -    async downloadMedia() {
    -        if (!this.hasMedia) {
    -            return undefined;
    -        }
    -
    -        const result = await this.client.pupPage.evaluate(async (msgId) => {
    -            const msg = window.Store.Msg.get(msgId);
    -            
    -            if(msg.mediaData.mediaStage != 'RESOLVED') {
    -                // try to resolve media
    -                await msg.downloadMedia(true, 1);
    -            }
    -            
    -            if(msg.mediaData.mediaStage.includes('ERROR')) {
    -                // media could not be downloaded
    -                return undefined;
    -            }
    -
    -            const buffer = await window.WWebJS.downloadBuffer(msg.clientUrl);
    -            const decrypted = await window.Store.CryptoLib.decryptE2EMedia(msg.type, buffer, msg.mediaKey, msg.mimetype);
    -            const data = await window.WWebJS.readBlobAsync(decrypted._blob);
    -            
    -            return {
    -                data: data.split(',')[1],
    -                mimetype: msg.mimetype,
    -                filename: msg.filename
    -            };
    -
    -        }, this.id._serialized);
    -
    -        if(!result) return undefined;
    -        return new MessageMedia(result.mimetype, result.data, result.filename);
    -    }
    -
    -    /**
    -     * Deletes a message from the chat
    -     * @param {?boolean} everyone If true and the message is sent by the current user, will delete it for everyone in the chat.
    -     */
    -    async delete(everyone) {
    -        await this.client.pupPage.evaluate((msgId, everyone) => {
    -            let msg = window.Store.Msg.get(msgId);
    -
    -            if(everyone &amp;&amp; msg.id.fromMe &amp;&amp; msg.canRevoke()) {
    -                return window.Store.Cmd.sendRevokeMsgs(msg.chat, [msg], true);
    -            } 
    -            
    -            return window.Store.Cmd.sendDeleteMsgs(msg.chat, [msg], true);
    -        }, this.id._serialized, everyone);
    -    }
    -}
    -
    -module.exports = Message;
    -
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/structures_MessageMedia.js.html b/whatsapp-web.js/docs/structures_MessageMedia.js.html deleted file mode 100644 index 0e3d474..0000000 --- a/whatsapp-web.js/docs/structures_MessageMedia.js.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: structures/MessageMedia.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -const fs = require('fs');
    -const path = require('path');
    -const mime = require('mime');
    -
    -/**
    - * Media attached to a message
    - * @param {string} mimetype MIME type of the attachment
    - * @param {string} data Base64-encoded data of the file
    - * @param {?string} filename Document file name
    - */
    -class MessageMedia {
    -    constructor(mimetype, data, filename) {
    -        /**
    -         * MIME type of the attachment
    -         * @type {string}
    -         */
    -        this.mimetype = mimetype;
    -
    -        /**
    -         * Base64 encoded data that represents the file
    -         * @type {string}
    -         */
    -        this.data = data;
    -
    -        /**
    -         * Name of the file (for documents)
    -         * @type {?string}
    -         */
    -        this.filename = filename;
    -    }
    -
    -    /**
    -     * Creates a MessageMedia instance from a local file path
    -     * @param {string} filePath 
    -     * @returns {MessageMedia}
    -     */
    -    static fromFilePath(filePath) {
    -        const b64data = fs.readFileSync(filePath, {encoding: 'base64'});
    -        const mimetype = mime.getType(filePath); 
    -        const filename = path.basename(filePath);
    -
    -        return new MessageMedia(mimetype, b64data, filename);
    -    }
    -}
    -
    -module.exports = MessageMedia;
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/structures_PrivateChat.js.html b/whatsapp-web.js/docs/structures_PrivateChat.js.html deleted file mode 100644 index 4b0236e..0000000 --- a/whatsapp-web.js/docs/structures_PrivateChat.js.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: structures/PrivateChat.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -const Chat = require('./Chat');
    -
    -/**
    - * Represents a Private Chat on WhatsApp
    - * @extends {Chat}
    - */
    -class PrivateChat extends Chat {
    -
    -}
    -
    -module.exports = PrivateChat;
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/structures_PrivateContact.js.html b/whatsapp-web.js/docs/structures_PrivateContact.js.html deleted file mode 100644 index f2a62ec..0000000 --- a/whatsapp-web.js/docs/structures_PrivateContact.js.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: structures/PrivateContact.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -const Contact = require('./Contact');
    -
    -/**
    - * Represents a Private Contact on WhatsApp
    - * @extends {Contact}
    - */
    -class PrivateContact extends Contact {
    -
    -}
    -
    -module.exports = PrivateContact;
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/util_Constants.js.html b/whatsapp-web.js/docs/util_Constants.js.html deleted file mode 100644 index 0890487..0000000 --- a/whatsapp-web.js/docs/util_Constants.js.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: util/Constants.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -exports.WhatsWebURL = 'https://web.whatsapp.com/';
    -
    -exports.UserAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36';
    -
    -exports.DefaultOptions = {
    -    puppeteer: {
    -        headless: true,
    -        defaultViewport: null
    -    },
    -    session: false,
    -    qrTimeoutMs: 45000,
    -    qrRefreshIntervalMs: 20000,
    -    authTimeoutMs: 45000,
    -    takeoverOnConflict: false,
    -    takeoverTimeoutMs: 0
    -};
    -
    -/**
    - * Client status
    - * @readonly
    - * @enum {number}
    - */
    -exports.Status = {
    -    INITIALIZING: 0,
    -    AUTHENTICATING: 1,
    -    READY: 3
    -};
    -
    -/**
    - * Events that can be emitted by the client
    - * @readonly
    - * @enum {string}
    - */
    -exports.Events = {
    -    AUTHENTICATED: 'authenticated',
    -    AUTHENTICATION_FAILURE: 'auth_failure',
    -    READY: 'ready',
    -    MESSAGE_RECEIVED: 'message',
    -    MESSAGE_CREATE: 'message_create',
    -    MESSAGE_REVOKED_EVERYONE: 'message_revoke_everyone',
    -    MESSAGE_REVOKED_ME: 'message_revoke_me',
    -    MESSAGE_ACK: 'message_ack',
    -    MEDIA_UPLOADED: 'media_uploaded',
    -    GROUP_JOIN: 'group_join',
    -    GROUP_LEAVE: 'group_leave',
    -    GROUP_UPDATE: 'group_update',
    -    QR_RECEIVED: 'qr',
    -    DISCONNECTED: 'disconnected',
    -    STATE_CHANGED: 'change_state',
    -    BATTERY_CHANGED: 'change_battery'
    -};
    -
    -/**
    - * Message types
    - * @readonly
    - * @enum {string}
    - */
    -exports.MessageTypes = {
    -    TEXT: 'chat',
    -    AUDIO: 'audio',
    -    VOICE: 'ptt',
    -    IMAGE: 'image',
    -    VIDEO: 'video',
    -    DOCUMENT: 'document',
    -    STICKER: 'sticker',
    -    LOCATION: 'location',
    -    CONTACT_CARD: 'vcard',
    -    CONTACT_CARD_MULTI: 'multi_vcard',
    -    REVOKED: 'revoked',
    -    UNKNOWN: 'unknown'
    -};
    -
    -/**
    - * Group notification types
    - * @readonly
    - * @enum {string}
    - */
    -exports.GroupNotificationTypes = {
    -    ADD: 'add',
    -    INVITE: 'invite',
    -    REMOVE: 'remove',
    -    LEAVE: 'leave',
    -    SUBJECT: 'subject',
    -    DESCRIPTION: 'description',
    -    PICTURE: 'picture',
    -    ANNOUNCE: 'announce',
    -    RESTRICT: 'restrict',
    -};
    -
    -/**
    - * Chat types
    - * @readonly
    - * @enum {string}
    - */
    -exports.ChatTypes = {
    -    SOLO: 'solo',
    -    GROUP: 'group',
    -    UNKNOWN: 'unknown'
    -};
    -
    -/**
    - * WhatsApp state
    - * @readonly
    - * @enum {string}
    - */
    -exports.WAState = {
    -    CONFLICT: 'CONFLICT',
    -    CONNECTED: 'CONNECTED',
    -    DEPRECATED_VERSION: 'DEPRECATED_VERSION',
    -    OPENING: 'OPENING',
    -    PAIRING: 'PAIRING',
    -    PROXYBLOCK: 'PROXYBLOCK',
    -    SMB_TOS_BLOCK: 'SMB_TOS_BLOCK',
    -    TIMEOUT: 'TIMEOUT',
    -    TOS_BLOCK: 'TOS_BLOCK',
    -    UNLAUNCHED: 'UNLAUNCHED',
    -    UNPAIRED: 'UNPAIRED',
    -    UNPAIRED_IDLE: 'UNPAIRED_IDLE'
    -};
    -
    -/**
    - * Message ACK
    - * @readonly
    - * @enum {number}
    - */
    -exports.MessageAck = {
    -    ACK_ERROR: -1,
    -    ACK_PENDING: 0,
    -    ACK_SERVER: 1,
    -    ACK_DEVICE: 2,
    -    ACK_READ: 3,
    -    ACK_PLAYED: 4,
    -};
    -
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/util_InterfaceController.js.html b/whatsapp-web.js/docs/util_InterfaceController.js.html deleted file mode 100644 index 43c9006..0000000 --- a/whatsapp-web.js/docs/util_InterfaceController.js.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: util/InterfaceController.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -/**
    - * Interface Controller
    - */
    -class InterfaceController {
    -
    -    constructor(props) {
    -        this.pupPage = props.pupPage;
    -    }
    -
    -    /**
    -     * Opens the Chat Window
    -     * @param {string} chatId ID of the chat window that will be opened
    -     */
    -    async openChatWindow(chatId) {
    -        await this.pupPage.evaluate(async chatId => {
    -            let chat = await window.Store.Chat.get(chatId);
    -            await window.Store.Cmd.openChatAt(chat);
    -        }, chatId);
    -    }
    -
    -    /**
    -     * Opens the Chat Drawer
    -     * @param {string} chatId ID of the chat drawer that will be opened
    -     */
    -    async openChatDrawer(chatId) {
    -        await this.pupPage.evaluate(async chatId => {
    -            let chat = await window.Store.Chat.get(chatId);
    -            await window.Store.Cmd.chatInfoDrawer(chat);
    -        }, chatId);
    -    }
    -
    -    /**
    -     * Opens the Message Drawer
    -     * @param {string} msgId ID of the message drawer that will be opened
    -     */
    -    async openMessageDrawer(msgId) {
    -        await this.pupPage.evaluate(async msgId => {
    -            let msg = await window.Store.Msg.get(msgId);
    -            await window.Store.Cmd.msgInfoDrawer(msg);
    -        }, msgId);
    -    }
    -
    -    /**
    -     * Closes the Right Drawer
    -     */
    -    async closeRightDrawer() {
    -        await this.pupPage.evaluate(async () => {
    -            await window.Store.Cmd.closeDrawerRight();
    -        });
    -    }
    -    
    -}
    -
    -module.exports = InterfaceController;
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/docs/util_Util.js.html b/whatsapp-web.js/docs/util_Util.js.html deleted file mode 100644 index 642044b..0000000 --- a/whatsapp-web.js/docs/util_Util.js.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - whatsapp-web.js 1.7.0 » Source: util/Util.js - - - - - - - - -
    -
    -
    - -
    - -
    -
    'use strict';
    -
    -const has = (o, k) => Object.prototype.hasOwnProperty.call(o, k);
    -
    -/**
    - * Utility methods
    - */
    -class Util {
    -
    -    constructor() {
    -        throw new Error(`The ${this.constructor.name} class may not be instantiated.`);
    -    }
    -
    -    /**
    -     * Sets default properties on an object that aren't already specified.
    -     * @param {Object} def Default properties
    -     * @param {Object} given Object to assign defaults to
    -     * @returns {Object}
    -     * @private
    -     */
    -    static mergeDefault(def, given) {
    -        if (!given) return def;
    -        for (const key in def) {
    -            if (!has(given, key) || given[key] === undefined) {
    -                given[key] = def[key];
    -            } else if (given[key] === Object(given[key])) {
    -                given[key] = Util.mergeDefault(def[key], given[key]);
    -            }
    -        }
    -
    -        return given;
    -    }
    -}
    -
    -module.exports = Util;
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - \ No newline at end of file diff --git a/whatsapp-web.js/example.js b/whatsapp-web.js/example.js deleted file mode 100644 index c495e80..0000000 --- a/whatsapp-web.js/example.js +++ /dev/null @@ -1,255 +0,0 @@ -const fs = require('fs'); -const { Client, Location } = require('./index'); - -const SESSION_FILE_PATH = './session.json'; -let sessionCfg; -if (fs.existsSync(SESSION_FILE_PATH)) { - sessionCfg = require(SESSION_FILE_PATH); -} - -const client = new Client({ puppeteer: { headless: false }, session: sessionCfg }); -// You can use an existing session and avoid scanning a QR code by adding a "session" object to the client options. -// This object must include WABrowserId, WASecretBundle, WAToken1 and WAToken2. - -client.initialize(); - -client.on('qr', (qr) => { - // NOTE: This event will not be fired if a session is specified. - console.log('QR RECEIVED', qr); -}); - -client.on('authenticated', (session) => { - console.log('AUTHENTICATED', session); - sessionCfg=session; - fs.writeFile(SESSION_FILE_PATH, JSON.stringify(session), function (err) { - if (err) { - console.error(err); - } - }); -}); - -client.on('auth_failure', msg => { - // Fired if session restore was unsuccessfull - console.error('AUTHENTICATION FAILURE', msg); -}); - -client.on('ready', () => { - console.log('READY'); -}); - -client.on('message', async msg => { - console.log('MESSAGE RECEIVED', msg); - - if (msg.body == '!ping reply') { - // Send a new message as a reply to the current one - msg.reply('pong'); - - } else if (msg.body == '!ping') { - // Send a new message to the same chat - client.sendMessage(msg.from, 'pong'); - - } else if (msg.body.startsWith('!sendto ')) { - // Direct send a new message to specific id - let number = msg.body.split(' ')[1]; - let messageIndex = msg.body.indexOf(number) + number.length; - let message = msg.body.slice(messageIndex, msg.body.length); - number = number.includes('@c.us') ? number : `${number}@c.us`; - let chat = await msg.getChat(); - chat.sendSeen(); - client.sendMessage(number, message); - - } else if (msg.body.startsWith('!subject ')) { - // Change the group subject - let chat = await msg.getChat(); - if (chat.isGroup) { - let newSubject = msg.body.slice(9); - chat.setSubject(newSubject); - } else { - msg.reply('This command can only be used in a group!'); - } - } else if (msg.body.startsWith('!echo ')) { - // Replies with the same message - msg.reply(msg.body.slice(6)); - } else if (msg.body.startsWith('!desc ')) { - // Change the group description - let chat = await msg.getChat(); - if (chat.isGroup) { - let newDescription = msg.body.slice(6); - chat.setDescription(newDescription); - } else { - msg.reply('This command can only be used in a group!'); - } - } else if (msg.body == '!leave') { - // Leave the group - let chat = await msg.getChat(); - if (chat.isGroup) { - chat.leave(); - } else { - msg.reply('This command can only be used in a group!'); - } - } else if (msg.body.startsWith('!join ')) { - const inviteCode = msg.body.split(' ')[1]; - try { - await client.acceptInvite(inviteCode); - msg.reply('Joined the group!'); - } catch (e) { - msg.reply('That invite code seems to be invalid.'); - } - } else if (msg.body == '!groupinfo') { - let chat = await msg.getChat(); - if (chat.isGroup) { - msg.reply(` - *Group Details* - Name: ${chat.name} - Description: ${chat.description} - Created At: ${chat.createdAt.toString()} - Created By: ${chat.owner.user} - Participant count: ${chat.participants.length} - `); - } else { - msg.reply('This command can only be used in a group!'); - } - } else if (msg.body == '!chats') { - const chats = await client.getChats(); - client.sendMessage(msg.from, `The bot has ${chats.length} chats open.`); - } else if (msg.body == '!info') { - let info = client.info; - client.sendMessage(msg.from, ` - *Connection info* - User name: ${info.pushname} - My number: ${info.me.user} - Platform: ${info.platform} - WhatsApp version: ${info.phone.wa_version} - `); - } else if (msg.body == '!mediainfo' && msg.hasMedia) { - const attachmentData = await msg.downloadMedia(); - msg.reply(` - *Media info* - MimeType: ${attachmentData.mimetype} - Filename: ${attachmentData.filename} - Data (length): ${attachmentData.data.length} - `); - } else if (msg.body == '!quoteinfo' && msg.hasQuotedMsg) { - const quotedMsg = await msg.getQuotedMessage(); - - quotedMsg.reply(` - ID: ${quotedMsg.id._serialized} - Type: ${quotedMsg.type} - Author: ${quotedMsg.author || quotedMsg.from} - Timestamp: ${quotedMsg.timestamp} - Has Media? ${quotedMsg.hasMedia} - `); - } else if (msg.body == '!resendmedia' && msg.hasQuotedMsg) { - const quotedMsg = await msg.getQuotedMessage(); - if (quotedMsg.hasMedia) { - const attachmentData = await quotedMsg.downloadMedia(); - client.sendMessage(msg.from, attachmentData, { caption: 'Here\'s your requested media.' }); - } - } else if (msg.body == '!location') { - msg.reply(new Location(37.422, -122.084, 'Googleplex\nGoogle Headquarters')); - } else if (msg.location) { - msg.reply(msg.location); - } else if (msg.body.startsWith('!status ')) { - const newStatus = msg.body.split(' ')[1]; - await client.setStatus(newStatus); - msg.reply(`Status was updated to *${newStatus}*`); - } else if (msg.body == '!mention') { - const contact = await msg.getContact(); - const chat = await msg.getChat(); - chat.sendMessage(`Hi @${contact.number}!`, { - mentions: [contact] - }); - } else if (msg.body == '!delete' && msg.hasQuotedMsg) { - const quotedMsg = await msg.getQuotedMessage(); - if (quotedMsg.fromMe) { - quotedMsg.delete(true); - } else { - msg.reply('I can only delete my own messages'); - } - } else if (msg.body === '!archive') { - const chat = await msg.getChat(); - chat.archive(); - } else if (msg.body === '!mute') { - const chat = await msg.getChat(); - // mute the chat for 20 seconds - const unmuteDate = new Date(); - unmuteDate.setSeconds(unmuteDate.getSeconds() + 20); - await chat.mute(unmuteDate); - } else if (msg.body === '!typing') { - const chat = await msg.getChat(); - // simulates typing in the chat - chat.sendStateTyping(); - } else if (msg.body === '!recording') { - const chat = await msg.getChat(); - // simulates recording audio in the chat - chat.sendStateRecording(); - } else if (msg.body === '!clearstate') { - const chat = await msg.getChat(); - // stops typing or recording in the chat - chat.clearState(); - } -}); - -client.on('message_create', (msg) => { - // Fired on all message creations, including your own - if (msg.fromMe) { - // do stuff here - } -}); - -client.on('message_revoke_everyone', async (after, before) => { - // Fired whenever a message is deleted by anyone (including you) - console.log(after); // message after it was deleted. - if (before) { - console.log(before); // message before it was deleted. - } -}); - -client.on('message_revoke_me', async (msg) => { - // Fired whenever a message is only deleted in your own view. - console.log(msg.body); // message before it was deleted. -}); - -client.on('message_ack', (msg, ack) => { - /* - == ACK VALUES == - ACK_ERROR: -1 - ACK_PENDING: 0 - ACK_SERVER: 1 - ACK_DEVICE: 2 - ACK_READ: 3 - ACK_PLAYED: 4 - */ - - if(ack == 3) { - // The message was read - } -}); - -client.on('group_join', (notification) => { - // User has joined or been added to the group. - console.log('join', notification); - notification.reply('User joined.'); -}); - -client.on('group_leave', (notification) => { - // User has left or been kicked from the group. - console.log('leave', notification); - notification.reply('User left.'); -}); - -client.on('group_update', (notification) => { - // Group picture, subject or description has been updated. - console.log('update', notification); -}); - -client.on('change_battery', (batteryInfo) => { - // Battery percentage for attached device has changed - const { battery, plugged } = batteryInfo; - console.log(`Battery: ${battery}% - Charging? ${plugged}`); -}); - -client.on('disconnected', (reason) => { - console.log('Client was logged out', reason); -}); - diff --git a/whatsapp-web.js/hello.js b/whatsapp-web.js/hello.js deleted file mode 100644 index 0e70241..0000000 --- a/whatsapp-web.js/hello.js +++ /dev/null @@ -1,419 +0,0 @@ -const fs = require('fs'); -const { Client, Location } = require('./index'); -const MessageMedia = require('./src/structures/MessageMedia'); - -const SESSION_FILE_PATH = './session.json'; -let sessionCfg; -if (fs.existsSync(SESSION_FILE_PATH)) { - sessionCfg = require(SESSION_FILE_PATH); -} -let Parser = require('rss-parser'); -let parser = new Parser(); - -let quote = -[ -"If you want to achieve greatness stop asking for permission." , -"Things work out best for those who make the best of how things work out.", -"To live a creative life, we must lose our fear of being wrong.", -"If you are not willing to risk the usual you will have to settle for the ordinary." , -"Trust because you are willing to accept the risk, not because it's safe or certain.", -"Take up one idea. Make that one idea your life--think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone. This is the way to success.", -"All our dreams can come true if we have the courage to pursue them.", -"Good things come to people who wait, but better things come to those who go out and get them.", -"If you do what you always did, you will get what you always got." , -"Success is walking from failure to failure with no loss of enthusiasm.", -"Just when the caterpillar thought the world was ending, he turned into a butterfly.", -"Successful entrepreneurs are givers and not takers of positive energy." , -"Whenever you see a successful person you only see the public glories, never the private sacrifices to reach them.", -"Opportunities don't happen, you create them." , -"Try not to become a person of success, but rather try to become a person of value." , -"Great minds discuss ideas; average minds discuss events; small minds discuss people." , -"I have not failed. I've just found 10,000 ways that won't work." , -"If you don't value your time, neither will others. Stop giving away your time and talents--start charging for it." , -"A successful man is one who can lay a firm foundation with the bricks others have thrown at him." , - "No one can make you feel inferior without your consent." , - "The whole secret of a successful life is to find out what is one's destiny to do, and then do it." , - "If you're going through hell keep going." , - "The ones who are crazy enough to think they can change the world, are the ones who do." , - "Don't raise your voice, improve your argument." , - "What seems to us as bitter trials are often blessings in disguise.", - "The meaning of life is to find your gift. The purpose of life is to give it away." , - "The distance between insanity and genius is measured only by success.", - "When you stop chasing the wrong things, you give the right things a chance to catch you." , - "I believe that the only courage anybody ever needs is the courage to follow your own dreams." , - "No masterpiece was ever created by a lazy artist." , - "Happiness is a butterfly, which when pursued, is always beyond your grasp, but which, if you will sit down quietly, may alight upon you.", - "If you can't explain it simply, you don't understand it well enough." , - "Blessed are those who can give without remembering and take without forgetting." , - "Do one thing every day that scares you." , - "What's the point of being alive if you don't at least try to do something remarkable." , - "Life is not about finding yourself. Life is about creating yourself." , - "Nothing in the world is more common than unsuccessful people with talent." , - "Knowledge is being aware of what you can do. Wisdom is knowing when not to do it." , - "Your problem isn't the problem. Your reaction is the problem." , - "You can do anything, but not everything.", - "Innovation distinguishes between a leader and a follower." , - "There are two types of people who will tell you that you cannot make a difference in this world: those who are afraid to try and those who are afraid you will succeed." , - "Thinking should become your capital asset, no matter whatever ups and downs you come across in your life." , - "I find that the harder I work, the more luck I seem to have." , - "The starting point of all achievement is desire." , - "Success is the sum of small efforts, repeated day-in and day-out." , - "If you want to achieve excellence, you can get there today. As of this second, quit doing less-than-excellent work." , - "All progress takes place outside the comfort zone." , - "You may only succeed if you desire succeeding; you may only fail if you do not mind failing." , - "Courage is resistance to fear, mastery of fear--not absence of fear." , - "Only put off until tomorrow what you are willing to die having left undone." , - "People often say that motivation doesn't last. Well, neither does bathing--that's why we recommend it daily." , - "We become what we think about most of the time, and that's the strangest secret." , - "The only place where success comes before work is in the dictionary." , - "Too many of us are not living our dreams because we are living our fears. " , - "I find that when you have a real interest in life and a curious life, that sleep is not the most important thing." , - "It's not what you look at that matters, it's what you see.", - "The road to success and the road to failure are almost exactly the same." , - "The function of leadership is to produce more leaders, not more followers." , - "Success is liking yourself, liking what you do, and liking how you do it." , - "As we look ahead into the next century, leaders will be those who empower others." , - "A real entrepreneur is somebody who has no safety net underneath them." , - "The first step toward success is taken when you refuse to be a captive of the environment in which you first find yourself." , - "People who succeed have momentum. The more they succeed, the more they want to succeed, and the more they find a way to succeed. Similarly, when someone is failing, the tendency is to get on a downward spiral that can even become a self-fulfilling prophecy." , - "When I dare to be powerful, to use my strength in the service of my vision, then it becomes less and less important whether I am afraid." , - "Whenever you find yourself on the side of the majority, it is time to pause and reflect.", - "The successful warrior is the average man, with laser-like focus." , - "There is no traffic jam along the extra mile." , - "Develop success from failures. Discouragement and failure are two of the surest stepping stones to success." , - "If you don't design your own life plan, chances are you'll fall into someone else's plan. And guess what they have planned for you? Not much." , - "If you genuinely want something, don't wait for it--teach yourself to be impatient." , - "Don't let the fear of losing be greater than the excitement of winning." , - "If you want to make a permanent change, stop focusing on the size of your problems and start focusing on the size of you!" , - "You can't connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something--your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life." , - "Two roads diverged in a wood and I took the one less traveled by, and that made all the difference." , - "The number one reason people fail in life is because they listen to their friends, family, and neighbors." , - "The reason most people never reach their goals is that they don't define them, or ever seriously consider them as believable or achievable. Winners can tell you where they are going, what they plan to do along the way, and who will be sharing the adventure with them." , - "In my experience, there is only one motivation, and that is desire. No reasons or principle contain it or stand against it." , - "Success does not consist in never making mistakes but in never making the same one a second time." , - "I don't want to get to the end of my life and find that I lived just the length of it. I want to have lived the width of it as well." , - "You must expect great things of yourself before you can do them." , - "Motivation is what gets you started. Habit is what keeps you going." , - "People rarely succeed unless they have fun in what they are doing." , - "There is no chance, no destiny, no fate, that can hinder or control the firm resolve of a determined soul." , - "Our greatest fear should not be of failure but of succeeding at things in life that don't really matter." , - "You've got to get up every morning with determination if you're going to go to bed with satisfaction." , - "A goal is not always meant to be reached; it often serves simply as something to aim at." , - "Success is ... knowing your purpose in life, growing to reach your maximum potential, and sowing seeds that benefit others." , - "Be miserable. Or motivate yourself. Whatever has to be done, it's always your choice." , - "To accomplish great things, we must not only act, but also dream, not only plan, but also believe." , - "Most of the important things in the world have been accomplished by people who have kept on trying when there seemed to be no help at all." , - "You measure the size of the accomplishment by the obstacles you had to overcome to reach your goals." , - "Real difficulties can be overcome; it is only the imaginary ones that are unconquerable.", - "It is better to fail in originality than to succeed in imitation." , - "What would you do if you weren't afraid." , - "Little minds are tamed and subdued by misfortune; but great minds rise above it.", - "Failure is the condiment that gives success its flavor." , - "Don't let what you cannot do interfere with what you can do." , - "You may have to fight a battle more than once to win it." , - "A man can be as great as he wants to be. If you believe in yourself and have the courage, the determination, the dedication, the competitive drive and if you are willing to sacrifice the little things in life and pay the price for the things that are worthwhile, it can be done."] - -let meme = new Array(); -meme.push("memes/meme1.png"); -meme.push("memes/meme2.png"); -meme.push("memes/meme3.png"); -meme.push("memes/meme4.png"); -meme.push("memes/meme5.png"); -meme.push("memes/meme6.png"); -meme.push("memes/meme7.png"); -meme.push("memes/meme8.png"); -meme.push("memes/meme9.png"); -meme.push("memes/meme10.png"); -meme.push("memes/meme11.png"); -meme.push("memes/meme12.png"); -meme.push("memes/meme13.png"); -meme.push("memes/meme14.png"); -meme.push("memes/meme15.png"); -meme.push("memes/meme16.png"); -meme.push("memes/meme17.png"); -meme.push("memes/meme18.png"); -meme.push("memes/meme19.png"); -meme.push("memes/meme20.png"); - -let memeCaption = new Array(); -memeCaption.push('Programmers know the risks involved!'); -memeCaption.push('LMAO'); -memeCaption.push('C++ Cheater'); -memeCaption.push('Quality "Assurance"'); -memeCaption.push('I am the IT department'); -memeCaption.push('Stacking if else statements be like'); -memeCaption.push('Big brain game'); -memeCaption.push('Damn those race conditions!'); -memeCaption.push('Did any body done this?'); -memeCaption.push('Someone please pick this Jira ticket'); -memeCaption.push('Just family tech support things'); -memeCaption.push('IT department'); -memeCaption.push('I should have written this with the switch statement'); -memeCaption.push('When the world tells you to stay indoors and work remotely'); -memeCaption.push('Increment'); -memeCaption.push('Catbugging'); -memeCaption.push('True Happiness'); -memeCaption.push('Why is my function not outputting anything'); -memeCaption.push('Thats how you TRAIN'); -memeCaption.push('Really need this super powerful computer!'); - -const client = new Client({ puppeteer: { headless: false }, session: sessionCfg }); -client.initialize(); -client.on('qr', (qr) => { - console.log('QR RECEIVED', qr); -}); - -client.on('authenticated', (session) => { - console.log('AUTHENTICATED', session); - sessionCfg=session; - fs.writeFile(SESSION_FILE_PATH, JSON.stringify(session), function (err) { - if (err) { - console.error(err); - } - }); -}); -client.on('auth_failure', msg => { - console.error('AUTHENTICATION FAILURE', msg); -}); -client.on('ready', () => { - console.log('READY'); -}); -client.on('message', async msg => { - console.log('MESSAGE RECEIVED', msg); - if (msg.body == '!spam') { - for(i =0;i < 20;i++) - { - client.sendMessage(msg.from,"Sorry for the Spam!"); - } - } - if (msg.body == '!hello') { - msg.reply('Hello World!'); - } - - if (msg.body == '!test') { - const attachmentData = new MessageMedia('image/png',fs.readFileSync('memes/meme1.png','base64'),'meme.png'); - console.log(attachmentData); - client.sendMessage(msg.from, attachmentData, { caption: 'Programmers know the risks involved!' }); - } - if (msg.body == '!meme') { - let num = Math.floor(Math.random() * meme.length); - var memePath = meme[num]; - meme.splice(num,1); - var memeCap = memeCaption[num]; - memeCaption.splice(num,1); - const attachmentData = new MessageMedia('image/png',fs.readFileSync(memePath,'base64'),'meme.png'); - console.log(attachmentData); - client.sendMessage(msg.from, attachmentData, { caption: memeCap }); - } - if (msg.body == '!q') { - let num = Math.floor(Math.random() * quote.length); - var q = quote[num]; - quote.splice(num,1); - msg.reply(q); - } - else if (msg.body == '!groupinfo') { - let chat = await msg.getChat(); - if (chat.isGroup) { - msg.reply(` - *Group Details* - Name: ${chat.name} - Description: ${chat.description} - Created At: ${chat.createdAt.toString()} - Created By: ${chat.owner.user} - Participant count: ${chat.participants.length} - `); - } else { - msg.reply('This command can only be used in a group!'); - } - } else if (msg.body == '!chats') { - const chats = await client.getChats(); - client.sendMessage(msg.from, `The bot has ${chats.length} chats open.`); - } else if (msg.body == '!info') { - let info = client.info; - client.sendMessage(msg.from, ` - *Connection info* - User name: ${info.pushname} - My number: ${info.me.user} - Platform: ${info.platform} - WhatsApp version: ${info.phone.wa_version} - `); - } else if (msg.body == '!mediainfo' && msg.hasMedia) { - const attachmentData = await msg.downloadMedia(); - msg.reply(` - *Media info* - MimeType: ${attachmentData.mimetype} - Filename: ${attachmentData.filename} - Data (length): ${attachmentData.data.length} - `); - } else if (msg.body == '!quoteinfo' && msg.hasQuotedMsg) { - const quotedMsg = await msg.getQuotedMessage(); - - quotedMsg.reply(` - ID: ${quotedMsg.id._serialized} - Type: ${quotedMsg.type} - Author: ${quotedMsg.author || quotedMsg.from} - Timestamp: ${quotedMsg.timestamp} - Has Media? ${quotedMsg.hasMedia} - `); - } else if (msg.body == '!resendmedia' && msg.hasQuotedMsg) { - const quotedMsg = await msg.getQuotedMessage(); - if (quotedMsg.hasMedia) { - const attachmentData = await quotedMsg.downloadMedia(); - client.sendMessage(msg.from, attachmentData, { caption: 'Here\'s your requested media.' }); - } - } else if (msg.body == '!location') { - msg.reply(new Location(37.422, -122.084, 'Googleplex\nGoogle Headquarters')); - } else if (msg.location) { - msg.reply(msg.location); - } else if (msg.body.startsWith('!status ')) { - const newStatus = msg.body.split(' ')[1]; - await client.setStatus(newStatus); - msg.reply(`Status was updated to *${newStatus}*`); - } else if (msg.body == '!mention') { - const contact = await msg.getContact(); - const chat = await msg.getChat(); - chat.sendMessage(`Hi @${contact.number}!`, { - mentions: [contact] - }); - } else if (msg.body == '!delete' && msg.hasQuotedMsg) { - const quotedMsg = await msg.getQuotedMessage(); - if (quotedMsg.fromMe) { - quotedMsg.delete(true); - } else { - msg.reply('I can only delete my own messages'); - } - } else if (msg.body === '!archive') { - const chat = await msg.getChat(); - chat.archive(); - } else if (msg.body === '!typing') { - const chat = await msg.getChat(); - // simulates typing in the chat - chat.sendStateTyping(); - } else if (msg.body === '!recording') { - const chat = await msg.getChat(); - // simulates recording audio in the chat - chat.sendStateRecording(); - } else if (msg.body === '!clearstate') { - const chat = await msg.getChat(); - // stops typing or recording in the chat - chat.clearState(); - } else if(msg.body === '!n') - { - (async () => { - let feed = await parser.parseURL('https://www.reddit.com/.rss'); - let feedTop = await parser.parseURL('https://gulfnews.com/rss/?generatorName=mrss&uuid=5bd9758c-9198-40ac-8d81-1e38745d5485'); - let feedUAE = await parser.parseURL('https://gulfnews.com/rss/?generatorName=mrss&categories=UAE,Education,Crime,Government,Health,Weather,Transport,Science,Environment'); - let feedBusiness = await parser.parseURL('https://gulfnews.com/rss/?generatorName=mrss&categories=Business,Banking,Aviation,Property,Energy,Analysis,Tourism,Markets,Retail,Personal-Finance,Podcast'); - let feedSport = await parser.parseURL('https://gulfnews.com/rss/?generatorName=mrss&categories=Sport,UAE-Sport,Horse-Racing,Cricket,IPL,ICC,Football,Motorsport,Tennis,Golf,Rugby'); - let feedVideo = await parser.parseURL('https://gulfnews.com/rss/?generatorName=mrss&categories=Videos,Best-Of-Bollywood,news-video'); - let feedEntertainment = await parser.parseURL('https://gulfnews.com/rss/?generatorName=mrss&categories=Entertainment,HollyWood,BollyWood,Pakistani-Cinema,Pinoy-Celebs,South-Indian,Arab-Celebs,Music,TV,Books,Theatre,Arts-Culture'); - let feedOpinion = await parser.parseURL('https://gulfnews.com/rss/?generatorName=mrss&categories=Opinion,Editorials,Op-Eds'); - let feedWorld = await parser.parseURL('https://gulfnews.com/rss/?generatorName=mrss&categories=World,Europe,Asia,India,Pakistan,Philipines,Oceania,Americas,Africa'); - let feedGoingOut = await parser.parseURL('https://gulfnews.com/rss/?generatorName=mrss&categories=Going-out,Bars-Clubs,Movie-Reviews,Movie-Trailers,Restaurants,Events,Society'); - let feedTravel = await parser.parseURL('https://gulfnews.com/rss/?generatorName=mrss&categories=Travel,Advice,Destinations,Hotels'); - let feedTech = await parser.parseURL('https://gulfnews.com/rss/?generatorName=mrss&categories=Technology,Consumer-Electronics,Gaming,Trends,Fin-Tech,Companies,Media'); - let feedHowTo = await parser.parseURL('https://gulfnews.com/rss/?generatorName=mrss&categories=How-To,Employment,Housing,Passports-Visa,Your-Money,Legal'); - const keyword = msg.body.split(' ')[1]; - console.log(feed.title); - feed.items.forEach(item => { - if(item.title.includes(keyword),0) - { - msg.reply(item.title + ':' + item.link); - } - }); - feedTop.items.forEach(item => { - if(item.title.includes(keyword),0) - { - msg.reply(item.title + ':' + item.link); - } - }); - feedUAE.items.forEach(item => { - if(item.title.includes(keyword),0) - { - msg.reply(item.title + ':' + item.link); - } - }); - feedBusiness.items.forEach(item => { - if(item.title.includes(keyword),0) - { - msg.reply(item.title + ':' + item.link); - } - }); - feedSport.items.forEach(item => { - if(item.title.includes(keyword),0) - { - msg.reply(item.title + ':' + item.link); - } - }); - feedVideo.items.forEach(item => { - if(item.title.includes(keyword),0) - { - msg.reply(item.title + ':' + item.link); - } - }); - feedEntertainment.items.forEach(item => { - if(item.title.includes(keyword),0) - { - msg.reply(item.title + ':' + item.link); - } - }); - feedOpinion.items.forEach(item => { - if(item.title.includes(keyword),0) - { - msg.reply(item.title + ':' + item.link); - } - }); - feedWorld.items.forEach(item => { - if(item.title.includes(keyword),0) - { - msg.reply(item.title + ':' + item.link); - } - }); - feedGoingOut.items.forEach(item => { - if(item.title.includes(keyword),0) - { - msg.reply(item.title + ':' + item.link); - } - }); - feedTravel.items.forEach(item => { - if(item.title.includes(keyword),0) - { - msg.reply(item.title + ':' + item.link); - } - }); - feedTech.items.forEach(item => { - if(item.title.includes(keyword),0) - { - msg.reply(item.title + ':' + item.link); - } - }); - feedHowTo.items.forEach(item => { - if(item.title.includes(keyword),0) - { - msg.reply(item.title + ':' + item.link); - } - }); - })(); - } -}); - - - -client.on('group_join', (notification) => { - console.log('join', notification); - notification.reply('User joined.'); -}); - -client.on('group_leave', (notification) => { - console.log('leave', notification); - notification.reply('User left.'); -}); - -client.on('group_update', (notification) => { - console.log('update', notification); -}); - -client.on('disconnected', (reason) => { - console.log('Client was logged out', reason); -}); - diff --git a/whatsapp-web.js/index.d.ts b/whatsapp-web.js/index.d.ts deleted file mode 100644 index fd7014f..0000000 --- a/whatsapp-web.js/index.d.ts +++ /dev/null @@ -1,697 +0,0 @@ - -import { EventEmitter } from 'events' -import puppeteer = require('puppeteer') - -declare namespace WAWebJS { - - export class Client extends EventEmitter { - constructor(options: ClientOptions) - - /** - * Current connection information - * @todo add this in the official docs - */ - public info: ClientInfo - - /**Accepts an invitation to join a group */ - acceptInvite(inviteCode: string): Promise - - /**Returns an object with information about the invite code's group */ - getInviteInfo(inviteCode: string): Promise - - /** Enables and returns the archive state of the Chat */ - archiveChat(): Promise - - /** - * Create a new group - * @param name group title - * @param participants an array of Contacts or contact IDs to add to the group - * - * @todo improve return type in the official docs - */ - createGroup(name: string, participants: Contact[] | string[]): Promise - - /** Closes the client */ - destroy(): Promise - - /** Logs out the client, closing the current session */ - logout(): Promise - - /** Get chat instance by ID */ - getChatById(chatId: string): Promise - - /** Get all current chat instances */ - getChats(): Promise - - /** Get contact instance by ID */ - getContactById(contactId: string): Promise - - /** Get all current contact instances */ - getContacts(): Promise - - /** Returns the contact ID's profile picture URL, if privacy settings allow it */ - getProfilePicUrl(contactId: string): Promise - - /** Gets the current connection state for the client */ - getState(): Promise - - /** Returns the version of WhatsApp Web currently being run */ - getWWebVersion(): Promise - - /** Sets up events and requirements, kicks off authentication request */ - initialize(): Promise - - /** Check if a given ID is registered in whatsapp */ - isRegisteredUser(contactId: string): Promise - - /** - * Mutes the Chat until a specified date - * @param chatId ID of the chat that will be muted - * @param unmuteDate Date when the chat will be unmuted - */ - muteChat(chatId: string, unmuteDate: Date): Promise - - /** Force reset of connection state for the client */ - resetState(): Promise - - /** Send a message to a specific chatId */ - sendMessage(chatId: string, content: MessageContent, options: MessageSendOptions): Promise - - /** Marks the client as online */ - sendPresenceAvailable(): Promise - - /** Mark as seen for the Chat */ - sendSeen(chatId: string): Promise - - /** - * Sets the current user's status message - * @param status New status message - */ - setStatus(status: string): Promise - - /** Changes and returns the archive state of the Chat */ - unarchiveChat(chatId: string): Promise - - /** Unmutes the Chat */ - unmuteChat(chatId: string): Promise - - /** Generic event */ - on(event: string, listener: (...args: any) => void): this - - /** Emitted when there has been an error while trying to restore an existing session */ - on(event: 'auth_failure', listener: (message: string) => void): this - - /** Emitted when authentication is successful */ - on(event: 'authenticated', listener: ( - /** Object containing session information. Can be used to restore the session */ - session: ClientSession - ) => void): this - - /** Emitted when the battery percentage for the attached device changes */ - on(event: 'change_battery', listener: (batteryInfo: BatteryInfo) => void): this - - /** Emitted when the connection state changes */ - on(event: 'change_state', listener: ( - /** the new connection state */ - state: WAState - ) => void): this - - /** Emitted when the client has been disconnected */ - on(event: 'disconnected', listener: ( - /** state that caused the disconnect */ - reason: WAState - ) => void): this - - /** Emitted when a user joins the chat via invite link or is added by an admin */ - on(event: 'group_join', listener: ( - /** GroupNotification with more information about the action */ - notification: GroupNotification - ) => void): this - - /** Emitted when a user leaves the chat or is removed by an admin */ - on(event: 'group_leave', listener: ( - /** GroupNotification with more information about the action */ - notification: GroupNotification - ) => void): this - - /** Emitted when group settings are updated, such as subject, description or picture */ - on(event: 'group_update', listener: ( - /** GroupNotification with more information about the action */ - notification: GroupNotification - ) => void): this - - /** Emitted when media has been uploaded for a message sent by the client */ - on(event: 'media_uploaded', listener: ( - /** The message with media that was uploaded */ - message: Message - ) => void): this - - /** Emitted when a new message is received */ - on(event: 'message', listener: ( - /** The message that was received */ - message: Message - ) => void): this - - /** Emitted when an ack event occurrs on message type */ - on(event: 'message_ack', listener: ( - /** The message that was affected */ - message: Message, - /** The new ACK value */ - ack: MessageAck - ) => void): this - - /** Emitted when a new message is created, which may include the current user's own messages */ - on(event: 'message_create', listener: ( - /** The message that was created */ - message: Message - ) => void): this - - /** Emitted when a message is deleted for everyone in the chat */ - on(event: 'message_revoke_everyone', listener: ( - /** The message that was revoked, in its current state. It will not contain the original message's data */ - message: Message, - /**The message that was revoked, before it was revoked. - * It will contain the message's original data. - * Note that due to the way this data is captured, - * it may be possible that this param will be undefined. */ - revoked_msg?: Message | null - ) => void): this - - /** Emitted when a message is deleted by the current user */ - on(event: 'message_revoke_me', listener: ( - /** The message that was revoked */ - message: Message - ) => void): this - - /** Emitted when the QR code is received */ - on(event: 'qr', listener: ( - /** qr code string - * @example ```1@9Q8tWf6bnezr8uVGwVCluyRuBOJ3tIglimzI5dHB0vQW2m4DQ0GMlCGf,f1/vGcW4Z3vBa1eDNl3tOjWqLL5DpYTI84DMVkYnQE8=,ZL7YnK2qdPN8vKo2ESxhOQ==``` */ - qr: string - ) => void): this - - /** Emitted when the client has initialized and is ready to receive messages */ - on(event: 'ready', listener: () => void): this - } - - /** Current connection information */ - export interface ClientInfo { - /** Current user ID */ - me: ContactId - /** Information about the phone this client is connected to */ - phone: ClientInfoPhone - /** Platform the phone is running on */ - platform: string - /** Name configured to be shown in push notifications */ - pushname: string - - /** Get current battery percentage and charging status for the attached device */ - getBatteryStatus: () => Promise - } - - /** Information about the phone this client is connected to */ - export interface ClientInfoPhone { - /** WhatsApp Version running on the phone */ - wa_version: string - /** OS Version running on the phone (iOS or Android version) */ - os_version: string - /** Device manufacturer */ - device_manufacturer: string - /** Device model */ - device_model: string - /** OS build number */ - os_build_number: string - } - - /** - * Options for initializing the whatsapp client - * @todo add these in the official docs - */ - export interface ClientOptions { - puppeteer?: puppeteer.LaunchOptions - /** Whatsapp session to restore. If not set, will start a new session */ - session?: ClientSession, - /** @default 45000 */ - qrTimeoutMs?: number, - /** @default 20000 */ - qrRefreshIntervalMs?: number, - /** @default 45000 */ - authTimeoutMs?: number, - /** @default false */ - takeoverOnConflict?: boolean, - /** @default 0 */ - takeoverTimeoutMs?: number, - /** @default 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36' */ - userAgent?: string - } - - /** Represents a Whatsapp client session */ - export interface ClientSession { - WABrowserId: string, - WASecretBundle: string, - WAToken1: string, - WAToken2: string, - } - - export interface BatteryInfo { - /** The current battery percentage */ - battery: number, - /** Indicates if the phone is plugged in (true) or not (false) */ - plugged: boolean, - } - - export interface CreateGroupResult { - /** ID for the group that was just created */ - gid: string, - /** participants that were not added to the group. - * Keys represent the ID for participant that was not added and its value is a status code - * that represents the reason why participant could not be added. - * This is usually 403 if the user's privacy settings don't allow you to add them to groups. */ - missingParticipants: Record - } - - export interface GroupNotification { - /** ContactId for the user that produced the GroupNotification */ - author: string, - /** Extra content */ - body: string, - /** ID for the Chat that this groupNotification was sent for */ - chatId: string, - /** ID that represents the groupNotification - * @todo create a more specific type for the id object */ - id: object, - /** Contact IDs for the users that were affected by this GroupNotification */ - recipientIds: string[], - /** Unix timestamp for when the groupNotification was created */ - timestamp: number, - /** GroupNotification type */ - type: GroupNotificationTypes, - - /** Returns the Chat this GroupNotification was sent in */ - getChat: () => Promise, - /** Returns the Contact this GroupNotification was produced by */ - getContact: () => Promise, - /** Returns the Contacts affected by this GroupNotification */ - getRecipients: () => Promise, - /** Sends a message to the same chat this GroupNotification was produced in */ - reply: (content: MessageContent, options: MessageSendOptions) => Promise, - - } - - /** Chat types */ - export enum ChatTypes { - SOLO = 'solo', - GROUP = 'group', - UNKNOWN = 'unknown', - } - - /** Events that can be emitted by the client */ - export enum Events { - AUTHENTICATED = 'authenticated', - AUTHENTICATION_FAILURE = 'auth_failure', - READY = 'ready', - MESSAGE_RECEIVED = 'message', - MESSAGE_CREATE = 'message_create', - MESSAGE_REVOKED_EVERYONE = 'message_revoke_everyone', - MESSAGE_REVOKED_ME = 'message_revoke_me', - MESSAGE_ACK = 'message_ack', - MEDIA_UPLOADED = 'media_uploaded', - GROUP_JOIN = 'group_join', - GROUP_LEAVE = 'group_leave', - GROUP_UPDATE = 'group_update', - QR_RECEIVED = 'qr', - DISCONNECTED = 'disconnected', - STATE_CHANGED = 'change_state', - BATTERY_CHANGED = 'change_battery', - } - - /** Group notification types */ - export enum GroupNotificationTypes { - ADD = 'add', - INVITE = 'invite', - REMOVE = 'remove', - LEAVE = 'leave', - SUBJECT = 'subject', - DESCRIPTION = 'description', - PICTURE = 'picture', - ANNOUNCE = 'announce', - RESTRICT = 'restrict', - } - - /** Message ACK */ - export enum MessageAck { - ACK_ERROR = -1, - ACK_PENDING = 0, - ACK_SERVER = 1, - ACK_DEVICE = 2, - ACK_READ = 3, - ACK_PLAYED = 4, - } - - /** Message types */ - export enum MessageTypes { - TEXT = 'chat', - AUDIO = 'audio', - VOICE = 'ptt', - IMAGE = 'image', - VIDEO = 'video', - DOCUMENT = 'document', - STICKER = 'sticker', - LOCATION = 'location', - CONTACT_CARD = 'vcard', - CONTACT_CARD_MULTI = 'multi_vcard', - REVOKED = 'revoked', - UNKNOWN = 'unknown', - } - - /** Client status */ - export enum Status { - INITIALIZING = 0, - AUTHENTICATING = 1, - READY = 3, - } - - /** WhatsApp state */ - export enum WAState { - CONFLICT = 'CONFLICT', - CONNECTED = 'CONNECTED', - DEPRECATED_VERSION = 'DEPRECATED_VERSION', - OPENING = 'OPENING', - PAIRING = 'PAIRING', - PROXYBLOCK = 'PROXYBLOCK', - SMB_TOS_BLOCK = 'SMB_TOS_BLOCK', - TIMEOUT = 'TIMEOUT', - TOS_BLOCK = 'TOS_BLOCK', - UNLAUNCHED = 'UNLAUNCHED', - UNPAIRED = 'UNPAIRED', - UNPAIRED_IDLE = 'UNPAIRED_IDLE', - } - - /** - * Represents a Message on WhatsApp - * - * @example - * { - * mediaKey: undefined, - * id: { - * fromMe: false, - * remote: `554199999999@c.us`, - * id: '1234567890ABCDEFGHIJ', - * _serialized: `false_554199999999@c.us_1234567890ABCDEFGHIJ` - * }, - * ack: -1, - * hasMedia: false, - * body: 'Hello!', - * type: 'chat', - * timestamp: 1591482682, - * from: `554199999999@c.us`, - * to: `554188888888@c.us`, - * author: undefined, - * isForwarded: false, - * broadcast: false, - * fromMe: false, - * hasQuotedMsg: false, - * location: undefined, - * mentionedIds: [] - * } - */ - export interface Message { - /** ACK status for the message */ - ack: MessageAck, - /** If the message was sent to a group, this field will contain the user that sent the message. */ - author?: string, - /** Message content */ - body: string, - /** Indicates if the message was a broadcast */ - broadcast: boolean, - /** ID for the Chat that this message was sent to, except if the message was sent by the current user */ - from: string, - /** Indicates if the message was sent by the current user */ - fromMe: boolean, - /** Indicates if the message has media available for download */ - hasMedia: boolean, - /** Indicates if the message was sent as a reply to another message */ - hasQuotedMsg: boolean, - /** ID that represents the message */ - id: MessageId, - /** Indicates if the message was forwarded */ - isForwarded: boolean, - /** Location information contained in the message, if the message is type "location" */ - location: Location, - /** MediaKey that represents the sticker 'ID' */ - mediaKey?: string, - /** Indicates the mentions in the message body. */ - mentionedIds: [], - /** Unix timestamp for when the message was created */ - timestamp: number, - /** - * ID for who this message is for. - * If the message is sent by the current user, it will be the Chat to which the message is being sent. - * If the message is sent by another user, it will be the ID for the current user. - */ - to: string, - /** Message type */ - type: string, - - /** Deletes the message from the chat */ - delete: (everyone?: boolean) => Promise, - /** Downloads and returns the attatched message media */ - downloadMedia: () => Promise, - /** Returns the Chat this message was sent in */ - getChat: () => Promise, - /** Returns the Contact this message was sent from */ - getContact: () => Promise, - /** Returns the Contacts mentioned in this message */ - getMentions: () => Promise, - /** Returns the quoted message, if any */ - getQuotedMessage: () => Promise, - /** - * Sends a message as a reply to this message. - * If chatId is specified, it will be sent through the specified Chat. - * If not, it will send the message in the same Chat as the original message was sent. - */ - reply: (content: MessageContent, chatId: string, options: MessageSendOptions) => Promise, - } - - /** ID that represents a message */ - export interface MessageId { - fromMe: boolean, - remote: string, - id: string, - _serialized: string, - } - - export interface Location { - description?: string | null, - latitude: string, - longitude: string, - } - - /** - * Options for sending a message - * @todo add more specific type for the object */ - export type MessageSendOptions = object - - export interface MessageMedia { - data: string, - mimetype: string, - filename?: string | null, - - fromFilePath: (filePath: string) => MessageMedia, - } - - export type MessageContent = string | MessageMedia | Location - - /** - * Represents a Contact on WhatsApp - * - * @example - * { - * id: { - * server: 'c.us', - * user: '554199999999', - * _serialized: `554199999999@c.us` - * }, - * number: '554199999999', - * isBusiness: false, - * isEnterprise: false, - * labels: [], - * name: undefined, - * pushname: 'John', - * sectionHeader: undefined, - * shortName: undefined, - * statusMute: false, - * type: 'in', - * verifiedLevel: undefined, - * verifiedName: undefined, - * isMe: false, - * isUser: true, - * isGroup: false, - * isWAContact: true, - * isMyContact: false - * } - */ - export interface Contact { - /** Contact's phone number */ - number: string, - /** Indicates if the contact is a business contact */ - isBusiness: boolean, - /** ID that represents the contact */ - id: ContactId, - /** Indicates if the contact is an enterprise contact */ - isEnterprise: boolean, - /** Indicates if the contact is a group contact */ - isGroup: boolean, - /** Indicates if the contact is the current user's contact */ - isMe: boolean, - /** Indicates if the number is saved in the current phone's contacts */ - isMyContact: boolean - /** Indicates if the contact is a user contact */ - isUser: boolean, - /** Indicates if the number is registered on WhatsApp */ - isWAContact: boolean, - /** @todo verify labels type. didn't have any documentation */ - labels?: string[], - /** The contact's name, as saved by the current user */ - name?: string, - /** The name that the contact has configured to be shown publically */ - pushname: string, - /** @todo missing documentation */ - sectionHeader: string, - /** A shortened version of name */ - shortName?: string, - /** Indicates if the status from the contact is muted */ - statusMute: boolean, - /** @todo missing documentation */ - type: string, - /** @todo missing documentation */ - verifiedLevel?: undefined, - /** @todo missing documentation */ - verifiedName?: undefined, - - /** Returns the contact's profile picture URL, if privacy settings allow it */ - getProfilePicUrl: () => Promise, - } - - export interface ContactId { - server: string, - user: string, - _serialized: string, - } - - export interface BusinessContact extends Contact { - /** - * The contact's business profile - * @todo add a more specific type for the object - */ - businessProfile: object - } - - export interface PrivateContact extends Contact { - - } - - /** - * Represents a Chat on WhatsApp - * - * @example - * { - * id: { - * server: 'c.us', - * user: '554199999999', - * _serialized: `554199999999@c.us` - * }, - * name: '+55 41 9999-9999', - * isGroup: false, - * isReadOnly: false, - * unreadCount: 6, - * timestamp: 1591484087, - * archived: false - * } - */ - export interface Chat { - /** Indicates if the Chat is archived */ - archived: boolean, - /** ID that represents the chat */ - id: ChatId, - /** Indicates if the Chat is a Group Chat */ - isGroup: boolean, - /** Indicates if the Chat is readonly */ - isReadOnly: boolean, - /** Title of the chat */ - name: string, - /** Unix timestamp for when the chat was created */ - timestamp: number, - /** Amount of messages unread */ - unreadCount: number, - - /** Archives this chat */ - archive: () => Promise, - /** Clears all messages from the chat */ - clearMessages: () => Promise, - /** Stops typing or recording in chat immediately. */ - clearState: () => Promise, - /** Deletes the chat */ - delete: () => Promise, - /** Loads chat messages, sorted from earliest to latest. */ - fetchMessages: (searchOptions: MessageSearchOptions) => Promise, - /** Mutes this chat until a specified date */ - mute: (unmuteDate: Date) => Promise, - /** Send a message to this chat */ - sendMessage: (content: MessageContent, options?: MessageSendOptions) => Promise, - /** Set the message as seen */ - sendSeen: () => Promise, - /** Simulate recording audio in chat. This will last for 25 seconds */ - sendStateRecording: () => Promise, - /** Simulate typing in chat. This will last for 25 seconds. */ - sendStateTyping: () => Promise, - /** un-archives this chat */ - unarchive: () => Promise, - /** Unmutes this chat */ - unmute: () => Promise, - } - - export interface MessageSearchOptions { - /** - * The amount of messages to return. - * Note that the actual number of returned messages may be smaller if there aren't enough messages in the conversation. - * Set this to Infinity to load all messages. - * @default 50 - */ - limit?: number - } - - /** - * Id that represents the chat - * - * @example - * id: { - * server: 'c.us', - * user: '554199999999', - * _serialized: `554199999999@c.us` - * }, - */ - export interface ChatId { - /** - * Whatsapp server domain - * @example `c.us` - */ - server: string, - /** - * User whatsapp number - * @example `554199999999` - */ - user: string, - /** - * Serialized id - * @example `554199999999@c.us` - */ - _serialized: string, - } - - export interface PrivateChat extends Chat { - - } -} - -export = WAWebJS diff --git a/whatsapp-web.js/index.js b/whatsapp-web.js/index.js index a5a6bc2..518bc28 100644 --- a/whatsapp-web.js/index.js +++ b/whatsapp-web.js/index.js @@ -1,19 +1,53 @@ -'use strict'; +const fs = require('fs'); +var request = require('request'); +const { Client } = require('whatsapp-web.js'); +const onMessage = require('./src/userInteraction/messages'); -module.exports = { - Client: require('./src/Client'), + + +const SESSION_FILE_PATH = './session.json'; +let sessionCfg; +if (fs.existsSync(SESSION_FILE_PATH)) +{ + sessionCfg = require(SESSION_FILE_PATH); +} + +const client = new Client({ puppeteer: { headless: false }, session: sessionCfg }); +client.initialize(); + + +client.on('qr', (qr) => +{ + console.log('QR RECEIVED', qr); +}); + +client.on('authenticated', (session) => +{ + console.log('AUTHENTICATED', session); + sessionCfg=session; + fs.writeFile(SESSION_FILE_PATH, JSON.stringify(session), function (err) { + if (err) + { + console.error(err); + } + }); +}); +client.on('auth_failure', (msg) => +{ + console.error('AUTHENTICATION FAILURE', msg); +}); +client.on('ready', () => +{ + console.log('READY'); +}); + +client.on('message', async (msg) => { + + onMessage(msg, client); - version: require('./package.json').version, +}); - // Structures - Chat: require('./src/structures/Chat'), - PrivateChat: require('./src/structures/PrivateChat'), - GroupChat: require('./src/structures/GroupChat'), - Message: require('./src/structures/Message'), - MessageMedia: require('./src/structures/MessageMedia'), - Contact: require('./src/structures/Contact'), - PrivateContact: require('./src/structures/PrivateContact'), - BusinessContact: require('./src/structures/BusinessContact'), - ClientInfo: require('./src/structures/ClientInfo'), - Location: require('./src/structures/Location') -}; \ No newline at end of file +client.on('disconnected', (reason) => +{ + console.log('Client was logged out', reason); +}); diff --git a/whatsapp-web.js/news.js b/whatsapp-web.js/news.js deleted file mode 100644 index c917eb3..0000000 --- a/whatsapp-web.js/news.js +++ /dev/null @@ -1,14 +0,0 @@ -let Parser = require('rss-parser'); -let parser = new Parser(); - -(async () => { - - //let feed = await parser.parseURL('https://www.reddit.com/.rss'); - let feed = await parser.parseURL('https://gulfnews.com/rss/?generatorName=mrss&uuid=5bd9758c-9198-40ac-8d81-1e38745d5485'); - console.log(feed.title); - - feed.items.forEach(item => { - console.log(item.title + ':' + item.link) - }); - -})(); \ No newline at end of file diff --git a/whatsapp-web.js/package-lock.json b/whatsapp-web.js/package-lock.json index 5b7e51f..59cab3b 100644 --- a/whatsapp-web.js/package-lock.json +++ b/whatsapp-web.js/package-lock.json @@ -1,44 +1,18 @@ { - "name": "whatsapp-web.js", - "version": "1.7.0-post", + "name": "whatsapp-web", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { - "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", - "dev": true, - "requires": { - "@babel/highlight": "^7.8.3" - } - }, - "@babel/highlight": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", - "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.4.tgz", - "integrity": "sha512-8jHII4hf+YVDsskTF6WuMB3X4Eh+PsUkC2ljq22so5rHvH+T8BzyL94VOdyFLNR8tBSVXOTbNHOKpR4TfRxVtA==", - "dev": true - }, "@pedroslopez/moduleraid": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@pedroslopez/moduleraid/-/moduleraid-4.1.0.tgz", "integrity": "sha512-+2OYf1IDLhZlOY3QEwGfZJKfM/uPB3lw9zedl3eqEMtod73r1R7TUnmlh8S7hM8uLUcrWXMnJ9TrMbxXeV1pZg==" }, "@types/node": { - "version": "14.0.22", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.22.tgz", - "integrity": "sha512-emeGcJvdiZ4Z3ohbmw93E/64jRzUHAItSHt8nF7M4TGgQTiWqFVGB8KNpLGFmUHmHLvjvBgFwVlqNcq+VuGv9g==", + "version": "14.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.23.tgz", + "integrity": "sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw==", "optional": true }, "@types/yauzl": { @@ -50,33 +24,15 @@ "@types/node": "*" } }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "acorn": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", - "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", - "dev": true - }, - "acorn-jsx": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", - "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", - "dev": true - }, "agent-base": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz", "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==" }, "ajv": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz", - "integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==", + "version": "6.12.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", + "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -84,39 +40,6 @@ "uri-js": "^4.2.2" } }, - "ansi-escapes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", - "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", - "dev": true, - "requires": { - "type-fest": "^0.8.1" - } - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -130,12 +53,6 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true - }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -179,12 +96,6 @@ "readable-stream": "^3.4.0" } }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -208,78 +119,16 @@ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, - "catharsis": { - "version": "0.8.11", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz", - "integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, "chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -288,53 +137,16 @@ "delayed-stream": "~1.0.0" } }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, - "config-chain": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", - "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", - "dev": true, - "requires": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -351,32 +163,11 @@ "ms": "^2.1.1" } }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -386,32 +177,6 @@ "safer-buffer": "^2.1.0" } }, - "editorconfig": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz", - "integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==", - "dev": true, - "requires": { - "commander": "^2.19.0", - "lru-cache": "^4.1.5", - "semver": "^5.6.0", - "sigmund": "^1.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -420,151 +185,11 @@ "once": "^1.4.0" } }, - "entities": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", - "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.3", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - } - }, - "eslint-scope": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", - "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "eslint-visitor-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", - "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", - "dev": true - }, - "espree": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", - "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", - "dev": true, - "requires": { - "acorn": "^7.1.0", - "acorn-jsx": "^5.1.0", - "eslint-visitor-keys": "^1.1.0" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", - "dev": true, - "requires": { - "estraverse": "^4.0.0" - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, "extract-zip": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", @@ -582,21 +207,15 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, "fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", @@ -605,52 +224,6 @@ "pend": "~1.2.0" } }, - "figures": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", - "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", - "dev": true, - "requires": { - "flat-cache": "^2.0.1" - } - }, - "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", - "dev": true, - "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - }, - "dependencies": { - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - } - } - }, - "flatted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", - "dev": true - }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -676,12 +249,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, "get-stream": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", @@ -711,49 +278,6 @@ "path-is-absolute": "^1.0.0" } }, - "glob-parent": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", - "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", - "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", - "dev": true, - "requires": { - "type-fest": "^0.8.1" - } - }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", - "dev": true - }, - "handlebars": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", - "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", - "dev": true, - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - } - }, - "handlebars-layouts": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/handlebars-layouts/-/handlebars-layouts-3.1.4.tgz", - "integrity": "sha1-JrO+uTG0uHffv35v6vQFjuYiiwI=", - "dev": true - }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -768,12 +292,6 @@ "har-schema": "^2.0.0" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -793,42 +311,11 @@ "debug": "4" } }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, "ieee754": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, - "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -843,196 +330,21 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "inquirer": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.4.tgz", - "integrity": "sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^2.4.2", - "cli-cursor": "^3.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.15", - "mute-stream": "0.0.8", - "run-async": "^2.2.0", - "rxjs": "^6.5.3", - "string-width": "^4.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, - "js-beautify": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.11.0.tgz", - "integrity": "sha512-a26B+Cx7USQGSWnz9YxgJNMmML/QG2nqIaL7VVYPCXbqiKz8PN0waSNvroMtvAK6tY7g/wPdNWGEP+JTNIBr6A==", - "dev": true, - "requires": { - "config-chain": "^1.1.12", - "editorconfig": "^0.15.3", - "glob": "^7.1.3", - "mkdirp": "~1.0.3", - "nopt": "^4.0.3" - }, - "dependencies": { - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - } - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "js2xmlparser": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.1.tgz", - "integrity": "sha512-KrPTolcw6RocpYjdC7pL7v62e55q7qOMHvLX1UCLc5AAS8qeJ6nukarEJAF2KL2PZxlbGueEbINqZR2bDe/gUw==", - "dev": true, - "requires": { - "xmlcreate": "^2.0.3" - } - }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, - "jsdoc": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.4.tgz", - "integrity": "sha512-3G9d37VHv7MFdheviDCjUfQoIjdv4TC5zTTf5G9VODLtOnVS6La1eoYBDlbWfsRT3/Xo+j2MIqki2EV12BZfwA==", - "dev": true, - "requires": { - "@babel/parser": "^7.9.4", - "bluebird": "^3.7.2", - "catharsis": "^0.8.11", - "escape-string-regexp": "^2.0.0", - "js2xmlparser": "^4.0.1", - "klaw": "^3.0.0", - "markdown-it": "^10.0.0", - "markdown-it-anchor": "^5.2.7", - "marked": "^0.8.2", - "mkdirp": "^1.0.4", - "requizzle": "^0.2.3", - "strip-json-comments": "^3.1.0", - "taffydb": "2.6.2", - "underscore": "~1.10.2" - }, - "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - } - } - }, - "jsdoc-baseline": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/jsdoc-baseline/-/jsdoc-baseline-0.1.5.tgz", - "integrity": "sha512-bJwd6KRIEeAaazLwDxTM0XN5hG/uPA59omgsfYEJrnqZDZ9w4S7vPK5dRdCyQ/Gaxa5h8bCH4O7dCWW1yTGjtA==", - "dev": true, - "requires": { - "catharsis": "^0.8.11", - "deep-extend": "^0.6.0", - "escape-string-regexp": "^2.0.0", - "handlebars": "^4.4.3", - "handlebars-layouts": "^3.1.4", - "js-beautify": "^1.10.2", - "js-yaml": "^3.13.1", - "lodash": "^4.17.15", - "messageformat": "^2.3.0", - "spdx-license-list": "^6.1.0", - "strip-json-comments": "^3.0.1" - }, - "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - } - } - }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -1043,12 +355,6 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -1070,122 +376,6 @@ "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.3.1.tgz", "integrity": "sha512-zCTP6Qd/WwjrpuHFkJuXc5opRdKprUr7eI7+JCCtcetThJt45qptu82MWQ+eET+FtDrMo7+BYjo3iD0XIq1L9Q==" }, - "klaw": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", - "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "linkify-it": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", - "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", - "dev": true, - "requires": { - "uc.micro": "^1.0.1" - } - }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-plural": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-4.3.0.tgz", - "integrity": "sha512-xTYd4JVHpSCW+aqDof6w/MebaMVNTVYBZhbB/vi513xXdiPT92JMVCo0Jq8W2UZnzYRFeVbQiQ+I25l13JuKvA==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true, - "optional": true - } - } - }, - "markdown-it": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", - "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "entities": "~2.0.0", - "linkify-it": "^2.0.0", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - } - }, - "markdown-it-anchor": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz", - "integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==", - "dev": true - }, - "marked": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", - "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", - "dev": true - }, - "mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", - "dev": true - }, - "messageformat": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/messageformat/-/messageformat-2.3.0.tgz", - "integrity": "sha512-uTzvsv0lTeQxYI2y1NPa1lItL5VRI8Gb93Y2K2ue5gBPyrbJxfDi/EYWxh2PKv5yO42AJeeqblS9MJSh/IEk4w==", - "dev": true, - "requires": { - "make-plural": "^4.3.0", - "messageformat-formatters": "^2.0.1", - "messageformat-parser": "^4.1.2" - } - }, - "messageformat-formatters": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/messageformat-formatters/-/messageformat-formatters-2.0.1.tgz", - "integrity": "sha512-E/lQRXhtHwGuiQjI7qxkLp8AHbMD5r2217XNe/SREbBlSawe0lOqsFb7rflZJmlQFSULNLIqlcjjsCPlB3m3Mg==", - "dev": true - }, - "messageformat-parser": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/messageformat-parser/-/messageformat-parser-4.1.2.tgz", - "integrity": "sha512-7dWuifeyldz7vhEuL96Kwq1fhZXBW+TUfbnHN4UCrCxoXQTYjHnR78eI66Gk9LaLLsAvzPNVJBaa66DRfFNaiA==", - "dev": true - }, "mime": { "version": "2.4.6", "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", @@ -1204,12 +394,6 @@ "mime-db": "1.44.0" } }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -1218,29 +402,6 @@ "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } - } - }, "mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", @@ -1251,40 +412,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "nopt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", - "dev": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -1298,71 +425,11 @@ "wrappy": "1" } }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, "pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", @@ -1373,34 +440,16 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, - "proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", - "dev": true - }, "proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, "psl": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", @@ -1452,12 +501,6 @@ "util-deprecate": "^1.0.1" } }, - "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", - "dev": true - }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -1485,31 +528,6 @@ "uuid": "^3.3.2" } }, - "requizzle": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz", - "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -1518,24 +536,6 @@ "glob": "^7.1.3" } }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "rxjs": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", - "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1546,76 +546,6 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - } - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "spdx-license-list": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/spdx-license-list/-/spdx-license-list-6.1.0.tgz", - "integrity": "sha512-xiaE3KtBiylVmZrlux8tHR28HZgZ921HTXbx2fEZaDloRjbBOro79LeKttcQJ5MSDYFKG7in9v2GTAEhcR9/Qg==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -1632,28 +562,6 @@ "tweetnacl": "~0.14.0" } }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -1662,81 +570,6 @@ "safe-buffer": "~5.2.0" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - } - } - }, - "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "dependencies": { - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - } - } - }, - "taffydb": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", - "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", - "dev": true - }, "tar-fs": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.0.tgz", @@ -1760,26 +593,11 @@ "readable-stream": "^3.1.1" } }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, "tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -1789,12 +607,6 @@ "punycode": "^2.1.1" } }, - "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", - "dev": true - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -1808,37 +620,6 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - }, - "uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "uglify-js": { - "version": "3.9.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.9.4.tgz", - "integrity": "sha512-8RZBJq5smLOa7KslsNsVcSH+KOXf1uDU8yqLeNuVKwmT0T3FA0ZoXlinQfRad7SDcbZZRZE4ov+2v71EnxNyCA==", - "dev": true, - "optional": true, - "requires": { - "commander": "~2.20.3" - } - }, "unbzip2-stream": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", @@ -1848,12 +629,6 @@ "through": "^2.3.8" } }, - "underscore": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", - "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==", - "dev": true - }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -1872,12 +647,6 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, - "v8-compile-cache": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", - "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", - "dev": true - }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -1888,58 +657,27 @@ "extsprintf": "^1.2.0" } }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, + "whatsapp-web.js": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/whatsapp-web.js/-/whatsapp-web.js-1.7.0.tgz", + "integrity": "sha512-cha7byb+/xWZCB60JW/bSTGaiPgWlA4m37vXjGRkUvMT30/JZyVjQ9W2hazS4dBOtnx3/8DKSnn2AQEEb6Hi5w==", "requires": { - "isexe": "^2.0.0" + "@pedroslopez/moduleraid": "^4.1.0", + "jsqr": "^1.3.1", + "mime": "^2.4.5", + "puppeteer": "^3.0.4" } }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, "ws": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==" }, - "xmlcreate": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz", - "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, "yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", diff --git a/whatsapp-web.js/package.json b/whatsapp-web.js/package.json index 0d00f61..7a7dec6 100644 --- a/whatsapp-web.js/package.json +++ b/whatsapp-web.js/package.json @@ -1,42 +1,16 @@ { - "name": "whatsapp-web.js", - "version": "1.7.0-post", - "description": "Library for interacting with the WhatsApp Web API ", - "main": "./index.js", - "typings": "./index.d.ts", + "name": "whatsapp-web", + "version": "1.0.0", + "description": "", + "main": "test.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "generate-docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose", - "start": "node website_test.js" + "test": "node website_test.js http://localhost:8004", + "start": "node index.js" }, - "repository": { - "type": "git", - "url": "git+https://github.com/pedroslopez/whatsapp-web.js.git" - }, - "keywords": [ - "whatsapp", - "whatsapp-web", - "api", - "bot", - "client", - "node" - ], - "author": "Pedro Lopez", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/pedroslopez/whatsapp-web.js/issues" - }, - "homepage": "https://github.com/pedroslopez/whatsapp-web.js#readme", + "author": "", + "license": "ISC", "dependencies": { - "@pedroslopez/moduleraid": "^4.1.0", - "jsqr": "^1.3.1", - "mime": "^2.4.5", - "puppeteer": "^3.0.4", - "request": "^2.88.2" - }, - "devDependencies": { - "eslint": "^6.8.0", - "jsdoc": "^3.6.4", - "jsdoc-baseline": "^0.1.5" + "request": "^2.88.2", + "whatsapp-web.js": "^1.7.0" } } diff --git a/whatsapp-web.js/src/Client.js b/whatsapp-web.js/src/Client.js deleted file mode 100644 index a8db45f..0000000 --- a/whatsapp-web.js/src/Client.js +++ /dev/null @@ -1,663 +0,0 @@ -'use strict'; - -const EventEmitter = require('events'); -const puppeteer = require('puppeteer'); -const moduleRaid = require('@pedroslopez/moduleraid/moduleraid'); -const jsQR = require('jsqr'); - -const Util = require('./util/Util'); -const InterfaceController = require('./util/InterfaceController'); -const { WhatsWebURL, DefaultOptions, Events, WAState } = require('./util/Constants'); -const { ExposeStore, LoadUtils } = require('./util/Injected'); -const ChatFactory = require('./factories/ChatFactory'); -const ContactFactory = require('./factories/ContactFactory'); -const { ClientInfo, Message, MessageMedia, Contact, Location, GroupNotification } = require('./structures'); -/** - * Starting point for interacting with the WhatsApp Web API - * @extends {EventEmitter} - * @param {object} options - * @fires Client#qr - * @fires Client#authenticated - * @fires Client#auth_failure - * @fires Client#ready - * @fires Client#message - * @fires Client#message_ack - * @fires Client#message_create - * @fires Client#message_revoke_me - * @fires Client#message_revoke_everyone - * @fires Client#media_uploaded - * @fires Client#group_join - * @fires Client#group_leave - * @fires Client#group_update - * @fires Client#disconnected - * @fires Client#change_state - * @fires Client#change_battery - */ -class Client extends EventEmitter { - constructor(options = {}) { - super(); - - this.options = Util.mergeDefault(DefaultOptions, options); - - this.pupBrowser = null; - this.pupPage = null; - } - - /** - * Sets up events and requirements, kicks off authentication request - */ - async initialize() { - const browser = await puppeteer.launch(this.options.puppeteer); - const page = (await browser.pages())[0]; - page.setUserAgent(this.options.userAgent); - - this.pupBrowser = browser; - this.pupPage = page; - - if (this.options.session) { - await page.evaluateOnNewDocument( - session => { - localStorage.clear(); - localStorage.setItem('WABrowserId', session.WABrowserId); - localStorage.setItem('WASecretBundle', session.WASecretBundle); - localStorage.setItem('WAToken1', session.WAToken1); - localStorage.setItem('WAToken2', session.WAToken2); - }, this.options.session); - } - - await page.goto(WhatsWebURL, { - waitUntil: 'load', - timeout: 0, - }); - - const KEEP_PHONE_CONNECTED_IMG_SELECTOR = '[data-asset-intro-image-light="true"]'; - - if (this.options.session) { - // Check if session restore was successfull - try { - await page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: this.options.authTimeoutMs }); - } catch (err) { - if (err.name === 'TimeoutError') { - /** - * Emitted when there has been an error while trying to restore an existing session - * @event Client#auth_failure - * @param {string} message - */ - this.emit(Events.AUTHENTICATION_FAILURE, 'Unable to log in. Are the session details valid?'); - browser.close(); - if (this.options.restartOnAuthFail) { - // session restore failed so try again but without session to force new authentication - this.options.session = null; - this.initialize(); - } - return; - } - - throw err; - } - - } else { - const getQrCode = async () => { - // Check if retry button is present - var QR_RETRY_SELECTOR = 'div[data-ref] > span > div'; - var qrRetry = await page.$(QR_RETRY_SELECTOR); - if (qrRetry) { - await qrRetry.click(); - } - - // Wait for QR Code - - const QR_CANVAS_SELECTOR = 'canvas'; - await page.waitForSelector(QR_CANVAS_SELECTOR, { timeout: this.options.qrTimeoutMs }); - const qrImgData = await page.$eval(QR_CANVAS_SELECTOR, canvas => [].slice.call(canvas.getContext('2d').getImageData(0, 0, 264, 264).data)); - const qr = jsQR(qrImgData, 264, 264).data; - /** - * Emitted when the QR code is received - * @event Client#qr - * @param {string} qr QR Code - */ - this.emit(Events.QR_RECEIVED, qr); - }; - getQrCode(); - this._qrRefreshInterval = setInterval(getQrCode, this.options.qrRefreshIntervalMs); - - // Wait for code scan - await page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: 0 }); - clearInterval(this._qrRefreshInterval); - this._qrRefreshInterval = undefined; - - } - - await page.evaluate(ExposeStore, moduleRaid.toString()); - - // Get session tokens - const localStorage = JSON.parse(await page.evaluate(() => { - return JSON.stringify(window.localStorage); - })); - - const session = { - WABrowserId: localStorage.WABrowserId, - WASecretBundle: localStorage.WASecretBundle, - WAToken1: localStorage.WAToken1, - WAToken2: localStorage.WAToken2 - }; - - /** - * Emitted when authentication is successful - * @event Client#authenticated - * @param {object} session Object containing session information. Can be used to restore the session. - */ - this.emit(Events.AUTHENTICATED, session); - - // Check window.Store Injection - await page.waitForFunction('window.Store != undefined'); - - //Load util functions (serializers, helper functions) - await page.evaluate(LoadUtils); - - // Expose client info - this.info = new ClientInfo(this, await page.evaluate(() => { - return window.Store.Conn.serialize(); - })); - - // Add InterfaceController - this.interface = new InterfaceController(this); - - // Register events - await page.exposeFunction('onAddMessageEvent', msg => { - if (!msg.isNewMsg) return; - - if (msg.type === 'gp2') { - const notification = new GroupNotification(this, msg); - if (msg.subtype === 'add' || msg.subtype === 'invite') { - /** - * Emitted when a user joins the chat via invite link or is added by an admin. - * @event Client#group_join - * @param {GroupNotification} notification GroupNotification with more information about the action - */ - this.emit(Events.GROUP_JOIN, notification); - } else if (msg.subtype === 'remove' || msg.subtype === 'leave') { - /** - * Emitted when a user leaves the chat or is removed by an admin. - * @event Client#group_leave - * @param {GroupNotification} notification GroupNotification with more information about the action - */ - this.emit(Events.GROUP_LEAVE, notification); - } else { - /** - * Emitted when group settings are updated, such as subject, description or picture. - * @event Client#group_update - * @param {GroupNotification} notification GroupNotification with more information about the action - */ - this.emit(Events.GROUP_UPDATE, notification); - } - return; - } - - const message = new Message(this, msg); - - /** - * Emitted when a new message is created, which may include the current user's own messages. - * @event Client#message_create - * @param {Message} message The message that was created - */ - this.emit(Events.MESSAGE_CREATE, message); - - if (msg.id.fromMe) return; - - /** - * Emitted when a new message is received. - * @event Client#message - * @param {Message} message The message that was received - */ - this.emit(Events.MESSAGE_RECEIVED, message); - }); - - let last_message; - - await page.exposeFunction('onChangeMessageTypeEvent', (msg) => { - - if (msg.type === 'revoked') { - const message = new Message(this, msg); - let revoked_msg; - if (last_message && msg.id.id === last_message.id.id) { - revoked_msg = new Message(this, last_message); - } - - /** - * Emitted when a message is deleted for everyone in the chat. - * @event Client#message_revoke_everyone - * @param {Message} message The message that was revoked, in its current state. It will not contain the original message's data. - * @param {?Message} revoked_msg The message that was revoked, before it was revoked. It will contain the message's original data. - * Note that due to the way this data is captured, it may be possible that this param will be undefined. - */ - this.emit(Events.MESSAGE_REVOKED_EVERYONE, message, revoked_msg); - } - - }); - - await page.exposeFunction('onChangeMessageEvent', (msg) => { - - if (msg.type !== 'revoked') { - last_message = msg; - } - - }); - - await page.exposeFunction('onRemoveMessageEvent', (msg) => { - - if (!msg.isNewMsg) return; - - const message = new Message(this, msg); - - /** - * Emitted when a message is deleted by the current user. - * @event Client#message_revoke_me - * @param {Message} message The message that was revoked - */ - this.emit(Events.MESSAGE_REVOKED_ME, message); - - }); - - await page.exposeFunction('onMessageAckEvent', (msg, ack) => { - - const message = new Message(this, msg); - - /** - * Emitted when an ack event occurrs on message type. - * @event Client#message_ack - * @param {Message} message The message that was affected - * @param {MessageAck} ack The new ACK value - */ - this.emit(Events.MESSAGE_ACK, message, ack); - - }); - - await page.exposeFunction('onMessageMediaUploadedEvent', (msg) => { - - const message = new Message(this, msg); - - /** - * Emitted when media has been uploaded for a message sent by the client. - * @event Client#media_uploaded - * @param {Message} message The message with media that was uploaded - */ - this.emit(Events.MEDIA_UPLOADED, message); - }); - - await page.exposeFunction('onAppStateChangedEvent', (state) => { - - /** - * Emitted when the connection state changes - * @event Client#change_state - * @param {WAState} state the new connection state - */ - this.emit(Events.STATE_CHANGED, state); - - const ACCEPTED_STATES = [WAState.CONNECTED, WAState.OPENING, WAState.PAIRING, WAState.TIMEOUT]; - - if(this.options.takeoverOnConflict) { - ACCEPTED_STATES.push(WAState.CONFLICT); - - if(state === WAState.CONFLICT) { - setTimeout(() => { - this.pupPage.evaluate(() => window.Store.AppState.takeover()); - }, this.options.takeoverTimeoutMs); - } - } - - if (!ACCEPTED_STATES.includes(state)) { - /** - * Emitted when the client has been disconnected - * @event Client#disconnected - * @param {WAState} reason state that caused the disconnect - */ - this.emit(Events.DISCONNECTED, state); - this.destroy(); - } - }); - - await page.exposeFunction('onBatteryStateChangedEvent', (state) => { - const { battery, plugged } = state; - - if(battery === undefined) return; - - /** - * Emitted when the battery percentage for the attached device changes - * @event Client#change_battery - * @param {object} batteryInfo - * @param {number} batteryInfo.battery - The current battery percentage - * @param {boolean} batteryInfo.plugged - Indicates if the phone is plugged in (true) or not (false) - */ - this.emit(Events.BATTERY_CHANGED, { battery, plugged }); - }); - - await page.evaluate(() => { - window.Store.Msg.on('add', (msg) => { if(msg.isNewMsg) window.onAddMessageEvent(msg); }); - window.Store.Msg.on('change', (msg) => { window.onChangeMessageEvent(msg); }); - window.Store.Msg.on('change:type', (msg) => { window.onChangeMessageTypeEvent(msg); }); - window.Store.Msg.on('change:ack', (msg, ack) => { window.onMessageAckEvent(msg, ack); }); - window.Store.Msg.on('change:isUnsentMedia', (msg, unsent) => { if(msg.id.fromMe && !unsent) window.onMessageMediaUploadedEvent(msg); }); - window.Store.Msg.on('remove', (msg) => { if(msg.isNewMsg) window.onRemoveMessageEvent(msg); }); - window.Store.AppState.on('change:state', (_AppState, state) => { window.onAppStateChangedEvent(state); }); - window.Store.Conn.on('change:battery', (state) => { window.onBatteryStateChangedEvent(state); }); - }); - - /** - * Emitted when the client has initialized and is ready to receive messages. - * @event Client#ready - */ - this.emit(Events.READY); - } - - /** - * Closes the client - */ - async destroy() { - if (this._qrRefreshInterval) { - clearInterval(this._qrRefreshInterval); - } - await this.pupBrowser.close(); - } - - /** - * Logs out the client, closing the current session - */ - async logout() { - return await this.pupPage.evaluate(() => { - return window.Store.AppState.logout(); - }); - } - - /** - * Returns the version of WhatsApp Web currently being run - * @returns {Promise} - */ - async getWWebVersion() { - return await this.pupPage.evaluate(() => { - return window.Debug.VERSION; - }); - } - - /** - * Mark as seen for the Chat - * @param {string} chatId - * @returns {Promise} result - * - */ - async sendSeen(chatId) { - const result = await this.pupPage.evaluate(async (chatId) => { - return window.WWebJS.sendSeen(chatId); - - }, chatId); - return result; - } - - /** - * Send a message to a specific chatId - * @param {string} chatId - * @param {string|MessageMedia|Location} content - * @param {object} options - * @returns {Promise} Message that was just sent - */ - async sendMessage(chatId, content, options = {}) { - let internalOptions = { - linkPreview: options.linkPreview === false ? undefined : true, - sendAudioAsVoice: options.sendAudioAsVoice, - caption: options.caption, - quotedMessageId: options.quotedMessageId, - mentionedJidList: Array.isArray(options.mentions) ? options.mentions.map(contact => contact.id._serialized) : [] - }; - - const sendSeen = typeof options.sendSeen === 'undefined' ? true : options.sendSeen; - - if (content instanceof MessageMedia) { - internalOptions.attachment = content; - content = ''; - } else if (options.media instanceof MessageMedia) { - internalOptions.attachment = options.media; - internalOptions.caption = content; - content = ''; - } else if (content instanceof Location) { - internalOptions.location = content; - content = ''; - } - - const newMessage = await this.pupPage.evaluate(async (chatId, message, options, sendSeen) => { - const chatWid = window.Store.WidFactory.createWid(chatId); - const chat = await window.Store.Chat.find(chatWid); - - if(sendSeen) { - window.WWebJS.sendSeen(chatId); - } - - const msg = await window.WWebJS.sendMessage(chat, message, options, sendSeen); - return msg.serialize(); - }, chatId, content, internalOptions, sendSeen); - - return new Message(this, newMessage); - } - - /** - * Get all current chat instances - * @returns {Promise>} - */ - async getChats() { - let chats = await this.pupPage.evaluate(() => { - return window.WWebJS.getChats(); - }); - - return chats.map(chat => ChatFactory.create(this, chat)); - } - - /** - * Get chat instance by ID - * @param {string} chatId - * @returns {Promise} - */ - async getChatById(chatId) { - let chat = await this.pupPage.evaluate(chatId => { - return window.WWebJS.getChat(chatId); - }, chatId); - - return ChatFactory.create(this, chat); - } - - /** - * Get all current contact instances - * @returns {Promise>} - */ - async getContacts() { - let contacts = await this.pupPage.evaluate(() => { - return window.WWebJS.getContacts(); - }); - - return contacts.map(contact => ContactFactory.create(this, contact)); - } - - /** - * Get contact instance by ID - * @param {string} contactId - * @returns {Promise} - */ - async getContactById(contactId) { - let contact = await this.pupPage.evaluate(contactId => { - return window.WWebJS.getContact(contactId); - }, contactId); - - return ContactFactory.create(this, contact); - } - - /** - * Returns an object with information about the invite code's group - * @param {string} inviteCode - * @returns {Promise} Invite information - */ - async getInviteInfo(inviteCode) { - return await this.pupPage.evaluate(inviteCode => { - return window.Store.Wap.groupInviteInfo(inviteCode); - }, inviteCode); - } - - /** - * Accepts an invitation to join a group - * @param {string} inviteCode Invitation code - */ - async acceptInvite(inviteCode) { - const chatId = await this.pupPage.evaluate(async inviteCode => { - return await window.Store.Invite.sendJoinGroupViaInvite(inviteCode); - }, inviteCode); - - return chatId._serialized; - } - - /** - * Sets the current user's status message - * @param {string} status New status message - */ - async setStatus(status) { - await this.pupPage.evaluate(async status => { - return await window.Store.Wap.sendSetStatus(status); - }, status); - } - - /** - * Gets the current connection state for the client - * @returns {WAState} - */ - async getState() { - return await this.pupPage.evaluate(() => { - return window.Store.AppState.state; - }); - } - - /** - * Marks the client as online - */ - async sendPresenceAvailable() { - return await this.pupPage.evaluate(() => { - return window.Store.Wap.sendPresenceAvailable(); - }); - } - - /** - * Enables and returns the archive state of the Chat - * @returns {boolean} - */ - async archiveChat(chatId) { - return await this.pupPage.evaluate(async chatId => { - let chat = await window.Store.Chat.get(chatId); - await window.Store.Cmd.archiveChat(chat, true); - return chat.archive; - }, chatId); - } - - /** - * Changes and returns the archive state of the Chat - * @returns {boolean} - */ - async unarchiveChat(chatId) { - return await this.pupPage.evaluate(async chatId => { - let chat = await window.Store.Chat.get(chatId); - await window.Store.Cmd.archiveChat(chat, false); - return chat.archive; - }, chatId); - } - - /** - * Mutes the Chat until a specified date - * @param {string} chatId ID of the chat that will be muted - * @param {Date} unmuteDate Date when the chat will be unmuted - */ - async muteChat(chatId, unmuteDate) { - await this.pupPage.evaluate(async (chatId, timestamp) => { - let chat = await window.Store.Chat.get(chatId); - await chat.mute.mute(timestamp, !0); - }, chatId, unmuteDate.getTime() / 1000); - } - - /** - * Unmutes the Chat - * @param {string} chatId ID of the chat that will be unmuted - */ - async unmuteChat(chatId) { - await this.pupPage.evaluate(async chatId => { - let chat = await window.Store.Chat.get(chatId); - await window.Store.Cmd.muteChat(chat, false); - }, chatId); - } - - /** - * Returns the contact ID's profile picture URL, if privacy settings allow it - * @param {string} contactId the whatsapp user's ID - * @returns {Promise} - */ - async getProfilePicUrl(contactId) { - const profilePic = await this.pupPage.evaluate((contactId) => { - return window.Store.Wap.profilePicFind(contactId); - }, contactId); - - return profilePic ? profilePic.eurl : undefined; - } - - /** - * Force reset of connection state for the client - */ - async resetState(){ - await this.pupPage.evaluate(() => { - window.Store.AppState.phoneWatchdog.shiftTimer.forceRunNow(); - }); - } - - /** - * Check if a given ID is registered in whatsapp - * @param {string} id the whatsapp user's ID - * @returns {Promise} - */ - async isRegisteredUser(id) { - return await this.pupPage.evaluate(async (id) => { - let result = await window.Store.Wap.queryExist(id); - return result.jid !== undefined; - }, id); - } - - /** - * Create a new group - * @param {string} name group title - * @param {Array} participants an array of Contacts or contact IDs to add to the group - * @returns {Object} createRes - * @returns {string} createRes.gid - ID for the group that was just created - * @returns {Object.} createRes.missingParticipants - participants that were not added to the group. Keys represent the ID for participant that was not added and its value is a status code that represents the reason why participant could not be added. This is usually 403 if the user's privacy settings don't allow you to add them to groups. - */ - async createGroup(name, participants) { - if(!Array.isArray(participants) || participants.length == 0) { - throw 'You need to add at least one other participant to the group'; - } - - if(participants.every(c => c instanceof Contact)) { - participants = participants.map(c => c.id._serialized); - } - - const createRes = await this.pupPage.evaluate(async (name, participantIds) => { - const res = await window.Store.Wap.createGroup(name, participantIds); - console.log(res); - if(!res.status === 200) { - throw 'An error occurred while creating the group!'; - } - - return res; - }, name, participants); - - const missingParticipants = createRes.participants.reduce(((missing, c) => { - const id = Object.keys(c)[0]; - const statusCode = c[id].code; - if(statusCode != 200) return Object.assign(missing, {[id]: statusCode}); - return missing; - }), {}); - - return { gid: createRes.gid, missingParticipants}; - } - -} - -module.exports = Client; diff --git a/whatsapp-web.js/src/businessLogic/logic.js b/whatsapp-web.js/src/businessLogic/logic.js new file mode 100644 index 0000000..e349610 --- /dev/null +++ b/whatsapp-web.js/src/businessLogic/logic.js @@ -0,0 +1,4 @@ + +module.exports.onWG = () => { + console.log('hello world'); +} \ No newline at end of file diff --git a/whatsapp-web.js/src/factories/ChatFactory.js b/whatsapp-web.js/src/factories/ChatFactory.js deleted file mode 100644 index 524aea1..0000000 --- a/whatsapp-web.js/src/factories/ChatFactory.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const PrivateChat = require('../structures/PrivateChat'); -const GroupChat = require('../structures/GroupChat'); - -class ChatFactory { - static create(client, data) { - if(data.isGroup) { - return new GroupChat(client, data); - } - - return new PrivateChat(client, data); - } -} - -module.exports = ChatFactory; \ No newline at end of file diff --git a/whatsapp-web.js/src/factories/ContactFactory.js b/whatsapp-web.js/src/factories/ContactFactory.js deleted file mode 100644 index a40e90b..0000000 --- a/whatsapp-web.js/src/factories/ContactFactory.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const PrivateContact = require('../structures/PrivateContact'); -const BusinessContact = require('../structures/BusinessContact'); - -class ContactFactory { - static create(client, data) { - if(data.isBusiness) { - return new BusinessContact(client, data); - } - - return new PrivateContact(client, data); - } -} - -module.exports = ContactFactory; \ No newline at end of file diff --git a/whatsapp-web.js/src/models/product.js b/whatsapp-web.js/src/models/product.js new file mode 100644 index 0000000..4214921 --- /dev/null +++ b/whatsapp-web.js/src/models/product.js @@ -0,0 +1,50 @@ + +class Product { + + constructor({ id = '', name = '', desc = '', cost = 0, image = null }) { + this.id = id; + this.name = name; + this.desc = desc; + this.cost = cost; + this.image = image; + } + + getId(){ + return this.id; + } + + setName(name){ + this.name = name; + } + + getName(){ + return this.name; + } + + setDesc(desc){ + this.desc = desc; + } + + getDesc(){ + return this.desc; + } + + setCost(cost){ + this.cost = cost; + } + + getCost(){ + return this.cost; + } + + setImage(image){ + this.imageUrl = image; + } + + getImage(){ + return this.imageUrl; + } + +} + +module.exports.Product = Product; diff --git a/whatsapp-web.js/src/models/website.js b/whatsapp-web.js/src/models/website.js new file mode 100644 index 0000000..d13f47e --- /dev/null +++ b/whatsapp-web.js/src/models/website.js @@ -0,0 +1,23 @@ +const {Product} = require('./product'); + +class Website { + + /** + * @param {Map} details + */ + constructor(details){ + this.details = details; + this.products = []; + } + + /** + * + * @param {Product} product + */ + addProduct(product){ + this.products.push(product); + } + +} + +module.exports.Website = Website; \ No newline at end of file diff --git a/whatsapp-web.js/src/structures/Base.js b/whatsapp-web.js/src/structures/Base.js deleted file mode 100644 index 8236a4e..0000000 --- a/whatsapp-web.js/src/structures/Base.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -/** - * Represents a WhatsApp data structure - */ -class Base { - constructor(client) { - /** - * The client that instantiated this - * @readonly - */ - Object.defineProperty(this, 'client', { value: client }); - } - - _clone() { - return Object.assign(Object.create(this), this); - } - - _patch(data) { return data; } -} - -module.exports = Base; \ No newline at end of file diff --git a/whatsapp-web.js/src/structures/BusinessContact.js b/whatsapp-web.js/src/structures/BusinessContact.js deleted file mode 100644 index 80fd8d6..0000000 --- a/whatsapp-web.js/src/structures/BusinessContact.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -const Contact = require('./Contact'); - -/** - * Represents a Business Contact on WhatsApp - * @extends {Contact} - */ -class BusinessContact extends Contact { - _patch(data) { - /** - * The contact's business profile - */ - this.businessProfile = data.businessProfile; - - return super._patch(data); - } - -} - -module.exports = BusinessContact; \ No newline at end of file diff --git a/whatsapp-web.js/src/structures/Chat.js b/whatsapp-web.js/src/structures/Chat.js deleted file mode 100644 index 506fbb2..0000000 --- a/whatsapp-web.js/src/structures/Chat.js +++ /dev/null @@ -1,191 +0,0 @@ -'use strict'; - -const Base = require('./Base'); -const Message = require('./Message'); - -/** - * Represents a Chat on WhatsApp - * @extends {Base} - */ -class Chat extends Base { - constructor(client, data) { - super(client); - - if (data) this._patch(data); - } - - _patch(data) { - /** - * ID that represents the chat - * @type {object} - */ - this.id = data.id; - - /** - * Title of the chat - * @type {string} - */ - this.name = data.formattedTitle; - - /** - * Indicates if the Chat is a Group Chat - * @type {boolean} - */ - this.isGroup = data.isGroup; - - /** - * Indicates if the Chat is readonly - * @type {boolean} - */ - this.isReadOnly = data.isReadOnly; - - /** - * Amount of messages unread - * @type {number} - */ - this.unreadCount = data.unreadCount; - - /** - * Unix timestamp for when the chat was created - * @type {number} - */ - this.timestamp = data.t; - - /** - * Indicates if the Chat is archived - * @type {boolean} - */ - this.archived = data.archive; - - return super._patch(data); - } - - /** - * Send a message to this chat - * @param {string|MessageMedia|Location} content - * @param {object} options - * @returns {Promise} Message that was just sent - */ - async sendMessage(content, options) { - return this.client.sendMessage(this.id._serialized, content, options); - } - - /** - * Set the message as seen - * @returns {Promise} result - */ - async sendSeen() { - return this.client.sendSeen(this.id._serialized); - } - - /** - * Clears all messages from the chat - * @returns {Promise} result - */ - async clearMessages() { - return this.client.pupPage.evaluate(chatId => { - return window.WWebJS.sendClearChat(chatId); - }, this.id._serialized); - } - - /** - * Deletes the chat - * @returns {Promise} result - */ - async delete() { - return this.client.pupPage.evaluate(chatId => { - return window.WWebJS.sendDeleteChat(chatId); - }, this.id._serialized); - } - - /** - * Archives this chat - */ - async archive() { - return this.client.archiveChat(this.id._serialized); - } - - /** - * un-archives this chat - */ - async unarchive() { - return this.client.unarchiveChat(this.id._serialized); - } - - /** - * Mutes this chat until a specified date - * @param {Date} unmuteDate Date at which the Chat will be unmuted - */ - async mute(unmuteDate) { - return this.client.muteChat(this.id._serialized, unmuteDate); - } - - /** - * Unmutes this chat - */ - async unmute() { - return this.client.unmuteChat(this.id._serialized); - } - - /** - * Loads chat messages, sorted from earliest to latest. - * @param {Object} searchOptions Options for searching messages. Right now only limit is supported. - * @param {Number} [searchOptions.limit=50] The amount of messages to return. Note that the actual number of returned messages may be smaller if there aren't enough messages in the conversation. Set this to Infinity to load all messages. - * @returns {Promise>} - */ - async fetchMessages(searchOptions) { - if(!searchOptions || !searchOptions.limit) { - searchOptions = {limit: 50}; - } - let messages = await this.client.pupPage.evaluate(async (chatId, limit) => { - const msgFilter = m => !m.isNotification; // dont include notification messages - - const chat = window.Store.Chat.get(chatId); - let msgs = chat.msgs.models.filter(msgFilter); - - while(msgs.length < limit) { - const loadedMessages = await chat.loadEarlierMsgs(); - if(!loadedMessages) break; - msgs = [...loadedMessages.filter(msgFilter), ...msgs]; - } - - msgs.sort((a, b) => (a.t > b.t) ? 1 : -1); - return msgs.splice(msgs.length - limit).map(m => m.serialize()); - - }, this.id._serialized, searchOptions.limit); - - return messages.map(m => new Message(this.client, m)); - } - - /** - * Simulate typing in chat. This will last for 25 seconds. - */ - async sendStateTyping() { - return this.client.pupPage.evaluate(chatId => { - window.WWebJS.sendChatstate('typing', chatId); - return true; - }, this.id._serialized); - } - - /** - * Simulate recording audio in chat. This will last for 25 seconds. - */ - async sendStateRecording() { - return this.client.pupPage.evaluate(chatId => { - window.WWebJS.sendChatstate('recording', chatId); - return true; - }, this.id._serialized); - } - - /** - * Stops typing or recording in chat immediately. - */ - async clearState() { - return this.client.pupPage.evaluate(chatId => { - window.WWebJS.sendChatstate('stop', chatId); - return true; - }, this.id._serialized); - } -} - -module.exports = Chat; diff --git a/whatsapp-web.js/src/structures/ClientInfo.js b/whatsapp-web.js/src/structures/ClientInfo.js deleted file mode 100644 index 9595fac..0000000 --- a/whatsapp-web.js/src/structures/ClientInfo.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -const Base = require('./Base'); - -/** - * Current connection information - * @extends {Base} - */ -class ClientInfo extends Base { - constructor(client, data) { - super(client); - - if(data) this._patch(data); - } - - _patch(data) { - /** - * Name configured to be shown in push notifications - * @type {string} - */ - this.pushname = data.pushname; - - /** - * Current user ID - * @type {object} - */ - this.me = data.me; - - /** - * Information about the phone this client is connected to - * @type {object} - * @property {string} wa_version WhatsApp Version running on the phone - * @property {string} os_version OS Version running on the phone (iOS or Android version) - * @property {string} device_manufacturer Device manufacturer - * @property {string} device_model Device model - * @property {string} os_build_number OS build number - */ - this.phone = data.phone; - - /** - * Platform the phone is running on - * @type {string} - */ - this.platform = data.platform; - - return super._patch(data); - } - - /** - * Get current battery percentage and charging status for the attached device - * @returns {object} batteryStatus - * @returns {number} batteryStatus.battery - The current battery percentage - * @returns {boolean} batteryStatus.plugged - Indicates if the phone is plugged in (true) or not (false) - */ - async getBatteryStatus() { - return await this.client.pupPage.evaluate(() => { - const { battery, plugged } = window.Store.Conn; - return { battery, plugged }; - }); - } - -} - -module.exports = ClientInfo; \ No newline at end of file diff --git a/whatsapp-web.js/src/structures/Contact.js b/whatsapp-web.js/src/structures/Contact.js deleted file mode 100644 index 2321ccc..0000000 --- a/whatsapp-web.js/src/structures/Contact.js +++ /dev/null @@ -1,111 +0,0 @@ -'use strict'; - -const Base = require('./Base'); - -/** - * Represents a Contact on WhatsApp - * @extends {Base} - */ -class Contact extends Base { - constructor(client, data) { - super(client); - - if(data) this._patch(data); - } - - _patch(data) { - /** - * ID that represents the contact - * @type {object} - */ - this.id = data.id; - - /** - * Contact's phone number - * @type {string} - */ - this.number = data.userid; - - /** - * Indicates if the contact is a business contact - * @type {boolean} - */ - this.isBusiness = data.isBusiness; - - /** - * Indicates if the contact is an enterprise contact - * @type {boolean} - */ - this.isEnterprise = data.isEnterprise; - - this.labels = data.labels; - - /** - * The contact's name, as saved by the current user - * @type {?string} - */ - this.name = data.name; - - /** - * The name that the contact has configured to be shown publically - * @type {string} - */ - this.pushname = data.pushname; - - this.sectionHeader = data.sectionHeader; - - /** - * A shortened version of name - * @type {?string} - */ - this.shortName = data.shortName; - - this.statusMute = data.statusMute; - this.type = data.type; - this.verifiedLevel = data.verifiedLevel; - this.verifiedName = data.verifiedName; - - /** - * Indicates if the contact is the current user's contact - * @type {boolean} - */ - this.isMe = data.isMe; - - /** - * Indicates if the contact is a user contact - * @type {boolean} - */ - this.isUser = data.isUser; - - /** - * Indicates if the contact is a group contact - * @type {boolean} - */ - this.isGroup = data.isGroup; - - /** - * Indicates if the number is registered on WhatsApp - * @type {boolean} - */ - this.isWAContact = data.isWAContact; - - /** - * Indicates if the number is saved in the current phone's contacts - * @type {boolean} - */ - this.isMyContact = data.isMyContact; - - return super._patch(data); - } - - /** - * Returns the contact's profile picture URL, if privacy settings allow it - * @returns {Promise} - */ - async getProfilePicUrl() { - return await this.client.getProfilePicUrl(this.id._serialized); - } - -} - -module.exports = Contact; \ No newline at end of file diff --git a/whatsapp-web.js/src/structures/GroupChat.js b/whatsapp-web.js/src/structures/GroupChat.js deleted file mode 100644 index 8fc95cc..0000000 --- a/whatsapp-web.js/src/structures/GroupChat.js +++ /dev/null @@ -1,150 +0,0 @@ -'use strict'; - -const Chat = require('./Chat'); - -/** - * Represents a Group Chat on WhatsApp - * @extends {Chat} - */ -class GroupChat extends Chat { - _patch(data) { - this.groupMetadata = data.groupMetadata; - - return super._patch(data); - } - - /** - * Gets the group owner - */ - get owner() { - return this.groupMetadata.owner; - } - - /** - * Gets the date at which the group was created - * @type {date} - */ - get createdAt() { - return new Date(this.groupMetadata.creation * 1000); - } - - /** - * Gets the group description - * @type {string} - */ - get description() { - return this.groupMetadata.desc; - } - /** - * Gets the group participants - * @type {array} - */ - get participants() { - return this.groupMetadata.participants; - } - - /** - * Adds a list of participants by ID to the group - * @param {Array} participantIds - */ - async addParticipants(participantIds) { - return await this.client.pupPage.evaluate((chatId, participantIds) => { - return window.Store.Wap.addParticipants(chatId, participantIds); - }, this.id._serialized, participantIds); - } - - /** - * Removes a list of participants by ID to the group - * @param {Array} participantIds - */ - async removeParticipants(participantIds) { - return await this.client.pupPage.evaluate((chatId, participantIds) => { - return window.Store.Wap.removeParticipants(chatId, participantIds); - }, this.id._serialized, participantIds); - } - - /** - * Promotes participants by IDs to admins - * @param {Array} participantIds - */ - async promoteParticipants(participantIds) { - return await this.client.pupPage.evaluate((chatId, participantIds) => { - return window.Store.Wap.promoteParticipants(chatId, participantIds); - }, this.id._serialized, participantIds); - } - - /** - * Demotes participants by IDs to regular users - * @param {Array} participantIds - */ - async demoteParticipants(participantIds) { - return await this.client.pupPage.evaluate((chatId, participantIds) => { - return window.Store.Wap.demoteParticipants(chatId, participantIds); - }, this.id._serialized, participantIds); - } - - /** - * Updates the group subject - * @param {string} subject - */ - async setSubject(subject) { - let res = await this.client.pupPage.evaluate((chatId, subject) => { - return window.Store.Wap.changeSubject(chatId, subject); - }, this.id._serialized, subject); - - if(res.status == 200) { - this.name = subject; - } - } - - /** - * Updates the group description - * @param {string} description - */ - async setDescription(description) { - let res = await this.client.pupPage.evaluate((chatId, description) => { - let descId = window.Store.GroupMetadata.get(chatId).descId; - return window.Store.Wap.setGroupDescription(chatId, description, window.Store.genId(), descId); - }, this.id._serialized, description); - - if (res.status == 200) { - this.groupMetadata.desc = description; - } - } - - /** - * Gets the invite code for a specific group - */ - async getInviteCode() { - let res = await this.client.pupPage.evaluate(chatId => { - return window.Store.Wap.groupInviteCode(chatId); - }, this.id._serialized); - - if (res.status == 200) { - return res.code; - } - - throw new Error('Not authorized'); - } - - /** - * Invalidates the current group invite code and generates a new one - */ - async revokeInvite() { - return await this.client.pupPage.evaluate(chatId => { - return window.Store.Wap.revokeGroupInvite(chatId); - }, this.id._serialized); - } - - /** - * Makes the bot leave the group - */ - async leave() { - return await this.client.pupPage.evaluate(chatId => { - return window.Store.Wap.leaveGroup(chatId); - }, this.id._serialized); - } - -} - -module.exports = GroupChat; \ No newline at end of file diff --git a/whatsapp-web.js/src/structures/GroupNotification.js b/whatsapp-web.js/src/structures/GroupNotification.js deleted file mode 100644 index d96dc03..0000000 --- a/whatsapp-web.js/src/structures/GroupNotification.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -const Base = require('./Base'); - -/** - * Represents a GroupNotification on WhatsApp - * @extends {Base} - */ -class GroupNotification extends Base { - constructor(client, data) { - super(client); - - if(data) this._patch(data); - } - - _patch(data) { - /** - * ID that represents the groupNotification - * @type {object} - */ - this.id = data.id; - - /** - * Extra content - * @type {string} - */ - this.body = data.body || ''; - - /** - * GroupNotification type - * @type {GroupNotificationTypes} - */ - this.type = data.subtype; - - /** - * Unix timestamp for when the groupNotification was created - * @type {number} - */ - this.timestamp = data.t; - - /** - * ID for the Chat that this groupNotification was sent for. - * - * @type {string} - */ - this.chatId = typeof (data.from) === 'object' ? data.from._serialized : data.from; - - /** - * ContactId for the user that produced the GroupNotification. - * @type {string} - */ - this.author = typeof (data.author) === 'object' ? data.author._serialized : data.author; - - /** - * Contact IDs for the users that were affected by this GroupNotification. - * @type {Array} - */ - this.recipientIds = []; - - if (data.recipients) { - this.recipientIds = data.recipients; - } - - return super._patch(data); - } - - /** - * Returns the Chat this groupNotification was sent in - * @returns {Promise} - */ - getChat() { - return this.client.getChatById(this.chatId); - } - - /** - * Returns the Contact this GroupNotification was produced by - * @returns {Promise} - */ - getContact() { - return this.client.getContactById(this.author); - } - - /** - * Returns the Contacts affected by this GroupNotification. - * @returns {Promise>} - */ - async getRecipients() { - return await Promise.all(this.recipientIds.map(async m => await this.client.getContactById(m))); - } - - /** - * Sends a message to the same chat this GroupNotification was produced in. - * - * @param {string|MessageMedia|Location} content - * @param {object} options - * @returns {Promise} - */ - async reply(content, options={}) { - return this.client.sendMessage(this.chatId, content, options); - } - -} - -module.exports = GroupNotification; diff --git a/whatsapp-web.js/src/structures/Location.js b/whatsapp-web.js/src/structures/Location.js deleted file mode 100644 index f9bc9dc..0000000 --- a/whatsapp-web.js/src/structures/Location.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -/** - * Location information - */ -class Location { - /** - * @param {number} latitude - * @param {number} longitude - * @param {?string} description - */ - constructor(latitude, longitude, description) { - /** - * Location latitude - * @type {number} - */ - this.latitude = latitude; - - /** - * Location longitude - * @type {number} - */ - this.longitude = longitude; - - /** - * Name for the location - * @type {?string} - */ - this.description = description; - } -} - -module.exports = Location; \ No newline at end of file diff --git a/whatsapp-web.js/src/structures/Message.js b/whatsapp-web.js/src/structures/Message.js deleted file mode 100644 index 8702915..0000000 --- a/whatsapp-web.js/src/structures/Message.js +++ /dev/null @@ -1,248 +0,0 @@ -'use strict'; - -const Base = require('./Base'); -const MessageMedia = require('./MessageMedia'); -const Location = require('./Location'); -const { MessageTypes } = require('../util/Constants'); - -/** - * Represents a Message on WhatsApp - * @extends {Base} - */ -class Message extends Base { - constructor(client, data) { - super(client); - - if(data) this._patch(data); - } - - _patch(data) { - /** - * MediaKey that represents the sticker 'ID' - * @type {string} - */ - this.mediaKey = data.mediaKey; - - - /** - * ID that represents the message - * @type {object} - */ - this.id = data.id; - - /** - * ACK status for the message - * @type {MessageAck} - */ - this.ack = data.ack; - - /** - * Indicates if the message has media available for download - * @type {boolean} - */ - this.hasMedia = data.clientUrl ? true : false; - - /** - * Message content - * @type {string} - */ - this.body = this.hasMedia ? data.caption || '' : data.body || ''; - - /** - * Message type - * @type {MessageTypes} - */ - this.type = data.type; - - /** - * Unix timestamp for when the message was created - * @type {number} - */ - this.timestamp = data.t; - - /** - * ID for the Chat that this message was sent to, except if the message was sent by the current user. - * @type {string} - */ - this.from = (typeof (data.from) === 'object' && data.from !== null) ? data.from._serialized : data.from; - - /** - * ID for who this message is for. - * - * If the message is sent by the current user, it will be the Chat to which the message is being sent. - * If the message is sent by another user, it will be the ID for the current user. - * @type {string} - */ - this.to = (typeof (data.to) === 'object' && data.to !== null) ? data.to._serialized : data.to; - - /** - * If the message was sent to a group, this field will contain the user that sent the message. - * @type {string} - */ - this.author = (typeof (data.author) === 'object' && data.author !== null) ? data.author._serialized : data.author; - - /** - * Indicates if the message was forwarded - * @type {boolean} - */ - this.isForwarded = data.isForwarded; - - /** - * Indicates if the message was a broadcast - * @type {boolean} - */ - this.broadcast = data.broadcast; - - /** - * Indicates if the message was sent by the current user - * @type {boolean} - */ - this.fromMe = data.id.fromMe; - - /** - * Indicates if the message was sent as a reply to another message. - * @type {boolean} - */ - this.hasQuotedMsg = data.quotedMsg ? true : false; - - /** - * Location information contained in the message, if the message is type "location" - * @type {Location} - */ - this.location = data.type === MessageTypes.LOCATION ? new Location(data.lat, data.lng, data.loc) : undefined; - - /** - * Indicates the mentions in the message body. - * @type {Array} - */ - this.mentionedIds = []; - - if (data.mentionedJidList) { - this.mentionedIds = data.mentionedJidList; - } - - return super._patch(data); - } - - _getChatId() { - return this.fromMe ? this.to : this.from; - } - - /** - * Returns the Chat this message was sent in - * @returns {Promise} - */ - getChat() { - return this.client.getChatById(this._getChatId()); - } - - /** - * Returns the Contact this message was sent from - * @returns {Promise} - */ - getContact() { - return this.client.getContactById(this.author || this.from); - } - - /** - * Returns the Contacts mentioned in this message - * @returns {Promise>} - */ - async getMentions() { - return await Promise.all(this.mentionedIds.map(async m => await this.client.getContactById(m))); - } - - /** - * Returns the quoted message, if any - * @returns {Promise} - */ - async getQuotedMessage() { - if (!this.hasQuotedMsg) return undefined; - - const quotedMsg = await this.client.pupPage.evaluate((msgId) => { - let msg = window.Store.Msg.get(msgId); - return msg.quotedMsgObj().serialize(); - }, this.id._serialized); - - return new Message(this.client, quotedMsg); - } - - /** - * Sends a message as a reply to this message. If chatId is specified, it will be sent - * through the specified Chat. If not, it will send the message - * in the same Chat as the original message was sent. - * - * @param {string|MessageMedia|Location} content - * @param {?string} chatId - * @param {object} options - * @returns {Promise} - */ - async reply(content, chatId, options={}) { - if (!chatId) { - chatId = this._getChatId(); - } - - options = { - ...options, - quotedMessageId: this.id._serialized - }; - - return this.client.sendMessage(chatId, content, options); - } - - /** - * Downloads and returns the attatched message media - * @returns {Promise} - */ - async downloadMedia() { - if (!this.hasMedia) { - return undefined; - } - - const result = await this.client.pupPage.evaluate(async (msgId) => { - const msg = window.Store.Msg.get(msgId); - - if(msg.mediaData.mediaStage != 'RESOLVED') { - // try to resolve media - await msg.downloadMedia(true, 1); - } - - if(msg.mediaData.mediaStage.includes('ERROR')) { - // media could not be downloaded - return undefined; - } - - const buffer = await window.WWebJS.downloadBuffer(msg.clientUrl); - const decrypted = await window.Store.CryptoLib.decryptE2EMedia(msg.type, buffer, msg.mediaKey, msg.mimetype); - const data = await window.WWebJS.readBlobAsync(decrypted._blob); - - return { - data: data.split(',')[1], - mimetype: msg.mimetype, - filename: msg.filename - }; - - }, this.id._serialized); - - if(!result) return undefined; - return new MessageMedia(result.mimetype, result.data, result.filename); - } - - /** - * Deletes a message from the chat - * @param {?boolean} everyone If true and the message is sent by the current user, will delete it for everyone in the chat. - */ - async delete(everyone) { - await this.client.pupPage.evaluate((msgId, everyone) => { - let msg = window.Store.Msg.get(msgId); - - if(everyone && msg.id.fromMe && msg.canRevoke()) { - return window.Store.Cmd.sendRevokeMsgs(msg.chat, [msg], true); - } - - return window.Store.Cmd.sendDeleteMsgs(msg.chat, [msg], true); - }, this.id._serialized, everyone); - } -} - -module.exports = Message; diff --git a/whatsapp-web.js/src/structures/MessageMedia.js b/whatsapp-web.js/src/structures/MessageMedia.js deleted file mode 100644 index 3d9a25b..0000000 --- a/whatsapp-web.js/src/structures/MessageMedia.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const path = require('path'); -const mime = require('mime'); - -/** - * Media attached to a message - * @param {string} mimetype MIME type of the attachment - * @param {string} data Base64-encoded data of the file - * @param {?string} filename Document file name - */ -class MessageMedia { - constructor(mimetype, data, filename) { - /** - * MIME type of the attachment - * @type {string} - */ - this.mimetype = mimetype; - - /** - * Base64 encoded data that represents the file - * @type {string} - */ - this.data = data; - - /** - * Name of the file (for documents) - * @type {?string} - */ - this.filename = filename; - } - - /** - * Creates a MessageMedia instance from a local file path - * @param {string} filePath - * @returns {MessageMedia} - */ - static fromFilePath(filePath) { - const b64data = fs.readFileSync(filePath, {encoding: 'base64'}); - const mimetype = mime.getType(filePath); - const filename = path.basename(filePath); - - return new MessageMedia(mimetype, b64data, filename); - } -} - -module.exports = MessageMedia; \ No newline at end of file diff --git a/whatsapp-web.js/src/structures/PrivateChat.js b/whatsapp-web.js/src/structures/PrivateChat.js deleted file mode 100644 index 9296f86..0000000 --- a/whatsapp-web.js/src/structures/PrivateChat.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -const Chat = require('./Chat'); - -/** - * Represents a Private Chat on WhatsApp - * @extends {Chat} - */ -class PrivateChat extends Chat { - -} - -module.exports = PrivateChat; \ No newline at end of file diff --git a/whatsapp-web.js/src/structures/PrivateContact.js b/whatsapp-web.js/src/structures/PrivateContact.js deleted file mode 100644 index 0247967..0000000 --- a/whatsapp-web.js/src/structures/PrivateContact.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -const Contact = require('./Contact'); - -/** - * Represents a Private Contact on WhatsApp - * @extends {Contact} - */ -class PrivateContact extends Contact { - -} - -module.exports = PrivateContact; \ No newline at end of file diff --git a/whatsapp-web.js/src/structures/index.js b/whatsapp-web.js/src/structures/index.js deleted file mode 100644 index 87b3f6e..0000000 --- a/whatsapp-web.js/src/structures/index.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - Base: require('./Base'), - BusinessContact: require('./BusinessContact'), - Chat: require('./Chat'), - ClientInfo: require('./ClientInfo'), - Contact: require('./Contact'), - GroupChat: require('./GroupChat'), - Location: require('./Location'), - Message: require('./Message'), - MessageMedia: require('./MessageMedia'), - PrivateChat: require('./PrivateChat'), - PrivateContact: require('./PrivateContact'), - GroupNotification: require('./GroupNotification') -}; \ No newline at end of file diff --git a/whatsapp-web.js/src/userInteraction/commands.js b/whatsapp-web.js/src/userInteraction/commands.js new file mode 100644 index 0000000..01dc992 --- /dev/null +++ b/whatsapp-web.js/src/userInteraction/commands.js @@ -0,0 +1,23 @@ +class Command{ + + + constructor({command, message, callback}){ + this.command = command; + this.message = message; + this.callback = callback; + } + + getCommand(){ + return this.command; + } + + getCallback(){ + return this.callback; + } + + getMessage(){ + return this.message; + } +} + +module.exports.Command = Command; diff --git a/whatsapp-web.js/src/userInteraction/messages.js b/whatsapp-web.js/src/userInteraction/messages.js new file mode 100644 index 0000000..1f39c14 --- /dev/null +++ b/whatsapp-web.js/src/userInteraction/messages.js @@ -0,0 +1,52 @@ + +const { Command } = require("./commands"); +const { onWG } = require("../businessLogic/logic"); + +/////////// +//add the commands here +/////////// +const commands = [ + + new Command({ + command: 'wg', + message : [ + `stop it and get some help by using the following command *wg help*`, + `Hope everything works well` + ] , + callback : () => { + onWG(); + } + }), + +]; + + + +module.exports= onMessage = (message, client) => { + + let command = null; + + //if the message start with wg then proceed + if(message.body.startsWith("wg")) + { + for (let c of commands){ + if(c.getCommand() == message.body) + { + command = c; + break; + } + } + + if(command != null){ + command.getCallback()(); + for (let msg of command.getMessage()) + { + client.sendMessage(message.from, msg, new Object()); + } + } + } + +}; + + +//export default onMessage; \ No newline at end of file diff --git a/whatsapp-web.js/src/util/Constants.js b/whatsapp-web.js/src/util/Constants.js deleted file mode 100644 index 2534c58..0000000 --- a/whatsapp-web.js/src/util/Constants.js +++ /dev/null @@ -1,134 +0,0 @@ -'use strict'; - -exports.WhatsWebURL = 'https://web.whatsapp.com/'; - -exports.DefaultOptions = { - puppeteer: { - headless: true, - defaultViewport: null - }, - session: false, - qrTimeoutMs: 45000, - qrRefreshIntervalMs: 20000, - authTimeoutMs: 45000, - takeoverOnConflict: false, - takeoverTimeoutMs: 0, - userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36' -}; - -/** - * Client status - * @readonly - * @enum {number} - */ -exports.Status = { - INITIALIZING: 0, - AUTHENTICATING: 1, - READY: 3 -}; - -/** - * Events that can be emitted by the client - * @readonly - * @enum {string} - */ -exports.Events = { - AUTHENTICATED: 'authenticated', - AUTHENTICATION_FAILURE: 'auth_failure', - READY: 'ready', - MESSAGE_RECEIVED: 'message', - MESSAGE_CREATE: 'message_create', - MESSAGE_REVOKED_EVERYONE: 'message_revoke_everyone', - MESSAGE_REVOKED_ME: 'message_revoke_me', - MESSAGE_ACK: 'message_ack', - MEDIA_UPLOADED: 'media_uploaded', - GROUP_JOIN: 'group_join', - GROUP_LEAVE: 'group_leave', - GROUP_UPDATE: 'group_update', - QR_RECEIVED: 'qr', - DISCONNECTED: 'disconnected', - STATE_CHANGED: 'change_state', - BATTERY_CHANGED: 'change_battery' -}; - -/** - * Message types - * @readonly - * @enum {string} - */ -exports.MessageTypes = { - TEXT: 'chat', - AUDIO: 'audio', - VOICE: 'ptt', - IMAGE: 'image', - VIDEO: 'video', - DOCUMENT: 'document', - STICKER: 'sticker', - LOCATION: 'location', - CONTACT_CARD: 'vcard', - CONTACT_CARD_MULTI: 'multi_vcard', - REVOKED: 'revoked', - UNKNOWN: 'unknown' -}; - -/** - * Group notification types - * @readonly - * @enum {string} - */ -exports.GroupNotificationTypes = { - ADD: 'add', - INVITE: 'invite', - REMOVE: 'remove', - LEAVE: 'leave', - SUBJECT: 'subject', - DESCRIPTION: 'description', - PICTURE: 'picture', - ANNOUNCE: 'announce', - RESTRICT: 'restrict', -}; - -/** - * Chat types - * @readonly - * @enum {string} - */ -exports.ChatTypes = { - SOLO: 'solo', - GROUP: 'group', - UNKNOWN: 'unknown' -}; - -/** - * WhatsApp state - * @readonly - * @enum {string} - */ -exports.WAState = { - CONFLICT: 'CONFLICT', - CONNECTED: 'CONNECTED', - DEPRECATED_VERSION: 'DEPRECATED_VERSION', - OPENING: 'OPENING', - PAIRING: 'PAIRING', - PROXYBLOCK: 'PROXYBLOCK', - SMB_TOS_BLOCK: 'SMB_TOS_BLOCK', - TIMEOUT: 'TIMEOUT', - TOS_BLOCK: 'TOS_BLOCK', - UNLAUNCHED: 'UNLAUNCHED', - UNPAIRED: 'UNPAIRED', - UNPAIRED_IDLE: 'UNPAIRED_IDLE' -}; - -/** - * Message ACK - * @readonly - * @enum {number} - */ -exports.MessageAck = { - ACK_ERROR: -1, - ACK_PENDING: 0, - ACK_SERVER: 1, - ACK_DEVICE: 2, - ACK_READ: 3, - ACK_PLAYED: 4, -}; diff --git a/whatsapp-web.js/src/util/Injected.js b/whatsapp-web.js/src/util/Injected.js deleted file mode 100644 index 4a57820..0000000 --- a/whatsapp-web.js/src/util/Injected.js +++ /dev/null @@ -1,321 +0,0 @@ -'use strict'; - -// Exposes the internal Store to the WhatsApp Web client -exports.ExposeStore = (moduleRaidStr) => { - eval('var moduleRaid = ' + moduleRaidStr); - // eslint-disable-next-line no-undef - window.mR = moduleRaid(); - window.Store = window.mR.findModule('Chat')[1].default; - window.Store.AppState = window.mR.findModule('STREAM')[0].default; - window.Store.Conn = window.mR.findModule('Conn')[0].default; - window.Store.CryptoLib = window.mR.findModule('decryptE2EMedia')[0]; - window.Store.Wap = window.mR.findModule('Wap')[0].default; - window.Store.SendSeen = window.mR.findModule('sendSeen')[0]; - window.Store.SendClear = window.mR.findModule('sendClear')[0]; - window.Store.SendDelete = window.mR.findModule('sendDelete')[0]; - window.Store.genId = window.mR.findModule((module) => module.default && typeof module.default === 'function' && module.default.toString().match(/crypto/))[0].default; - window.Store.SendMessage = window.mR.findModule('addAndSendMsgToChat')[0]; - window.Store.MsgKey = window.mR.findModule((module) => module.default && module.default.fromString)[0].default; - window.Store.Invite = window.mR.findModule('sendJoinGroupViaInvite')[0]; - window.Store.OpaqueData = window.mR.findModule('getOrCreateOpaqueDataForPath')[0]; - window.Store.MediaPrep = window.mR.findModule('MediaPrep')[0]; - window.Store.MediaObject = window.mR.findModule('getOrCreateMediaObject')[0]; - window.Store.MediaUpload = window.mR.findModule('uploadMedia')[0]; - window.Store.Cmd = window.mR.findModule('Cmd')[0].default; - window.Store.MediaTypes = window.mR.findModule('msgToMediaType')[0]; - window.Store.UserConstructor = window.mR.findModule((module) => (module.default && module.default.prototype && module.default.prototype.isServer && module.default.prototype.isUser) ? module.default : null)[0].default; - window.Store.Validators = window.mR.findModule('findLinks')[0]; - window.Store.WidFactory = window.mR.findModule('createWid')[0]; -}; - -exports.LoadUtils = () => { - window.WWebJS = {}; - window.WWebJS.getNumberId = async (id) => { - - let result = await window.Store.Wap.queryExist(id); - if (result.jid === undefined) - throw 'The number provided is not a registered whatsapp user'; - return result.jid; - }; - window.WWebJS.sendSeen = async (chatId) => { - let chat = window.Store.Chat.get(chatId); - if (chat !== undefined) { - await window.Store.SendSeen.sendSeen(chat, false); - return true; - } - return false; - - }; - window.WWebJS.sendMessage = async (chat, content, options = {}) => { - let attOptions = {}; - if (options.attachment) { - attOptions = await window.WWebJS.processMediaData(options.attachment, options.sendAudioAsVoice); - content = attOptions.preview; - delete options.attachment; - } - - let quotedMsgOptions = {}; - if (options.quotedMessageId) { - let quotedMessage = window.Store.Msg.get(options.quotedMessageId); - if (quotedMessage.canReply()) { - quotedMsgOptions = quotedMessage.msgContextInfo(chat); - } - delete options.quotedMessageId; - } - - if (options.mentionedJidList) { - options.mentionedJidList = options.mentionedJidList.map(cId => window.Store.Contact.get(cId).id); - } - - let locationOptions = {}; - if (options.location) { - locationOptions = { - type: 'location', - loc: options.location.description, - lat: options.location.latitude, - lng: options.location.longitude - }; - delete options.location; - } - - if (options.linkPreview) { - delete options.linkPreview; - const link = window.Store.Validators.findLink(content); - if (link) { - const preview = await window.Store.Wap.queryLinkPreview(link.url); - preview.preview = true; - preview.subtype = 'url'; - options = { ...options, ...preview }; - } - } - - const newMsgId = new window.Store.MsgKey({ - from: window.Store.Conn.me, - to: chat.id, - id: window.Store.genId(), - }); - - const message = { - ...options, - id: newMsgId, - ack: 0, - body: content, - from: window.Store.Conn.me, - to: chat.id, - local: true, - self: 'out', - t: parseInt(new Date().getTime() / 1000), - isNewMsg: true, - type: 'chat', - ...locationOptions, - ...attOptions, - ...quotedMsgOptions - }; - - await window.Store.SendMessage.addAndSendMsgToChat(chat, message); - return window.Store.Msg.get(newMsgId._serialized); - }; - - window.WWebJS.processMediaData = async (mediaInfo, forceVoice) => { - const file = window.WWebJS.mediaInfoToFile(mediaInfo); - const mData = await window.Store.OpaqueData.default.createFromData(file, file.type); - const mediaPrep = window.Store.MediaPrep.prepRawMedia(mData, {}); - const mediaData = await mediaPrep.waitForPrep(); - const mediaObject = window.Store.MediaObject.getOrCreateMediaObject(mediaData.filehash); - - const mediaType = window.Store.MediaTypes.msgToMediaType({ - type: mediaData.type, - isGif: mediaData.isGif - }); - - if(forceVoice && mediaData.type === 'audio') { - mediaData.type = 'ptt'; - } - - if (!(mediaData.mediaBlob instanceof window.Store.OpaqueData.default)) { - mediaData.mediaBlob = await window.Store.OpaqueData.default.createFromData(mediaData.mediaBlob, mediaData.mediaBlob.type); - } - - mediaData.renderableUrl = mediaData.mediaBlob.url(); - mediaObject.consolidate(mediaData.toJSON()); - mediaData.mediaBlob.autorelease(); - - const uploadedMedia = await window.Store.MediaUpload.uploadMedia({ mimetype: mediaData.mimetype, mediaObject, mediaType }); - if (!uploadedMedia) { - throw new Error('upload failed: media entry was not created'); - } - - mediaData.set({ - clientUrl: uploadedMedia.mmsUrl, - directPath: uploadedMedia.directPath, - mediaKey: uploadedMedia.mediaKey, - mediaKeyTimestamp: uploadedMedia.mediaKeyTimestamp, - filehash: mediaObject.filehash, - uploadhash: uploadedMedia.uploadHash, - size: mediaObject.size, - streamingSidecar: uploadedMedia.sidecar, - firstFrameSidecar: uploadedMedia.firstFrameSidecar - }); - - return mediaData; - }; - - window.WWebJS.getChatModel = chat => { - let res = chat.serialize(); - res.isGroup = chat.isGroup; - res.formattedTitle = chat.formattedTitle; - - if (chat.groupMetadata) { - res.groupMetadata = chat.groupMetadata.serialize(); - } - - return res; - }; - - window.WWebJS.getChat = chatId => { - const chat = window.Store.Chat.get(chatId); - return window.WWebJS.getChatModel(chat); - }; - - window.WWebJS.getChats = () => { - const chats = window.Store.Chat.models; - return chats.map(chat => window.WWebJS.getChatModel(chat)); - }; - - window.WWebJS.getContactModel = contact => { - let res = contact.serialize(); - res.isBusiness = contact.isBusiness; - - if (contact.businessProfile) { - res.businessProfile = contact.businessProfile.serialize(); - } - - res.isMe = contact.isMe; - res.isUser = contact.isUser; - res.isGroup = contact.isGroup; - res.isWAContact = contact.isWAContact; - res.isMyContact = contact.isMyContact; - res.userid = contact.userid; - - return res; - }; - - window.WWebJS.getContact = contactId => { - const contact = window.Store.Contact.get(contactId); - return window.WWebJS.getContactModel(contact); - }; - - window.WWebJS.getContacts = () => { - const contacts = window.Store.Contact.models; - return contacts.map(contact => window.WWebJS.getContactModel(contact)); - }; - - window.WWebJS.mediaInfoToFile = ({ data, mimetype, filename }) => { - const binaryData = atob(data); - - const buffer = new ArrayBuffer(binaryData.length); - const view = new Uint8Array(buffer); - for (let i = 0; i < binaryData.length; i++) { - view[i] = binaryData.charCodeAt(i); - } - - const blob = new Blob([buffer], { type: mimetype }); - return new File([blob], filename, { - type: mimetype, - lastModified: Date.now() - }); - }; - - window.WWebJS.downloadBuffer = (url) => { - return new Promise(function (resolve, reject) { - let xhr = new XMLHttpRequest(); - xhr.open('GET', url); - xhr.responseType = 'arraybuffer'; - xhr.onload = function () { - if (xhr.status == 200) { - resolve(xhr.response); - } else { - reject({ - status: this.status, - statusText: xhr.statusText - }); - } - }; - xhr.onerror = function () { - reject({ - status: this.status, - statusText: xhr.statusText - }); - }; - xhr.send(null); - }); - }; - - window.WWebJS.readBlobAsync = (blob) => { - return new Promise((resolve, reject) => { - let reader = new FileReader(); - - reader.onload = () => { - resolve(reader.result); - }; - - reader.onerror = reject; - - reader.readAsDataURL(blob); - }); - }; - - window.WWebJS.sendClearChat = async (chatId) => { - let chat = window.Store.Chat.get(chatId); - if (chat !== undefined) { - await window.Store.SendClear.sendClear(chat, false); - return true; - } - return false; - }; - - window.WWebJS.sendDeleteChat = async (chatId) => { - let chat = window.Store.Chat.get(chatId); - if (chat !== undefined) { - await window.Store.SendDelete.sendDelete(chat); - return true; - } - return false; - }; - - window.WWebJS.sendChatstate = async (state, chatId) => { - switch(state) { - case 'typing': - await window.Store.Wap.sendChatstateComposing(chatId); - break; - case 'recording': - await window.Store.Wap.sendChatstateRecording(chatId); - break; - case 'stop': - await window.Store.Wap.sendChatstatePaused(chatId); - break; - default: - throw 'Invalid chatstate'; - } - - return true; - }; - -}; - -exports.MarkAllRead = () => { - let Chats = window.Store.Chat.models; - - for (let chatIndex in Chats) { - if (isNaN(chatIndex)) { - continue; - } - - let chat = Chats[chatIndex]; - - if (chat.unreadCount > 0) { - chat.markSeen(); - window.Store.Wap.sendConversationSeen(chat.id, chat.getLastMsgKeyForAction(), chat.unreadCount - chat.pendingSeenCount); - } - } -}; diff --git a/whatsapp-web.js/src/util/InterfaceController.js b/whatsapp-web.js/src/util/InterfaceController.js deleted file mode 100644 index 9fce571..0000000 --- a/whatsapp-web.js/src/util/InterfaceController.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -/** - * Interface Controller - */ -class InterfaceController { - - constructor(props) { - this.pupPage = props.pupPage; - } - - /** - * Opens the Chat Window - * @param {string} chatId ID of the chat window that will be opened - */ - async openChatWindow(chatId) { - await this.pupPage.evaluate(async chatId => { - let chat = await window.Store.Chat.get(chatId); - await window.Store.Cmd.openChatAt(chat); - }, chatId); - } - - /** - * Opens the Chat Drawer - * @param {string} chatId ID of the chat drawer that will be opened - */ - async openChatDrawer(chatId) { - await this.pupPage.evaluate(async chatId => { - let chat = await window.Store.Chat.get(chatId); - await window.Store.Cmd.chatInfoDrawer(chat); - }, chatId); - } - - /** - * Opens the Message Drawer - * @param {string} msgId ID of the message drawer that will be opened - */ - async openMessageDrawer(msgId) { - await this.pupPage.evaluate(async msgId => { - let msg = await window.Store.Msg.get(msgId); - await window.Store.Cmd.msgInfoDrawer(msg); - }, msgId); - } - - /** - * Closes the Right Drawer - */ - async closeRightDrawer() { - await this.pupPage.evaluate(async () => { - await window.Store.Cmd.closeDrawerRight(); - }); - } - -} - -module.exports = InterfaceController; \ No newline at end of file diff --git a/whatsapp-web.js/src/util/Util.js b/whatsapp-web.js/src/util/Util.js deleted file mode 100644 index bb09215..0000000 --- a/whatsapp-web.js/src/util/Util.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -const has = (o, k) => Object.prototype.hasOwnProperty.call(o, k); - -/** - * Utility methods - */ -class Util { - - constructor() { - throw new Error(`The ${this.constructor.name} class may not be instantiated.`); - } - - /** - * Sets default properties on an object that aren't already specified. - * @param {Object} def Default properties - * @param {Object} given Object to assign defaults to - * @returns {Object} - * @private - */ - static mergeDefault(def, given) { - if (!given) return def; - for (const key in def) { - if (!has(given, key) || given[key] === undefined) { - given[key] = def[key]; - } else if (given[key] === Object(given[key])) { - given[key] = Util.mergeDefault(def[key], given[key]); - } - } - - return given; - } -} - -module.exports = Util; \ No newline at end of file diff --git a/whatsapp-web.js/website_test.js b/whatsapp-web.js/website_test.js index 29acc5c..53ea894 100644 --- a/whatsapp-web.js/website_test.js +++ b/whatsapp-web.js/website_test.js @@ -1,7 +1,6 @@ const fs = require('fs'); var request = require('request'); -const { Client, Location } = require('./index'); -const MessageMedia = require('./src/structures/MessageMedia'); +const { Client} = require('whatsapp-web.js'); // Data structure to store basic information : To ensure that user gets the website genreated with the data which he wrote /* @@ -35,6 +34,7 @@ if (fs.existsSync(SESSION_FILE_PATH)) const client = new Client({ puppeteer: { headless: false }, session: sessionCfg }); client.initialize(); + client.on('qr', (qr) => { console.log('QR RECEIVED', qr);