├── .drone.sec ├── .drone.yml ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .husky ├── commit-msg └── pre-commit ├── .lintstagedrc ├── .release-it.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── bower.json ├── commitlint.config.js ├── dist ├── client.base.min.js ├── client.base.min.js.map ├── client.flash.min.js ├── client.flash.min.js.map ├── client.java.min.js ├── client.java.min.js.map ├── client.min.js └── client.min.js.map ├── karma ├── aircover.conf.js ├── base.conf.js ├── drone.conf.js └── local.conf.js ├── logo.jpg ├── package-lock.json ├── package.json ├── scripts ├── install.js └── sauce-sample.json ├── specs ├── .eslintrc.js ├── client-build-variants.spec.js └── client.spec.js ├── src ├── .eslintrc.js ├── client.base.js ├── client.flash.js ├── client.java.js ├── client.js ├── modules │ ├── flash-detection.js │ └── java-detection.js └── vendor │ ├── deployJava.js │ ├── fontdetect.js │ └── swfobject.js └── webpack.config.js /.drone.sec: -------------------------------------------------------------------------------- 1 | eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.naZ1ZlMpAFxwzNOaGvEKoeNhE3SQOUTvFOYZMVhdGTf1EJc3BwPh4Chs4FtG0jEyZppCP1UkYfVnONWKWVhjcvJ2APLNSX1vFuq6nDv8WM9AnGqB475v9f58Rcl8u6Eqq0NvvPD3M67Bgk3bv5NLwCnYAkhMwl4gmtbL4f_eC2W7YIzsojRPvj4bdoLnmy8KK-D10dsXEpA81ZI9h0fzn9FXc9gEo0vOX40DMiv1TdUJBlItReSVST_2B9F5lSomFZN7DYLsPVHJ7o1FM4DGC4A8qQpUYz5wQme6GhlsXOKXNfmuAbStm3eoUzTGv6CIyf7uUys81y48Stz1FfQkQw.RGma1N7Gg6_suZhs.IgCP4YFRx-Cx6xWw8OunxeVo35MnQ8TI2JJEM0eIPSZH7F8XGte4qQCS7ZyKK81DIIaD_H6W2w8yxSkKhDgyRgss1W7camoy4kZmw3NmWymcfV96vziTRWhZ5bUNnUlDyaShkrD-yJnX5uwYjVlj2-YN2zQpDeUW5N9NZ1v08kq5absuQrI2OBWFouEEC_U6_3BJPnNYIGDMn4Ftm7Px1JwyPyFPJl3JjVMszY-mROu6dcuwl4wsqV0oJges73wyi2-lqW0eBal5MBnCdNsVMHBKmSusxm5LxZyjNgMwgDOYLeNj6A.FwC4gtJGBAXAHBeIzX919w -------------------------------------------------------------------------------- /.drone.yml: -------------------------------------------------------------------------------- 1 | build: 2 | image: node:latest 3 | environment: 4 | - SAUCE_USERNAME=$$SAUCE_USERNAME 5 | - SAUCE_ACCESS_KEY=$$SAUCE_ACCESS_KEY 6 | commands: 7 | - export BUILD_NUMBER=$DRONE_BUILD_NUMBER 8 | - npm install --quiet 9 | - npm run test:drone 10 | 11 | publish: 12 | coverage: 13 | token: $$GITHUB_TOKEN 14 | include: jackspirou/clientjs/coverage/lcov.info 15 | when: 16 | branch: master 17 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | src/vendor 2 | dist 3 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = { 3 | root: true, 4 | parserOptions: { 5 | ecmaVersion: 2018, 6 | sourceType: 'script', 7 | }, 8 | extends: ['eslint:recommended'], 9 | env: { 10 | node: true, 11 | }, 12 | rules: { 13 | strict: 'error', 14 | 'no-unused-vars': ['error', { argsIgnorePattern: '^_' }], 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## 2 | # DRONE 3 | ## 4 | .secrets.yml 5 | sauce.json 6 | 7 | ## 8 | # NODE 9 | ## 10 | 11 | # Logs 12 | logs 13 | *.log 14 | npm-debug.log* 15 | 16 | # Runtime data 17 | pids 18 | *.pid 19 | *.seed 20 | 21 | # Directory for instrumented libs generated by jscoverage/JSCover 22 | lib-cov 23 | 24 | # Coverage directory used by tools like istanbul 25 | coverage 26 | 27 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 28 | .grunt 29 | 30 | # node-waf configuration 31 | .lock-wscript 32 | 33 | # Compiled binary addons (http://nodejs.org/api/addons.html) 34 | build/Release 35 | 36 | # Dependency directory 37 | node_modules 38 | 39 | # Optional npm cache directory 40 | .npm 41 | 42 | # Optional REPL history 43 | .node_repl_history 44 | 45 | ## 46 | # MAC OSX 47 | ## 48 | 49 | .DS_Store 50 | .AppleDouble 51 | .LSOverride 52 | 53 | # Icon must end with two \r 54 | Icon 55 | 56 | 57 | # Thumbnails 58 | ._* 59 | 60 | # Files that might appear in the root of a volume 61 | .DocumentRevisions-V100 62 | .fseventsd 63 | .Spotlight-V100 64 | .TemporaryItems 65 | .Trashes 66 | .VolumeIcon.icns 67 | 68 | # Directories potentially created on remote AFP share 69 | .AppleDB 70 | .AppleDesktop 71 | Network Trash Folder 72 | Temporary Items 73 | .apdisk 74 | 75 | ## 76 | # WINDOWS OS 77 | ## 78 | 79 | # Windows image file caches 80 | Thumbs.db 81 | ehthumbs.db 82 | 83 | # Folder config file 84 | Desktop.ini 85 | 86 | # Recycle Bin used on file shares 87 | $RECYCLE.BIN/ 88 | 89 | # Windows Installer files 90 | *.cab 91 | *.msi 92 | *.msm 93 | *.msp 94 | 95 | # Windows shortcuts 96 | *.lnk 97 | 98 | ## 99 | # Editors/IDEs 100 | ## 101 | 102 | # VSCode + Plugins 103 | .history 104 | .vscode 105 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx --no-install commitlint --edit "$1" 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx --no-install lint-staged 5 | -------------------------------------------------------------------------------- /.lintstagedrc: -------------------------------------------------------------------------------- 1 | { 2 | "*.js": "eslint --fix" 3 | } 4 | -------------------------------------------------------------------------------- /.release-it.json: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "commitMessage": "chore: release v${version}" 4 | }, 5 | "github": { 6 | "release": true 7 | }, 8 | "plugins": { 9 | "@release-it/keep-a-changelog": { 10 | "filename": "CHANGELOG.md" 11 | }, 12 | "@release-it/bumper": { 13 | "out": { 14 | "file": "bower.json" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## [0.2.1] - 2021-10-25 8 | ### Changed 9 | - Bump potentialy vulnerable `ua-parser-js` version to a safe version range. Security advisory: [GHSA-pjwm-rvh2-c87w](https://github.com/advisories/GHSA-pjwm-rvh2-c87w). 10 | 11 | ## [0.2.0] - 2021-08-25 12 | ### Added 13 | - Modularize Java and Flash detection, offer bundles excluding either Java or Flash detection or both 14 | 15 | ### Changed 16 | - (**breaking**) Expose the client.js variant *without* Java and Flash detection for browser bundlers 17 | - Update all production and dev dependencies 18 | - Use `ua-parser-js` package from `npm` instead of a vendored copy 19 | - Use `murmurhash-js` package from `npm` instead of a vendored copy of an older implementation 20 | - Update vendored `deployJava.js` to latest version 21 | 22 | ### Fixed 23 | - Migrate to webpack-based build to fix broken bundle 24 | 25 | ## [0.1.11] - 2016-01-25 26 | 27 | ## [0.1.10] - 2016-01-25 28 | 29 | ## [0.1.9] - 2016-01-16 30 | 31 | ## [0.1.8] - 2016-01-03 32 | 33 | ## [0.1.7] - 2016-01-02 34 | 35 | ## [0.1.6] - 2015-12-31 36 | 37 | ## [0.1.5] - 2015-09-13 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![ClientJS logo](logo.jpg) 2 | 3 | **Device information and digital fingerprinting written in _pure_ JavaScript.** 4 | 5 | [![Sauce Test Status](https://saucelabs.com/buildstatus/clientjs)](https://saucelabs.com/u/clientjs) [![Build Status](http://beta.drone.io/api/badges/jackspirou/clientjs/status.svg)](http://beta.drone.io/jackspirou/clientjs) [![Aircover Coverage](https://aircover.co/badges/jackspirou/clientjs/coverage.svg)](https://aircover.co/jackspirou/clientjs) 6 | 7 | 8 | [![Sauce Test Status](https://saucelabs.com/browser-matrix/clientjs.svg)](https://saucelabs.com/u/clientjs) 9 | 10 | ClientJS is a JavaScript library that makes digital fingerprinting easy, while also exposing all the browser data-points used in generating fingerprints. 11 | 12 | If you want to fingerprint browsers, you are **_probably_** also interested in other client-based information, such as screen resolution, operating system, browser type, device type, and much more. 13 | 14 | Below are some features that make ClientJS different from other fingerprinting libraries: 15 | - It's pure native JavaScript 16 | - It's decently lightweight at ~55 KB (full bundle) or ~28 KB (minimal bundle) 17 | - All user data points are available by design, not just the 32bit integer fingerprint 18 | 19 | 21 | 22 | ## Installation 23 | To use ClientJS, simply include `dist/client.base.min.js` or one of the other bundles (see [bundles](#bundles) section for more details) 24 | 25 | ### npm 26 | 27 | ```shell 28 | npm install clientjs 29 | ``` 30 | 31 | ## Fingerprinting 32 | Digital fingerprints are based on device/browser settings. 33 | They allow you to make an "educated guess" about the identify of a new or returning visitor. 34 | By taking multiple data points, combining them, and representing them as a number, you can be surprisingly accurate at recognizing not only browsers and devices, but also individual users. 35 | 36 | This is useful for identifying users or devices without cookies or sessions. 37 | It is not a full proof technique, but it has been shown to be statistically significant at accurately identifying devices. 38 | 39 | First, you'll need to import the library. You can do it in different ways, depending on your environment: 40 | 41 | ```js 42 | // in an ES6 environment: 43 | import { ClientJS } from 'clientjs'; 44 | 45 | // via CommonJS imports: 46 | const { ClientJS } = require('clientjs'); 47 | 48 | // in a browser, when using a script tag: 49 | const ClientJS = window.ClientJS; 50 | ``` 51 | 52 | After having imported the library, simply create a new `ClientJS` object and call the `getFingerprint()` method which will return 53 | the browser/device fingerprint as a 32bit integer hash ID. 54 | 55 | ```js 56 | // Create a new ClientJS object 57 | const client = new ClientJS(); 58 | 59 | // Get the client's fingerprint id 60 | const fingerprint = client.getFingerprint(); 61 | 62 | // Print the 32bit hash id to the console 63 | console.log(fingerprint); 64 | ``` 65 | 66 | The current data-points that used to generate fingerprint 32bit integer hash ID is listed below: 67 | - user agent 68 | - screen print 69 | - color depth 70 | - current resolution 71 | - available resolution 72 | - device XDPI 73 | - device YDPI 74 | - plugin list 75 | - font list 76 | - local storage 77 | - session storage 78 | - timezone 79 | - language 80 | - system language 81 | - cookies 82 | - canvas print 83 | 84 | ## Bundles 85 | For maximum flexibility, this library is distributed in 4 different pre-bundled variants for the browser: 86 | 87 | - `dist/client.min.js` - full distribution bundle, contains Flash and Java detection mechanisms 88 | - `dist/client.flash.min.js` - contains Flash detection mechanism but misses Java detection (`getJavaVersion()` will throw an error when called) 89 | - `dist/client.java.min.js` - contains Java detection mechanism but misses Flash detection (`getFlashVersion()` will throw an error when called) 90 | - `dist/client.base.min.js` - misses both, Flash and Java detection mechanisms (`getFlashVersion()` and `getJavaVersion()` will throw an error when called) 91 | 92 | ## Available Methods 93 | Below is the current list of available methods to find information on a users browser/device. 94 | 95 | You can find documentation on each method at [clientjs.org](https://clientjs.org/). 96 | 97 | ```js 98 | const client = new ClientJS(); 99 | 100 | client.getBrowserData(); 101 | client.getFingerprint(); 102 | client.getCustomFingerprint(...); 103 | 104 | client.getUserAgent(); 105 | client.getUserAgentLowerCase(); 106 | 107 | client.getBrowser(); 108 | client.getBrowserVersion(); 109 | client.getBrowserMajorVersion(); 110 | client.isIE(); 111 | client.isChrome(); 112 | client.isFirefox(); 113 | client.isSafari(); 114 | client.isOpera(); 115 | 116 | client.getEngine(); 117 | client.getEngineVersion(); 118 | 119 | client.getOS(); 120 | client.getOSVersion(); 121 | client.isWindows(); 122 | client.isMac(); 123 | client.isLinux(); 124 | client.isUbuntu(); 125 | client.isSolaris(); 126 | 127 | client.getDevice(); 128 | client.getDeviceType(); 129 | client.getDeviceVendor(); 130 | 131 | client.getCPU(); 132 | 133 | client.isMobile(); 134 | client.isMobileMajor(); 135 | client.isMobileAndroid(); 136 | client.isMobileOpera(); 137 | client.isMobileWindows(); 138 | client.isMobileBlackBerry(); 139 | 140 | client.isMobileIOS(); 141 | client.isIphone(); 142 | client.isIpad(); 143 | client.isIpod(); 144 | 145 | client.getScreenPrint(); 146 | client.getColorDepth(); 147 | client.getCurrentResolution(); 148 | client.getAvailableResolution(); 149 | client.getDeviceXDPI(); 150 | client.getDeviceYDPI(); 151 | 152 | client.getPlugins(); 153 | client.isJava(); 154 | client.getJavaVersion(); // functional only in java and full builds, throws an error otherwise 155 | client.isFlash(); 156 | client.getFlashVersion(); // functional only in flash and full builds, throws an error otherwise 157 | client.isSilverlight(); 158 | client.getSilverlightVersion(); 159 | 160 | client.getMimeTypes(); 161 | client.isMimeTypes(); 162 | 163 | client.isFont(); 164 | client.getFonts(); 165 | 166 | client.isLocalStorage(); 167 | client.isSessionStorage(); 168 | client.isCookie(); 169 | 170 | client.getTimeZone(); 171 | 172 | client.getLanguage(); 173 | client.getSystemLanguage(); 174 | 175 | client.isCanvas(); 176 | client.getCanvasPrint(); 177 | ``` 178 | 179 | ## Shoulders of Giants 180 | It is important to note this project owes much to other pieces great works. 181 | We had the advantage of observing how others had approached this problem. 182 | 183 | Built Upon: 184 | - https://web.archive.org/web/20200714191004/https://github.com/Valve/fingerprintjs 185 | - https://web.archive.org/web/20200411083356/https://www.darkwavetech.com/index.php/device-fingerprint-blog 186 | - http://detectmobilebrowsers.com 187 | 188 | ## Contributing 189 | Collaborate by [forking](https://help.github.com/articles/fork-a-repo/) this project and sending a Pull Request this way. 190 | 191 | Once cloned, install all dependencies. ClientJS uses [Karma](https://karma-runner.github.io/) as its testing environment. 192 | 193 | ```shell 194 | # Install dependencies 195 | $ npm install 196 | ``` 197 | 198 | Run Karma and enjoy coding! 199 | 200 | ```shell 201 | $ npm test 202 | ``` 203 | 204 | Thanks for contributing to ClientJS! Please report any bug [here](https://github.com/jackspirou/clientjs/issues). 205 | 206 | ## Releasing 207 | 208 | To make a new release, use the [`release-it`](https://github.com/release-it/release-it) tool, this will guide you through the release process: 209 | 210 | ```sh 211 | npx release-it 212 | ``` 213 | 214 | You can make a dry run of the release process with the following command: 215 | 216 | ```sh 217 | npx release-it --dry-run 218 | ``` 219 | 220 | ## LICENSE 221 | [Apache License 2.0](https://github.com/jackspirou/clientjs/blob/master/LICENSE) 222 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "clientjs", 3 | "version": "0.2.1", 4 | "main": [ 5 | "dist/client.base.min.js" 6 | ], 7 | "ignore": [ 8 | ".husky", 9 | ".drone.sec", 10 | ".drone.yml", 11 | ".eslintignore", 12 | ".eslintrc.js", 13 | ".gitignore", 14 | ".lintstagedrc", 15 | ".release-it.json", 16 | "commitlint.config.js", 17 | "karma", 18 | "node_modules", 19 | "package-lock.json", 20 | "package.json", 21 | "sauce.json", 22 | "scripts", 23 | "specs", 24 | "webpack.config.js" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { extends: ["@commitlint/config-conventional"] }; 4 | -------------------------------------------------------------------------------- /dist/client.base.min.js: -------------------------------------------------------------------------------- 1 | !function(e,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i();else if("function"==typeof define&&define.amd)define([],i);else{var t=i();for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(this,(function(){return function(e){var i={};function t(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,i){if(1&i&&(e=t(e)),8&i)return e;if(4&i&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&i&&"string"!=typeof e)for(var o in e)t.d(n,o,function(i){return e[i]}.bind(null,o));return n},t.n=function(e){var i=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},t.p="",t(t.s=0)}([function(e,i,t){"use strict";var n,o,r=t(1)(),a=t(3),s=t(4),l=t(6),u=function(){var e=new s;return n=e.getResult(),o=new l,this};u.prototype={getSoftwareVersion:function(){return"0.1.11"},getBrowserData:function(){return n},getFingerprint:function(){var e="|",i=n.ua,t=this.getScreenPrint(),o=this.getPlugins(),r=this.getFonts(),s=this.isLocalStorage(),l=this.isSessionStorage(),u=this.getTimeZone(),c=this.getLanguage(),d=this.getSystemLanguage(),b=this.isCookie(),m=this.getCanvasPrint();return a(i+e+t+e+o+e+r+e+s+e+l+e+u+e+c+e+d+e+b+e+m,256)},getCustomFingerprint:function(){for(var e="|",i="",t=0;t>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|o>>>19))+((5*(o>>>16)&65535)<<16)&4294967295))+((58964+(r>>>16)&65535)<<16);switch(l=0,t){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:o^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return o^=e.length,o=2246822507*(65535&(o^=o>>>16))+((2246822507*(o>>>16)&65535)<<16)&4294967295,o=3266489909*(65535&(o^=o>>>13))+((3266489909*(o>>>16)&65535)<<16)&4294967295,(o^=o>>>16)>>>0}},function(e,i,t){var n;!function(o,r){"use strict";var a="function",s="undefined",l="object",u="string",c="model",d="name",b="type",m="vendor",w="version",g="architecture",p="console",f="mobile",h="tablet",v="smarttv",y="wearable",x="embedded",k="Amazon",S="Apple",C="ASUS",M="BlackBerry",P="Firefox",T="Google",B="Huawei",A="LG",L="Microsoft",U="Motorola",E="Opera",G="Samsung",N="Sony",j="Xiaomi",_="Zebra",R="Facebook",D=function(e){var i={};for(var t in e)i[e[t].toUpperCase()]=e[t];return i},I=function(e,i){return typeof e===u&&-1!==O(i).indexOf(O(e))},O=function(e){return e.toLowerCase()},z=function(e,i){if(typeof e===u)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof i===s?e:e.substring(0,255)},F=function(e,i){for(var t,n,o,s,u,c,d=0;d0?2==s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:3==s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=c?c.replace(s[1],s[2]):r:this[s[0]]=c?s[1].call(this,c,s[2]):r:4==s.length&&(this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):r):this[s]=c||r;d+=2}},q=function(e,i){for(var t in i)if(typeof i[t]===l&&i[t].length>0){for(var n=0;n255?z(e,255):e,this},this.setUA(t),this};H.VERSION="0.7.30",H.BROWSER=D([d,w,"major"]),H.CPU=D([g]),H.DEVICE=D([c,m,b,p,f,v,h,y,x]),H.ENGINE=H.OS=D([d,w]),typeof i!==s?(typeof e!==s&&e.exports&&(i=e.exports=H),i.UAParser=H):t(5)?(n=function(){return H}.call(i,t,i,e))===r||(e.exports=n):typeof o!==s&&(o.UAParser=H);var K=typeof o!==s&&(o.jQuery||o.Zepto);if(K&&!K.ua){var Y=new H;K.ua=Y.getResult(),K.ua.get=function(){return Y.getUA()},K.ua.set=function(e){Y.setUA(e);var i=Y.getResult();for(var t in i)K.ua[t]=i[t]}}}("object"==typeof window?window:this)},function(e,i){(function(i){e.exports=i}).call(this,{})},function(e,i){e.exports=function(){var e=["monospace","sans-serif","serif"],i=document.getElementsByTagName("body")[0],t=document.createElement("span");t.style.fontSize="72px",t.innerHTML="mmmmmmmmmmlli";var n={},o={};for(var r in e)t.style.fontFamily=e[r],i.appendChild(t),n[e[r]]=t.offsetWidth,o[e[r]]=t.offsetHeight,i.removeChild(t);this.detect=function(r){var a=!1;for(var s in e){t.style.fontFamily=r+","+e[s],i.appendChild(t);var l=t.offsetWidth!=n[e[s]]||t.offsetHeight!=o[e[s]];i.removeChild(t),a=a||l}return a}}}])})); 2 | //# sourceMappingURL=client.base.min.js.map -------------------------------------------------------------------------------- /dist/client.flash.min.js: -------------------------------------------------------------------------------- 1 | !function(e,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i();else if("function"==typeof define&&define.amd)define([],i);else{var t=i();for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(this,(function(){return function(e){var i={};function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,i){if(1&i&&(e=t(e)),8&i)return e;if(4&i&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&i&&"string"!=typeof e)for(var r in e)t.d(n,r,function(i){return e[i]}.bind(null,r));return n},t.n=function(e){var i=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},t.p="",t(t.s=13)}([function(e,i,t){"use strict";var n,r,o=t(1)(),a=t(3),s=t(4),l=t(6),u=function(){var e=new s;return n=e.getResult(),r=new l,this};u.prototype={getSoftwareVersion:function(){return"0.1.11"},getBrowserData:function(){return n},getFingerprint:function(){var e="|",i=n.ua,t=this.getScreenPrint(),r=this.getPlugins(),o=this.getFonts(),s=this.isLocalStorage(),l=this.isSessionStorage(),u=this.getTimeZone(),c=this.getLanguage(),d=this.getSystemLanguage(),f=this.isCookie(),p=this.getCanvasPrint();return a(i+e+t+e+r+e+o+e+s+e+l+e+u+e+c+e+d+e+f+e+p,256)},getCustomFingerprint:function(){for(var e="|",i="",t=0;t>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,t){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:r^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return r^=e.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0}},function(e,i,t){var n;!function(r,o){"use strict";var a="function",s="undefined",l="object",u="string",c="model",d="name",f="type",p="vendor",b="version",m="architecture",w="console",g="mobile",h="tablet",v="smarttv",y="wearable",S="embedded",C="Amazon",x="Apple",k="ASUS",M="BlackBerry",T="Firefox",P="Google",A="Huawei",B="LG",E="Microsoft",L="Motorola",N="Opera",U="Samsung",j="Sony",O="Xiaomi",I="Zebra",F="Facebook",R=function(e){var i={};for(var t in e)i[e[t].toUpperCase()]=e[t];return i},G=function(e,i){return typeof e===u&&-1!==D(i).indexOf(D(e))},D=function(e){return e.toLowerCase()},_=function(e,i){if(typeof e===u)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof i===s?e:e.substring(0,255)},V=function(e,i){for(var t,n,r,s,u,c,d=0;d0?2==s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:3==s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=c?c.replace(s[1],s[2]):o:this[s[0]]=c?s[1].call(this,c,s[2]):o:4==s.length&&(this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):o):this[s]=c||o;d+=2}},z=function(e,i){for(var t in i)if(typeof i[t]===l&&i[t].length>0){for(var n=0;n255?_(e,255):e,this},this.setUA(t),this};H.VERSION="0.7.30",H.BROWSER=R([d,b,"major"]),H.CPU=R([m]),H.DEVICE=R([c,p,f,w,g,v,h,y,S]),H.ENGINE=H.OS=R([d,b]),typeof i!==s?(typeof e!==s&&e.exports&&(i=e.exports=H),i.UAParser=H):t(5)?(n=function(){return H}.call(i,t,i,e))===o||(e.exports=n):typeof r!==s&&(r.UAParser=H);var $=typeof r!==s&&(r.jQuery||r.Zepto);if($&&!$.ua){var K=new H;$.ua=K.getResult(),$.ua.get=function(){return K.getUA()},$.ua.set=function(e){K.setUA(e);var i=K.getResult();for(var t in i)$.ua[t]=i[t]}}}("object"==typeof window?window:this)},function(e,i){(function(i){e.exports=i}).call(this,{})},function(e,i){e.exports=function(){var e=["monospace","sans-serif","serif"],i=document.getElementsByTagName("body")[0],t=document.createElement("span");t.style.fontSize="72px",t.innerHTML="mmmmmmmmmmlli";var n={},r={};for(var o in e)t.style.fontFamily=e[o],i.appendChild(t),n[e[o]]=t.offsetWidth,r[e[o]]=t.offsetHeight,i.removeChild(t);this.detect=function(o){var a=!1;for(var s in e){t.style.fontFamily=o+","+e[s],i.appendChild(t);var l=t.offsetWidth!=n[e[s]]||t.offsetHeight!=r[e[s]];i.removeChild(t),a=a||l}return a}}},function(e,i){"function"==typeof Object.create?e.exports=function(e,i){i&&(e.super_=i,e.prototype=Object.create(i.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,i){if(i){e.super_=i;var t=function(){};t.prototype=i.prototype,e.prototype=new t,e.prototype.constructor=e}}},,,function(e,i,t){"use strict";var n=t(11);e.exports=function(){if(this.isFlash()){var e=n.getFlashPlayerVersion();return e.major+"."+e.minor+"."+e.release}return""}},function(e,i){ 2 | /*! SWFObject v2.3.20130521 3 | is released under the MIT License 4 | */ 5 | var t,n,r,o,a,s,l="undefined",u="object",c="Shockwave Flash",d="application/x-shockwave-flash",f="SWFObjectExprInst",p="onreadystatechange",b=window,m=document,w=navigator,g=!1,h=[],v=[],y=[],S=[],C=!1,x=!1,k=!0,M=!1,T=function(){var e=typeof m.getElementById!==l&&typeof m.getElementsByTagName!==l&&typeof m.createElement!==l,i=w.userAgent.toLowerCase(),t=w.platform.toLowerCase(),n=/win/.test(t||i),r=/mac/.test(t||i),o=!!/webkit/.test(i)&&parseFloat(i.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")),a="Microsoft Internet Explorer"===w.appName,s=[0,0,0],f=null;if(typeof w.plugins!==l&&typeof w.plugins[c]===u)(f=w.plugins[c].description)&&typeof w.mimeTypes!==l&&w.mimeTypes[d]&&w.mimeTypes[d].enabledPlugin&&(g=!0,a=!1,f=f.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),s[0]=V(f.replace(/^(.*)\..*$/,"$1")),s[1]=V(f.replace(/^.*\.(.*)\s.*$/,"$1")),s[2]=/[a-zA-Z]/.test(f)?V(f.replace(/^.*[a-zA-Z]+(.*)$/,"$1")):0);else if(typeof b.ActiveXObject!==l)try{var p=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");p&&(f=p.GetVariable("$version"))&&(a=!0,s=[V((f=f.split(" ")[1].split(","))[0]),V(f[1]),V(f[2])])}catch(h){}return{w3:e,pv:s,wk:o,ie:a,win:n,mac:r}}();function P(){if(!C&&document.getElementsByTagName("body")[0]){try{var e,i=_("span");i.style.display="none",(e=m.getElementsByTagName("body")[0].appendChild(i)).parentNode.removeChild(e),e=null,i=null}catch(r){return}C=!0;for(var t=h.length,n=0;n0)for(var i=0;i0){var o=D(t);if(o)if(!z(v[i].swfVersion)||T.wk&&T.wk<312)if(v[i].expressInstall&&L()){var a={};a.data=v[i].expressInstall,a.width=o.getAttribute("width")||"0",a.height=o.getAttribute("height")||"0",o.getAttribute("class")&&(a.styleclass=o.getAttribute("class")),o.getAttribute("align")&&(a.align=o.getAttribute("align"));for(var s={},u=o.getElementsByTagName("param"),c=u.length,d=0;d"+o+"",b=a.firstChild),e)Object.prototype.hasOwnProperty.call(e,c)&&("styleclass"===(f=c.toLowerCase())?b.setAttribute("class",e[c]):"classid"!==f&&"data"!==f&&b.setAttribute(c,e[c]));T.ie?y[y.length]=e.id:(b.setAttribute("type",d),b.setAttribute("data",e.data)),s.parentNode.replaceChild(b,s),n=b}return n}function I(e,i,t){var n=_("param");n.setAttribute("name",i),n.setAttribute("value",t),e.appendChild(n)}function F(e){var i=D(e);i&&"OBJECT"===i.nodeName.toUpperCase()&&(T.ie?(i.style.display="none",function t(){if(4==i.readyState){for(var e in i)"function"==typeof i[e]&&(i[e]=null);i.parentNode.removeChild(i)}else setTimeout(t,10)}()):i.parentNode.removeChild(i))}function R(e){return e&&e.nodeType&&1===e.nodeType}function G(e){return R(e)?e.id:e}function D(e){if(R(e))return e;var i=null;try{i=m.getElementById(e)}catch(t){}return i}function _(e){return m.createElement(e)}function V(e){return parseInt(e,10)}function z(e){e+="";var i=T.pv,t=e.split(".");return t[0]=V(t[0]),t[1]=V(t[1])||0,t[2]=V(t[2])||0,i[0]>t[0]||i[0]==t[0]&&i[1]>t[1]||i[0]==t[0]&&i[1]==t[1]&&i[2]>=t[2]}function W(e,i,t,n){var r=m.getElementsByTagName("head")[0];if(r){var o="string"==typeof t?t:"screen";if(n&&(a=null,s=null),!a||s!=o){var u=_("style");u.setAttribute("type","text/css"),u.setAttribute("media",o),a=r.appendChild(u),T.ie&&typeof m.styleSheets!==l&&m.styleSheets.length>0&&(a=m.styleSheets[m.styleSheets.length-1]),s=o}a&&(typeof a.addRule!==l?a.addRule(e,i):typeof m.createTextNode!==l&&a.appendChild(m.createTextNode(e+" {"+i+"}")))}}function q(e,i){if(k){var t=i?"visible":"hidden",n=D(e);C&&n?n.style.visibility=t:"string"==typeof e&&W("#"+e,"visibility:"+t)}}function H(e){return null!==/[\\"<>.;]/.exec(e)&&typeof encodeURIComponent!==l?encodeURIComponent(e):e}T.w3&&((typeof m.readyState!==l&&("complete"===m.readyState||"interactive"===m.readyState)||typeof m.readyState===l&&(m.getElementsByTagName("body")[0]||m.body))&&P(),C||(typeof m.addEventListener!==l&&m.addEventListener("DOMContentLoaded",P,!1),T.ie&&(m.attachEvent(p,(function K(){"complete"===m.readyState&&(m.detachEvent(p,K),P())})),b==top&&function J(){if(!C){try{m.documentElement.doScroll("left")}catch(e){return void setTimeout(J,0)}P()}}()),T.wk&&function X(){C||(/loaded|complete/.test(m.readyState)?P():setTimeout(X,0))}())),h[0]=function(){g?function(){var e=m.getElementsByTagName("body")[0],i=_(u);i.setAttribute("style","visibility: hidden;"),i.setAttribute("type",d);var t=e.appendChild(i);if(t){var n=0;!function r(){if(typeof t.GetVariable!==l)try{var o=t.GetVariable("$version");o&&(o=o.split(" ")[1].split(","),T.pv=[V(o[0]),V(o[1]),V(o[2])])}catch(a){T.pv=[8,0,0]}else if(n<10)return n++,void setTimeout(r,10);e.removeChild(i),t=null,B()}()}else B()}():B()},T.ie&&window.attachEvent("onunload",(function(){for(var e=S.length,i=0;i>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,t){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:r^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return r^=e.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0}},function(e,i,t){var n;!function(r,o){"use strict";var a="function",s="undefined",l="object",u="string",c="model",d="name",m="type",p="vendor",h="version",g="architecture",f="console",b="mobile",w="tablet",v="smarttv",y="wearable",x="embedded",S="Amazon",C="Apple",k="ASUS",T="BlackBerry",M="Firefox",P="Google",A="Huawei",E="LG",I="Microsoft",N="Motorola",B="Opera",U="Samsung",j="Sony",L="Xiaomi",R="Zebra",O="Facebook",J=function(e){var i={};for(var t in e)i[e[t].toUpperCase()]=e[t];return i},D=function(e,i){return typeof e===u&&-1!==F(i).indexOf(F(e))},F=function(e){return e.toLowerCase()},_=function(e,i){if(typeof e===u)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof i===s?e:e.substring(0,255)},V=function(e,i){for(var t,n,r,s,u,c,d=0;d0?2==s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:3==s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=c?c.replace(s[1],s[2]):o:this[s[0]]=c?s[1].call(this,c,s[2]):o:4==s.length&&(this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):o):this[s]=c||o;d+=2}},G=function(e,i){for(var t in i)if(typeof i[t]===l&&i[t].length>0){for(var n=0;n255?_(e,255):e,this},this.setUA(t),this};q.VERSION="0.7.30",q.BROWSER=J([d,h,"major"]),q.CPU=J([g]),q.DEVICE=J([c,p,m,f,b,v,w,y,x]),q.ENGINE=q.OS=J([d,h]),typeof i!==s?(typeof e!==s&&e.exports&&(i=e.exports=q),i.UAParser=q):t(5)?(n=function(){return q}.call(i,t,i,e))===o||(e.exports=n):typeof r!==s&&(r.UAParser=q);var H=typeof r!==s&&(r.jQuery||r.Zepto);if(H&&!H.ua){var X=new q;H.ua=X.getResult(),H.ua.get=function(){return X.getUA()},H.ua.set=function(e){X.setUA(e);var i=X.getResult();for(var t in i)H.ua[t]=i[t]}}}("object"==typeof window?window:this)},function(e,i){(function(i){e.exports=i}).call(this,{})},function(e,i){e.exports=function(){var e=["monospace","sans-serif","serif"],i=document.getElementsByTagName("body")[0],t=document.createElement("span");t.style.fontSize="72px",t.innerHTML="mmmmmmmmmmlli";var n={},r={};for(var o in e)t.style.fontFamily=e[o],i.appendChild(t),n[e[o]]=t.offsetWidth,r[e[o]]=t.offsetHeight,i.removeChild(t);this.detect=function(o){var a=!1;for(var s in e){t.style.fontFamily=o+","+e[s],i.appendChild(t);var l=t.offsetWidth!=n[e[s]]||t.offsetHeight!=r[e[s]];i.removeChild(t),a=a||l}return a}}},function(e,i){"function"==typeof Object.create?e.exports=function(e,i){i&&(e.super_=i,e.prototype=Object.create(i.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,i){if(i){e.super_=i;var t=function(){};t.prototype=i.prototype,e.prototype=new t,e.prototype.constructor=e}}},function(e,i,t){"use strict";var n=t(9);e.exports=function(){return n.getJREs().toString()}},function(e,i,t){"use strict";var n="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:[_\\.](\\d+))?)?)?",r=n+"$",o=n+"(\\*|\\+)?$",a={core:["id","class","title","style"],applet:["codebase","code","name","archive","object","width","height","alt","align","hspace","vspace"]},s=a.applet.concat(a.core);function l(e){p.debug&&(console.log?console.log(e):alert(e))}function u(e,i){var t=0,n=e.match(o);if(null!=n){if(i)return!0;for(var r=!1,a=!1,s=new Array,u=1;u-1?t.substring(0,n+1):t+"/")+e}return i}(e)}function d(){return"Edge"==p.getBrowser()||"Chrome"==p.browserName2||"FirefoxNoPlugin"==p.browserName2&&!u("1.8*",!1)||"NoActiveX"==p.browserName2}function m(e){var i="https://java.com/dt-redirect";return null==e||0==e.length?i:("&"==e.charAt(0)&&(e=e.substring(1,e.length)),i+"?"+e)}"function"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(e,i){return i=i||0,this.indexOf(e,i)===i});var p={debug:null,version:"20120801",firefoxJavaVersion:null,useStaticMimeType:!1,myInterval:null,preInstallJREList:null,brand:null,locale:null,installType:null,EAInstallEnabled:!1,EarlyAccessURL:null,oldMimeType:"application/npruntime-scriptable-plugin;DeploymentToolkit",mimeType:"application/java-deployment-toolkit",launchButtonPNG:function(){var e="//java.com/js/webstart.png";try{return-1!=document.location.protocol.indexOf("http")?e:"https:"+e}catch(i){return"https:"+e}}(),browserName:null,browserName2:null,getJREs:function(){var e=new Array;if(this.isPluginInstalled())for(var i=this.getPlugin().jvms,t=0;t0){var n=e.charAt(e.length-1);"."!=n&&"_"!=n||(e=e.substring(0,e.length-1))}return"*"==t?0==i.indexOf(e):"+"==t&&e<=i}("1.6.0_33+",e)}(e))},isCallbackSupported:function(){return this.isPluginInstalled()&&this.compareVersionToPattern(this.getPlugin().version,["10","2","0"],!1,!0)},installLatestJRE:function(){if(l("The Deployment Toolkit installLatestJRE() method no longer installs JRE. If user's version of Java is below the security baseline it redirects user to java.com to get an updated JRE. More Information on usage of the Deployment Toolkit can be found in the Deployment Guide at ://docs.oracle.com/javase/8/docs/technotes/guides/deploy/"),!this.isPluginInstalled()||!this.getPlugin().installLatestJRE()){var e=this.getBrowser(),i=navigator.platform.toLowerCase();return"MSIE"==e?this.IEInstall():"Netscape Family"==e&&-1!=i.indexOf("win32")?this.FFInstall():(location.href=m((null!=this.locale?"&locale="+this.locale:"")+(null!=this.brand?"&brand="+this.brand:"")),!1)}return!0},runApplet:function(e,i,t){if("undefined"!=t&&null!=t||(t="1.1"),null!=t.match(r))if("?"!=this.getBrowser()){if(d()){var n=setInterval((function(){var e;"complete"==document.readyState&&(clearInterval(n),(e=document.createElement("div")).id="messagebox",e.setAttribute("style","background-color: #ffffce;text-align: left;border: solid 1px #f0c000; padding: 1.65em 1.65em .75em 0.5em; font-family: Helvetica, Arial, sans-serif; font-size: 75%; bottom:0; left:0; right:0; position:fixed; margin:auto; opacity:0.9; width:400px;"),e.innerHTML='×

Java Plug-in is not supported by this browser. More info

',document.body.appendChild(e))}),15);return void l("[runApplet()] Java Plug-in is not supported by this browser")}(this.versionCheck(t+"+")||this.installJRE(t+"+"))&&this.writeAppletTag(e,i)}else this.writeAppletTag(e,i);else l("[runApplet()] Invalid minimumVersion argument to runApplet():"+t)},writeAppletTag:function(e,i){var t="';a||(n+=''),r&&(t+=' code="dummy"'),t+=">",document.write(t+"\n"+n+"\n")},versionCheck:function(e){return u(e,d())},isWebStartInstalled:function(e){if(d())return!0;if("?"==this.getBrowser())return!0;"undefined"!=e&&null!=e||(e="1.4.2");var i=!1;return null!=e.match(r)?i=this.versionCheck(e+"+"):(l("[isWebStartInstaller()] Invalid minimumVersion argument to isWebStartInstalled(): "+e),i=this.versionCheck("1.4.2+")),i},getJPIVersionUsingMimeType:function(){var e,i;for(e=0;e':"Netscape Family"==n&&(t=''),"undefined"==document.body||null==document.body)document.write(t),document.location=i;else{var r=document.createElement("div");r.id="div1",r.style.position="relative",r.style.left="-10000px",r.style.margin="0px auto",r.className="dynamicDiv",r.innerHTML=t,document.body.appendChild(r)}},createWebStartLaunchButtonEx:function(e){var i="javascript:deployJava.launchWebStartApplication('"+e+"');";document.write('')},createWebStartLaunchButton:function(e,i){var t="javascript:if (!deployJava.isWebStartInstalled(""+i+"")) {if (deployJava.installLatestJRE()) {if (deployJava.launch(""+e+"")) {}}} else {if (deployJava.launch(""+e+"")) {}}";document.write('')},launch:function(e){return document.location=e,!0},launchEx:function(e){return c(e),!0},isPluginInstalled:function(){var e=this.getPlugin();return!(!e||!e.jvms)},isAutoUpdateEnabled:function(){return!!this.isPluginInstalled()&&this.getPlugin().isAutoUpdateEnabled()},setAutoUpdateEnabled:function(){return!!this.isPluginInstalled()&&this.getPlugin().setAutoUpdateEnabled()},setInstallerType:function(e){return l("The Deployment Toolkit no longer installs JRE. Method setInstallerType() is no-op. More Information on usage of the Deployment Toolkit can be found in the Deployment Guide at ://docs.oracle.com/javase/8/docs/technotes/guides/deploy/"),!1},setAdditionalPackages:function(e){return l("The Deployment Toolkit no longer installs JRE. Method setAdditionalPackages() is no-op. More Information on usage of the Deployment Toolkit can be found in the Deployment Guide at ://docs.oracle.com/javase/8/docs/technotes/guides/deploy/"),!1},setEarlyAccess:function(e){this.EAInstallEnabled=e},isPlugin2:function(){if(this.isPluginInstalled()&&this.versionCheck("1.6.0_10+"))try{return this.getPlugin().isPlugin2()}catch(e){}return!1},allowPlugin:function(){return this.getBrowser(),"Safari"!=this.browserName2&&"Opera"!=this.browserName2},getPlugin:function(){this.refresh();var e=null;return this.allowPlugin()&&(e=document.getElementById("deployJavaPlugin")),e},compareVersionToPattern:function(e,i,t,n){if(e==undefined||i==undefined)return!1;var o=e.match(r);if(null!=o){for(var a=0,s=new Array,l=1;lm)return!0}return!0}for(var p=0;p "+e),-1!=e.indexOf("edge"))this.browserName="Edge",this.browserName2="Edge";else if(-1!=e.indexOf("msie")&&-1==e.indexOf("opera"))this.browserName="MSIE",this.browserName2="MSIE";else if(-1!=e.indexOf("trident")||-1!=e.indexOf("Trident")){if(this.browserName="MSIE",this.browserName2="MSIE",-1!=e.indexOf("windows nt 6.3")||-1!=e.indexOf("windows nt 6.2"))try{new ActiveXObject("htmlfile")}catch(i){this.browserName2="NoActiveX"}}else-1!=e.indexOf("iphone")?(this.browserName="Netscape Family",this.browserName2="iPhone"):-1!=e.indexOf("firefox")&&-1==e.indexOf("opera")?(this.browserName="Netscape Family",this.isPluginInstalled()?this.browserName2="Firefox":this.browserName2="FirefoxNoPlugin"):-1!=e.indexOf("chrome")?(this.browserName="Netscape Family",this.browserName2="Chrome"):-1!=e.indexOf("safari")?(this.browserName="Netscape Family",this.browserName2="Safari"):-1!=e.indexOf("mozilla")&&-1==e.indexOf("opera")?(this.browserName="Netscape Family",this.browserName2="Other"):-1!=e.indexOf("opera")?(this.browserName="Netscape Family",this.browserName2="Opera"):(this.browserName="?",this.browserName2="unknown");l("[getBrowser()] Detected browser name:"+this.browserName+", "+this.browserName2)}return this.browserName},testUsingActiveX:function(e){var i="JavaWebStart.isInstalled."+e+".0";if("undefined"==typeof ActiveXObject||!ActiveXObject)return l("[testUsingActiveX()] Browser claims to be IE, but no ActiveXObject object?"),!1;try{return null!=new ActiveXObject(i)}catch(t){return!1}},testForMSVM:function(){if("undefined"!=typeof oClientCaps){var e=oClientCaps.getComponentVersion("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}","ComponentID");return""!=e&&"5,0,5000,0"!=e}return!1},testUsingMimeTypes:function(e){if(!navigator.mimeTypes)return l("[testUsingMimeTypes()] Browser claims to be Netscape family, but no mimeTypes[] array?"),!1;for(var i=0;in[0]||!(t[0]n[1]||!(t[1]n[2]||!(t[2]'):"Netscape Family"==e&&this.allowPlugin()&&this.writeEmbedTag()},refresh:function(){(navigator.plugins.refresh(!1),"Netscape Family"==this.getBrowser()&&this.allowPlugin())&&(null==document.getElementById("deployJavaPlugin")&&this.writeEmbedTag())},writeEmbedTag:function(){var e=!1;if(null!=navigator.mimeTypes){for(var i=0;i