Copy disabled (too large)
Showing preview only (10,129K chars total). The displayed content is truncated. Use the JSON API for full output.
Repository: cupslab/password_meter
Branch: master
Commit: b679be79ff83
Files: 36
Total size: 9.7 MB
Directory structure:
gitextract_kme0tmep/
├── .gitignore
├── LICENSE
├── README.md
├── example/
│ ├── LICENSES
│ ├── PasswordMeter.js
│ ├── blacklist-chi17lowercase-compressed.txt
│ ├── blacklist-chi17strippedlowercase-compressed.txt
│ ├── blacklist-cmu-compressed.txt
│ ├── config.css
│ ├── config_policy_meter.js
│ ├── dictionary-blacklist1c8-compressed.txt
│ ├── dictionary-englishwords-compressed.txt
│ ├── dictionary-names-compressed.txt
│ ├── dictionary-passwords-compressed.txt
│ ├── dictionary-phrases-compressed.txt
│ ├── dictionary-wikipedia-compressed.txt
│ ├── index.html
│ ├── lz-string.js
│ ├── nn-client.js
│ ├── static.css
│ ├── tfjs_1c8/
│ │ ├── model.json
│ │ └── model_info_and_guess_nums.json
│ └── worker.js.source_map
└── src/
├── package.json
└── ts/
├── PasswordMeter.ts
├── array.ts
├── blacklist.ts
├── config.ts
├── constants.ts
├── dict-misc.ts
├── helper.ts
├── hibp.ts
├── nn-misc.ts
├── rulefunctions.ts
├── string.ts
└── ui-misc.ts
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
src/node_modules
src/package-lock.json
# emacs temp files
*~
================================================
FILE: LICENSE
================================================
Copyright 2017-2021 by Felicia Alfieri, Maung Aung, Lujo Bauer, Nicolas
Christin, Jessica Colnago, Lorrie Faith Cranor, Henry Dixon, Pardis
Emami Naeini, Hana Habib, Noah Johnson, William Melicher, Michael
Stroucken, Josh Tan, and Blase Ur.
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.
================================================
FILE: README.md
================================================
# Password Meter
This project implements a data-driven password meter. Its effects on password security and usability were evaluated in the following publication: Ur et al. "Design and Evaluation of a Data-Driven Password Meter." In the Proceedings of CHI, 2017. https://dl.acm.org/citation.cfm?id=3026050
The project is written in TypeScript, which transcompiles to JavaScript.
The original implementation of this password meter ([v1.0](https://github.com/cupslab/password_meter/releases/tag/v1.0)) has been extended to include additional support for minimum-strength and blocklist requirements ([v2.0](https://github.com/cupslab/password_meter/releases/tag/v2.0)). Password-policy configurations based on these new requirement types were evaluated in the following publication: J. Tan, L. Bauer, N. Christin, and L. F. Cranor. "Practical recommendations for stronger, more usable passwords combining minimum-strength, minimum-length, and blocklist requirements." In the Proceedings of CCS, 2020. https://dl.acm.org/doi/10.1145/3372297.3417882
This project uses the [Pwned Passwords API](https://haveibeenpwned.com/API/v3#PwnedPasswords) to check for previously leaked passwords.
A JavaScript library ([hibp-js](https://github.com/mehdibo/hibp-js) has been
used in this project, with minor modifications.
An online demo of the meter is available at https://cups.cs.cmu.edu/meter2/
## Contact
password-guessability@cs.cmu.edu
## Deploying (minimal customization required)
Many potential users of the meter will not need to re-transcompile from TypeScript to JavaScript. Instead, such users can use the code in the /example directory, which contains a ready-to-run environment for the password meter. The primary HTML file is index.html. The password-policy requirements and other meter configuration can be set by editing parameters defined in config_policy_meter.js
We expect that most people who take advantage of the example files will edit two sets of common configurations that are made available in config_policy_meter.js:
1) "domainSpecificWords" should be updated to contain a list of site-specific words that should count for nothing in the password. We currently provide a small set of examples specific to CMU.
2) A number of variables (minLogNnGuessNum, length, prohibitKnownLeaked, etc.) define the site's mandated password-composition policy. In the example file, it is set to require a 1c12+NN10 policy that also prohibits known leaked passwords reported by the Pwned Passwords API. The other dimensions are currently set to inactive, but can be enabled by simply editing these variables.
Beyond these configuration decisions, we expect that people who deploy our meter will edit the layout in /example/index.html and /example/config.css
Note that running the meter's code locally on your computer using "file" URLs with browser's default settings will not load the dictionary files (dictionary-*), and as a result no feedback will be given based on the use of dictionary words or common passwords. In contrast, if loaded from a web server (e.g., Apache), these files will be loaded correctly.
Note also that the meter expects all files to be in the same directory as each other.
## Building from source
* Install command line runnable npm and browserify (the latter via, e.g., "npm install -g browserify")
* In the src directory, first run npm install to install dependencies
* Then run npm run do-browserify to generate the PasswordMeter.js file
* Place the PasswordMeter.js file with the other web files (i.e., in the /example directory)
Finally, the neural network that estimates password strength needs to be trained for a site's particular password-composition policy. The parameter files must be provided in the configuration. The example neural network files we provide (/example/tfjs_1c8/*) are trained for a 1class8 policy and may not provide accurate strength estimates for passwords created under different policies.
For more detail on training the neural network, please see https://github.com/cupslab/neural_network_cracking
For more detail on importing a custom TensorFlow model, refer to https://www.tensorflow.org/js/tutorials/conversion/import_saved_model
## Dependencies
Our meter depends on several external web-development libraries:
* JQuery (minified version 3.5.1 JS file used for testing) https://jquery.com/
* Bootstrap (minified version 3.3.7 of both the CSS and JS file used for testing) http://getbootstrap.com/
* loglevel (minified version of 1.6.0 JS file used for testing) https://github.com/pimterry/loglevel
* lz-string.js http://pieroxy.net/blog/pages/lz-string/testing.html
## Setup
To set up the meter, define the following global variables for the above dependencies before referencing the PasswordMeter.js file:-
* $ for JQuery with Bootstrap
* LZString for LZString
* log for loglevel
* passwordMeterConfig for configuration (optional, will default to 1class8 policy)
Once a compliant password has been devised, the meter code will call out to a function "continueSubmit" with the password as an argument. The code in example/index.html will currently display a Javascript alert, but can be extended as the interface to further processing.
## Details of /example files
We label each file with its intended purpose within the meter: main file; neural network computation; visual layout; dictionary; required external library
* **tfjs_1c8/** Contains files describing TensorFlowJS saved model parameters, architecture, and JSON encoding of a pre-computed mapping of estimating a password's guess number from its probability by using Monte Carlo methods. These files are for a 1class8 policy, and for other policies should be retrained using https://github.com/cupslab/neural_network_cracking
* **bootstrap.min.css** (Required external library) The Bootstrap library (version 3.3.7), minified http://getbootstrap.com/
* **bootstrap.min.js** (Required external library) The Bootstrap library (version 3.3.7), minified http://getbootstrap.com/
* **loglevel.min.js** (Required external library) The loglevel library (version 1.6.0), minified https://github.com/pimterry/loglevel
* **config.css** (Visual layout) The primary configuration settings for the meter's visual design are located in this file. These settings include colors, fonts, sizes, and border radii.
* **dictionary-blacklist1c8-compressed.txt** (Dictionary) An LZW compressed version of the 96,480 passwords containing at least 8 characters that appear in the Xato.net corpus of passwords at least four times.
* **dictionary-englishwords-compressed.txt** (Dictionary) An LZW compressed version of 80,031 frequently used English words taken from the intersection of the BYU Corpus of Contemporary American English (COCA) and the UNIX dictionary.
* **dictionary-names-compressed.txt** (Dictionary) An LZW compressed version of 4,937 male and female names popular in the United States, per recent census data.
* **dictionary-passwords-compressed.txt** (Dictionary) An LZW compressed version of the 87,143 passwords of any length that appear at least 10 times in the Xato.net corpus.
* **dictionary-phrases-compressed.txt** (Dictionary) An LZW compressed version of the 49,927 unique entries (after filtering out non-ascii and spaces) from the 100,000 top 3-word phrases (3-grams) used on Wikipedia.
* **dictionary-wikipedia-compressed.txt** (Dictionary) An LZW compressed version of the 47,276 words that are among the 100,000 top single words (1-grams) used on Wikipedia and are not already captured by dictionary-englishwords-compressed.txt.
* **index.html** The main file for our demo meter. This file contains the HTML layout for our demo meter and the options for configuring the password-composition policy. It references, directly or indirectly, all of the other files.
* **jquery-3.5.1.min.js** (Required external library) The jquery library (version 3.5.1), minified. https://jquery.com/
* **lz-string.js** (Required external library) A Javascript implementation of Lempel-Ziv-Welch (LZW) lossless compression. http://pieroxy.net/blog/pages/lz-string/testing.html
* **nn-client.js** (Neural network computation) The main file for instantiating our artificial neural networks for calculating password guessability. This file loads worker.min.js as needed.
* **PasswordMeter.js** (Main file) A Javascript file containing the functions used to score the password based on 21 different heuristics. It includes helper functions (mostly string and array prototypes), functions to verify that a password meets the minimum requirements of a given password-composition policy, and the functions that implement our heuristic scoring. This file is transcompiled from the set of TypeScript files in the /src/ts/ directory.
* **worker.min.js** (Neural network computation) To calculate neural network guess numbers asynchronously (and thereby prevent interface lag), this file uses the WebWorker framework to spawn separate threads for calculating guess numbers for a password using neural networks.
## Characteristics
We tested and iteratively updated many prioritizations of the feedback we provided users in the standard meter. For each advanced heuristic, if the associated function has feedback relevant to that particular password, it returns a non-empty string for both publicFeedback and sensitiveFeedback. If it does not have feedback, which occurs when that heuristic does not indicate a predictable pattern, it returns the empty string. We traverse the list of functions in descending priority for the first (up to) three pieces of feedback to give the user. If, however, our scoring functions rate the password such that its score fills the bar, we ignore all text feedback and tell the user that his or her password appears strong.
The list of functions that provide feedback, in descending order of priority, includes:
* **contextual()** returns the password after removing the longest string of five or more contiguous characters of the password that overlap (case-insensitive) with the user's chosen username. If there is no such overlap, the function returns the original password.
* **combinedDictCheck()** returns three values. First, it returns the number of characters in the password contained from any of the following sources: the 234 most popular pet names; the 2,500 most popular male and 2,500 most popular female names according to the U.S. census; the top 50,000 three-word phrases used on Wikipedia; frequently used English words taken from the intersection of the BYU Corpus of Contemporary American English (COCA) 100,000 most frequent 1-grams and the Unix dictionary; the 100,000 top single words (1-grams) used on Wikipedia. For each list, we removed those that were internal duplicates (e.g., some common male and female names are identical, and some distinct three-word phrases appear the same after removing spaces and punctuation), and we also removed any that appeared on a list above it (following the order listed above) or was a keyboard pattern, string of a single character repeated, or alphabetic/numeric sequence. In addition to checking for these words in a case-insensitive manner, we also evaluate whether a transformation of these words is present by reversing all instances of the 10 most common character substitutions in passwords. For instance, if the user's password contains a "4," we will evaluate whether replacing that character by an "a" or "for" leads to the password containing a dictionary word. The commonness of the substitution (what percentage of all substitutions follow that particular rule is the second value returned by this function. It also returns the number of distinct dictionary tokens (e.g., a password that contains two separate dictionary words contains two tokens) as the third value.
* **keyboardPatterns()** returns the total number of characters of a password contained in one or more keyboard patterns. We define a keyboard pattern to be 4+ characters in a row for which the inter-key x-y coordinate change on a physical QWERTY keyboard layout is the same. For instance, "qetu" would be a keyboard pattern because each inter-key coordinate change is 2 keys to the right horizontally, and no change vertically. Note that we only consider a string to be a keyboard pattern if the inter-key vector on a QWERTY keyboard is identical. While some keyboard patterns in practice could include snake-like bends, they would lead to many false positives (e.g., "reds," "polk") and common keyboard patterns of that type would be identified as a common password substring, so we do not look for them.
* **repeats()** returns the number of characters in the longest string of at least 3+ consecutive, repeated characters (e.g., "monkeeey" returns 3, while "monkeey" returns 0) in the password.
* **identifyDates()** returns the number of characters in the password contained in a date. We use the common ways of writing dates observed by Veras et al. in their investigation of the use of dates in passwords from the RockYou breach. We search for dates in MM-DD-YYYY, DD-MM-YYYY, MM-DD-YY, and DD-MM-YY format using the following delimiters: space; period; hyphen; forward slash. We subsequently search for dates in MMDDYYYY and DDMMYYYY format without any delimiters. We also search for written-out months (e.g., "april") and recent years (4 digits or 2 digits). We also search for MM-DD and DD-MM dates using the following delimiters: space; period; hyphen; forward slash. Finally, we search for recent years (1900 through 2049).
* **repeatedSections()** returns the number of characters in the password that repeat, either forwards or backwards, a string of 3+ characters that appeared earlier in the password (case insensitive) . For instance, "monkey" returns 0, "monkeymonkey" and "monkeyyeknom" would each return 6, while "monkeymonkey123yeknom" would return 12.
* **alphabeticSequenceCheck()** return the number of characters that are part of alphabetic sequences (e.g., "abc" or "aceg") or numerical sequences (e.g., "123" or "1357") that are at least 3 characters long and are defined using the difference in ASCII codes between adjacent characters. If the inter-character difference in ASCII codes is the same, the elements in that string or substring are an alphabetic sequence. If there are multiple such sequences, it returns the sum of the number of characters in each.
* **commonpwCheck()** returns the length of the longest substring of the password that is itself one of the passwords that appears at least 10 times in the Xato.net corpus of 10 million passwords.
* **uppercasePredictable()** returns 1 (true) or 0 (false) whether the usage of uppercase characters in this password is predictable. To determine predictability, we examined capitalization patterns in the 10 million Xato passwords. The two most common capitalization patterns, which are thus the ones we label as predictable, are capitalizing only the first character and using all uppercase characters.
* **digitsPredictable()** returns 1 (true) or 0 (false) whether the location of digits in this password is predictable. To determine predictability, we examined patterns in the location of digits in the 10 million Xato passwords. The patterns we identified as predictable are constructing the password exclusively of digits, putting the digits in one group at the beginning of the password, and putting the digits in one group at the end of the password.
* **symbolsPredictable()** returns 1 (true) or 0 (false) whether the location of symbols in this password is predictable. To determine predictability, we examined patterns in the location of symbols in the 10 million Xato passwords. The patterns we identified as predictable are putting the symbols in one group at the end of the password or constructing the password as letters-symbols-digits.
* **duplicatedCharacters()** returns the total number of characters that are duplicates of characters used previously in the password. The repetition of characters does not need to be consecutive. For instance, "zcbm" contains 0 duplicated characters, "zcbmcb" contains 2 duplicated characters, and "zcbmbb" also contains 2 duplicated characters.
* **pwLength()** returns the total number of characters in the password.
* **countSYMS()** returns the number of symbols contained in the password.
* **countUC()** returns the number of uppercase letters contained in the password.
* **countDIGS()** returns the number of digits contained in the password.
* **countLC()** returns the number of lowercase letters contained in the password.
* **commonsubstringCheck()** returns the number of characters in the password that are common substrings in passwords. We require that these substrings contain 4-8 characters and occur at least 2,000 times each among the 10 million Xato passwords. We build the list of common substrings in order of decreasing length, ignoring potential substrings that are themselves substrings already on our list. For instance, if we identify "monkey" as a common substring, will not add "monke" to the list of common substrings. In total, we identified 2,385 substrings that met these criteria.
* **structurePredictable()** identifies how common the character-class structure (e.g., "6 lowercase letters, followed by 2 digits") of the password is. It returns a number between 1 (Nth most common structure) and N (most common structure). We are currently using N = 2,124 structures based on our work on adaptive password-composition policies.
* **characterClasses()** returns the number of different character classes (1-4) in the password
## Project Contributors
Felicia Alfieri, Maung Aung, Lujo Bauer, Nicolas Christin, Jessica Colnago, Lorrie Faith Cranor, Henry Dixon, Pardis Emami Naeini, Hana Habib, Noah Johnson, William Melicher, Michael Stroucken, Josh Tan and Blase Ur* at Carnegie Mellon University and (*)the University of Chicago, United States.
================================================
FILE: example/LICENSES
================================================
lz-string was licensed under the WTFPL
bootstrap was licensed under the MIT license
jquery was licensed under the Apache license
hibp was licensed under the MIT license
There are no licensing or attribution requirements on the Pwned Passwords API.
Phrase and word corpora were derived from the following sources:
-Wikipedia database download (dual licensed under GFDL and CC-BY-SA)
https://en.wikipedia.org/wiki/Wikipedia:Database_download
-US Social Security Administration popular baby names
https://www.ssa.gov/oact/babynames/decades/index.html
-The Unix dictionary
-Mark Burnett's xato.net corpus of common passwords
https://xato.net/today-i-am-releasing-ten-million-passwords-b6278bbe7495#.s11zbdb8q
================================================
FILE: example/PasswordMeter.js
================================================
!function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,(function(r){return o(e[i][1][r]||r)}),p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){"use strict";exports.byteLength=function(b64){var lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1];return 3*(validLen+placeHoldersLen)/4-placeHoldersLen},exports.toByteArray=function(b64){var tmp,i,lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1],arr=new Arr(function(b64,validLen,placeHoldersLen){return 3*(validLen+placeHoldersLen)/4-placeHoldersLen}(0,validLen,placeHoldersLen)),curByte=0,len=placeHoldersLen>0?validLen-4:validLen;for(i=0;i<len;i+=4)tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)],arr[curByte++]=tmp>>16&255,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp;2===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[curByte++]=255&tmp);1===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp);return arr},exports.fromByteArray=function(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,parts=[],i=0,len2=len-extraBytes;i<len2;i+=16383)parts.push(encodeChunk(uint8,i,i+16383>len2?len2:i+16383));1===extraBytes?(tmp=uint8[len-1],parts.push(lookup[tmp>>2]+lookup[tmp<<4&63]+"==")):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],parts.push(lookup[tmp>>10]+lookup[tmp>>4&63]+lookup[tmp<<2&63]+"="));return parts.join("")};for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;function getLens(b64){var len=b64.length;if(len%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var validLen=b64.indexOf("=");return-1===validLen&&(validLen=len),[validLen,validLen===len?0:4-validLen%4]}function encodeChunk(uint8,start,end){for(var tmp,num,output=[],i=start;i<end;i+=3)tmp=(uint8[i]<<16&16711680)+(uint8[i+1]<<8&65280)+(255&uint8[i+2]),output.push(lookup[(num=tmp)>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]);return output.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},{}],2:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var bloom_filter_1=require("./bloom/bloom-filter");Object.defineProperty(exports,"BloomFilter",{enumerable:!0,get:function(){return bloom_filter_1.default}});var counting_bloom_filter_1=require("./bloom/counting-bloom-filter");Object.defineProperty(exports,"CountingBloomFilter",{enumerable:!0,get:function(){return counting_bloom_filter_1.default}});var partitioned_bloom_filter_1=require("./bloom/partitioned-bloom-filter");Object.defineProperty(exports,"PartitionedBloomFilter",{enumerable:!0,get:function(){return partitioned_bloom_filter_1.default}});var count_min_sketch_1=require("./sketch/count-min-sketch");Object.defineProperty(exports,"CountMinSketch",{enumerable:!0,get:function(){return count_min_sketch_1.default}});var hyperloglog_1=require("./sketch/hyperloglog");Object.defineProperty(exports,"HyperLogLog",{enumerable:!0,get:function(){return hyperloglog_1.default}});var topk_1=require("./sketch/topk");Object.defineProperty(exports,"TopK",{enumerable:!0,get:function(){return topk_1.default}});var min_hash_1=require("./sketch/min-hash");Object.defineProperty(exports,"MinHash",{enumerable:!0,get:function(){return min_hash_1.MinHash}});var min_hash_factory_1=require("./sketch/min-hash-factory");Object.defineProperty(exports,"MinHashFactory",{enumerable:!0,get:function(){return min_hash_factory_1.default}});var cuckoo_filter_1=require("./cuckoo/cuckoo-filter");Object.defineProperty(exports,"CuckooFilter",{enumerable:!0,get:function(){return cuckoo_filter_1.default}});var invertible_bloom_lookup_tables_1=require("./iblt/invertible-bloom-lookup-tables");Object.defineProperty(exports,"InvertibleBloomFilter",{enumerable:!0,get:function(){return invertible_bloom_lookup_tables_1.default}});var cell_1=require("./iblt/cell");Object.defineProperty(exports,"Cell",{enumerable:!0,get:function(){return cell_1.default}})},{"./bloom/bloom-filter":4,"./bloom/counting-bloom-filter":5,"./bloom/partitioned-bloom-filter":6,"./cuckoo/cuckoo-filter":8,"./iblt/cell":11,"./iblt/invertible-bloom-lookup-tables":12,"./sketch/count-min-sketch":13,"./sketch/hyperloglog":14,"./sketch/min-hash":16,"./sketch/min-hash-factory":15,"./sketch/topk":17}],3:[function(require,module,exports){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k),Object.defineProperty(o,k2,{enumerable:!0,get:function(){return m[k]}})}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(null!=mod)for(var k in mod)Object.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var utils=__importStar(require("./utils")),seedrandom_1=__importDefault(require("seedrandom")),BaseFilter=function(){function BaseFilter(){this._seed=utils.getDefaultSeed(),this._rng=seedrandom_1.default(""+this._seed)}return Object.defineProperty(BaseFilter.prototype,"seed",{get:function(){return this._seed},set:function(seed){this._seed=seed,this._rng=seedrandom_1.default(""+this._seed)},enumerable:!1,configurable:!0}),Object.defineProperty(BaseFilter.prototype,"random",{get:function(){return this._rng},enumerable:!1,configurable:!0}),BaseFilter}();exports.default=BaseFilter},{"./utils":18,seedrandom:30}],4:[function(require,module,exports){"use strict";var extendStatics,__extends=this&&this.__extends||(extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),__decorate=this&&this.__decorate||function(decorators,target,key,desc){var d,c=arguments.length,r=c<3?target:null===desc?desc=Object.getOwnPropertyDescriptor(target,key):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r},__metadata=this&&this.__metadata||function(k,v){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,v)},__param=this&&this.__param||function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var base_filter_1=__importDefault(require("../base-filter")),exportable_1=require("../exportable"),formulas_1=require("../formulas"),utils_1=require("../utils"),BloomFilter=function(_super){function BloomFilter(size,nbHashes){var _this=_super.call(this)||this;if(nbHashes<1)throw new Error("A BloomFilter cannot uses less than one hash function, while you tried to use "+nbHashes+".");return _this._size=size,_this._nbHashes=nbHashes,_this._filter=utils_1.allocateArray(_this._size,0),_this._length=0,_this}var BloomFilter_1;return __extends(BloomFilter,_super),BloomFilter_1=BloomFilter,BloomFilter.create=function(nbItems,errorRate){var size=formulas_1.optimalFilterSize(nbItems,errorRate),hashes=formulas_1.optimalHashes(size,nbItems);return new BloomFilter_1(size,hashes)},BloomFilter.from=function(items,errorRate){var array=Array.from(items),filter=BloomFilter_1.create(array.length,errorRate);return array.forEach((function(element){return filter.add(element)})),filter},Object.defineProperty(BloomFilter.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(BloomFilter.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),BloomFilter.prototype.add=function(element){for(var indexes=utils_1.getDistinctIndices(element,this._size,this._nbHashes,this.seed),i=0;i<indexes.length;i++)this._filter[indexes[i]]=1;this._length++},BloomFilter.prototype.has=function(element){for(var indexes=utils_1.getDistinctIndices(element,this._size,this._nbHashes,this.seed),i=0;i<indexes.length;i++)if(!this._filter[indexes[i]])return!1;return!0},BloomFilter.prototype.rate=function(){return Math.pow(1-Math.exp(-this._nbHashes*this._length/this._size),this._nbHashes)},BloomFilter.prototype.equals=function(other){return this._size===other._size&&this._nbHashes===other._nbHashes&&this._length===other._length&&this._filter.every((function(value,index){return other._filter[index]===value}))},__decorate([exportable_1.Field(),__metadata("design:type",Number)],BloomFilter.prototype,"_size",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],BloomFilter.prototype,"_nbHashes",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Array)],BloomFilter.prototype,"_filter",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],BloomFilter.prototype,"_length",void 0),BloomFilter=BloomFilter_1=__decorate([exportable_1.AutoExportable("BloomFilter",["_seed"]),__param(0,exportable_1.Parameter("_size")),__param(1,exportable_1.Parameter("_nbHashes")),__metadata("design:paramtypes",[Number,Number])],BloomFilter)}(base_filter_1.default);exports.default=BloomFilter},{"../base-filter":3,"../exportable":9,"../formulas":10,"../utils":18}],5:[function(require,module,exports){"use strict";var extendStatics,__extends=this&&this.__extends||(extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),__decorate=this&&this.__decorate||function(decorators,target,key,desc){var d,c=arguments.length,r=c<3?target:null===desc?desc=Object.getOwnPropertyDescriptor(target,key):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r},__metadata=this&&this.__metadata||function(k,v){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,v)},__param=this&&this.__param||function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var base_filter_1=__importDefault(require("../base-filter")),exportable_1=require("../exportable"),formulas_1=require("../formulas"),utils_1=require("../utils"),CountingBloomFilter=function(_super){function CountingBloomFilter(size,nbHashes){var _this=_super.call(this)||this;if(nbHashes<1)throw new Error("A CountingBloomFilter must used at least one hash function, but you tried to use "+nbHashes+" functions. Consider increasing it.");return _this._size=size,_this._nbHashes=nbHashes,_this._filter=utils_1.allocateArray(_this._size,(function(){return[0,0]})),_this._length=0,_this}var CountingBloomFilter_1;return __extends(CountingBloomFilter,_super),CountingBloomFilter_1=CountingBloomFilter,CountingBloomFilter.create=function(capacity,errorRate){var s=formulas_1.optimalFilterSize(capacity,errorRate);return new CountingBloomFilter_1(s,formulas_1.optimalHashes(s,capacity))},CountingBloomFilter.from=function(items,errorRate){var array=Array.from(items),filter=CountingBloomFilter_1.create(array.length,errorRate);return array.forEach((function(element){return filter.add(element)})),filter},Object.defineProperty(CountingBloomFilter.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(CountingBloomFilter.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),CountingBloomFilter.prototype.add=function(element){for(var indexes=utils_1.getDistinctIndices(element,this._size,this._nbHashes,this.seed),i=0;i<indexes.length;i++)this._filter[indexes[i]][1]+=1,this._filter[indexes[i]][1]>0&&(this._filter[indexes[i]][0]=1);this._length++},CountingBloomFilter.prototype.remove=function(element){for(var indexes=utils_1.getDistinctIndices(element,this._size,this._nbHashes,this.seed),i=0;i<indexes.length;i++)this._filter[indexes[i]][1]-=1,this._filter[indexes[i]][1]<=0&&(this._filter[indexes[i]][0]=0);return this._length--,!0},CountingBloomFilter.prototype.has=function(element){for(var indexes=utils_1.getDistinctIndices(element,this._size,this._nbHashes,this.seed),i=0;i<indexes.length;i++)if(!this._filter[indexes[i]][0])return!1;return!0},CountingBloomFilter.prototype.rate=function(){return Math.pow(1-Math.exp(-this._nbHashes*this._length/this._size),this._nbHashes)},CountingBloomFilter.prototype.equals=function(other){return this._size===other._size&&this._nbHashes===other._nbHashes&&this._length===other._length&&this._filter.every((function(value,index){return other._filter[index][0]===value[0]&&other._filter[index][1]===value[1]}))},__decorate([exportable_1.Field(),__metadata("design:type",Number)],CountingBloomFilter.prototype,"_size",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],CountingBloomFilter.prototype,"_nbHashes",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Array)],CountingBloomFilter.prototype,"_filter",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],CountingBloomFilter.prototype,"_length",void 0),CountingBloomFilter=CountingBloomFilter_1=__decorate([exportable_1.AutoExportable("CountingBloomFilter",["_seed"]),__param(0,exportable_1.Parameter("_size")),__param(1,exportable_1.Parameter("_nbHashes")),__metadata("design:paramtypes",[Number,Number])],CountingBloomFilter)}(base_filter_1.default);exports.default=CountingBloomFilter},{"../base-filter":3,"../exportable":9,"../formulas":10,"../utils":18}],6:[function(require,module,exports){"use strict";var extendStatics,__extends=this&&this.__extends||(extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),__decorate=this&&this.__decorate||function(decorators,target,key,desc){var d,c=arguments.length,r=c<3?target:null===desc?desc=Object.getOwnPropertyDescriptor(target,key):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r},__metadata=this&&this.__metadata||function(k,v){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,v)},__param=this&&this.__param||function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var base_filter_1=__importDefault(require("../base-filter")),exportable_1=require("../exportable"),utils_1=require("../utils");var PartitionedBloomFilter=function(_super){function PartitionedBloomFilter(size,nbHashes,loadFactor,capacity){var _this=_super.call(this)||this;return _this._size=size,_this._nbHashes=nbHashes,_this._loadFactor=loadFactor,_this._m=Math.ceil(_this._size/_this._nbHashes),_this._filter=utils_1.allocateArray(_this._nbHashes,(function(){return utils_1.allocateArray(_this._m,0)})),_this._capacity=void 0!==capacity?capacity:function(totalBits,loadFactor,nbHashes){return Math.ceil(totalBits*(Math.log(loadFactor)*Math.log(1-loadFactor))/(-nbHashes*Math.log(loadFactor)))}(_this._size,loadFactor,nbHashes),_this._length=0,_this}var PartitionedBloomFilter_1;return __extends(PartitionedBloomFilter,_super),PartitionedBloomFilter_1=PartitionedBloomFilter,PartitionedBloomFilter.create=function(size,errorRate,loadFactor){void 0===loadFactor&&(loadFactor=.5);var capacity=function(size,rate,loadFactor){return Math.ceil(size*-Math.log(rate)/(Math.log(loadFactor)*Math.log(1-loadFactor)))}(size,errorRate,loadFactor),nbHashes=function(errorRate,loadFactor){return Math.ceil(Math.log(errorRate)/Math.log(loadFactor))}(errorRate,loadFactor);return new PartitionedBloomFilter_1(capacity,nbHashes,loadFactor,size)},PartitionedBloomFilter.from=function(items,errorRate,loadFactor){void 0===loadFactor&&(loadFactor=.5);var array=Array.from(items),filter=PartitionedBloomFilter_1.create(array.length,errorRate,loadFactor);return array.forEach((function(element){return filter.add(element)})),filter},Object.defineProperty(PartitionedBloomFilter.prototype,"capacity",{get:function(){return this._capacity},enumerable:!1,configurable:!0}),Object.defineProperty(PartitionedBloomFilter.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(PartitionedBloomFilter.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),Object.defineProperty(PartitionedBloomFilter.prototype,"loadFactor",{get:function(){return this._loadFactor},enumerable:!1,configurable:!0}),PartitionedBloomFilter.prototype.add=function(element){for(var indexes=utils_1.getIndices(element,this._m,this._nbHashes,this.seed),i=0;i<this._nbHashes;i++)this._filter[i][indexes[i]]=1;this._length++},PartitionedBloomFilter.prototype.has=function(element){for(var indexes=utils_1.getIndices(element,this._m,this._nbHashes,this.seed),i=0;i<this._nbHashes;i++)if(!this._filter[i][indexes[i]])return!1;return!0},PartitionedBloomFilter.prototype.rate=function(){var p=this._currentload();return Math.pow(p,this._nbHashes)},PartitionedBloomFilter.prototype.equals=function(other){return this._size===other._size&&this._nbHashes===other._nbHashes&&this._length===other._length&&this._loadFactor===other._loadFactor&&this._filter.every((function(array,outerIndex){return other._filter[outerIndex].every((function(item,innerIndex){return array[innerIndex]===item}))}))},PartitionedBloomFilter.prototype._currentload=function(){return this._filter.map((function(bucket){return bucket.reduce((function(a,b){return a+b}),0)})).reduce((function(a,b){return a+b}),0)/this._size},__decorate([exportable_1.Field(),__metadata("design:type",Number)],PartitionedBloomFilter.prototype,"_size",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],PartitionedBloomFilter.prototype,"_nbHashes",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],PartitionedBloomFilter.prototype,"_loadFactor",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],PartitionedBloomFilter.prototype,"_m",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Array)],PartitionedBloomFilter.prototype,"_filter",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],PartitionedBloomFilter.prototype,"_capacity",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],PartitionedBloomFilter.prototype,"_length",void 0),PartitionedBloomFilter=PartitionedBloomFilter_1=__decorate([exportable_1.AutoExportable("PartitionedBloomFilter",["_seed"]),__param(0,exportable_1.Parameter("_size")),__param(1,exportable_1.Parameter("_nbHashes")),__param(2,exportable_1.Parameter("_loadFactor")),__param(3,exportable_1.Parameter("_capacity")),__metadata("design:paramtypes",[Number,Number,Number,Number])],PartitionedBloomFilter)}(base_filter_1.default);exports.default=PartitionedBloomFilter},{"../base-filter":3,"../exportable":9,"../utils":18}],7:[function(require,module,exports){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k),Object.defineProperty(o,k2,{enumerable:!0,get:function(){return m[k]}})}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}:function(o,v){o.default=v}),__decorate=this&&this.__decorate||function(decorators,target,key,desc){var d,c=arguments.length,r=c<3?target:null===desc?desc=Object.getOwnPropertyDescriptor(target,key):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r},__importStar=this&&this.__importStar||function(mod){if(mod&&mod.__esModule)return mod;var result={};if(null!=mod)for(var k in mod)Object.hasOwnProperty.call(mod,k)&&__createBinding(result,mod,k);return __setModuleDefault(result,mod),result},__metadata=this&&this.__metadata||function(k,v){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,v)},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var lodash_eq_1=__importDefault(require("lodash.eq")),lodash_indexof_1=__importDefault(require("lodash.indexof")),utils=__importStar(require("../utils")),exportable_1=require("../exportable"),exportable_2=require("../exportable"),Bucket=function(){function Bucket(size){this._elements=utils.allocateArray(size,null),this._size=size,this._length=0}var Bucket_1;return Bucket_1=Bucket,Object.defineProperty(Bucket.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(Bucket.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),Bucket.prototype.isFree=function(){return this._length<this._size},Bucket.prototype.nextEmptySlot=function(){return lodash_indexof_1.default(this._elements,null)},Bucket.prototype.at=function(index){return this._elements[index]},Bucket.prototype.add=function(element){return!(null===element||!this.isFree())&&(this.set(this.nextEmptySlot(),element),this._length++,!0)},Bucket.prototype.remove=function(element){var index=lodash_indexof_1.default(this._elements,element);return!(index<=-1)&&(this.unset(index),!0)},Bucket.prototype.has=function(element){return lodash_indexof_1.default(this._elements,element)>-1},Bucket.prototype.set=function(index,element){this._elements[index]=element},Bucket.prototype.unset=function(index){this._elements[index]=null,this._length--},Bucket.prototype.swapRandom=function(element,random){void 0===random&&(random=Math.random);var index=utils.randomInt(0,this._length-1,random),tmp=this._elements[index];return this._elements[index]=element,tmp},Bucket.prototype.swap=function(index,element){var tmp=this._elements[index];return this._elements[index]=element,tmp},Bucket.prototype.equals=function(bucket){return this._size===bucket.size&&this._length===bucket.length&&this._elements.every((function(elt,index){return lodash_eq_1.default(bucket.at(index),elt)}))},Bucket=Bucket_1=__decorate([exportable_1.Exportable({export:exportable_2.cloneObject("Bucket","_size","_elements"),import:function(json){if(json.type,!("_elements"in json))throw new Error("Cannot create a Bucket from a JSON export which does not represent a bucket");var bucket=new Bucket_1(json._size);return json._elements.forEach((function(elt,i){null!==elt&&(bucket._elements[i]=elt,bucket._length++)})),bucket}}),__metadata("design:paramtypes",[Number])],Bucket)}();exports.default=Bucket},{"../exportable":9,"../utils":18,"lodash.eq":25,"lodash.indexof":26}],8:[function(require,module,exports){"use strict";var extendStatics,__extends=this&&this.__extends||(extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),__decorate=this&&this.__decorate||function(decorators,target,key,desc){var d,c=arguments.length,r=c<3?target:null===desc?desc=Object.getOwnPropertyDescriptor(target,key):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r},__metadata=this&&this.__metadata||function(k,v){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,v)},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var base_filter_1=__importDefault(require("../base-filter")),bucket_1=__importDefault(require("./bucket")),exportable_1=require("../exportable"),utils_1=require("../utils");var CuckooFilter=function(_super){function CuckooFilter(size,fLength,bucketSize,maxKicks){void 0===maxKicks&&(maxKicks=500);var _this=_super.call(this)||this;return _this._filter=utils_1.allocateArray(size,(function(){return new bucket_1.default(bucketSize)})),_this._size=size,_this._bucketSize=bucketSize,_this._fingerprintLength=fLength,_this._length=0,_this._maxKicks=maxKicks,_this}var CuckooFilter_1;return __extends(CuckooFilter,_super),CuckooFilter_1=CuckooFilter,CuckooFilter.create=function(size,errorRate,bucketSize,maxKicks){void 0===bucketSize&&(bucketSize=4),void 0===maxKicks&&(maxKicks=500);var fl=function(size,rate){var f=Math.ceil(Math.log2(1/rate)+Math.log2(2*size));return Math.ceil(f/4)}(bucketSize,errorRate),capacity=Math.ceil(size/bucketSize/.955);return new CuckooFilter_1(capacity,fl,bucketSize,maxKicks)},CuckooFilter.from=function(items,errorRate,bucketSize,maxKicks){void 0===bucketSize&&(bucketSize=4),void 0===maxKicks&&(maxKicks=500);var array=Array.from(items),filter=CuckooFilter_1.create(array.length,errorRate,bucketSize,maxKicks);return array.forEach((function(item){return filter.add(item)})),filter},Object.defineProperty(CuckooFilter.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(CuckooFilter.prototype,"fullSize",{get:function(){return this.size*this.bucketSize},enumerable:!1,configurable:!0}),Object.defineProperty(CuckooFilter.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),Object.defineProperty(CuckooFilter.prototype,"fingerprintLength",{get:function(){return this._fingerprintLength},enumerable:!1,configurable:!0}),Object.defineProperty(CuckooFilter.prototype,"bucketSize",{get:function(){return this._bucketSize},enumerable:!1,configurable:!0}),Object.defineProperty(CuckooFilter.prototype,"maxKicks",{get:function(){return this._maxKicks},enumerable:!1,configurable:!0}),CuckooFilter.prototype.add=function(element,throwError,destructive){void 0===throwError&&(throwError=!1),void 0===destructive&&(destructive=!1);var locations=this._locations(element);if(this._filter[locations.firstIndex].isFree())this._filter[locations.firstIndex].add(locations.fingerprint);else{if(!this._filter[locations.secondIndex].isFree()){for(var index=this.random()<.5?locations.firstIndex:locations.secondIndex,movedElement=locations.fingerprint,logs=[],nbTry=0;nbTry<this._maxKicks;nbTry++){var rndIndex=utils_1.randomInt(0,this._filter[index].length-1,this.random),tmp=this._filter[index].at(rndIndex);logs.push([index,rndIndex,tmp]),this._filter[index].set(rndIndex,movedElement),movedElement=tmp;var newHash=utils_1.hashAsInt(movedElement,this.seed,64);if(index=Math.abs(index^Math.abs(newHash))%this._filter.length,this._filter[index].isFree())return this._filter[index].add(movedElement),this._length++,!0}if(!destructive)for(var i=logs.length-1;i>=0;i--){var log=logs[i];this._filter[log[0]].set(log[1],log[2])}if(throwError)throw new Error('The Cuckoo Filter is full, cannot insert element "'+element+'"');return!1}this._filter[locations.secondIndex].add(locations.fingerprint)}return this._length++,!0},CuckooFilter.prototype.remove=function(element){var locations=this._locations(element);return this._filter[locations.firstIndex].has(locations.fingerprint)?(this._filter[locations.firstIndex].remove(locations.fingerprint),this._length--,!0):!!this._filter[locations.secondIndex].has(locations.fingerprint)&&(this._filter[locations.secondIndex].remove(locations.fingerprint),this._length--,!0)},CuckooFilter.prototype.has=function(element){var locations=this._locations(element);return this._filter[locations.firstIndex].has(locations.fingerprint)||this._filter[locations.secondIndex].has(locations.fingerprint)},CuckooFilter.prototype.rate=function(){var load=this._computeHashTableLoad(),c=this._fingerprintLength/load.load;return Math.pow(2,Math.log2(2*this._bucketSize)-load.load*c)},CuckooFilter.prototype._computeHashTableLoad=function(){var max=this._filter.length*this._bucketSize,used=this._filter.reduce((function(acc,val){return acc+val.length}),0);return{used:used,free:max-used,size:max,load:used/max}},CuckooFilter.prototype._locations=function(element){var hashes=utils_1.hashIntAndString(element,this.seed,16,64),hash=hashes.int;if(this._fingerprintLength>hashes.string.length)throw new Error("The fingerprint length ("+this._fingerprintLength+") is higher than the hash length ("+hashes.string.length+"). Please reduce the fingerprint length or report if it is an unexpected behavior.");var fingerprint=hashes.string.substring(0,this._fingerprintLength),firstIndex=Math.abs(hash),secondHash=Math.abs(utils_1.hashAsInt(fingerprint,this.seed,64)),secondIndex=Math.abs(firstIndex^secondHash);return{fingerprint:fingerprint,firstIndex:firstIndex%this._size,secondIndex:secondIndex%this._size}},CuckooFilter.prototype.equals=function(filter){for(var i=0,res=!0;res&&i<this._filter.length;){var bucket=this._filter[i];filter._filter[i].equals(bucket)||(res=!1),i++}return res},CuckooFilter=CuckooFilter_1=__decorate([exportable_1.Exportable({export:exportable_1.cloneObject("CuckooFilter","_size","_fingerprintLength","_length","_maxKicks","_filter","_seed"),import:function(json){if(!("CuckooFilter"===json.type&&"_size"in json&&"_fingerprintLength"in json&&"_length"in json&&"_maxKicks"in json&&"_filter"in json&&"_seed"in json))throw new Error("Cannot create a CuckooFilter from a JSON export which does not represent a cuckoo filter");var filter=new CuckooFilter_1(json._size,json._fingerprintLength,json._bucketSize,json._maxKicks);return filter._length=json._length,filter._filter=json._filter.map((function(j){var bucket=new bucket_1.default(j._size);return j._elements.forEach((function(elt,i){null!==elt&&(bucket._elements[i]=elt,bucket._length++)})),bucket})),filter.seed=json.seed,filter}}),__metadata("design:paramtypes",[Number,Number,Number,Number])],CuckooFilter)}(base_filter_1.default);exports.default=CuckooFilter},{"../base-filter":3,"../exportable":9,"../utils":18,"./bucket":7}],9:[function(require,module,exports){"use strict";var __read=this&&this.__read||function(o,n){var m="function"==typeof Symbol&&o[Symbol.iterator];if(!m)return o;var r,e,i=m.call(o),ar=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)ar.push(r.value)}catch(error){e={error:error}}finally{try{r&&!r.done&&(m=i.return)&&m.call(i)}finally{if(e)throw e.error}}return ar},__spread=this&&this.__spread||function(){for(var ar=[],i=0;i<arguments.length;i++)ar=ar.concat(__read(arguments[i]));return ar};function cloneField(v){return null==v?v:Array.isArray(v)?v.map(cloneField):"object"==typeof v?"saveAsJSON"in v?v.saveAsJSON():Object.assign({},v):v}Object.defineProperty(exports,"__esModule",{value:!0}),exports.AutoExportable=exports.Parameter=exports.Field=exports.Exportable=exports.cloneObject=exports.cloneField=void 0,require("reflect-metadata"),exports.cloneField=cloneField,exports.cloneObject=function(type){for(var fields=[],_i=1;_i<arguments.length;_i++)fields[_i-1]=arguments[_i];return function(obj){var json={type:type};return fields.forEach((function(field){json[field]=cloneField(obj[field])})),json}},exports.Exportable=function(specs){return function(target){return target.prototype.saveAsJSON=function(){return specs.export(this)},target.fromJSON=function(json){return specs.import(json)},target}};var METADATA_CLASSNAME=Symbol("bloom-filters:exportable:class-name"),METADATA_FIELDS=Symbol("bloom-filters:exportable:fields"),METADATA_PARAMETERS=Symbol("bloom-filters:exportable:constructor-parameters");exports.Field=function(exporter,importer){return void 0===exporter&&(exporter=cloneField),void 0===importer&&(importer=function(v){return v}),function(target,propertyKey){var fields=[];Reflect.hasMetadata(METADATA_FIELDS,target)&&(fields=Reflect.getMetadata(METADATA_FIELDS,target)),fields.push({name:propertyKey,exporter:exporter,importer:importer}),Reflect.defineMetadata(METADATA_FIELDS,fields,target)}},exports.Parameter=function(fieldName){return function(target,propertyKey,parameterIndex){var parameters=new Map;Reflect.hasMetadata(METADATA_PARAMETERS,target)&&(parameters=Reflect.getMetadata(METADATA_PARAMETERS,target)),parameters.set(fieldName,parameterIndex),Reflect.defineMetadata(METADATA_PARAMETERS,parameters,target)}},exports.AutoExportable=function(className,otherFields){return void 0===otherFields&&(otherFields=[]),function(target){if(Reflect.defineMetadata(METADATA_CLASSNAME,className,target.prototype),!Reflect.hasMetadata(METADATA_FIELDS,target.prototype)||0===otherFields.length)throw new SyntaxError("No exported fields declared when @AutoExportable is called");Reflect.hasMetadata(METADATA_PARAMETERS,target)||Reflect.defineMetadata(METADATA_PARAMETERS,new Map,target),target.prototype.saveAsJSON=function(){var _this=this,json={type:Reflect.getMetadata(METADATA_CLASSNAME,target.prototype)};return Reflect.getMetadata(METADATA_FIELDS,target.prototype).forEach((function(field){json[field.name]=field.exporter(_this[field.name])})),otherFields.forEach((function(field){json[field]=cloneField(_this[field])})),json},target.fromJSON=function(json){var className=Reflect.getMetadata(METADATA_CLASSNAME,target.prototype),parameters=Reflect.getMetadata(METADATA_PARAMETERS,target),fields=Reflect.getMetadata(METADATA_FIELDS,target.prototype);if(json.type!==className)throw new Error("Cannot create an object "+className+' from a JSON export with type "'+json.type+'"');var constructorArgs=[],copyFields=[];otherFields.map((function(name){return{name:name,importer:function(v){return v}}})).concat(fields).forEach((function(field){if(!(field.name in json))throw new Error('Invalid import: required field "'+field+'" not found in JSON export "'+json+'"');parameters.has(field.name)?constructorArgs[parameters.get(field.name)]=field.importer(json[field.name]):copyFields.push({name:field.name,value:field.importer(json[field.name])})}));var obj=new(target.bind.apply(target,__spread([void 0],constructorArgs)));return copyFields.forEach((function(arg){obj[arg.name]=arg.value})),obj}}}},{"reflect-metadata":29}],10:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.optimalHashes=exports.optimalFilterSize=void 0,exports.optimalFilterSize=function(length,errorRate){return Math.ceil(-length*Math.log(errorRate)/Math.pow(Math.log(2),2))},exports.optimalHashes=function(size,length){return Math.ceil(size/length*Math.log(2))}},{}],11:[function(require,module,exports){(function(Buffer){(function(){"use strict";var extendStatics,__extends=this&&this.__extends||(extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),__decorate=this&&this.__decorate||function(decorators,target,key,desc){var d,c=arguments.length,r=c<3?target:null===desc?desc=Object.getOwnPropertyDescriptor(target,key):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r},__metadata=this&&this.__metadata||function(k,v){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,v)},__param=this&&this.__param||function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var utils_1=require("../utils"),exportable_1=require("../exportable"),base_filter_1=__importDefault(require("../base-filter")),inspect=Symbol.for("nodejs.util.inspect.custom"),Cell=function(_super){function Cell(idSum,hashSum,count){var _this=_super.call(this)||this;return _this._idSum=idSum,_this._hashSum=hashSum,_this._count=count,_this}var Cell_1;return __extends(Cell,_super),Cell_1=Cell,Cell.empty=function(){return new Cell_1(Buffer.allocUnsafe(0).fill(0),Buffer.allocUnsafe(0).fill(0),0)},Cell.prototype[inspect]=function(){return"Cell:<"+JSON.stringify(this._idSum.toJSON().data)+", "+JSON.stringify(this._hashSum.toJSON().data)+", "+this._count+">"},Object.defineProperty(Cell.prototype,"idSum",{get:function(){return this._idSum},enumerable:!1,configurable:!0}),Object.defineProperty(Cell.prototype,"hashSum",{get:function(){return this._hashSum},enumerable:!1,configurable:!0}),Object.defineProperty(Cell.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Cell.prototype.add=function(idSum,hashSum){this._idSum=utils_1.xorBuffer(this._idSum,idSum),this._hashSum=utils_1.xorBuffer(this._hashSum,hashSum),this._count++},Cell.prototype.xorm=function(cell){return new Cell_1(utils_1.xorBuffer(this._idSum,cell.idSum),utils_1.xorBuffer(this._hashSum,cell.hashSum),this._count-cell.count)},Cell.prototype.isEmpty=function(){return this._idSum.equals(Buffer.from(""))&&this._hashSum.equals(Buffer.from(""))&&0===this._count},Cell.prototype.equals=function(cell){return this._count===cell.count&&this._idSum.equals(cell.idSum)&&this._hashSum.equals(cell.hashSum)},Cell.prototype.isPure=function(){if(this.isEmpty()||1!==this._count&&-1!==this._count)return!1;var hashes=utils_1.hashTwiceAsString(JSON.stringify(this._idSum.toJSON()),this.seed);return this._hashSum.equals(Buffer.from(hashes.first))},__decorate([exportable_1.Field((function(elt){return elt.toString()}),Buffer.from),__metadata("design:type",Buffer)],Cell.prototype,"_idSum",void 0),__decorate([exportable_1.Field((function(elt){return elt.toString()}),Buffer.from),__metadata("design:type",Buffer)],Cell.prototype,"_hashSum",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],Cell.prototype,"_count",void 0),Cell=Cell_1=__decorate([exportable_1.AutoExportable("Cell",["_seed"]),__param(0,exportable_1.Parameter("_idSum")),__param(1,exportable_1.Parameter("_hashSum")),__param(2,exportable_1.Parameter("_count")),__metadata("design:paramtypes",[Buffer,Buffer,Number])],Cell)}(base_filter_1.default);exports.default=Cell}).call(this)}).call(this,require("buffer").Buffer)},{"../base-filter":3,"../exportable":9,"../utils":18,buffer:20}],12:[function(require,module,exports){(function(Buffer){(function(){"use strict";var extendStatics,__extends=this&&this.__extends||(extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),__decorate=this&&this.__decorate||function(decorators,target,key,desc){var d,c=arguments.length,r=c<3?target:null===desc?desc=Object.getOwnPropertyDescriptor(target,key):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r},__metadata=this&&this.__metadata||function(k,v){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,v)},__param=this&&this.__param||function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}},__generator=this&&this.__generator||function(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return function(op){if(f)throw new TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=_.trys,(t=t.length>0&&t[t.length-1])||6!==op[0]&&2!==op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}([n,v])}}},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var base_filter_1=__importDefault(require("../base-filter")),cell_1=__importDefault(require("./cell")),exportable_1=require("../exportable"),utils_1=require("../utils"),formulas_1=require("../formulas"),InvertibleBloomFilter=function(_super){function InvertibleBloomFilter(size,hashCount){void 0===hashCount&&(hashCount=3);var _this=_super.call(this)||this;if(void 0===Buffer)throw new Error('No native Buffer implementation bound in your JavaScript env. If you are in a Web browser, consider importing the polyfill "feross/buffer" (https://github.com/feross/buffer).');if(hashCount<=0)throw new Error("The hashCount must be a non-zero, positive integer");return _this._size=size,_this._hashCount=hashCount,_this._elements=utils_1.allocateArray(_this._size,(function(){return cell_1.default.empty()})),_this}var InvertibleBloomFilter_1;return __extends(InvertibleBloomFilter,_super),InvertibleBloomFilter_1=InvertibleBloomFilter,InvertibleBloomFilter.create=function(nbItems,errorRate){var size=formulas_1.optimalFilterSize(nbItems,errorRate),nbHashes=formulas_1.optimalHashes(size,nbItems);return new InvertibleBloomFilter_1(size,nbHashes)},InvertibleBloomFilter.from=function(items,errorRate){var array=Array.from(items),filter=InvertibleBloomFilter_1.create(array.length,errorRate);return array.forEach((function(item){return filter.add(item)})),filter},Object.defineProperty(InvertibleBloomFilter.prototype,"hashCount",{get:function(){return this._hashCount},enumerable:!1,configurable:!0}),Object.defineProperty(InvertibleBloomFilter.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(InvertibleBloomFilter.prototype,"length",{get:function(){return this._elements.reduce((function(a,b){return a+b.count}),0)/this._hashCount},enumerable:!1,configurable:!0}),Object.defineProperty(InvertibleBloomFilter.prototype,"elements",{get:function(){return this._elements},enumerable:!1,configurable:!0}),InvertibleBloomFilter.prototype.add=function(element){for(var hashes=utils_1.allInOneHashTwice(JSON.stringify(element.toJSON()),this.seed),indexes=utils_1.getDistinctIndices(hashes.string.first,this._size,this._hashCount,this.seed),i=0;i<this._hashCount;++i)this._elements[indexes[i]].add(element,Buffer.from(hashes.string.first))},InvertibleBloomFilter.prototype.remove=function(element){for(var hashes=utils_1.allInOneHashTwice(JSON.stringify(element.toJSON()),this.seed),indexes=utils_1.getDistinctIndices(hashes.string.first,this.size,this._hashCount,this.seed),i=0;i<this._hashCount;++i)this._elements[indexes[i]]=this._elements[indexes[i]].xorm(new cell_1.default(Buffer.from(element),Buffer.from(hashes.string.first),1));return!0},InvertibleBloomFilter.prototype.has=function(element){for(var hashes=utils_1.allInOneHashTwice(JSON.stringify(element.toJSON()),this.seed),indexes=utils_1.getDistinctIndices(hashes.string.first,this.size,this._hashCount,this.seed),i=0;i<this._hashCount;++i){if(0===this._elements[indexes[i]].count)return!1;if(1===this._elements[indexes[i]].count)return!!this._elements[indexes[i]].idSum.equals(element)}return!0},InvertibleBloomFilter.prototype.listEntries=function(){var that=this,seenBefore=[];return function(){var _loop_1,index,state_1;return __generator(this,(function(_a){switch(_a.label){case 0:_loop_1=function(index){var localCell;return __generator(this,(function(_a){switch(_a.label){case 0:return(localCell=that._elements[index]).count>0&&-1===seenBefore.findIndex((function(b){return b.equals(localCell.idSum)}))?that.has(localCell.idSum)?(seenBefore.push(localCell.idSum),[4,localCell.idSum]):[3,2]:[3,3];case 1:return _a.sent(),[3,3];case 2:return[2,{value:!1}];case 3:return[2]}}))},index=0,_a.label=1;case 1:return index<that._elements.length-1?[5,_loop_1(index)]:[3,4];case 2:if("object"==typeof(state_1=_a.sent()))return[2,state_1.value];_a.label=3;case 3:return index++,[3,1];case 4:return[2,!0]}}))}()},InvertibleBloomFilter.prototype.substract=function(iblt){if(this.size!==iblt.size)throw new Error("The two Invertible Bloom Filters must be of the same size");var res=new InvertibleBloomFilter_1(iblt._size,iblt._hashCount);res.seed=this.seed;for(var i=0;i<this.size;++i)res._elements[i]=this._elements[i].xorm(iblt._elements[i]);return res},InvertibleBloomFilter.prototype.equals=function(iblt){if(iblt._size!==this._size||iblt._hashCount!==this._hashCount||iblt.seed!==this.seed)return!1;for(var i=0;i<iblt._elements.length;++i)if(!iblt._elements[i].equals(this._elements[i]))return!1;return!0},InvertibleBloomFilter.prototype.decode=function(additional,missing){void 0===additional&&(additional=[]),void 0===missing&&(missing=[]);for(var pureList=[],cell=null,i=0;i<this._elements.length;++i)(cell=this._elements[i]).isPure()&&pureList.push(i);for(;0!==pureList.length;){var id=(cell=this._elements[pureList.pop()]).idSum,c=cell.count;if(cell.isPure()){if(1===c)additional.push(id);else{if(-1!==c)throw new Error("Please report, not possible");missing.push(id)}var hashes=utils_1.allInOneHashTwice(JSON.stringify(id.toJSON()),this.seed),indexes=utils_1.getDistinctIndices(hashes.string.first,this._size,this._hashCount,this.seed);for(i=0;i<indexes.length;++i)this._elements[indexes[i]]=this._elements[indexes[i]].xorm(new cell_1.default(id,Buffer.from(hashes.string.first),c)),this._elements[indexes[i]].isPure()&&pureList.push(indexes[i])}}return this._elements.findIndex((function(e){return!e.isEmpty()}))>-1?{success:!1,reason:{cell:cell,iblt:this},additional:additional,missing:missing}:{success:!0,additional:additional,missing:missing}},__decorate([exportable_1.Field(),__metadata("design:type",Number)],InvertibleBloomFilter.prototype,"_size",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],InvertibleBloomFilter.prototype,"_hashCount",void 0),__decorate([exportable_1.Field(void 0,(function(json){return json.map((function(elt){var c=new cell_1.default(Buffer.from(elt._idSum),Buffer.from(elt._hashSum),elt._count);return c.seed=elt._seed,c}))})),__metadata("design:type",Array)],InvertibleBloomFilter.prototype,"_elements",void 0),InvertibleBloomFilter=InvertibleBloomFilter_1=__decorate([exportable_1.AutoExportable("InvertibleBloomFilter",["_seed"]),__param(0,exportable_1.Parameter("_size")),__param(1,exportable_1.Parameter("_hashCount")),__metadata("design:paramtypes",[Number,Number])],InvertibleBloomFilter)}(base_filter_1.default);exports.default=InvertibleBloomFilter}).call(this)}).call(this,require("buffer").Buffer)},{"../base-filter":3,"../exportable":9,"../formulas":10,"../utils":18,"./cell":11,buffer:20}],13:[function(require,module,exports){"use strict";var extendStatics,__extends=this&&this.__extends||(extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),__decorate=this&&this.__decorate||function(decorators,target,key,desc){var d,c=arguments.length,r=c<3?target:null===desc?desc=Object.getOwnPropertyDescriptor(target,key):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r},__metadata=this&&this.__metadata||function(k,v){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,v)},__param=this&&this.__param||function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}},__values=this&&this.__values||function(o){var s="function"==typeof Symbol&&Symbol.iterator,m=s&&o[s],i=0;if(m)return m.call(o);if(o&&"number"==typeof o.length)return{next:function(){return o&&i>=o.length&&(o=void 0),{value:o&&o[i++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var base_filter_1=__importDefault(require("../base-filter")),exportable_1=require("../exportable"),utils_1=require("../utils"),CountMinSketch=function(_super){function CountMinSketch(columns,rows){var _this=_super.call(this)||this;return _this._columns=columns,_this._rows=rows,_this._matrix=utils_1.allocateArray(_this._rows,(function(){return utils_1.allocateArray(_this._columns,0)})),_this._allSums=0,_this}var CountMinSketch_1;return __extends(CountMinSketch,_super),CountMinSketch_1=CountMinSketch,CountMinSketch.create=function(errorRate,accuracy){void 0===accuracy&&(accuracy=.999);var columns=Math.ceil(Math.E/errorRate),rows=Math.ceil(Math.log(1/accuracy));return new CountMinSketch_1(columns,rows)},CountMinSketch.from=function(items,errorRate,accuracy){var e_1,_a;void 0===accuracy&&(accuracy=.999);var filter=CountMinSketch_1.create(errorRate,accuracy);try{for(var items_1=__values(items),items_1_1=items_1.next();!items_1_1.done;items_1_1=items_1.next()){var item=items_1_1.value;filter.update(item)}}catch(e_1_1){e_1={error:e_1_1}}finally{try{items_1_1&&!items_1_1.done&&(_a=items_1.return)&&_a.call(items_1)}finally{if(e_1)throw e_1.error}}return filter},Object.defineProperty(CountMinSketch.prototype,"columns",{get:function(){return this._columns},enumerable:!1,configurable:!0}),Object.defineProperty(CountMinSketch.prototype,"rows",{get:function(){return this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(CountMinSketch.prototype,"sum",{get:function(){return this._allSums},enumerable:!1,configurable:!0}),CountMinSketch.prototype.update=function(element,count){void 0===count&&(count=1),this._allSums+=count;for(var indexes=utils_1.getDistinctIndices(element,this._columns,this._rows,this.seed),i=0;i<this._rows;i++)this._matrix[i][indexes[i]]+=count},CountMinSketch.prototype.count=function(element){for(var min=1/0,indexes=utils_1.getDistinctIndices(element,this._columns,this._rows,this.seed),i=0;i<this._rows;i++){var v=this._matrix[i][indexes[i]];min=Math.min(v,min)}return min},CountMinSketch.prototype.equals=function(other){if(this._columns!==other._columns||this._rows!==other._rows)return!1;for(var i=0;i<this._rows;i++)for(var j=0;j<this._columns;j++)if(this._matrix[i][j]!==other._matrix[i][j])return!1;return!0},CountMinSketch.prototype.merge=function(sketch){if(this._columns!==sketch._columns)throw new Error("Cannot merge two sketches with different number of columns");if(this._rows!==sketch._rows)throw new Error("Cannot merge two sketches with different number of rows");for(var i=0;i<this._rows;i++)for(var j=0;j<this._columns;j++)this._matrix[i][j]+=sketch._matrix[i][j]},CountMinSketch.prototype.clone=function(){var sketch=new CountMinSketch_1(this._columns,this._rows);return sketch.merge(this),sketch.seed=this.seed,sketch},__decorate([exportable_1.Field(),__metadata("design:type",Number)],CountMinSketch.prototype,"_columns",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],CountMinSketch.prototype,"_rows",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Array)],CountMinSketch.prototype,"_matrix",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],CountMinSketch.prototype,"_allSums",void 0),CountMinSketch=CountMinSketch_1=__decorate([exportable_1.AutoExportable("CountMinSketch",["_seed"]),__param(0,exportable_1.Parameter("_columns")),__param(1,exportable_1.Parameter("_rows")),__metadata("design:paramtypes",[Number,Number])],CountMinSketch)}(base_filter_1.default);exports.default=CountMinSketch},{"../base-filter":3,"../exportable":9,"../utils":18}],14:[function(require,module,exports){"use strict";var extendStatics,__extends=this&&this.__extends||(extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),__decorate=this&&this.__decorate||function(decorators,target,key,desc){var d,c=arguments.length,r=c<3?target:null===desc?desc=Object.getOwnPropertyDescriptor(target,key):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r},__metadata=this&&this.__metadata||function(k,v){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,v)},__param=this&&this.__param||function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var base_filter_1=__importDefault(require("../base-filter")),exportable_1=require("../exportable"),utils_1=require("../utils"),TWO_POW_32=Math.pow(2,32);var HyperLogLog=function(_super){function HyperLogLog(nbRegisters){var _this=_super.call(this)||this;return _this._nbRegisters=nbRegisters,_this._nbBytesPerHash=Math.round(Math.log2(nbRegisters)),_this._correctionBias=function(m){switch(m){case 16:return.673;case 32:return.697;case 64:return.709;default:return.7213/(1+1.079/m)}}(nbRegisters),_this._registers=utils_1.allocateArray(_this._nbRegisters,0),_this}var HyperLogLog_1;return __extends(HyperLogLog,_super),HyperLogLog_1=HyperLogLog,Object.defineProperty(HyperLogLog.prototype,"nbRegisters",{get:function(){return this._nbRegisters},enumerable:!1,configurable:!0}),HyperLogLog.prototype.update=function(element){for(var hashedValue=utils_1.hashAsInt(element,this.seed).toString(2),registerIndex=1+parseInt(hashedValue.slice(0,this._nbBytesPerHash-1),2),secondPart=hashedValue.slice(this._nbBytesPerHash),posLeftMost=0;"1"!==secondPart[posLeftMost]&&posLeftMost<secondPart.length-1;)posLeftMost++;this._registers[registerIndex]=Math.max(this._registers[registerIndex],posLeftMost)},HyperLogLog.prototype.count=function(round){void 0===round&&(round=!1);var harmonicMean=this._registers.reduce((function(acc,value){return acc+Math.pow(2,-value)}),0),estimation=this._correctionBias*Math.pow(this._nbRegisters,2)/harmonicMean;return estimation>TWO_POW_32/30&&(estimation=-TWO_POW_32*Math.log(1-estimation/TWO_POW_32)),round&&(estimation=Math.round(estimation)),estimation},HyperLogLog.prototype.accuracy=function(){return 1.04/Math.sqrt(this._nbRegisters)},HyperLogLog.prototype.merge=function(other){if(this.nbRegisters!==other.nbRegisters)throw new Error("Two HyperLogLog must have the same number of registers to be merged. Tried to merge two HyperLogLog with m = "+this.nbRegisters+" and m = "+other.nbRegisters);for(var newSketch=new HyperLogLog_1(this.nbRegisters),i=0;i<this.nbRegisters-1;i++)newSketch._registers[i]=Math.max(this._registers[i],other._registers[i]);return newSketch},HyperLogLog.prototype.equals=function(other){if(this.nbRegisters!==other.nbRegisters)return!1;for(var i=0;i<this.nbRegisters-1;i++)if(this._registers[i]!==other._registers[i])return!1;return!0},__decorate([exportable_1.Field(),__metadata("design:type",Number)],HyperLogLog.prototype,"_nbRegisters",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],HyperLogLog.prototype,"_nbBytesPerHash",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],HyperLogLog.prototype,"_correctionBias",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Array)],HyperLogLog.prototype,"_registers",void 0),HyperLogLog=HyperLogLog_1=__decorate([exportable_1.AutoExportable("HyperLogLog",["_seed"]),__param(0,exportable_1.Parameter("_nbRegisters")),__metadata("design:paramtypes",[Number])],HyperLogLog)}(base_filter_1.default);exports.default=HyperLogLog},{"../base-filter":3,"../exportable":9,"../utils":18}],15:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var min_hash_1=require("./min-hash"),lodash_1=require("lodash");function isPrime(x){if(2!==x&&x%2==0)return!1;for(var i=2;i<Math.sqrt(x);i++)if(x%i==0)return!1;return!0}var MinHashFactory=function(){function MinHashFactory(nbHashes,maxValue){this._nbHashes=nbHashes,this._maxValue=maxValue,this._hashFunctions=[];for(var c=function(x){for(var i=0;;){if(isPrime(x+i))return x+i;i++}}(this._maxValue),i=0;i<this._nbHashes;i++){var a=lodash_1.random(0,this._maxValue,!1),b=lodash_1.random(0,this._maxValue,!1);this._hashFunctions.push({a:a,b:b,c:c})}}return MinHashFactory.prototype.create=function(){return new min_hash_1.MinHash(this._nbHashes,this._hashFunctions)},MinHashFactory}();exports.default=MinHashFactory},{"./min-hash":16,lodash:27}],16:[function(require,module,exports){"use strict";var extendStatics,__extends=this&&this.__extends||(extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),__decorate=this&&this.__decorate||function(decorators,target,key,desc){var d,c=arguments.length,r=c<3?target:null===desc?desc=Object.getOwnPropertyDescriptor(target,key):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r},__metadata=this&&this.__metadata||function(k,v){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,v)},__param=this&&this.__param||function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}},__read=this&&this.__read||function(o,n){var m="function"==typeof Symbol&&o[Symbol.iterator];if(!m)return o;var r,e,i=m.call(o),ar=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)ar.push(r.value)}catch(error){e={error:error}}finally{try{r&&!r.done&&(m=i.return)&&m.call(i)}finally{if(e)throw e.error}}return ar},__spread=this&&this.__spread||function(){for(var ar=[],i=0;i<arguments.length;i++)ar=ar.concat(__read(arguments[i]));return ar},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.MinHash=void 0;var base_filter_1=__importDefault(require("../base-filter")),exportable_1=require("../exportable"),utils_1=require("../utils"),lodash_1=require("lodash"),EmptyMinHashError=function(_super){function EmptyMinHashError(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(EmptyMinHashError,_super),EmptyMinHashError}(Error);function applyHashFunction(x,fn){return(fn.a*x+fn.b)%fn.c}var MinHash=function(_super){function MinHash(nbHashes,hashFunctions){var _this=_super.call(this)||this;return _this._nbHashes=nbHashes,_this._hashFunctions=hashFunctions,_this._signature=utils_1.allocateArray(_this._nbHashes,1/0),_this}return __extends(MinHash,_super),Object.defineProperty(MinHash.prototype,"nbHashes",{get:function(){return this._nbHashes},enumerable:!1,configurable:!0}),MinHash.prototype.isEmpty=function(){return this._signature[0]===1/0},MinHash.prototype.add=function(value){for(var i=0;i<this._nbHashes;i++)this._signature[i]=Math.min(this._signature[i],applyHashFunction(value,this._hashFunctions[i]))},MinHash.prototype.bulkLoad=function(values){for(var _this=this,_loop_1=function(i){var candidateSignatures=values.map((function(value){return applyHashFunction(value,_this._hashFunctions[i])}));this_1._signature[i]=Math.min.apply(Math,__spread([this_1._signature[i]],candidateSignatures))},this_1=this,i=0;i<this._nbHashes;i++)_loop_1(i)},MinHash.prototype.compareWith=function(other){if(this.isEmpty()||other.isEmpty())throw new EmptyMinHashError("Cannot compute a Jaccard similairty with a MinHash that contains no values");return lodash_1.intersection(this._signature,other._signature).length/this._nbHashes},__decorate([exportable_1.Field(),__metadata("design:type",Number)],MinHash.prototype,"_nbHashes",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Array)],MinHash.prototype,"_hashFunctions",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Array)],MinHash.prototype,"_signature",void 0),MinHash=__decorate([exportable_1.AutoExportable("MinHash",["_seed"]),__param(0,exportable_1.Parameter("_nbHashes")),__param(1,exportable_1.Parameter("_hashFunctions")),__metadata("design:paramtypes",[Number,Array])],MinHash)}(base_filter_1.default);exports.MinHash=MinHash},{"../base-filter":3,"../exportable":9,"../utils":18,lodash:27}],17:[function(require,module,exports){"use strict";var extendStatics,__extends=this&&this.__extends||(extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)},function(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}),__decorate=this&&this.__decorate||function(decorators,target,key,desc){var d,c=arguments.length,r=c<3?target:null===desc?desc=Object.getOwnPropertyDescriptor(target,key):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r},__metadata=this&&this.__metadata||function(k,v){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,v)},__param=this&&this.__param||function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}},__generator=this&&this.__generator||function(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return function(op){if(f)throw new TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=_.trys,(t=t.length>0&&t[t.length-1])||6!==op[0]&&2!==op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}([n,v])}}},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var base_filter_1=__importDefault(require("../base-filter")),count_min_sketch_1=__importDefault(require("./count-min-sketch")),exportable_1=require("../exportable"),lodash_1=require("lodash"),MinHeap=function(){function MinHeap(){this._content=[]}return Object.defineProperty(MinHeap.prototype,"length",{get:function(){return this._content.length},enumerable:!1,configurable:!0}),Object.defineProperty(MinHeap.prototype,"content",{get:function(){return this._content},set:function(value){this._content=value},enumerable:!1,configurable:!0}),MinHeap.prototype.get=function(index){return this._content[index]},MinHeap.prototype.add=function(element){var index=lodash_1.sortedIndexBy(this._content,element,(function(heapElement){return heapElement.frequency}));this._content.splice(index,0,element)},MinHeap.prototype.remove=function(index){this._content.splice(index,1)},MinHeap.prototype.popMin=function(){return this._content.shift()},MinHeap.prototype.indexOf=function(value){return this._content.findIndex((function(heapElement){return heapElement.value===value}))},MinHeap.prototype.clear=function(){this._content=[]},MinHeap}(),TopK=function(_super){function TopK(k,errorRate,accuracy){var _this=_super.call(this)||this;return _this._k=k,_this._errorRate=errorRate,_this._accuracy=accuracy,_this._sketch=count_min_sketch_1.default.create(errorRate,accuracy),_this._heap=new MinHeap,_this}return __extends(TopK,_super),TopK.prototype.add=function(element){this._sketch.update(element);var frequency=this._sketch.count(element);if(this._heap.length<this._k||frequency>=this._heap.get(0).frequency){var index=this._heap.indexOf(element);index>-1&&this._heap.remove(index),this._heap.add({value:element,frequency:frequency}),this._heap.length>this._k&&this._heap.popMin()}},TopK.prototype.clear=function(){this._sketch=count_min_sketch_1.default.create(this._errorRate,this._accuracy),this._heap.clear()},TopK.prototype.values=function(){for(var res=[],i=this._heap.length-1;i>0;i--){var elt=this._heap.get(i);res.push({value:elt.value,frequency:elt.frequency,rank:this._heap.length-i})}return res},TopK.prototype.iterator=function(){var heap=this._heap;return function(){var i,elt;return __generator(this,(function(_a){switch(_a.label){case 0:i=heap.length-1,_a.label=1;case 1:return i>0?[4,{value:(elt=heap.get(i)).value,frequency:elt.frequency,rank:heap.length-i}]:[3,4];case 2:_a.sent(),_a.label=3;case 3:return i--,[3,1];case 4:return[2]}}))}()},__decorate([exportable_1.Field(),__metadata("design:type",Number)],TopK.prototype,"_k",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],TopK.prototype,"_errorRate",void 0),__decorate([exportable_1.Field(),__metadata("design:type",Number)],TopK.prototype,"_accuracy",void 0),__decorate([exportable_1.Field(),__metadata("design:type",count_min_sketch_1.default)],TopK.prototype,"_sketch",void 0),__decorate([exportable_1.Field((function(heap){return heap.content}),(function(json){var heap=new MinHeap;return heap.content=json,heap})),__metadata("design:type",MinHeap)],TopK.prototype,"_heap",void 0),TopK=__decorate([exportable_1.AutoExportable("TopK",["_seed"]),__param(0,exportable_1.Parameter("_k")),__param(1,exportable_1.Parameter("_errorRate")),__param(2,exportable_1.Parameter("_accuracy")),__metadata("design:paramtypes",[Number,Number,Number])],TopK)}(base_filter_1.default);exports.default=TopK},{"../base-filter":3,"../exportable":9,"./count-min-sketch":13,lodash:27}],18:[function(require,module,exports){(function(Buffer){(function(){"use strict";var __values=this&&this.__values||function(o){var s="function"==typeof Symbol&&Symbol.iterator,m=s&&o[s],i=0;if(m)return m.call(o);if(o&&"number"==typeof o.length)return{next:function(){return o&&i>=o.length&&(o=void 0),{value:o&&o[i++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.hex2bin=exports.power2=exports.getDefaultSeed=exports.hashIntAndString=exports.hashAsString=exports.hashAsInt=exports.isEmptyBuffer=exports.xorBuffer=exports.randomInt=exports.getIndices=exports.getDistinctIndices=exports.doubleHashing=exports.allInOneHashTwice=exports.hashTwiceAsString=exports.hashTwice=exports.allocateArray=void 0;var xxhashjs_1=__importDefault(require("xxhashjs"));function hashTwice(value,asInt,seed){void 0===asInt&&(asInt=!1),void 0===seed&&(seed=78187493520);var f=xxhashjs_1.default.h64(value,seed+1),l=xxhashjs_1.default.h64(value,seed+2);if(asInt)return{first:f.toNumber(),second:l.toNumber()};var one=f.toString(16);one.length<16&&(one="0".repeat(16-one.length)+one);var two=l.toString(16);return two.length<16&&(two="0".repeat(16-two.length)+two),{first:Number(one),second:Number(two)}}function doubleHashing(n,hashA,hashB,size){return Math.abs((hashA+n*hashB)%size)}function getDefaultSeed(){return 78187493520}function hex2bin(hex){return parseInt(hex,16).toString(2)}exports.allocateArray=function(size,defaultValue){for(var array=new Array(size),getDefault="function"==typeof defaultValue?defaultValue:function(){return defaultValue},ind=0;ind<size;ind++)array[ind]=getDefault();return array},exports.hashTwice=hashTwice,exports.hashTwiceAsString=function(value,seed){void 0===seed&&(seed=78187493520);var f=xxhashjs_1.default.h64(value,seed+1),l=xxhashjs_1.default.h64(value,seed+2),one=f.toString(16);one.length<16&&(one="0".repeat(16-one.length)+one);var two=l.toString(16);return two.length<16&&(two="0".repeat(16-two.length)+two),{first:one,second:two}},exports.allInOneHashTwice=function(val,seed){void 0===seed&&(seed=78187493520);var one=xxhashjs_1.default.h64(val,seed+1),two=xxhashjs_1.default.h64(val,seed+2),stringOne=one.toString(16);stringOne.length<16&&(stringOne="0".repeat(16-stringOne.length)+stringOne);var stringTwo=two.toString(16);return stringTwo.length<16&&(stringTwo="0".repeat(16-stringTwo.length)+stringTwo),{int:{first:one.toNumber(),second:two.toNumber()},string:{first:stringOne,second:stringTwo}}},exports.doubleHashing=doubleHashing,exports.getDistinctIndices=function(element,size,number,seed){return void 0===seed&&(seed=78187493520),function getDistinctIndicesBis(n,elem,size,count,indexes){if(void 0===indexes&&(indexes=[]),indexes.length===count)return indexes;var hashes=hashTwice(elem,!0,seed+size%n),ind=doubleHashing(n,hashes.first,hashes.second,size);return indexes.includes(ind)||indexes.push(ind),getDistinctIndicesBis(n+1,elem,size,count,indexes)}(1,element,size,number)},exports.getIndices=function(element,size,hashCount,seed){void 0===seed&&(seed=78187493520);for(var arr=[],i=1;i<=hashCount;i++){var hashes=hashTwice(element,!0,seed+size%i);arr.push(doubleHashing(i,hashes.first,hashes.second,size))}if(arr.length!==hashCount)throw new Error("report this, please, shouldnt be of different size");return arr},exports.randomInt=function(min,max,random){void 0===random&&(random=Math.random),min=Math.ceil(min),max=Math.floor(max);var rn=random();return Math.floor(rn*(max-min+1))+min},exports.xorBuffer=function(a,b){for(var length=Math.max(a.length,b.length),buffer=Buffer.allocUnsafe(length).fill(0),i=0;i<length;++i)i<a.length&&i<b.length?buffer[length-i-1]=a[a.length-i-1]^b[b.length-i-1]:i<a.length&&i>=b.length?buffer[length-i-1]^=a[a.length-i-1]:i<b.length&&i>=a.length&&(buffer[length-i-1]^=b[b.length-i-1]);for(var start=0,it=buffer.values(),value=it.next();!value.done&&0===value.value;)start++,value=it.next();return buffer.slice(start)},exports.isEmptyBuffer=function(buffer){var e_1,_a;if(null===buffer||!buffer)return!0;try{for(var buffer_1=__values(buffer),buffer_1_1=buffer_1.next();!buffer_1_1.done;buffer_1_1=buffer_1.next()){if(0!==buffer_1_1.value)return!1}}catch(e_1_1){e_1={error:e_1_1}}finally{try{buffer_1_1&&!buffer_1_1.done&&(_a=buffer_1.return)&&_a.call(buffer_1)}finally{if(e_1)throw e_1.error}}return!0},exports.hashAsInt=function(elem,seed,length){switch(void 0===seed&&(seed=78187493520),length){case 32:return xxhashjs_1.default.h32(elem,seed).toNumber();case 64:default:return xxhashjs_1.default.h64(elem,seed).toNumber()}},exports.hashAsString=function(elem,seed,base,length){var hash;switch(void 0===seed&&(seed=78187493520),void 0===base&&(base=16),void 0===length&&(length=64),length){case 32:hash=xxhashjs_1.default.h32(elem,seed);break;case 64:default:hash=xxhashjs_1.default.h64(elem,seed)}var result="";return 16===base?(result=hash.toString(base)).length<length/4&&(result="0".repeat(length/4-result.length)+result):2===base&&(result=hex2bin(hash.toString(16))).length<length&&(result="0".repeat(length-result.length)+result),result},exports.hashIntAndString=function(elem,seed,base,length){var hash;switch(void 0===seed&&(seed=78187493520),void 0===base&&(base=16),void 0===length&&(length=64),length){case 32:hash=xxhashjs_1.default.h32(elem,seed);break;case 64:default:hash=xxhashjs_1.default.h64(elem,seed)}var result="";return 16===base?(result=hash.toString(base)).length<length/4&&(result="0".repeat(length/4-result.length)+result):2===base&&(result=hex2bin(hash.toString(16))).length<length&&(result="0".repeat(length-result.length)+result),{int:hash.toNumber(),string:result}},exports.getDefaultSeed=getDefaultSeed,exports.power2=function(x){return Math.ceil(Math.pow(2,Math.floor(Math.log(x)/Math.log(2))))},exports.hex2bin=hex2bin}).call(this)}).call(this,require("buffer").Buffer)},{buffer:20,xxhashjs:38}],19:[function(require,module,exports){},{}],20:[function(require,module,exports){(function(Buffer){(function(){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
"use strict";var base64=require("base64-js"),ieee754=require("ieee754");exports.Buffer=Buffer,exports.SlowBuffer=function(length){+length!=length&&(length=0);return Buffer.alloc(+length)},exports.INSPECT_MAX_BYTES=50;function createBuffer(length){if(length>2147483647)throw new RangeError('The value "'+length+'" is invalid for option "size"');var buf=new Uint8Array(length);return buf.__proto__=Buffer.prototype,buf}function Buffer(arg,encodingOrOffset,length){if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}function from(value,encodingOrOffset,length){if("string"==typeof value)return function(string,encoding){"string"==typeof encoding&&""!==encoding||(encoding="utf8");if(!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);var length=0|byteLength(string,encoding),buf=createBuffer(length),actual=buf.write(string,encoding);actual!==length&&(buf=buf.slice(0,actual));return buf}(value,encodingOrOffset);if(ArrayBuffer.isView(value))return fromArrayLike(value);if(null==value)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value);if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer))return function(array,byteOffset,length){if(byteOffset<0||array.byteLength<byteOffset)throw new RangeError('"offset" is outside of buffer bounds');if(array.byteLength<byteOffset+(length||0))throw new RangeError('"length" is outside of buffer bounds');var buf;buf=void 0===byteOffset&&void 0===length?new Uint8Array(array):void 0===length?new Uint8Array(array,byteOffset):new Uint8Array(array,byteOffset,length);return buf.__proto__=Buffer.prototype,buf}(value,encodingOrOffset,length);if("number"==typeof value)throw new TypeError('The "value" argument must not be of type number. Received type number');var valueOf=value.valueOf&&value.valueOf();if(null!=valueOf&&valueOf!==value)return Buffer.from(valueOf,encodingOrOffset,length);var b=function(obj){if(Buffer.isBuffer(obj)){var len=0|checked(obj.length),buf=createBuffer(len);return 0===buf.length||obj.copy(buf,0,0,len),buf}if(void 0!==obj.length)return"number"!=typeof obj.length||numberIsNaN(obj.length)?createBuffer(0):fromArrayLike(obj);if("Buffer"===obj.type&&Array.isArray(obj.data))return fromArrayLike(obj.data)}(value);if(b)return b;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof value[Symbol.toPrimitive])return Buffer.from(value[Symbol.toPrimitive]("string"),encodingOrOffset,length);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value)}function assertSize(size){if("number"!=typeof size)throw new TypeError('"size" argument must be of type number');if(size<0)throw new RangeError('The value "'+size+'" is invalid for option "size"')}function allocUnsafe(size){return assertSize(size),createBuffer(size<0?0:0|checked(size))}function fromArrayLike(array){for(var length=array.length<0?0:0|checked(array.length),buf=createBuffer(length),i=0;i<length;i+=1)buf[i]=255&array[i];return buf}function checked(length){if(length>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if(ArrayBuffer.isView(string)||isInstance(string,ArrayBuffer))return string.byteLength;if("string"!=typeof string)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof string);var len=string.length,mustMatch=arguments.length>2&&!0===arguments[2];if(!mustMatch&&0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return mustMatch?-1:utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if((end>>>=0)<=(start>>>=0))return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),numberIsNaN(byteOffset=+byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var i,indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++)if(read(arr,i)===read(val,-1===foundIndex?0:i-foundIndex)){if(-1===foundIndex&&(foundIndex=i),i-foundIndex+1===valLength)return foundIndex*indexSize}else-1!==foundIndex&&(i-=i-foundIndex),foundIndex=-1}else for(byteOffset+valLength>arrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;j<valLength;j++)if(read(arr,i+j)!==read(val,j)){found=!1;break}if(found)return i}return-1}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length))>remaining&&(length=remaining):length=remaining;var strLen=string.length;length>strLen/2&&(length=strLen/2);for(var i=0;i<length;++i){var parsed=parseInt(string.substr(2*i,2),16);if(numberIsNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(function(str){for(var byteArray=[],i=0;i<str.length;++i)byteArray.push(255&str.charCodeAt(i));return byteArray}(string),buf,offset,length)}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(function(str,units){for(var c,hi,lo,byteArray=[],i=0;i<str.length&&!((units-=2)<0);++i)hi=(c=str.charCodeAt(i))>>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;i<end;){var secondByte,thirdByte,fourthByte,tempCodePoint,firstByte=buf[i],codePoint=null,bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end)switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:128==(192&(secondByte=buf[i+1]))&&(tempCodePoint=(31&firstByte)<<6|63&secondByte)>127&&(codePoint=tempCodePoint);break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128==(192&secondByte)&&128==(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte)>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint);break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128==(192&secondByte)&&128==(192&thirdByte)&&128==(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte)>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint)}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return function(codePoints){var len=codePoints.length;if(len<=4096)return String.fromCharCode.apply(String,codePoints);var res="",i=0;for(;i<len;)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=4096));return res}(res)}exports.kMaxLength=2147483647,Buffer.TYPED_ARRAY_SUPPORT=function(){try{var arr=new Uint8Array(1);return arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===arr.foo()}catch(e){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),Buffer.poolSize=8192,Buffer.from=function(value,encodingOrOffset,length){return from(value,encodingOrOffset,length)},Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,Buffer.alloc=function(size,fill,encoding){return function(size,fill,encoding){return assertSize(size),size<=0?createBuffer(size):void 0!==fill?"string"==typeof encoding?createBuffer(size).fill(fill,encoding):createBuffer(size).fill(fill):createBuffer(size)}(size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(size)},Buffer.isBuffer=function(b){return null!=b&&!0===b._isBuffer&&b!==Buffer.prototype},Buffer.compare=function(a,b){if(isInstance(a,Uint8Array)&&(a=Buffer.from(a,a.offset,a.byteLength)),isInstance(b,Uint8Array)&&(b=Buffer.from(b,b.offset,b.byteLength)),!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0},Buffer.isEncoding=function(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(list,length){if(!Array.isArray(list))throw new TypeError('"list" argument must be an Array of Buffers');if(0===list.length)return Buffer.alloc(0);var i;if(void 0===length)for(length=0,i=0;i<list.length;++i)length+=list[i].length;var buffer=Buffer.allocUnsafe(length),pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(isInstance(buf,Uint8Array)&&(buf=Buffer.from(buf)),!Buffer.isBuffer(buf))throw new TypeError('"list" argument must be an Array of Buffers');buf.copy(buffer,pos),pos+=buf.length}return buffer},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var len=this.length;if(len%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<len;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function(){var len=this.length;if(len%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<len;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.swap64=function(){var len=this.length;if(len%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<len;i+=8)swap(this,i,i+7),swap(this,i+1,i+6),swap(this,i+2,i+5),swap(this,i+3,i+4);return this},Buffer.prototype.toString=function(){var length=this.length;return 0===length?"":0===arguments.length?utf8Slice(this,0,length):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||0===Buffer.compare(this,b)},Buffer.prototype.inspect=function(){var str="",max=exports.INSPECT_MAX_BYTES;return str=this.toString("hex",0,max).replace(/(.{2})/g,"$1 ").trim(),this.length>max&&(str+=" ... "),"<Buffer "+str+">"},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(isInstance(target,Uint8Array)&&(target=Buffer.from(target,target.offset,target.byteLength)),!Buffer.isBuffer(target))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof target);if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(this===target)return 0;for(var x=(thisEnd>>>=0)-(thisStart>>>=0),y=(end>>>=0)-(start>>>=0),len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;i<len;++i)if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i],y=targetCopy[i];break}return x<y?-1:y<x?1:0},Buffer.prototype.includes=function(val,byteOffset,encoding){return-1!==this.indexOf(val,byteOffset,encoding)},Buffer.prototype.indexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!0)},Buffer.prototype.lastIndexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!1)},Buffer.prototype.write=function(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else{if(!isFinite(offset))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");offset>>>=0,isFinite(length)?(length>>>=0,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0)}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(127&buf[i]);return ret}function latin1Slice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;(!start||start<0)&&(start=0),(!end||end<0||end>len)&&(end=len);for(var out="",i=start;i<end;++i)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){for(var bytes=buf.slice(start,end),res="",i=0;i<bytes.length;i+=2)res+=String.fromCharCode(bytes[i]+256*bytes[i+1]);return res}function checkOffset(offset,ext,length){if(offset%1!=0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range")}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,4),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,8),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}Buffer.prototype.slice=function(start,end){var len=this.length;(start=~~start)<0?(start+=len)<0&&(start=0):start>len&&(start=len),(end=void 0===end?len:~~end)<0?(end+=len)<0&&(end=0):end>len&&(end=len),end<start&&(end=start);var newBuf=this.subarray(start,end);return newBuf.__proto__=Buffer.prototype,newBuf},Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val},Buffer.prototype.readUIntBE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset+--byteLength],mul=1;byteLength>0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val>=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return val>=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){(value=+value,offset>>>=0,byteLength>>>=0,noAssert)||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var mul=1,i=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUIntBE=function(value,offset,byteLength,noAssert){(value=+value,offset>>>=0,byteLength>>>=0,noAssert)||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var i=byteLength-1,mul=1;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,255,0),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value,offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i-1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,127,-128),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24,offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(!Buffer.isBuffer(target))throw new TypeError("argument should be a Buffer");if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end<start&&(end=start),end===start)return 0;if(0===target.length||0===this.length)return 0;if(targetStart<0)throw new RangeError("targetStart out of bounds");if(start<0||start>=this.length)throw new RangeError("Index out of range");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart<end-start&&(end=target.length-targetStart+start);var len=end-start;if(this===target&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(targetStart,start,end);else if(this===target&&start<targetStart&&targetStart<end)for(var i=len-1;i>=0;--i)target[i+targetStart]=this[i+start];else Uint8Array.prototype.set.call(target,this.subarray(start,end),targetStart);return len},Buffer.prototype.fill=function(val,start,end,encoding){if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=this.length):"string"==typeof end&&(encoding=end,end=this.length),void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);if(1===val.length){var code=val.charCodeAt(0);("utf8"===encoding&&code<128||"latin1"===encoding)&&(val=code)}}else"number"==typeof val&&(val&=255);if(start<0||this.length<start||this.length<end)throw new RangeError("Out of range index");if(end<=start)return this;var i;if(start>>>=0,end=void 0===end?this.length:end>>>0,val||(val=0),"number"==typeof val)for(i=start;i<end;++i)this[i]=val;else{var bytes=Buffer.isBuffer(val)?val:Buffer.from(val,encoding),len=bytes.length;if(0===len)throw new TypeError('The value "'+val+'" is invalid for argument "value"');for(i=0;i<end-start;++i)this[i+start]=bytes[i%len]}return this};var INVALID_BASE64_RE=/[^+/0-9A-Za-z-_]/g;function toHex(n){return n<16?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){var codePoint;units=units||1/0;for(var length=string.length,leadSurrogate=null,bytes=[],i=0;i<length;++i){if((codePoint=string.charCodeAt(i))>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=65536+(leadSurrogate-55296<<10|codePoint-56320)}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function base64ToBytes(str){return base64.toByteArray(function(str){if((str=(str=str.split("=")[0]).trim().replace(INVALID_BASE64_RE,"")).length<2)return"";for(;str.length%4!=0;)str+="=";return str}(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length&&!(i+offset>=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isInstance(obj,type){return obj instanceof type||null!=obj&&null!=obj.constructor&&null!=obj.constructor.name&&obj.constructor.name===type.name}function numberIsNaN(obj){return obj!=obj}}).call(this)}).call(this,require("buffer").Buffer)},{"base64-js":1,buffer:20,ieee754:24}],21:[function(require,module,exports){exports.UINT32=require("./lib/uint32"),exports.UINT64=require("./lib/uint64")},{"./lib/uint32":22,"./lib/uint64":23}],22:[function(require,module,exports){!function(root){UINT32(Math.pow(36,5)),UINT32(Math.pow(16,7)),UINT32(Math.pow(10,9)),UINT32(Math.pow(2,30)),UINT32(36),UINT32(16),UINT32(10),UINT32(2);function UINT32(l,h){return this instanceof UINT32?(this._low=0,this._high=0,this.remainder=null,void 0===h?fromNumber.call(this,l):"string"==typeof l?fromString.call(this,l,h):void fromBits.call(this,l,h)):new UINT32(l,h)}function fromBits(l,h){return this._low=0|l,this._high=0|h,this}function fromNumber(value){return this._low=65535&value,this._high=value>>>16,this}function fromString(s,radix){var value=parseInt(s,radix||10);return this._low=65535&value,this._high=value>>>16,this}UINT32.prototype.fromBits=fromBits,UINT32.prototype.fromNumber=fromNumber,UINT32.prototype.fromString=fromString,UINT32.prototype.toNumber=function(){return 65536*this._high+this._low},UINT32.prototype.toString=function(radix){return this.toNumber().toString(radix||10)},UINT32.prototype.add=function(other){var a00=this._low+other._low,a16=a00>>>16;return a16+=this._high+other._high,this._low=65535&a00,this._high=65535&a16,this},UINT32.prototype.subtract=function(other){return this.add(other.clone().negate())},UINT32.prototype.multiply=function(other){var c16,c00,a16=this._high,a00=this._low,b16=other._high,b00=other._low;return c16=(c00=a00*b00)>>>16,c16+=a16*b00,c16&=65535,c16+=a00*b16,this._low=65535&c00,this._high=65535&c16,this},UINT32.prototype.div=function(other){if(0==other._low&&0==other._high)throw Error("division by zero");if(0==other._high&&1==other._low)return this.remainder=new UINT32(0),this;if(other.gt(this))return this.remainder=this.clone(),this._low=0,this._high=0,this;if(this.eq(other))return this.remainder=new UINT32(0),this._low=1,this._high=0,this;for(var _other=other.clone(),i=-1;!this.lt(_other);)_other.shiftLeft(1,!0),i++;for(this.remainder=this.clone(),this._low=0,this._high=0;i>=0;i--)_other.shiftRight(1),this.remainder.lt(_other)||(this.remainder.subtract(_other),i>=16?this._high|=1<<i-16:this._low|=1<<i);return this},UINT32.prototype.negate=function(){var v=1+(65535&~this._low);return this._low=65535&v,this._high=~this._high+(v>>>16)&65535,this},UINT32.prototype.equals=UINT32.prototype.eq=function(other){return this._low==other._low&&this._high==other._high},UINT32.prototype.greaterThan=UINT32.prototype.gt=function(other){return this._high>other._high||!(this._high<other._high)&&this._low>other._low},UINT32.prototype.lessThan=UINT32.prototype.lt=function(other){return this._high<other._high||!(this._high>other._high)&&this._low<other._low},UINT32.prototype.or=function(other){return this._low|=other._low,this._high|=other._high,this},UINT32.prototype.and=function(other){return this._low&=other._low,this._high&=other._high,this},UINT32.prototype.not=function(){return this._low=65535&~this._low,this._high=65535&~this._high,this},UINT32.prototype.xor=function(other){return this._low^=other._low,this._high^=other._high,this},UINT32.prototype.shiftRight=UINT32.prototype.shiftr=function(n){return n>16?(this._low=this._high>>n-16,this._high=0):16==n?(this._low=this._high,this._high=0):(this._low=this._low>>n|this._high<<16-n&65535,this._high>>=n),this},UINT32.prototype.shiftLeft=UINT32.prototype.shiftl=function(n,allowOverflow){return n>16?(this._high=this._low<<n-16,this._low=0,allowOverflow||(this._high&=65535)):16==n?(this._high=this._low,this._low=0):(this._high=this._high<<n|this._low>>16-n,this._low=this._low<<n&65535,allowOverflow||(this._high&=65535)),this},UINT32.prototype.rotateLeft=UINT32.prototype.rotl=function(n){var v=this._high<<16|this._low;return v=v<<n|v>>>32-n,this._low=65535&v,this._high=v>>>16,this},UINT32.prototype.rotateRight=UINT32.prototype.rotr=function(n){var v=this._high<<16|this._low;return v=v>>>n|v<<32-n,this._low=65535&v,this._high=v>>>16,this},UINT32.prototype.clone=function(){return new UINT32(this._low,this._high)},"undefined"!=typeof define&&define.amd?define([],(function(){return UINT32})):void 0!==module&&module.exports?module.exports=UINT32:root.UINT32=UINT32}(this)},{}],23:[function(require,module,exports){!function(root){var radixPowerCache={16:UINT64(Math.pow(16,5)),10:UINT64(Math.pow(10,5)),2:UINT64(Math.pow(2,5))},radixCache={16:UINT64(16),10:UINT64(10),2:UINT64(2)};function UINT64(a00,a16,a32,a48){return this instanceof UINT64?(this.remainder=null,"string"==typeof a00?fromString.call(this,a00,a16):void 0===a16?fromNumber.call(this,a00):void fromBits.apply(this,arguments)):new UINT64(a00,a16,a32,a48)}function fromBits(a00,a16,a32,a48){return void 0===a32?(this._a00=65535&a00,this._a16=a00>>>16,this._a32=65535&a16,this._a48=a16>>>16,this):(this._a00=0|a00,this._a16=0|a16,this._a32=0|a32,this._a48=0|a48,this)}function fromNumber(value){return this._a00=65535&value,this._a16=value>>>16,this._a32=0,this._a48=0,this}function fromString(s,radix){radix=radix||10,this._a00=0,this._a16=0,this._a32=0,this._a48=0;for(var radixUint=radixPowerCache[radix]||new UINT64(Math.pow(radix,5)),i=0,len=s.length;i<len;i+=5){var size=Math.min(5,len-i),value=parseInt(s.slice(i,i+size),radix);this.multiply(size<5?new UINT64(Math.pow(radix,size)):radixUint).add(new UINT64(value))}return this}UINT64.prototype.fromBits=fromBits,UINT64.prototype.fromNumber=fromNumber,UINT64.prototype.fromString=fromString,UINT64.prototype.toNumber=function(){return 65536*this._a16+this._a00},UINT64.prototype.toString=function(radix){var radixUint=radixCache[radix=radix||10]||new UINT64(radix);if(!this.gt(radixUint))return this.toNumber().toString(radix);for(var self=this.clone(),res=new Array(64),i=63;i>=0&&(self.div(radixUint),res[i]=self.remainder.toNumber().toString(radix),self.gt(radixUint));i--);return res[i-1]=self.toNumber().toString(radix),res.join("")},UINT64.prototype.add=function(other){var a00=this._a00+other._a00,a16=a00>>>16,a32=(a16+=this._a16+other._a16)>>>16,a48=(a32+=this._a32+other._a32)>>>16;return a48+=this._a48+other._a48,this._a00=65535&a00,this._a16=65535&a16,this._a32=65535&a32,this._a48=65535&a48,this},UINT64.prototype.subtract=function(other){return this.add(other.clone().negate())},UINT64.prototype.multiply=function(other){var a00=this._a00,a16=this._a16,a32=this._a32,a48=this._a48,b00=other._a00,b16=other._a16,b32=other._a32,c00=a00*b00,c16=c00>>>16,c32=(c16+=a00*b16)>>>16;c16&=65535,c32+=(c16+=a16*b00)>>>16;var c48=(c32+=a00*b32)>>>16;return c32&=65535,c48+=(c32+=a16*b16)>>>16,c32&=65535,c48+=(c32+=a32*b00)>>>16,c48+=a00*other._a48,c48&=65535,c48+=a16*b32,c48&=65535,c48+=a32*b16,c48&=65535,c48+=a48*b00,this._a00=65535&c00,this._a16=65535&c16,this._a32=65535&c32,this._a48=65535&c48,this},UINT64.prototype.div=function(other){if(0==other._a16&&0==other._a32&&0==other._a48){if(0==other._a00)throw Error("division by zero");if(1==other._a00)return this.remainder=new UINT64(0),this}if(other.gt(this))return this.remainder=this.clone(),this._a00=0,this._a16=0,this._a32=0,this._a48=0,this;if(this.eq(other))return this.remainder=new UINT64(0),this._a00=1,this._a16=0,this._a32=0,this._a48=0,this;for(var _other=other.clone(),i=-1;!this.lt(_other);)_other.shiftLeft(1,!0),i++;for(this.remainder=this.clone(),this._a00=0,this._a16=0,this._a32=0,this._a48=0;i>=0;i--)_other.shiftRight(1),this.remainder.lt(_other)||(this.remainder.subtract(_other),i>=48?this._a48|=1<<i-48:i>=32?this._a32|=1<<i-32:i>=16?this._a16|=1<<i-16:this._a00|=1<<i);return this},UINT64.prototype.negate=function(){var v=1+(65535&~this._a00);return this._a00=65535&v,v=(65535&~this._a16)+(v>>>16),this._a16=65535&v,v=(65535&~this._a32)+(v>>>16),this._a32=65535&v,this._a48=~this._a48+(v>>>16)&65535,this},UINT64.prototype.equals=UINT64.prototype.eq=function(other){return this._a48==other._a48&&this._a00==other._a00&&this._a32==other._a32&&this._a16==other._a16},UINT64.prototype.greaterThan=UINT64.prototype.gt=function(other){return this._a48>other._a48||!(this._a48<other._a48)&&(this._a32>other._a32||!(this._a32<other._a32)&&(this._a16>other._a16||!(this._a16<other._a16)&&this._a00>other._a00))},UINT64.prototype.lessThan=UINT64.prototype.lt=function(other){return this._a48<other._a48||!(this._a48>other._a48)&&(this._a32<other._a32||!(this._a32>other._a32)&&(this._a16<other._a16||!(this._a16>other._a16)&&this._a00<other._a00))},UINT64.prototype.or=function(other){return this._a00|=other._a00,this._a16|=other._a16,this._a32|=other._a32,this._a48|=other._a48,this},UINT64.prototype.and=function(other){return this._a00&=other._a00,this._a16&=other._a16,this._a32&=other._a32,this._a48&=other._a48,this},UINT64.prototype.xor=function(other){return this._a00^=other._a00,this._a16^=other._a16,this._a32^=other._a32,this._a48^=other._a48,this},UINT64.prototype.not=function(){return this._a00=65535&~this._a00,this._a16=65535&~this._a16,this._a32=65535&~this._a32,this._a48=65535&~this._a48,this},UINT64.prototype.shiftRight=UINT64.prototype.shiftr=function(n){return(n%=64)>=48?(this._a00=this._a48>>n-48,this._a16=0,this._a32=0,this._a48=0):n>=32?(n-=32,this._a00=65535&(this._a32>>n|this._a48<<16-n),this._a16=this._a48>>n&65535,this._a32=0,this._a48=0):n>=16?(n-=16,this._a00=65535&(this._a16>>n|this._a32<<16-n),this._a16=65535&(this._a32>>n|this._a48<<16-n),this._a32=this._a48>>n&65535,this._a48=0):(this._a00=65535&(this._a00>>n|this._a16<<16-n),this._a16=65535&(this._a16>>n|this._a32<<16-n),this._a32=65535&(this._a32>>n|this._a48<<16-n),this._a48=this._a48>>n&65535),this},UINT64.prototype.shiftLeft=UINT64.prototype.shiftl=function(n,allowOverflow){return(n%=64)>=48?(this._a48=this._a00<<n-48,this._a32=0,this._a16=0,this._a00=0):n>=32?(n-=32,this._a48=this._a16<<n|this._a00>>16-n,this._a32=this._a00<<n&65535,this._a16=0,this._a00=0):n>=16?(n-=16,this._a48=this._a32<<n|this._a16>>16-n,this._a32=65535&(this._a16<<n|this._a00>>16-n),this._a16=this._a00<<n&65535,this._a00=0):(this._a48=this._a48<<n|this._a32>>16-n,this._a32=65535&(this._a32<<n|this._a16>>16-n),this._a16=65535&(this._a16<<n|this._a00>>16-n),this._a00=this._a00<<n&65535),allowOverflow||(this._a48&=65535),this},UINT64.prototype.rotateLeft=UINT64.prototype.rotl=function(n){if(0==(n%=64))return this;if(n>=32){var v=this._a00;if(this._a00=this._a32,this._a32=v,v=this._a48,this._a48=this._a16,this._a16=v,32==n)return this;n-=32}var high=this._a48<<16|this._a32,low=this._a16<<16|this._a00,_high=high<<n|low>>>32-n,_low=low<<n|high>>>32-n;return this._a00=65535&_low,this._a16=_low>>>16,this._a32=65535&_high,this._a48=_high>>>16,this},UINT64.prototype.rotateRight=UINT64.prototype.rotr=function(n){if(0==(n%=64))return this;if(n>=32){var v=this._a00;if(this._a00=this._a32,this._a32=v,v=this._a48,this._a48=this._a16,this._a16=v,32==n)return this;n-=32}var high=this._a48<<16|this._a32,low=this._a16<<16|this._a00,_high=high>>>n|low<<32-n,_low=low>>>n|high<<32-n;return this._a00=65535&_low,this._a16=_low>>>16,this._a32=65535&_high,this._a48=_high>>>16,this},UINT64.prototype.clone=function(){return new UINT64(this._a00,this._a16,this._a32,this._a48)},"undefined"!=typeof define&&define.amd?define([],(function(){return UINT64})):void 0!==module&&module.exports?module.exports=UINT64:root.UINT64=UINT64}(this)},{}],24:[function(require,module,exports){
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:1/0*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||0===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),(value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias))*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<<mLen|m,eLen+=mLen;eLen>0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],25:[function(require,module,exports){module.exports=function(value,other){return value===other||value!=value&&other!=other}},{}],26:[function(require,module,exports){var MAX_INTEGER=17976931348623157e292,reTrim=/^\s+|\s+$/g,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function baseIsNaN(value){return value!=value}var objectToString=Object.prototype.toString,nativeMax=Math.max;function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}module.exports=function(array,value,fromIndex){var length=array?array.length:0;if(!length)return-1;var index=null==fromIndex?0:function(value){var result=function(value){if(!value)return 0===value?value:0;if(Infinity===(value=function(value){if("number"==typeof value)return value;if(function(value){return"symbol"==typeof value||function(value){return!!value&&"object"==typeof value}(value)&&"[object Symbol]"==objectToString.call(value)}(value))return NaN;if(isObject(value)){var other="function"==typeof value.valueOf?value.valueOf():value;value=isObject(other)?other+"":other}if("string"!=typeof value)return 0===value?value:+value;value=value.replace(reTrim,"");var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NaN:+value}(value))||-Infinity===value){return(value<0?-1:1)*MAX_INTEGER}return value==value?value:0}(value),remainder=result%1;return result==result?remainder?result-remainder:result:0}(fromIndex);return index<0&&(index=nativeMax(length+index,0)),function(array,value,fromIndex){if(value!=value)return function(array,predicate,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?1:-1);fromRight?index--:++index<length;)if(predicate(array[index],index,array))return index;return-1}(array,baseIsNaN,fromIndex);for(var index=fromIndex-1,length=array.length;++index<length;)if(array[index]===value)return index;return-1}(array,value,index)}},{}],27:[function(require,module,exports){(function(global){(function(){(function(){var FUNC_ERROR_TEXT="Expected a function",PLACEHOLDER="__lodash_placeholder__",wrapFlags=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g,reEscapedHtml=/&(?:amp|lt|gt|quot|#39);/g,reUnescapedHtml=/[&<>"']/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source),reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source),reTrim=/^\s+|\s+$/g,reTrimStart=/^\s+/,reTrimEnd=/\s+$/,reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /,reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,reEscapeChar=/\\(\\)?/g,reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,reFlags=/\w*$/,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsOctal=/^0o[0-7]+$/i,reIsUint=/^(?:0|[1-9]\d*)$/,reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,reNoMatch=/($^)/,reUnescapedString=/['\n\r\u2028\u2029\\]/g,rsComboRange="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",rsBreakRange="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsAstral="[\\ud800-\\udfff]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboRange+"]",rsDigits="\\d+",rsDingbat="[\\u2700-\\u27bf]",rsLower="[a-z\\xdf-\\xf6\\xf8-\\xff]",rsMisc="[^\\ud800-\\udfff"+rsBreakRange+rsDigits+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsNonAstral="[^\\ud800-\\udfff]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="[A-Z\\xc0-\\xd6\\xd8-\\xde]",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",reOptMod="(?:"+rsCombo+"|"+rsFitz+")"+"?",rsSeq="[\\ufe0e\\ufe0f]?"+reOptMod+("(?:\\u200d(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")[\\ufe0e\\ufe0f]?"+reOptMod+")*"),rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reApos=RegExp("['’]","g"),reComboMark=RegExp(rsCombo,"g"),reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g"),reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+(?:['’](?:d|ll|m|re|s|t|ve))?",rsUpper+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsDigits,rsEmoji].join("|"),"g"),reHasUnicode=RegExp("[\\u200d\\ud800-\\udfff"+rsComboRange+"\\ufe0e\\ufe0f]"),reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,contextProps=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],templateCounter=-1,typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags["[object Uint8ClampedArray]"]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags["[object Uint8ClampedArray]"]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;var stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},freeParseFloat=parseFloat,freeParseInt=parseInt,freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),freeExports="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&"object"==typeof module&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,freeProcess=moduleExports&&freeGlobal.process,nodeUtil=function(){try{var types=freeModule&&freeModule.require&&freeModule.require("util").types;return types||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch(e){}}(),nodeIsArrayBuffer=nodeUtil&&nodeUtil.isArrayBuffer,nodeIsDate=nodeUtil&&nodeUtil.isDate,nodeIsMap=nodeUtil&&nodeUtil.isMap,nodeIsRegExp=nodeUtil&&nodeUtil.isRegExp,nodeIsSet=nodeUtil&&nodeUtil.isSet,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2])}return func.apply(thisArg,args)}function arrayAggregator(array,setter,iteratee,accumulator){for(var index=-1,length=null==array?0:array.length;++index<length;){var value=array[index];setter(accumulator,value,iteratee(value),array)}return accumulator}function arrayEach(array,iteratee){for(var index=-1,length=null==array?0:array.length;++index<length&&!1!==iteratee(array[index],index,array););return array}function arrayEachRight(array,iteratee){for(var length=null==array?0:array.length;length--&&!1!==iteratee(array[length],length,array););return array}function arrayEvery(array,predicate){for(var index=-1,length=null==array?0:array.length;++index<length;)if(!predicate(array[index],index,array))return!1;return!0}function arrayFilter(array,predicate){for(var index=-1,length=null==array?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];predicate(value,index,array)&&(result[resIndex++]=value)}return result}function arrayIncludes(array,value){return!!(null==array?0:array.length)&&baseIndexOf(array,value,0)>-1}function arrayIncludesWith(array,value,comparator){for(var index=-1,length=null==array?0:array.length;++index<length;)if(comparator(value,array[index]))return!0;return!1}function arrayMap(array,iteratee){for(var index=-1,length=null==array?0:array.length,result=Array(length);++index<length;)result[index]=iteratee(array[index],index,array);return result}function arrayPush(array,values){for(var index=-1,length=values.length,offset=array.length;++index<length;)array[offset+index]=values[index];return array}function arrayReduce(array,iteratee,accumulator,initAccum){var index=-1,length=null==array?0:array.length;for(initAccum&&length&&(accumulator=array[++index]);++index<length;)accumulator=iteratee(accumulator,array[index],index,array);return accumulator}function arrayReduceRight(array,iteratee,accumulator,initAccum){var length=null==array?0:array.length;for(initAccum&&length&&(accumulator=array[--length]);length--;)accumulator=iteratee(accumulator,array[length],length,array);return accumulator}function arraySome(array,predicate){for(var index=-1,length=null==array?0:array.length;++index<length;)if(predicate(array[index],index,array))return!0;return!1}var asciiSize=baseProperty("length");function baseFindKey(collection,predicate,eachFunc){var result;return eachFunc(collection,(function(value,key,collection){if(predicate(value,key,collection))return result=key,!1})),result}function baseFindIndex(array,predicate,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?1:-1);fromRight?index--:++index<length;)if(predicate(array[index],index,array))return index;return-1}function baseIndexOf(array,value,fromIndex){return value==value?function(array,value,fromIndex){var index=fromIndex-1,length=array.length;for(;++index<length;)if(array[index]===value)return index;return-1}(array,value,fromIndex):baseFindIndex(array,baseIsNaN,fromIndex)}function baseIndexOfWith(array,value,fromIndex,comparator){for(var index=fromIndex-1,length=array.length;++index<length;)if(comparator(array[index],value))return index;return-1}function baseIsNaN(value){return value!=value}function baseMean(array,iteratee){var length=null==array?0:array.length;return length?baseSum(array,iteratee)/length:NaN}function baseProperty(key){return function(object){return null==object?undefined:object[key]}}function basePropertyOf(object){return function(key){return null==object?undefined:object[key]}}function baseReduce(collection,iteratee,accumulator,initAccum,eachFunc){return eachFunc(collection,(function(value,index,collection){accumulator=initAccum?(initAccum=!1,value):iteratee(accumulator,value,index,collection)})),accumulator}function baseSum(array,iteratee){for(var result,index=-1,length=array.length;++index<length;){var current=iteratee(array[index]);undefined!==current&&(result=undefined===result?current:result+current)}return result}function baseTimes(n,iteratee){for(var index=-1,result=Array(n);++index<n;)result[index]=iteratee(index);return result}function baseUnary(func){return function(value){return func(value)}}function baseValues(object,props){return arrayMap(props,(function(key){return object[key]}))}function cacheHas(cache,key){return cache.has(key)}function charsStartIndex(strSymbols,chrSymbols){for(var index=-1,length=strSymbols.length;++index<length&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1;);return index}function charsEndIndex(strSymbols,chrSymbols){for(var index=strSymbols.length;index--&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1;);return index}function countHolders(array,placeholder){for(var length=array.length,result=0;length--;)array[length]===placeholder&&++result;return result}var deburrLetter=basePropertyOf({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),escapeHtmlChar=basePropertyOf({"&":"&","<":"<",">":">",'"':""","'":"'"});function escapeStringChar(chr){return"\\"+stringEscapes[chr]}function hasUnicode(string){return reHasUnicode.test(string)}function mapToArray(map){var index=-1,result=Array(map.size);return map.forEach((function(value,key){result[++index]=[key,value]})),result}function overArg(func,transform){return function(arg){return func(transform(arg))}}function replaceHolders(array,placeholder){for(var index=-1,length=array.length,resIndex=0,result=[];++index<length;){var value=array[index];value!==placeholder&&value!==PLACEHOLDER||(array[index]=PLACEHOLDER,result[resIndex++]=index)}return result}function setToArray(set){var index=-1,result=Array(set.size);return set.forEach((function(value){result[++index]=value})),result}function setToPairs(set){var index=-1,result=Array(set.size);return set.forEach((function(value){result[++index]=[value,value]})),result}function stringSize(string){return hasUnicode(string)?function(string){var result=reUnicode.lastIndex=0;for(;reUnicode.test(string);)++result;return result}(string):asciiSize(string)}function stringToArray(string){return hasUnicode(string)?function(string){return string.match(reUnicode)||[]}(string):function(string){return string.split("")}(string)}var unescapeHtmlChar=basePropertyOf({"&":"&","<":"<",">":">",""":'"',"'":"'"});var _=function runInContext(context){var uid,Array=(context=null==context?root:_.defaults(root.Object(),context,_.pick(root,contextProps))).Array,Date=context.Date,Error=context.Error,Function=context.Function,Math=context.Math,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError,arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=context["__core-js_shared__"],funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,idCounter=0,maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""))?"Symbol(src)_1."+uid:"",nativeObjectToString=objectProto.toString,objectCtorString=funcToString.call(Object),oldDash=root._,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Buffer=moduleExports?context.Buffer:undefined,Symbol=context.Symbol,Uint8Array=context.Uint8Array,allocUnsafe=Buffer?Buffer.allocUnsafe:undefined,getPrototype=overArg(Object.getPrototypeOf,Object),objectCreate=Object.create,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,spreadableSymbol=Symbol?Symbol.isConcatSpreadable:undefined,symIterator=Symbol?Symbol.iterator:undefined,symToStringTag=Symbol?Symbol.toStringTag:undefined,defineProperty=function(){try{var func=getNative(Object,"defineProperty");return func({},"",{}),func}catch(e){}}(),ctxClearTimeout=context.clearTimeout!==root.clearTimeout&&context.clearTimeout,ctxNow=Date&&Date.now!==root.Date.now&&Date.now,ctxSetTimeout=context.setTimeout!==root.setTimeout&&context.setTimeout,nativeCeil=Math.ceil,nativeFloor=Math.floor,nativeGetSymbols=Object.getOwnPropertySymbols,nativeIsBuffer=Buffer?Buffer.isBuffer:undefined,nativeIsFinite=context.isFinite,nativeJoin=arrayProto.join,nativeKeys=overArg(Object.keys,Object),nativeMax=Math.max,nativeMin=Math.min,nativeNow=Date.now,nativeParseInt=context.parseInt,nativeRandom=Math.random,nativeReverse=arrayProto.reverse,DataView=getNative(context,"DataView"),Map=getNative(context,"Map"),Promise=getNative(context,"Promise"),Set=getNative(context,"Set"),WeakMap=getNative(context,"WeakMap"),nativeCreate=getNative(Object,"create"),metaMap=WeakMap&&new WeakMap,realNames={},dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap),symbolProto=Symbol?Symbol.prototype:undefined,symbolValueOf=symbolProto?symbolProto.valueOf:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper)return value;if(hasOwnProperty.call(value,"__wrapped__"))return wrapperClone(value)}return new LodashWrapper(value)}var baseCreate=function(){function object(){}return function(proto){if(!isObject(proto))return{};if(objectCreate)return objectCreate(proto);object.prototype=proto;var result=new object;return object.prototype=undefined,result}}();function baseLodash(){}function LodashWrapper(value,chainAll){this.__wrapped__=value,this.__actions__=[],this.__chain__=!!chainAll,this.__index__=0,this.__values__=undefined}function LazyWrapper(value){this.__wrapped__=value,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Hash(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function ListCache(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function MapCache(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function SetCache(values){var index=-1,length=null==values?0:values.length;for(this.__data__=new MapCache;++index<length;)this.add(values[index])}function Stack(entries){var data=this.__data__=new ListCache(entries);this.size=data.size}function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value)!inherited&&!hasOwnProperty.call(value,key)||skipIndexes&&("length"==key||isBuff&&("offset"==key||"parent"==key)||isType&&("buffer"==key||"byteLength"==key||"byteOffset"==key)||isIndex(key,length))||result.push(key);return result}function arraySample(array){var length=array.length;return length?array[baseRandom(0,length-1)]:undefined}function arraySampleSize(array,n){return shuffleSelf(copyArray(array),baseClamp(n,0,array.length))}function arrayShuffle(array){return shuffleSelf(copyArray(array))}function assignMergeValue(object,key,value){(undefined!==value&&!eq(object[key],value)||undefined===value&&!(key in object))&&baseAssignValue(object,key,value)}function assignValue(object,key,value){var objValue=object[key];hasOwnProperty.call(object,key)&&eq(objValue,value)&&(undefined!==value||key in object)||baseAssignValue(object,key,value)}function assocIndexOf(array,key){for(var length=array.length;length--;)if(eq(array[length][0],key))return length;return-1}function baseAggregator(collection,setter,iteratee,accumulator){return baseEach(collection,(function(value,key,collection){setter(accumulator,value,iteratee(value),collection)})),accumulator}function baseAssign(object,source){return object&©Object(source,keys(source),object)}function baseAssignValue(object,key,value){"__proto__"==key&&defineProperty?defineProperty(object,key,{configurable:!0,enumerable:!0,value:value,writable:!0}):object[key]=value}function baseAt(object,paths){for(var index=-1,length=paths.length,result=Array(length),skip=null==object;++index<length;)result[index]=skip?undefined:get(object,paths[index]);return result}function baseClamp(number,lower,upper){return number==number&&(undefined!==upper&&(number=number<=upper?number:upper),undefined!==lower&&(number=number>=lower?number:lower)),number}function baseClone(value,bitmask,customizer,key,object,stack){var result,isDeep=1&bitmask,isFlat=2&bitmask,isFull=4&bitmask;if(customizer&&(result=object?customizer(value,key,object,stack):customizer(value)),undefined!==result)return result;if(!isObject(value))return value;var isArr=isArray(value);if(isArr){if(result=function(array){var length=array.length,result=new array.constructor(length);length&&"string"==typeof array[0]&&hasOwnProperty.call(array,"index")&&(result.index=array.index,result.input=array.input);return result}(value),!isDeep)return copyArray(value,result)}else{var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value))return cloneBuffer(value,isDeep);if(tag==objectTag||tag==argsTag||isFunc&&!object){if(result=isFlat||isFunc?{}:initCloneObject(value),!isDeep)return isFlat?function(source,object){return copyObject(source,getSymbolsIn(source),object)}(value,function(object,source){return object&©Object(source,keysIn(source),object)}(result,value)):function(source,object){return copyObject(source,getSymbols(source),object)}(value,baseAssign(result,value))}else{if(!cloneableTags[tag])return object?value:{};result=function(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return function(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}(object,isDeep);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:return cloneTypedArray(object,isDeep);case mapTag:return new Ctor;case numberTag:case stringTag:return new Ctor(object);case regexpTag:return function(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));return result.lastIndex=regexp.lastIndex,result}(object);case setTag:return new Ctor;case symbolTag:return symbol=object,symbolValueOf?Object(symbolValueOf.call(symbol)):{}}var symbol}(value,tag,isDeep)}}stack||(stack=new Stack);var stacked=stack.get(value);if(stacked)return stacked;stack.set(value,result),isSet(value)?value.forEach((function(subValue){result.add(baseClone(subValue,bitmask,customizer,subValue,value,stack))})):isMap(value)&&value.forEach((function(subValue,key){result.set(key,baseClone(subValue,bitmask,customizer,key,value,stack))}));var props=isArr?undefined:(isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys)(value);return arrayEach(props||value,(function(subValue,key){props&&(subValue=value[key=subValue]),assignValue(result,key,baseClone(subValue,bitmask,customizer,key,value,stack))})),result}function baseConformsTo(object,source,props){var length=props.length;if(null==object)return!length;for(object=Object(object);length--;){var key=props[length],predicate=source[key],value=object[key];if(undefined===value&&!(key in object)||!predicate(value))return!1}return!0}function baseDelay(func,wait,args){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return setTimeout((function(){func.apply(undefined,args)}),wait)}function baseDifference(array,values,iteratee,comparator){var index=-1,includes=arrayIncludes,isCommon=!0,length=array.length,result=[],valuesLength=values.length;if(!length)return result;iteratee&&(values=arrayMap(values,baseUnary(iteratee))),comparator?(includes=arrayIncludesWith,isCommon=!1):values.length>=200&&(includes=cacheHas,isCommon=!1,values=new SetCache(values));outer:for(;++index<length;){var value=array[index],computed=null==iteratee?value:iteratee(value);if(value=comparator||0!==value?value:0,isCommon&&computed==computed){for(var valuesIndex=valuesLength;valuesIndex--;)if(values[valuesIndex]===computed)continue outer;result.push(value)}else includes(values,computed,comparator)||result.push(value)}return result}lodash.templateSettings={escape:reEscape,evaluate:reEvaluate,interpolate:reInterpolate,variable:"",imports:{_:lodash}},lodash.prototype=baseLodash.prototype,lodash.prototype.constructor=lodash,LodashWrapper.prototype=baseCreate(baseLodash.prototype),LodashWrapper.prototype.constructor=LodashWrapper,LazyWrapper.prototype=baseCreate(baseLodash.prototype),LazyWrapper.prototype.constructor=LazyWrapper,Hash.prototype.clear=function(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0},Hash.prototype.delete=function(key){var result=this.has(key)&&delete this.__data__[key];return this.size-=result?1:0,result},Hash.prototype.get=function(key){var data=this.__data__;if(nativeCreate){var result=data[key];return"__lodash_hash_undefined__"===result?undefined:result}return hasOwnProperty.call(data,key)?data[key]:undefined},Hash.prototype.has=function(key){var data=this.__data__;return nativeCreate?undefined!==data[key]:hasOwnProperty.call(data,key)},Hash.prototype.set=function(key,value){var data=this.__data__;return this.size+=this.has(key)?0:1,data[key]=nativeCreate&&undefined===value?"__lodash_hash_undefined__":value,this},ListCache.prototype.clear=function(){this.__data__=[],this.size=0},ListCache.prototype.delete=function(key){var data=this.__data__,index=assocIndexOf(data,key);return!(index<0)&&(index==data.length-1?data.pop():splice.call(data,index,1),--this.size,!0)},ListCache.prototype.get=function(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1]},ListCache.prototype.has=function(key){return assocIndexOf(this.__data__,key)>-1},ListCache.prototype.set=function(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?(++this.size,data.push([key,value])):data[index][1]=value,this},MapCache.prototype.clear=function(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}},MapCache.prototype.delete=function(key){var result=getMapData(this,key).delete(key);return this.size-=result?1:0,result},MapCache.prototype.get=function(key){return getMapData(this,key).get(key)},MapCache.prototype.has=function(key){return getMapData(this,key).has(key)},MapCache.prototype.set=function(key,value){var data=getMapData(this,key),size=data.size;return data.set(key,value),this.size+=data.size==size?0:1,this},SetCache.prototype.add=SetCache.prototype.push=function(value){return this.__data__.set(value,"__lodash_hash_undefined__"),this},SetCache.prototype.has=function(value){return this.__data__.has(value)},Stack.prototype.clear=function(){this.__data__=new ListCache,this.size=0},Stack.prototype.delete=function(key){var data=this.__data__,result=data.delete(key);return this.size=data.size,result},Stack.prototype.get=function(key){return this.__data__.get(key)},Stack.prototype.has=function(key){return this.__data__.has(key)},Stack.prototype.set=function(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map||pairs.length<199)return pairs.push([key,value]),this.size=++data.size,this;data=this.__data__=new MapCache(pairs)}return data.set(key,value),this.size=data.size,this};var baseEach=createBaseEach(baseForOwn),baseEachRight=createBaseEach(baseForOwnRight,!0);function baseEvery(collection,predicate){var result=!0;return baseEach(collection,(function(value,index,collection){return result=!!predicate(value,index,collection)})),result}function baseExtremum(array,iteratee,comparator){for(var index=-1,length=array.length;++index<length;){var value=array[index],current=iteratee(value);if(null!=current&&(undefined===computed?current==current&&!isSymbol(current):comparator(current,computed)))var computed=current,result=value}return result}function baseFilter(collection,predicate){var result=[];return baseEach(collection,(function(value,index,collection){predicate(value,index,collection)&&result.push(value)})),result}function baseFlatten(array,depth,predicate,isStrict,result){var index=-1,length=array.length;for(predicate||(predicate=isFlattenable),result||(result=[]);++index<length;){var value=array[index];depth>0&&predicate(value)?depth>1?baseFlatten(value,depth-1,predicate,isStrict,result):arrayPush(result,value):isStrict||(result[result.length]=value)}return result}var baseFor=createBaseFor(),baseForRight=createBaseFor(!0);function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys)}function baseForOwnRight(object,iteratee){return object&&baseForRight(object,iteratee,keys)}function baseFunctions(object,props){return arrayFilter(props,(function(key){return isFunction(object[key])}))}function baseGet(object,path){for(var index=0,length=(path=castPath(path,object)).length;null!=object&&index<length;)object=object[toKey(path[index++])];return index&&index==length?object:undefined}function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object))}function baseGetTag(value){return null==value?undefined===value?"[object Undefined]":"[object Null]":symToStringTag&&symToStringTag in Object(value)?function(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=undefined;var unmasked=!0}catch(e){}var result=nativeObjectToString.call(value);unmasked&&(isOwn?value[symToStringTag]=tag:delete value[symToStringTag]);return result}(value):function(value){return nativeObjectToString.call(value)}(value)}function baseGt(value,other){return value>other}function baseHas(object,key){return null!=object&&hasOwnProperty.call(object,key)}function baseHasIn(object,key){return null!=object&&key in Object(object)}function baseIntersection(arrays,iteratee,comparator){for(var includes=comparator?arrayIncludesWith:arrayIncludes,length=arrays[0].length,othLength=arrays.length,othIndex=othLength,caches=Array(othLength),maxLength=1/0,result=[];othIndex--;){var array=arrays[othIndex];othIndex&&iteratee&&(array=arrayMap(array,baseUnary(iteratee))),maxLength=nativeMin(array.length,maxLength),caches[othIndex]=!comparator&&(iteratee||length>=120&&array.length>=120)?new SetCache(othIndex&&array):undefined}array=arrays[0];var index=-1,seen=caches[0];outer:for(;++index<length&&result.length<maxLength;){var value=array[index],computed=iteratee?iteratee(value):value;if(value=comparator||0!==value?value:0,!(seen?cacheHas(seen,computed):includes(result,computed,comparator))){for(othIndex=othLength;--othIndex;){var cache=caches[othIndex];if(!(cache?cacheHas(cache,computed):includes(arrays[othIndex],computed,comparator)))continue outer}seen&&seen.push(computed),result.push(value)}}return result}function baseInvoke(object,path,args){var func=null==(object=parent(object,path=castPath(path,object)))?object:object[toKey(last(path))];return null==func?undefined:apply(func,object,args)}function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag}function baseIsEqual(value,other,bitmask,customizer,stack){return value===other||(null==value||null==other||!isObjectLike(value)&&!isObjectLike(other)?value!=value&&other!=other:function(object,other,bitmask,customizer,equalFunc,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=objIsArr?arrayTag:getTag(object),othTag=othIsArr?arrayTag:getTag(other),objIsObj=(objTag=objTag==argsTag?objectTag:objTag)==objectTag,othIsObj=(othTag=othTag==argsTag?objectTag:othTag)==objectTag,isSameTag=objTag==othTag;if(isSameTag&&isBuffer(object)){if(!isBuffer(other))return!1;objIsArr=!0,objIsObj=!1}if(isSameTag&&!objIsObj)return stack||(stack=new Stack),objIsArr||isTypedArray(object)?equalArrays(object,other,bitmask,customizer,equalFunc,stack):function(object,other,tag,bitmask,customizer,equalFunc,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset)return!1;object=object.buffer,other=other.buffer;case arrayBufferTag:return!(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other)));case boolTag:case dateTag:case numberTag:return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:return object==other+"";case mapTag:var convert=mapToArray;case setTag:var isPartial=1&bitmask;if(convert||(convert=setToArray),object.size!=other.size&&!isPartial)return!1;var stacked=stack.get(object);if(stacked)return stacked==other;bitmask|=2,stack.set(object,other);var result=equalArrays(convert(object),convert(other),bitmask,customizer,equalFunc,stack);return stack.delete(object),result;case symbolTag:if(symbolValueOf)return symbolValueOf.call(object)==symbolValueOf.call(other)}return!1}(object,other,objTag,bitmask,customizer,equalFunc,stack);if(!(1&bitmask)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;return stack||(stack=new Stack),equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack)}}if(!isSameTag)return!1;return stack||(stack=new Stack),function(object,other,bitmask,customizer,equalFunc,stack){var isPartial=1&bitmask,objProps=getAllKeys(object),objLength=objProps.length,othLength=getAllKeys(other).length;if(objLength!=othLength&&!isPartial)return!1;var index=objLength;for(;index--;){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key)))return!1}var objStacked=stack.get(object),othStacked=stack.get(other);if(objStacked&&othStacked)return objStacked==other&&othStacked==object;var result=!0;stack.set(object,other),stack.set(other,object);var skipCtor=isPartial;for(;++index<objLength;){var objValue=object[key=objProps[index]],othValue=other[key];if(customizer)var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack);if(!(undefined===compared?objValue===othValue||equalFunc(objValue,othValue,bitmask,customizer,stack):compared)){result=!1;break}skipCtor||(skipCtor="constructor"==key)}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;objCtor==othCtor||!("constructor"in object)||!("constructor"in other)||"function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor||(result=!1)}return stack.delete(object),stack.delete(other),result}(object,other,bitmask,customizer,equalFunc,stack)}(value,other,bitmask,customizer,baseIsEqual,stack))}function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=Object(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++index<length;){var key=(data=matchData[index])[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(undefined===objValue&&!(key in object))return!1}else{var stack=new Stack;if(customizer)var result=customizer(objValue,srcValue,key,object,source,stack);if(!(undefined===result?baseIsEqual(srcValue,objValue,3,customizer,stack):result))return!1}}return!0}function baseIsNative(value){return!(!isObject(value)||(func=value,maskSrcKey&&maskSrcKey in func))&&(isFunction(value)?reIsNative:reIsHostCtor).test(toSource(value));var func}function baseIteratee(value){return"function"==typeof value?value:null==value?identity:"object"==typeof value?isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value):property(value)}function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty.call(object,key)&&"constructor"!=key&&result.push(key);return result}function baseKeysIn(object){if(!isObject(object))return function(object){var result=[];if(null!=object)for(var key in Object(object))result.push(key);return result}(object);var isProto=isPrototype(object),result=[];for(var key in object)("constructor"!=key||!isProto&&hasOwnProperty.call(object,key))&&result.push(key);return result}function baseLt(value,other){return value<other}function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,(function(value,key,collection){result[++index]=iteratee(value,key,collection)})),result}function baseMatches(source){var matchData=getMatchData(source);return 1==matchData.length&&matchData[0][2]?matchesStrictComparable(matchData[0][0],matchData[0][1]):function(object){return object===source||baseIsMatch(object,source,matchData)}}function baseMatchesProperty(path,srcValue){return isKey(path)&&isStrictComparable(srcValue)?matchesStrictComparable(toKey(path),srcValue):function(object){var objValue=get(object,path);return undefined===objValue&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,3)}}function baseMerge(object,source,srcIndex,customizer,stack){object!==source&&baseFor(source,(function(srcValue,key){if(stack||(stack=new Stack),isObject(srcValue))!function(object,source,key,srcIndex,mergeFunc,customizer,stack){var objValue=safeGet(object,key),srcValue=safeGet(source,key),stacked=stack.get(srcValue);if(stacked)return void assignMergeValue(object,key,stacked);var newValue=customizer?customizer(objValue,srcValue,key+"",object,source,stack):undefined,isCommon=undefined===newValue;if(isCommon){var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue,isArr||isBuff||isTyped?isArray(objValue)?newValue=objValue:isArrayLikeObject(objValue)?newValue=copyArray(objValue):isBuff?(isCommon=!1,newValue=cloneBuffer(srcValue,!0)):isTyped?(isCommon=!1,newValue=cloneTypedArray(srcValue,!0)):newValue=[]:isPlainObject(srcValue)||isArguments(srcValue)?(newValue=objValue,isArguments(objValue)?newValue=toPlainObject(objValue):isObject(objValue)&&!isFunction(objValue)||(newValue=initCloneObject(srcValue))):isCommon=!1}isCommon&&(stack.set(srcValue,newValue),mergeFunc(newValue,srcValue,srcIndex,customizer,stack),stack.delete(srcValue));assignMergeValue(object,key,newValue)}(object,source,key,srcIndex,baseMerge,customizer,stack);else{var newValue=customizer?customizer(safeGet(object,key),srcValue,key+"",object,source,stack):undefined;undefined===newValue&&(newValue=srcValue),assignMergeValue(object,key,newValue)}}),keysIn)}function baseNth(array,n){var length=array.length;if(length)return isIndex(n+=n<0?length:0,length)?array[n]:undefined}function baseOrderBy(collection,iteratees,orders){iteratees=iteratees.length?arrayMap(iteratees,(function(iteratee){return isArray(iteratee)?function(value){return baseGet(value,1===iteratee.length?iteratee[0]:iteratee)}:iteratee})):[identity];var index=-1;return iteratees=arrayMap(iteratees,baseUnary(getIteratee())),function(array,comparer){var length=array.length;for(array.sort(comparer);length--;)array[length]=array[length].value;return array}(baseMap(collection,(function(value,key,collection){return{criteria:arrayMap(iteratees,(function(iteratee){return iteratee(value)})),index:++index,value:value}})),(function(object,other){return function(object,other,orders){var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;for(;++index<length;){var result=compareAscending(objCriteria[index],othCriteria[index]);if(result)return index>=ordersLength?result:result*("desc"==orders[index]?-1:1)}return object.index-other.index}(object,other,orders)}))}function basePickBy(object,paths,predicate){for(var index=-1,length=paths.length,result={};++index<length;){var path=paths[index],value=baseGet(object,path);predicate(value,path)&&baseSet(result,castPath(path,object),value)}return result}function basePullAll(array,values,iteratee,comparator){var indexOf=comparator?baseIndexOfWith:baseIndexOf,index=-1,length=values.length,seen=array;for(array===values&&(values=copyArray(values)),iteratee&&(seen=arrayMap(array,baseUnary(iteratee)));++index<length;)for(var fromIndex=0,value=values[index],computed=iteratee?iteratee(value):value;(fromIndex=indexOf(seen,computed,fromIndex,comparator))>-1;)seen!==array&&splice.call(seen,fromIndex,1),splice.call(array,fromIndex,1);return array}function basePullAt(array,indexes){for(var length=array?indexes.length:0,lastIndex=length-1;length--;){var index=indexes[length];if(length==lastIndex||index!==previous){var previous=index;isIndex(index)?splice.call(array,index,1):baseUnset(array,index)}}return array}function baseRandom(lower,upper){return lower+nativeFloor(nativeRandom()*(upper-lower+1))}function baseRepeat(string,n){var result="";if(!string||n<1||n>9007199254740991)return result;do{n%2&&(result+=string),(n=nativeFloor(n/2))&&(string+=string)}while(n);return result}function baseRest(func,start){return setToString(overRest(func,start,identity),func+"")}function baseSample(collection){return arraySample(values(collection))}function baseSampleSize(collection,n){var array=values(collection);return shuffleSelf(array,baseClamp(n,0,array.length))}function baseSet(object,path,value,customizer){if(!isObject(object))return object;for(var index=-1,length=(path=castPath(path,object)).length,lastIndex=length-1,nested=object;null!=nested&&++index<length;){var key=toKey(path[index]),newValue=value;if("__proto__"===key||"constructor"===key||"prototype"===key)return object;if(index!=lastIndex){var objValue=nested[key];undefined===(newValue=customizer?customizer(objValue,key,nested):undefined)&&(newValue=isObject(objValue)?objValue:isIndex(path[index+1])?[]:{})}assignValue(nested,key,newValue),nested=nested[key]}return object}var baseSetData=metaMap?function(func,data){return metaMap.set(func,data),func}:identity,baseSetToString=defineProperty?function(func,string){return defineProperty(func,"toString",{configurable:!0,enumerable:!1,value:constant(string),writable:!0})}:identity;function baseShuffle(collection){return shuffleSelf(values(collection))}function baseSlice(array,start,end){var index=-1,length=array.length;start<0&&(start=-start>length?0:length+start),(end=end>length?length:end)<0&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index<length;)result[index]=array[index+start];return result}function baseSome(collection,predicate){var result;return baseEach(collection,(function(value,index,collection){return!(result=predicate(value,index,collection))})),!!result}function baseSortedIndex(array,value,retHighest){var low=0,high=null==array?low:array.length;if("number"==typeof value&&value==value&&high<=2147483647){for(;low<high;){var mid=low+high>>>1,computed=array[mid];null!==computed&&!isSymbol(computed)&&(retHighest?computed<=value:computed<value)?low=mid+1:high=mid}return high}return baseSortedIndexBy(array,value,identity,retHighest)}function baseSortedIndexBy(array,value,iteratee,retHighest){var low=0,high=null==array?0:array.length;if(0===high)return 0;for(var valIsNaN=(value=iteratee(value))!=value,valIsNull=null===value,valIsSymbol=isSymbol(value),valIsUndefined=undefined===value;low<high;){var mid=nativeFloor((low+high)/2),computed=iteratee(array[mid]),othIsDefined=undefined!==computed,othIsNull=null===computed,othIsReflexive=computed==computed,othIsSymbol=isSymbol(computed);if(valIsNaN)var setLow=retHighest||othIsReflexive;else setLow=valIsUndefined?othIsReflexive&&(retHighest||othIsDefined):valIsNull?othIsReflexive&&othIsDefined&&(retHighest||!othIsNull):valIsSymbol?othIsReflexive&&othIsDefined&&!othIsNull&&(retHighest||!othIsSymbol):!othIsNull&&!othIsSymbol&&(retHighest?computed<=value:computed<value);setLow?low=mid+1:high=mid}return nativeMin(high,4294967294)}function baseSortedUniq(array,iteratee){for(var index=-1,length=array.length,resIndex=0,result=[];++index<length;){var value=array[index],computed=iteratee?iteratee(value):value;if(!index||!eq(computed,seen)){var seen=computed;result[resIndex++]=0===value?0:value}}return result}function baseToNumber(value){return"number"==typeof value?value:isSymbol(value)?NaN:+value}function baseToString(value){if("string"==typeof value)return value;if(isArray(value))return arrayMap(value,baseToString)+"";if(isSymbol(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-Infinity?"-0":result}function baseUniq(array,iteratee,comparator){var index=-1,includes=arrayIncludes,length=array.length,isCommon=!0,result=[],seen=result;if(comparator)isCommon=!1,includes=arrayIncludesWith;else if(length>=200){var set=iteratee?null:createSet(array);if(set)return setToArray(set);isCommon=!1,includes=cacheHas,seen=new SetCache}else seen=iteratee?[]:result;outer:for(;++index<length;){var value=array[index],computed=iteratee?iteratee(value):value;if(value=comparator||0!==value?value:0,isCommon&&computed==computed){for(var seenIndex=seen.length;seenIndex--;)if(seen[seenIndex]===computed)continue outer;iteratee&&seen.push(computed),result.push(value)}else includes(seen,computed,comparator)||(seen!==result&&seen.push(computed),result.push(value))}return result}function baseUnset(object,path){return null==(object=parent(object,path=castPath(path,object)))||delete object[toKey(last(path))]}function baseUpdate(object,path,updater,customizer){return baseSet(object,path,updater(baseGet(object,path)),customizer)}function baseWhile(array,predicate,isDrop,fromRight){for(var length=array.length,index=fromRight?length:-1;(fromRight?index--:++index<length)&&predicate(array[index],index,array););return isDrop?baseSlice(array,fromRight?0:index,fromRight?index+1:length):baseSlice(array,fromRight?index+1:0,fromRight?length:index)}function baseWrapperValue(value,actions){var result=value;return result instanceof LazyWrapper&&(result=result.value()),arrayReduce(actions,(function(result,action){return action.func.apply(action.thisArg,arrayPush([result],action.args))}),result)}function baseXor(arrays,iteratee,comparator){var length=arrays.length;if(length<2)return length?baseUniq(arrays[0]):[];for(var index=-1,result=Array(length);++index<length;)for(var array=arrays[index],othIndex=-1;++othIndex<length;)othIndex!=index&&(result[index]=baseDifference(result[index]||array,arrays[othIndex],iteratee,comparator));return baseUniq(baseFlatten(result,1),iteratee,comparator)}function baseZipObject(props,values,assignFunc){for(var index=-1,length=props.length,valsLength=values.length,result={};++index<length;){var value=index<valsLength?values[index]:undefined;assignFunc(result,props[index],value)}return result}function castArrayLikeObject(value){return isArrayLikeObject(value)?value:[]}function castFunction(value){return"function"==typeof value?value:identity}function castPath(value,object){return isArray(value)?value:isKey(value,object)?[value]:stringToPath(toString(value))}var castRest=baseRest;function castSlice(array,start,end){var length=array.length;return end=undefined===end?length:end,!start&&end>=length?array:baseSlice(array,start,end)}var clearTimeout=ctxClearTimeout||function(id){return root.clearTimeout(id)};function cloneBuffer(buffer,isDeep){if(isDeep)return buffer.slice();var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);return buffer.copy(result),result}function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);return new Uint8Array(result).set(new Uint8Array(arrayBuffer)),result}function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}function compareAscending(value,other){if(value!==other){var valIsDefined=undefined!==value,valIsNull=null===value,valIsReflexive=value==value,valIsSymbol=isSymbol(value),othIsDefined=undefined!==other,othIsNull=null===other,othIsReflexive=other==other,othIsSymbol=isSymbol(other);if(!othIsNull&&!othIsSymbol&&!valIsSymbol&&value>other||valIsSymbol&&othIsDefined&&othIsReflexive&&!othIsNull&&!othIsSymbol||valIsNull&&othIsDefined&&othIsReflexive||!valIsDefined&&othIsReflexive||!valIsReflexive)return 1;if(!valIsNull&&!valIsSymbol&&!othIsSymbol&&value<other||othIsSymbol&&valIsDefined&&valIsReflexive&&!valIsNull&&!valIsSymbol||othIsNull&&valIsDefined&&valIsReflexive||!othIsDefined&&valIsReflexive||!othIsReflexive)return-1}return 0}function composeArgs(args,partials,holders,isCurried){for(var argsIndex=-1,argsLength=args.length,holdersLength=holders.length,leftIndex=-1,leftLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(leftLength+rangeLength),isUncurried=!isCurried;++leftIndex<leftLength;)result[leftIndex]=partials[leftIndex];for(;++argsIndex<holdersLength;)(isUncurried||argsIndex<argsLength)&&(result[holders[argsIndex]]=args[argsIndex]);for(;rangeLength--;)result[leftIndex++]=args[argsIndex++];return result}function composeArgsRight(args,partials,holders,isCurried){for(var argsIndex=-1,argsLength=args.length,holdersIndex=-1,holdersLength=holders.length,rightIndex=-1,rightLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(rangeLength+rightLength),isUncurried=!isCurried;++argsIndex<rangeLength;)result[argsIndex]=args[argsIndex];for(var offset=argsIndex;++rightIndex<rightLength;)result[offset+rightIndex]=partials[rightIndex];for(;++holdersIndex<holdersLength;)(isUncurried||argsIndex<argsLength)&&(result[offset+holders[holdersIndex]]=args[argsIndex++]);return result}function copyArray(source,array){var index=-1,length=source.length;for(array||(array=Array(length));++index<length;)array[index]=source[index];return array}function copyObject(source,props,object,customizer){var isNew=!object;object||(object={});for(var index=-1,length=props.length;++index<length;){var key=props[index],newValue=customizer?customizer(object[key],source[key],key,object,source):undefined;undefined===newValue&&(newValue=source[key]),isNew?baseAssignValue(object,key,newValue):assignValue(object,key,newValue)}return object}function createAggregator(setter,initializer){return function(collection,iteratee){var func=isArray(collection)?arrayAggregator:baseAggregator,accumulator=initializer?initializer():{};return func(collection,setter,getIteratee(iteratee,2),accumulator)}}function createAssigner(assigner){return baseRest((function(object,sources){var index=-1,length=sources.length,customizer=length>1?sources[length-1]:undefined,guard=length>2?sources[2]:undefined;for(customizer=assigner.length>3&&"function"==typeof customizer?(length--,customizer):undefined,guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=length<3?undefined:customizer,length=1),object=Object(object);++index<length;){var source=sources[index];source&&assigner(object,source,index,customizer)}return object}))}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(null==collection)return collection;if(!isArrayLike(collection))return eachFunc(collection,iteratee);for(var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);(fromRight?index--:++index<length)&&!1!==iteratee(iterable[index],index,iterable););return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;length--;){var key=props[fromRight?length:++index];if(!1===iteratee(iterable[key],key,iterable))break}return object}}function createCaseFirst(methodName){return function(string){var strSymbols=hasUnicode(string=toString(string))?stringToArray(string):undefined,chr=strSymbols?strSymbols[0]:string.charAt(0),trailing=strSymbols?castSlice(strSymbols,1).join(""):string.slice(1);return chr[methodName]()+trailing}}function createCompounder(callback){return function(string){return arrayReduce(words(deburr(string).replace(reApos,"")),callback,"")}}function createCtor(Ctor){return function(){var args=arguments;switch(args.length){case 0:return new Ctor;case 1:return new Ctor(args[0]);case 2:return new Ctor(args[0],args[1]);case 3:return new Ctor(args[0],args[1],args[2]);case 4:return new Ctor(args[0],args[1],args[2],args[3]);case 5:return new Ctor(args[0],args[1],args[2],args[3],args[4]);case 6:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5],args[6])}var thisBinding=baseCreate(Ctor.prototype),result=Ctor.apply(thisBinding,args);return isObject(result)?result:thisBinding}}function createFind(findIndexFunc){return function(collection,predicate,fromIndex){var iterable=Object(collection);if(!isArrayLike(collection)){var iteratee=getIteratee(predicate,3);collection=keys(collection),predicate=function(key){return iteratee(iterable[key],key,iterable)}}var index=findIndexFunc(collection,predicate,fromIndex);return index>-1?iterable[iteratee?collection[index]:index]:undefined}}function createFlow(fromRight){return flatRest((function(funcs){var length=funcs.length,index=length,prereq=LodashWrapper.prototype.thru;for(fromRight&&funcs.reverse();index--;){var func=funcs[index];if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);if(prereq&&!wrapper&&"wrapper"==getFuncName(func))var wrapper=new LodashWrapper([],!0)}for(index=wrapper?index:length;++index<length;){var funcName=getFuncName(func=funcs[index]),data="wrapper"==funcName?getData(func):undefined;wrapper=data&&isLaziable(data[0])&&424==data[1]&&!data[4].length&&1==data[9]?wrapper[getFuncName(data[0])].apply(wrapper,data[3]):1==func.length&&isLaziable(func)?wrapper[funcName]():wrapper.thru(func)}return function(){var args=arguments,value=args[0];if(wrapper&&1==args.length&&isArray(value))return wrapper.plant(value).value();for(var index=0,result=length?funcs[index].apply(this,args):value;++index<length;)result=funcs[index].call(this,result);return result}}))}function createHybrid(func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity){var isAry=128&bitmask,isBind=1&bitmask,isBindKey=2&bitmask,isCurried=24&bitmask,isFlip=512&bitmask,Ctor=isBindKey?undefined:createCtor(func);return function wrapper(){for(var length=arguments.length,args=Array(length),index=length;index--;)args[index]=arguments[index];if(isCurried)var placeholder=getHolder(wrapper),holdersCount=countHolders(args,placeholder);if(partials&&(args=composeArgs(args,partials,holders,isCurried)),partialsRight&&(args=composeArgsRight(args,partialsRight,holdersRight,isCurried)),length-=holdersCount,isCurried&&length<arity){var newHolders=replaceHolders(args,placeholder);return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,thisArg,args,newHolders,argPos,ary,arity-length)}var thisBinding=isBind?thisArg:this,fn=isBindKey?thisBinding[func]:func;return length=args.length,argPos?args=reorder(args,argPos):isFlip&&length>1&&args.reverse(),isAry&&ary<length&&(args.length=ary),this&&this!==root&&this instanceof wrapper&&(fn=Ctor||createCtor(fn)),fn.apply(thisBinding,args)}}function createInverter(setter,toIteratee){return function(object,iteratee){return function(object,setter,iteratee,accumulator){return baseForOwn(object,(function(value,key,object){setter(accumulator,iteratee(value),key,object)})),accumulator}(object,setter,toIteratee(iteratee),{})}}function createMathOperation(operator,defaultValue){return function(value,other){var result;if(undefined===value&&undefined===other)return defaultValue;if(undefined!==value&&(result=value),undefined!==other){if(undefined===result)return other;"string"==typeof value||"string"==typeof other?(value=baseToString(value),other=baseToString(other)):(value=baseToNumber(value),other=baseToNumber(other)),result=operator(value,other)}return result}}function createOver(arrayFunc){return flatRest((function(iteratees){return iteratees=arrayMap(iteratees,baseUnary(getIteratee())),baseRest((function(args){var thisArg=this;return arrayFunc(iteratees,(function(iteratee){return apply(iteratee,thisArg,args)}))}))}))}function createPadding(length,chars){var charsLength=
gitextract_kme0tmep/
├── .gitignore
├── LICENSE
├── README.md
├── example/
│ ├── LICENSES
│ ├── PasswordMeter.js
│ ├── blacklist-chi17lowercase-compressed.txt
│ ├── blacklist-chi17strippedlowercase-compressed.txt
│ ├── blacklist-cmu-compressed.txt
│ ├── config.css
│ ├── config_policy_meter.js
│ ├── dictionary-blacklist1c8-compressed.txt
│ ├── dictionary-englishwords-compressed.txt
│ ├── dictionary-names-compressed.txt
│ ├── dictionary-passwords-compressed.txt
│ ├── dictionary-phrases-compressed.txt
│ ├── dictionary-wikipedia-compressed.txt
│ ├── index.html
│ ├── lz-string.js
│ ├── nn-client.js
│ ├── static.css
│ ├── tfjs_1c8/
│ │ ├── model.json
│ │ └── model_info_and_guess_nums.json
│ └── worker.js.source_map
└── src/
├── package.json
└── ts/
├── PasswordMeter.ts
├── array.ts
├── blacklist.ts
├── config.ts
├── constants.ts
├── dict-misc.ts
├── helper.ts
├── hibp.ts
├── nn-misc.ts
├── rulefunctions.ts
├── string.ts
└── ui-misc.ts
Copy disabled (too large)
Condensed preview — 36 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (10,184K chars).
[
{
"path": ".gitignore",
"chars": 62,
"preview": "src/node_modules\nsrc/package-lock.json\n\n# emacs temp files\n*~\n"
},
{
"path": "LICENSE",
"chars": 769,
"preview": "Copyright 2017-2021 by Felicia Alfieri, Maung Aung, Lujo Bauer, Nicolas \nChristin, Jessica Colnago, Lorrie Faith Cranor,..."
},
{
"path": "README.md",
"chars": 18078,
"preview": "# Password Meter\n\nThis project implements a data-driven password meter. Its effects on password security and usability w..."
},
{
"path": "example/LICENSES",
"chars": 709,
"preview": "lz-string was licensed under the WTFPL\nbootstrap was licensed under the MIT license\njquery was licensed under the Apache..."
},
{
"path": "example/PasswordMeter.js",
"chars": 435049,
"preview": "!function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0)..."
},
{
"path": "example/blacklist-chi17lowercase-compressed.txt",
"chars": 615857,
"preview": "IwBj5AaUJZtiA7AsMroEzlTUu8CBOMYgFnj2CLIDZyAOco4gVgzWtcs6NczYBmNmTas29KnxRTWTWSym0OcarR6qitAUuFLRS8Usm9aM0-NOLeSFcGpIN9ok..."
},
{
"path": "example/blacklist-chi17strippedlowercase-compressed.txt",
"chars": 367993,
"preview": "A4QwzmDuD2BOAmAaARuApqgNpxAza0ALljgI6RqyECeArgJbTCJi3CUC2IAdoqSAC9IYAB6JCsWmELdoiAFZpu3erkota3MAAt63NInqZoANzTVotFoRCxIt..."
},
{
"path": "example/blacklist-cmu-compressed.txt",
"chars": 3848757,
"preview": "IYkGlUM8avLQXAFkhLNbXAJr9EffQ4LU7bUgS1toFNHHSAnAcxxnc0ICN+BAY0EEYbQpxAd0HHpElk5oKvJWhabTbLUhu6FgfabK+w0fKQA7tZu27SQcAcBr..."
},
{
"path": "example/config.css",
"chars": 2299,
"preview": "/* Overall layout of the page */\n\nbody {\n font-size: 12pt;\n color: #555555;\n background-color: #E0E0E0;\n padding:20p..."
},
{
"path": "example/config_policy_meter.js",
"chars": 3527,
"preview": "// 1c12, minNN=10^10, prohibit known leaked passwords\nvar passwordMeterConfig = {\n provideConcretePasswordSuggestions..."
},
{
"path": "example/dictionary-blacklist1c8-compressed.txt",
"chars": 635689,
"preview": "A4QwzmDuD2BOAmAaAjAJgMwBYCsA2A7ABwoY4GECciARuAKa0A2jiAZtNAC5MsCOkdWJwCeAVwCW0YCSx4iFAAyIwo4IIC2IAHYpeIAF6pIYAB6JOsUWE5bo..."
},
{
"path": "example/dictionary-englishwords-compressed.txt",
"chars": 448807,
"preview": "IY4CwGlSQYzApgOysANgSwJ7lQJwBMA3YPAa32NLIGcoAjYWDBpi4R2AVzo6Z4S9GAMwAurNAHskCCdMGskBaYuUyCq6RiQBzTUgC2ycXyXShwGrL5WNNhEa..."
},
{
"path": "example/dictionary-names-compressed.txt",
"chars": 21442,
"preview": "IbBOHsDsBpgIzgSwKazgEwK4Bs3N-IgObCIFyjAAWwAtmpfcOtbC9nMqAC7hvDZEkVMzr8YzdCjb5gM7KRbzFI9PlX5Ec5psja1g4fIIGFxjXrZD94bADM+z..."
},
{
"path": "example/dictionary-passwords-compressed.txt",
"chars": 449432,
"preview": "Pw4GlEM8agqR8xMS1yNq2gDP3MA-IgOl3JOKvNoKOsMauadbfY+YBMHWB7PtQCGQggEYx+AOxTJjWY1GMAjlIBeY+cQBMYgKxiAbGMXEAHGICcY5cQAuATyH..."
},
{
"path": "example/dictionary-phrases-compressed.txt",
"chars": 459996,
"preview": "IY0FwCwUwGldoDMD2AbVyDuBLAdgcznmEmwGcj5SyAHYfWYkicgJygEcBXKMsSgEb4AxmmStBIsa0SUyabABMB4xVAkJGISFBToseQiFTZ8uIibPCouMOqK5..."
},
{
"path": "example/dictionary-wikipedia-compressed.txt",
"chars": 265355,
"preview": "IY0EwUwcxAaVQFc4IMavuamSRsHYPBQgM1MIHsqVQBnO2kRQ5AhNpsb0AW35x0cAT0wAjdBhCSpwdOUyo6YzHlXRaxUOvwlcAS1W9DuAC6ZSs8rXIKQUCJig..."
},
{
"path": "example/index.html",
"chars": 21326,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n\n\n<l..."
},
{
"path": "example/lz-string.js",
"chars": 15870,
"preview": "// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>\n// This work is free. You can redistribute it and/or modify it\n// un..."
},
{
"path": "example/nn-client.js",
"chars": 8568,
"preview": "(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)ret..."
},
{
"path": "example/static.css",
"chars": 6366,
"preview": "/* Layout Expected to be mostly static */\n\ndiv.mainBox {\n width: 670px;\n padding: 0px;\n margin-left: auto;\n margin-r..."
},
{
"path": "example/tfjs_1c8/model.json",
"chars": 5291,
"preview": "{\"format\": \"layers-model\", \"weightsManifest\": [{\"weights\": [{\"shape\": [2000, 200], \"dtype\": \"float32\", \"name\": \"dense_1/..."
},
{
"path": "example/tfjs_1c8/model_info_and_guess_nums.json",
"chars": 19408,
"preview": "{\n \"end_character_frequencies\": {\n \"`\": 1043,\n \">\": 1371,\n \"S\": 43488,\n \"W\": 23438,\n \"'\": 1077,\n \"e\":..."
},
{
"path": "example/worker.js.source_map",
"chars": 2225141,
"preview": "{\n\"version\":3,\n\"file\":\"worker.min.js\",\n\"lineCount\":2251,\n\"mappings\":\"A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;..."
},
{
"path": "src/package.json",
"chars": 673,
"preview": "{\n \"name\": \"cups_password_meter\",\n \"version\": \"0.9.1\",\n \"description\": \"Password Meter\",\n \"main\": \"PasswordMeter.js\"..."
},
{
"path": "src/ts/PasswordMeter.ts",
"chars": 3329,
"preview": "// Copyright 2017-2021 by Carnegie Mellon University\n// globals on entry:\n// $ for JQuery (infected with Bootstrap)\n// L..."
},
{
"path": "src/ts/array.ts",
"chars": 3395,
"preview": "/* ***************** */\n/* ARRAY EXTENSIONS */\n/* ***************** */\n\ninterface Array<T> {\n\tremoveDuplicates(): Array<..."
},
{
"path": "src/ts/blacklist.ts",
"chars": 2178,
"preview": "import PasswordMeter = require(\"./PasswordMeter\");\nimport Helper = require(\"./helper\");\nimport BloomFilter = require(\"bl..."
},
{
"path": "src/ts/config.ts",
"chars": 7421,
"preview": "// test 11 dimensions of composition requirements as follows:\n// dimension 1: length (min / max)\n// dimension 2: man..."
},
{
"path": "src/ts/constants.ts",
"chars": 54608,
"preview": "export module Constants {\n export const LOWERCASE_LETTERS = new RegExp(\"[a-z]\");\n export const LOWERCASE_LETTERS_G..."
},
{
"path": "src/ts/dict-misc.ts",
"chars": 4326,
"preview": "import PasswordMeter = require(\"./PasswordMeter\");\nimport Helper = require(\"./helper\");\n\nexport module Dictionaries {..."
},
{
"path": "src/ts/helper.ts",
"chars": 13991,
"preview": "import LZString = require(\"lz-string\");\nimport PasswordMeter = require(\"./PasswordMeter\");\nimport LogLevel = require(\"lo..."
},
{
"path": "src/ts/hibp.ts",
"chars": 4855,
"preview": "/**\n * hibp.js\n * @version v1\n * @author Mehdi Bounya\n *\n * Report any bugs here: https://github.com/mehdibo/hibp-js\n *..."
},
{
"path": "src/ts/nn-misc.ts",
"chars": 5871,
"preview": "import PasswordMeter = require(\"./PasswordMeter\");\nimport Constants = require(\"./constants\");\nimport Config = require(\"...."
},
{
"path": "src/ts/rulefunctions.ts",
"chars": 90930,
"preview": "import PasswordMeter = require(\"./PasswordMeter\");\nimport Config = require(\"./config\");\nimport Helper = require(\"./helpe..."
},
{
"path": "src/ts/string.ts",
"chars": 2711,
"preview": "/* ***************** */\n/* STRING EXTENSIONS */\n/* ***************** */\n\ninterface String {\n\treplaceAt(index: number, st..."
},
{
"path": "src/ts/ui-misc.ts",
"chars": 52464,
"preview": "import Helper = require(\"./helper\");\nimport PasswordMeter = require(\"./PasswordMeter\");\nimport Config = require(\"./confi..."
}
]
About this extraction
This page contains the full source code of the cupslab/password_meter GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 36 files (9.7 MB), approximately 2.5M tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.