Browse Source

hashids weg

burningTyger 5 năm trước cách đây
mục cha
commit
4949087d73
33 tập tin đã thay đổi với 0 bổ sung2332 xóa
  1. 0 13
      node_modules/hashids/.babelrc.js
  2. 0 14
      node_modules/hashids/.editorconfig
  3. 0 24
      node_modules/hashids/.eslintrc
  4. 0 1
      node_modules/hashids/.gitattributes
  5. 0 29
      node_modules/hashids/.travis.yml
  6. 0 131
      node_modules/hashids/CHANGELOG.md
  7. 0 19
      node_modules/hashids/LICENSE
  8. 0 189
      node_modules/hashids/README.md
  9. 0 17
      node_modules/hashids/bower.json
  10. 0 318
      node_modules/hashids/dist/hashids-esm.js
  11. 0 6
      node_modules/hashids/dist/hashids.js
  12. 0 0
      node_modules/hashids/dist/hashids.min.js
  13. 0 0
      node_modules/hashids/dist/hashids.min.js.map
  14. 0 318
      node_modules/hashids/dist/hashids.mjs
  15. 0 0
      node_modules/hashids/dist/hashids.mjs.map
  16. 0 339
      node_modules/hashids/dist/index.js
  17. 0 0
      node_modules/hashids/dist/index.js.map
  18. 0 324
      node_modules/hashids/lib/hashids.js
  19. 0 97
      node_modules/hashids/package.json
  20. 0 8
      node_modules/hashids/tests-mjs/importing.js
  21. 0 8
      node_modules/hashids/tests-mjs/importing.mjs
  22. 0 91
      node_modules/hashids/tests/bad-input.js
  23. 0 43
      node_modules/hashids/tests/custom-alphabet.js
  24. 0 44
      node_modules/hashids/tests/custom-params-hex.js
  25. 0 54
      node_modules/hashids/tests/custom-params.js
  26. 0 39
      node_modules/hashids/tests/custom-salt.js
  27. 0 39
      node_modules/hashids/tests/default-params-hex.js
  28. 0 49
      node_modules/hashids/tests/default-params.js
  29. 0 36
      node_modules/hashids/tests/encode-types.js
  30. 0 40
      node_modules/hashids/tests/min-length.js
  31. 0 36
      node_modules/hashids/tests/requiring.js
  32. 0 5
      package-lock.json
  33. 0 1
      package.json

+ 0 - 13
node_modules/hashids/.babelrc.js

@@ -1,13 +0,0 @@
-module.exports = {
-	presets: [
-		[
-			'@babel/preset-env',
-			{
-				modules: process.env.BABEL_MODULES ? false : 'umd',
-			}
-		],
-	],
-	plugins: [
-		'@babel/plugin-syntax-dynamic-import'
-	]
-}

+ 0 - 14
node_modules/hashids/.editorconfig

@@ -1,14 +0,0 @@
-# editorconfig.org
-root = true
-
-[*]
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-indent_style = tab
-indent_size = 4
-
-[{package.json,.babelrc}]
-indent_style = space
-indent_size = 2

+ 0 - 24
node_modules/hashids/.eslintrc

@@ -1,24 +0,0 @@
-{
-  "env": {
-    "browser": true,
-    "node": true,
-    "mocha": true,
-    "es6": true
-  },
-  "extends": "eslint:recommended",
-  "parser": "babel-eslint",
-  "parserOptions": {
-    "ecmaVersion": 2018,
-    "sourceType": "module"
-  },
-  "rules": {
-    "eqeqeq": 2,
-    "indent": ["error", "tab"],
-    "no-var": 2,
-    "prefer-const": 2,
-    "no-unused-vars": [2, {"vars": "all", "args": "none", "varsIgnorePattern": "[iI]gnored"}],
-	"no-alert": 2,
-	"no-trailing-spaces": 2,
-	"radix": 2
-  }
-}

+ 0 - 1
node_modules/hashids/.gitattributes

@@ -1 +0,0 @@
-package-lock.json binary

+ 0 - 29
node_modules/hashids/.travis.yml

@@ -1,29 +0,0 @@
-language: node_js
-
-stages:
-  - basic
-  - modules
-
-matrix:
-  include:
-    - os: linux
-      node_js: "10"
-      env: JOB_PART=test
-      stage: basic
-    - os: linux
-      node_js: "8"
-      env: JOB_PART=test
-      stage: basic
-    - os: linux
-      node_js: "6"
-      env: JOB_PART=test
-      stage: basic
-    - os: linux
-      node_js: "10"
-      env: JOB_PART=test-modules
-      stage: modules
-  fast_finish: true
-
-sudo: false
-script: npm run $JOB_PART
-after_script: npm run coverage

+ 0 - 131
node_modules/hashids/CHANGELOG.md

@@ -1,131 +0,0 @@
-
-# CHANGELOG
-
-**1.2.2**:
-
-- another issue https://github.com/ivanakimov/hashids.js/issues/56
-
-**1.2.1** (do not use):
-
-- fixes a bug issue https://github.com/ivanakimov/hashids.js/issues/54
-
-**1.2.0** (do not use):
-
-- drop unsupported node versions (6 and above is still supported)
-- drop support for browsers with global market share < 0.5%
-- upgrade to babel 7 and update other `devDependencies`
-- expose both as a default and a commonjs export (fixes TypeScript typings)
-- add support for `.mjs`
-- `package.json` updates
-- `.gitattributes` marks `package-lock.json` as binary
-- path of the source file changed from `dist/hashids.min.map` to `dist/hashids.min.js.map`
-- minor regex cleanup
-- precommit hook to run lint and test
-
-**1.1.4**:
-
-- looks like some bad input could generate negative numbers, which when passed to `_encode` would crash because it can't handle those <https://github.com/ivanakimov/hashids.js/issues/34>
-*NOTE:* do not use `1.1.3`, it wasn't re-built
-
-**1.1.2**:
-
-- fixed issue with sourceMappingURL in hashids.min.js ([PR #38](https://github.com/ivanakimov/hashids.js/pull/38))
-- added `package-lock.json`
-
-**1.1.1**:
-
-- Enforce stricter integer parsing on encode function ([PR #24](https://github.com/ivanakimov/hashids.js/pull/24))
-- Moved source from `hashids.js` to `lib/hashids.js`
-- Minor `README.md` cleanup
-
-**1.1.0**:
-
-- ES6 source; ES5 dist
-- UMD support ([Node.js repo](https://github.com/ivanakimov/hashids.node.js) is merging into this one)
-- Added Eslint (npm run lint)
-- Added Mocha (npm run test)
-- Added Coveralls (npm run coverage)
-- Added build script (npm run build)
-- Moved CHANGELOG out of `README.md`
-- `README.md` completely updated
-- `examples/` folder removed; all examples are now in the README
-- [Bug fix](https://github.com/ivanakimov/hashids.node.js/issues/26): escaping regex
-- Improvement: relaxed parameter checks to `encode()`. All of these are allowed:
-
-	```javascript
-	var hashids = new Hashids();
-
-	hashids.encode(1, 2, 3); // o2fXhV
-	hashids.encode([1, 2, 3]); // o2fXhV
-	hashids.encode('1', '2', '3'); // o2fXhV
-	hashids.encode(['1', '2', '3']); // o2fXhV
-	```
-
-**1.0.2**:
-
-- Support for older browsers (using `charAt`) by [@tauanz](https://github.com/tauanz): <https://github.com/ivanakimov/hashids.js/pull/15>
-
-**1.0.1**:
-
-- *require.js* support by [@nleclerc](https://github.com/nleclerc): <https://github.com/ivanakimov/hashids.js/pull/12>
-
-**1.0.0**:
-
-- Several public functions are renamed to be more appropriate:
-	- Function `encrypt()` changed to `encode()`
-	- Function `decrypt()` changed to `decode()`
-	- Function `encryptHex()` changed to `encodeHex()`
-	- Function `decryptHex()` changed to `decodeHex()`
-
-	Hashids was designed to encode integers, primary ids at most. We've had several requests to encrypt sensitive data with Hashids and this is the wrong algorithm for that. So to encourage more appropriate use, `encrypt/decrypt` is being "downgraded" to `encode/decode`.
-
-- Version tag added: `1.0`
-- `README.md` updated
-
-**0.3.0**:
-
-**PRODUCED HASHES IN THIS VERSION ARE DIFFERENT THAN IN 0.1.4, DO NOT UPDATE IF YOU NEED THEM TO KEEP WORKING:**
-
-- Same algorithm as [PHP](https://github.com/ivanakimov/hashids.php) and [Node.js](https://github.com/ivanakimov/hashids.node.js) versions now
-- Overall approximately **4x** faster
-- Consistent shuffle function uses slightly modified version of [Fisher–Yates algorithm](http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm)
-- Generate large hash strings faster (where _minHashLength_ is more than 1000 chars)
-- When using _minHashLength_, hash character disorder has been improved
-- Basic English curse words will now be avoided even with custom alphabet
-- _encrypt_ function now also accepts array of integers as input
-- Passing JSLint now
-- Support for [Bower](http://bower.io/) package manager
-
-**0.1.4**:
-
-- Global var leak for hashSplit (thanks to [@BryanDonovan](https://github.com/BryanDonovan))
-- Class capitalization (thanks to [@BryanDonovan](https://github.com/BryanDonovan))
-
-**0.1.3**:
-
-	Warning: If you are using 0.1.2 or below, updating to this version will change your hashes.
-
-- Updated default alphabet (thanks to [@speps](https://github.com/speps))
-- Constructor removes duplicate characters for default alphabet as well (thanks to [@speps](https://github.com/speps))
-
-**0.1.2**:
-
-	Warning: If you are using 0.1.1 or below, updating to this version will change your hashes.
-
-- Minimum hash length can now be specified
-- Added more randomness to hashes
-- Added unit tests
-- Added example files
-- Changed warnings that can be thrown
-- Renamed `encode/decode` to `encrypt/decrypt`
-- Consistent shuffle does not depend on md5 anymore
-- Speed improvements
-
-**0.1.1**:
-
-- Speed improvements
-- Bug fixes
-
-**0.1.0**:
-
-- First commit

+ 0 - 19
node_modules/hashids/LICENSE

@@ -1,19 +0,0 @@
-Copyright (c) 2012-2016 Ivan Akimov
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.

+ 0 - 189
node_modules/hashids/README.md

@@ -1,189 +0,0 @@
-
-[![hashids](http://hashids.org/public/img/hashids.gif "Hashids")](http://hashids.org/)
-
-[![Build Status][travis-image]][travis-url]
-[![Coveralls Status][coveralls-image]][coveralls-url]
-[![NPM downloads][npm-downloads-image]][npm-url]
-[![NPM version][npm-version-image]][npm-url]
-[![License][license-image]][license-url]
-[![Chat][chat-image]][chat-url]
-
-**Hashids** is small JavaScript library to generate YouTube-like ids from numbers. Use it when you don't want to expose your database ids to the user: [http://hashids.org/javascript](http://hashids.org/javascript)
-
-Getting started
--------
-
-Install Hashids via:
-
-- [node.js](https://nodejs.org): `npm install --save hashids`
-- [bower](http://bower.io/): `bower install hashids`
-- [jam](http://jamjs.org/): `jam install hashids`
-
-(or just use the code at `dist/hashids.js`)
-
-Use in the browser (wherever ES5 is supported; 5KB):
-
-```javascript
-<script type="text/javascript" src="hashids.min.js"></script>
-<script type="text/javascript">
-
-    var hashids = new Hashids();
-    console.log(hashids.encode(1));
-
-</script>
-```
-
-Use in Node.js:
-
-```javascript
-var Hashids = require('hashids');
-var hashids = new Hashids();
-
-console.log(hashids.encode(1));
-```
-
-Quick example
--------
-
-```javascript
-var hashids = new Hashids();
-
-var id = hashids.encode(1, 2, 3); // o2fXhV
-var numbers = hashids.decode(id); // [1, 2, 3]
-```
-
-More options
--------
-
-**A few more ways to pass to `encode()`:**
-
-```javascript
-var hashids = new Hashids();
-
-console.log(hashids.encode(1, 2, 3)); // o2fXhV
-console.log(hashids.encode([1, 2, 3])); // o2fXhV
-console.log(hashids.encode('1', '2', '3')); // o2fXhV
-console.log(hashids.encode(['1', '2', '3'])); // o2fXhV
-```
-
-**Make your ids unique:**
-
-Pass a project name to make your ids unique:
-
-```javascript
-var hashids = new Hashids('My Project');
-console.log(hashids.encode(1, 2, 3)); // Z4UrtW
-
-var hashids = new Hashids('My Other Project');
-console.log(hashids.encode(1, 2, 3)); // gPUasb
-```
-
-**Use padding to make your ids longer:**
-
-Note that ids are only padded to fit **at least** a certain length. It doesn't mean that your ids will be *exactly* that length.
-
-```javascript
-var hashids = new Hashids(); // no padding
-console.log(hashids.encode(1)); // jR
-
-var hashids = new Hashids('', 10); // pad to length 10
-console.log(hashids.encode(1)); // VolejRejNm
-```
-
-**Pass a custom alphabet:**
-
-```javascript
-var hashids = new Hashids('', 0, 'abcdefghijklmnopqrstuvwxyz'); // all lowercase
-console.log(hashids.encode(1, 2, 3)); // mdfphx
-```
-
-Default alphabet is `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890`.
-
-**Encode hex instead of numbers:**
-
-Useful if you want to encode [Mongo](https://www.mongodb.com/)'s ObjectIds. Note that *there is no limit* on how large of a hex number you can pass (it does not have to be Mongo's ObjectId).
-
-```javascript
-var hashids = new Hashids();
-
-var id = hashids.encodeHex('507f1f77bcf86cd799439011'); // y42LW46J9luq3Xq9XMly
-var hex = hashids.decodeHex(id); // 507f1f77bcf86cd799439011
-```
-
-Pitfalls
--------
-
-1. When decoding, output is always an array of numbers (even if you encode only one number):
-
-	```javascript
-	var hashids = new Hashids();
-
-	var id = hashids.encode(1);
-	console.log(hashids.decode(id)); // [1]
-	```
-
-2. Encoding negative numbers is not supported.
-3. If you pass bogus input to `encode()`, an empty string will be returned:
-
-	```javascript
-	var hashids = new Hashids();
-
-	var id = hashids.encode('123a');
-	console.log(id === ''); // true
-	```
-
-4. Do not use this library as a security tool and do not encode sensitive data. This is **not** an encryption library.
-
-Randomness
--------
-
-The primary purpose of Hashids is to obfuscate ids. It's not meant or tested to be used as a security or compression tool. Having said that, this algorithm does try to make these ids random and unpredictable:
-
-No repeating patterns showing there are 3 identical numbers in the id:
-
-```javascript
-var hashids = new Hashids();
-console.log(hashids.encode(5, 5, 5)); // A6t1tQ
-```
-
-Same with incremented numbers:
-
-```javascript
-var hashids = new Hashids();
-
-console.log(hashids.encode(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)); // wpfLh9iwsqt0uyCEFjHM
-
-console.log(hashids.encode(1)); // jR
-console.log(hashids.encode(2)); // k5
-console.log(hashids.encode(3)); // l5
-console.log(hashids.encode(4)); // mO
-console.log(hashids.encode(5)); // nR
-```
-
-Curses! #$%@
--------
-
-This code was written with the intent of placing created ids in visible places, like the URL. Therefore, the algorithm tries to avoid generating most common English curse words by generating ids that never have the following letters next to each other:
-
-	c, f, h, i, s, t, u
-
-License
--------
-
-MIT License. See the [LICENSE](LICENSE) file. You can use Hashids in open source projects and commercial products. Don't break the Internet. Kthxbye.
-
-[travis-url]: https://travis-ci.org/ivanakimov/hashids.js
-[travis-image]: https://travis-ci.org/ivanakimov/hashids.js.svg
-
-[coveralls-url]: https://coveralls.io/github/ivanakimov/hashids.js
-[coveralls-image]: https://coveralls.io/repos/github/ivanakimov/hashids.js/badge.svg
-
-[npm-downloads-image]: https://img.shields.io/npm/dm/hashids.svg?style=flat-square
-[npm-version-image]: https://img.shields.io/npm/v/hashids.svg
-[npm-url]: https://www.npmjs.com/package/hashids
-
-[license-url]: https://github.com/ivanakimov/hashids.js/blob/master/LICENSE
-[license-image]: https://img.shields.io/packagist/l/hashids/hashids.svg?style=flat
-
-[chat-url]: https://gitter.im/hashids/hashids?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
-[chat-image]: https://badges.gitter.im/Join%20Chat.svg

+ 0 - 17
node_modules/hashids/bower.json

@@ -1,17 +0,0 @@
-{
-  "name": "hashids",
-  "description": "Generate YouTube-like ids from numbers. Use Hashids when you do not want to expose your database ids to the user.",
-  "main": "dist/hashids.js",
-  "homepage": "https://github.com/ivanakimov/hashids.js",
-  "license": "MIT",
-  "authors": [
-    "Ivan Akimov <ivan@barreleye.com> (https://twitter.com/IvanAkimov)"
-  ],
-  "ignore": [
-    "**/.*",
-    "node_modules",
-    "bower_components",
-    "tests",
-    "package.json"
-  ]
-}

+ 0 - 318
node_modules/hashids/dist/hashids-esm.js

@@ -1,318 +0,0 @@
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
-
-var Hashids =
-/*#__PURE__*/
-function () {
-  function Hashids() {
-    var salt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
-    var minLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
-    var alphabet = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
-
-    _classCallCheck(this, Hashids);
-
-    var minAlphabetLength = 16;
-    var sepDiv = 3.5;
-    var guardDiv = 12;
-    var errorAlphabetLength = 'error: alphabet must contain at least X unique characters';
-    var errorAlphabetSpace = 'error: alphabet cannot contain spaces';
-    var uniqueAlphabet = '',
-        sepsLength,
-        diff;
-    /* funcs */
-
-    this.escapeRegExp = function (s) {
-      return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
-    };
-
-    this.parseInt = function (v, radix) {
-      return /^(-|\+)?([0-9]+|Infinity)$/.test(v) ? parseInt(v, radix) : NaN;
-    };
-    /* alphabet vars */
-
-
-    this.seps = 'cfhistuCFHISTU';
-    this.minLength = parseInt(minLength, 10) > 0 ? minLength : 0;
-    this.salt = typeof salt === 'string' ? salt : '';
-
-    if (typeof alphabet === 'string') {
-      this.alphabet = alphabet;
-    }
-
-    for (var i = 0; i !== this.alphabet.length; i++) {
-      if (uniqueAlphabet.indexOf(this.alphabet.charAt(i)) === -1) {
-        uniqueAlphabet += this.alphabet.charAt(i);
-      }
-    }
-
-    this.alphabet = uniqueAlphabet;
-
-    if (this.alphabet.length < minAlphabetLength) {
-      throw errorAlphabetLength.replace('X', minAlphabetLength);
-    }
-
-    if (this.alphabet.search(' ') !== -1) {
-      throw errorAlphabetSpace;
-    }
-    /*
-    	`this.seps` should contain only characters present in `this.alphabet`
-    	`this.alphabet` should not contains `this.seps`
-    */
-
-
-    for (var _i = 0; _i !== this.seps.length; _i++) {
-      var j = this.alphabet.indexOf(this.seps.charAt(_i));
-
-      if (j === -1) {
-        this.seps = this.seps.substr(0, _i) + ' ' + this.seps.substr(_i + 1);
-      } else {
-        this.alphabet = this.alphabet.substr(0, j) + ' ' + this.alphabet.substr(j + 1);
-      }
-    }
-
-    this.alphabet = this.alphabet.replace(/ /g, '');
-    this.seps = this.seps.replace(/ /g, '');
-    this.seps = this._shuffle(this.seps, this.salt);
-
-    if (!this.seps.length || this.alphabet.length / this.seps.length > sepDiv) {
-      sepsLength = Math.ceil(this.alphabet.length / sepDiv);
-
-      if (sepsLength > this.seps.length) {
-        diff = sepsLength - this.seps.length;
-        this.seps += this.alphabet.substr(0, diff);
-        this.alphabet = this.alphabet.substr(diff);
-      }
-    }
-
-    this.alphabet = this._shuffle(this.alphabet, this.salt);
-    var guardCount = Math.ceil(this.alphabet.length / guardDiv);
-
-    if (this.alphabet.length < 3) {
-      this.guards = this.seps.substr(0, guardCount);
-      this.seps = this.seps.substr(guardCount);
-    } else {
-      this.guards = this.alphabet.substr(0, guardCount);
-      this.alphabet = this.alphabet.substr(guardCount);
-    }
-  }
-
-  _createClass(Hashids, [{
-    key: "encode",
-    value: function encode() {
-      for (var _len = arguments.length, numbers = new Array(_len), _key = 0; _key < _len; _key++) {
-        numbers[_key] = arguments[_key];
-      }
-
-      var ret = '';
-
-      if (!numbers.length) {
-        return ret;
-      }
-
-      if (numbers[0] && numbers[0].constructor === Array) {
-        numbers = numbers[0];
-
-        if (!numbers.length) {
-          return ret;
-        }
-      }
-
-      for (var i = 0; i !== numbers.length; i++) {
-        numbers[i] = this.parseInt(numbers[i], 10);
-
-        if (numbers[i] >= 0) {
-          continue;
-        } else {
-          return ret;
-        }
-      }
-
-      return this._encode(numbers);
-    }
-  }, {
-    key: "decode",
-    value: function decode(id) {
-      var ret = [];
-
-      if (!id || !id.length || typeof id !== 'string') {
-        return ret;
-      }
-
-      return this._decode(id, this.alphabet);
-    }
-  }, {
-    key: "encodeHex",
-    value: function encodeHex(hex) {
-      hex = hex.toString();
-
-      if (!/^[0-9a-fA-F]+$/.test(hex)) {
-        return '';
-      }
-
-      var numbers = hex.match(/[\w\W]{1,12}/g);
-
-      for (var i = 0; i !== numbers.length; i++) {
-        numbers[i] = parseInt('1' + numbers[i], 16);
-      }
-
-      return this.encode.apply(this, numbers);
-    }
-  }, {
-    key: "decodeHex",
-    value: function decodeHex(id) {
-      var ret = [];
-      var numbers = this.decode(id);
-
-      for (var i = 0; i !== numbers.length; i++) {
-        ret += numbers[i].toString(16).substr(1);
-      }
-
-      return ret;
-    }
-  }, {
-    key: "_encode",
-    value: function _encode(numbers) {
-      var ret,
-          alphabet = this.alphabet,
-          numbersIdInt = 0;
-
-      for (var i = 0; i !== numbers.length; i++) {
-        numbersIdInt += numbers[i] % (i + 100);
-      }
-
-      ret = alphabet.charAt(numbersIdInt % alphabet.length);
-      var lottery = ret;
-
-      for (var _i2 = 0; _i2 !== numbers.length; _i2++) {
-        var number = numbers[_i2];
-        var buffer = lottery + this.salt + alphabet;
-        alphabet = this._shuffle(alphabet, buffer.substr(0, alphabet.length));
-
-        var last = this._toAlphabet(number, alphabet);
-
-        ret += last;
-
-        if (_i2 + 1 < numbers.length) {
-          number %= last.charCodeAt(0) + _i2;
-          var sepsIndex = number % this.seps.length;
-          ret += this.seps.charAt(sepsIndex);
-        }
-      }
-
-      if (ret.length < this.minLength) {
-        var guardIndex = (numbersIdInt + ret[0].charCodeAt(0)) % this.guards.length;
-        var guard = this.guards[guardIndex];
-        ret = guard + ret;
-
-        if (ret.length < this.minLength) {
-          guardIndex = (numbersIdInt + ret[2].charCodeAt(0)) % this.guards.length;
-          guard = this.guards[guardIndex];
-          ret += guard;
-        }
-      }
-
-      var halfLength = parseInt(alphabet.length / 2, 10);
-
-      while (ret.length < this.minLength) {
-        alphabet = this._shuffle(alphabet, alphabet);
-        ret = alphabet.substr(halfLength) + ret + alphabet.substr(0, halfLength);
-        var excess = ret.length - this.minLength;
-
-        if (excess > 0) {
-          ret = ret.substr(excess / 2, this.minLength);
-        }
-      }
-
-      return ret;
-    }
-  }, {
-    key: "_decode",
-    value: function _decode(id, alphabet) {
-      var ret = [],
-          i = 0,
-          r = new RegExp("[".concat(this.escapeRegExp(this.guards), "]"), 'g'),
-          idBreakdown = id.replace(r, ' '),
-          idArray = idBreakdown.split(' ');
-
-      if (idArray.length === 3 || idArray.length === 2) {
-        i = 1;
-      }
-
-      idBreakdown = idArray[i];
-
-      if (typeof idBreakdown[0] !== 'undefined') {
-        var lottery = idBreakdown[0];
-        idBreakdown = idBreakdown.substr(1);
-        r = new RegExp("[".concat(this.escapeRegExp(this.seps), "]"), 'g');
-        idBreakdown = idBreakdown.replace(r, ' ');
-        idArray = idBreakdown.split(' ');
-
-        for (var j = 0; j !== idArray.length; j++) {
-          var subId = idArray[j];
-          var buffer = lottery + this.salt + alphabet;
-          alphabet = this._shuffle(alphabet, buffer.substr(0, alphabet.length));
-          ret.push(this._fromAlphabet(subId, alphabet));
-        }
-
-        if (this.encode(ret) !== id) {
-          ret = [];
-        }
-      }
-
-      return ret;
-    }
-  }, {
-    key: "_shuffle",
-    value: function _shuffle(alphabet, salt) {
-      var integer;
-
-      if (!salt.length) {
-        return alphabet;
-      }
-
-      alphabet = alphabet.split("");
-
-      for (var i = alphabet.length - 1, v = 0, p = 0, j = 0; i > 0; i--, v++) {
-        v %= salt.length;
-        p += integer = salt.charCodeAt(v);
-        j = (integer + v + p) % i;
-        var tmp = alphabet[j];
-        alphabet[j] = alphabet[i];
-        alphabet[i] = tmp;
-      }
-
-      alphabet = alphabet.join("");
-      return alphabet;
-    }
-  }, {
-    key: "_toAlphabet",
-    value: function _toAlphabet(input, alphabet) {
-      var id = '';
-
-      do {
-        id = alphabet.charAt(input % alphabet.length) + id;
-        input = parseInt(input / alphabet.length, 10);
-      } while (input);
-
-      return id;
-    }
-  }, {
-    key: "_fromAlphabet",
-    value: function _fromAlphabet(input, alphabet) {
-      return input.split("").map(function (item) {
-        return alphabet.indexOf(item);
-      }).reduce(function (carry, item) {
-        return carry * alphabet.length + item;
-      }, 0);
-    }
-  }]);
-
-  return Hashids;
-}();
-
-export { Hashids as default };
-
-//# sourceMappingURL=hashids.mjs.map

+ 0 - 6
node_modules/hashids/dist/hashids.js

@@ -1,6 +0,0 @@
-"use strict";
-// this file here is for backwards compatibility with an earlier CommonJS version
-const Hashids = require("./index").default;
-Object.defineProperty(Hashids, "__esModule", {value: true});
-module.exports = Hashids;
-Hashids.default = module.exports;

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
node_modules/hashids/dist/hashids.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
node_modules/hashids/dist/hashids.min.js.map


+ 0 - 318
node_modules/hashids/dist/hashids.mjs

@@ -1,318 +0,0 @@
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
-
-var Hashids =
-/*#__PURE__*/
-function () {
-  function Hashids() {
-    var salt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
-    var minLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
-    var alphabet = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
-
-    _classCallCheck(this, Hashids);
-
-    var minAlphabetLength = 16;
-    var sepDiv = 3.5;
-    var guardDiv = 12;
-    var errorAlphabetLength = 'error: alphabet must contain at least X unique characters';
-    var errorAlphabetSpace = 'error: alphabet cannot contain spaces';
-    var uniqueAlphabet = '',
-        sepsLength,
-        diff;
-    /* funcs */
-
-    this.escapeRegExp = function (s) {
-      return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
-    };
-
-    this.parseInt = function (v, radix) {
-      return /^(-|\+)?([0-9]+|Infinity)$/.test(v) ? parseInt(v, radix) : NaN;
-    };
-    /* alphabet vars */
-
-
-    this.seps = 'cfhistuCFHISTU';
-    this.minLength = parseInt(minLength, 10) > 0 ? minLength : 0;
-    this.salt = typeof salt === 'string' ? salt : '';
-
-    if (typeof alphabet === 'string') {
-      this.alphabet = alphabet;
-    }
-
-    for (var i = 0; i !== this.alphabet.length; i++) {
-      if (uniqueAlphabet.indexOf(this.alphabet.charAt(i)) === -1) {
-        uniqueAlphabet += this.alphabet.charAt(i);
-      }
-    }
-
-    this.alphabet = uniqueAlphabet;
-
-    if (this.alphabet.length < minAlphabetLength) {
-      throw errorAlphabetLength.replace('X', minAlphabetLength);
-    }
-
-    if (this.alphabet.search(' ') !== -1) {
-      throw errorAlphabetSpace;
-    }
-    /*
-    	`this.seps` should contain only characters present in `this.alphabet`
-    	`this.alphabet` should not contains `this.seps`
-    */
-
-
-    for (var _i = 0; _i !== this.seps.length; _i++) {
-      var j = this.alphabet.indexOf(this.seps.charAt(_i));
-
-      if (j === -1) {
-        this.seps = this.seps.substr(0, _i) + ' ' + this.seps.substr(_i + 1);
-      } else {
-        this.alphabet = this.alphabet.substr(0, j) + ' ' + this.alphabet.substr(j + 1);
-      }
-    }
-
-    this.alphabet = this.alphabet.replace(/ /g, '');
-    this.seps = this.seps.replace(/ /g, '');
-    this.seps = this._shuffle(this.seps, this.salt);
-
-    if (!this.seps.length || this.alphabet.length / this.seps.length > sepDiv) {
-      sepsLength = Math.ceil(this.alphabet.length / sepDiv);
-
-      if (sepsLength > this.seps.length) {
-        diff = sepsLength - this.seps.length;
-        this.seps += this.alphabet.substr(0, diff);
-        this.alphabet = this.alphabet.substr(diff);
-      }
-    }
-
-    this.alphabet = this._shuffle(this.alphabet, this.salt);
-    var guardCount = Math.ceil(this.alphabet.length / guardDiv);
-
-    if (this.alphabet.length < 3) {
-      this.guards = this.seps.substr(0, guardCount);
-      this.seps = this.seps.substr(guardCount);
-    } else {
-      this.guards = this.alphabet.substr(0, guardCount);
-      this.alphabet = this.alphabet.substr(guardCount);
-    }
-  }
-
-  _createClass(Hashids, [{
-    key: "encode",
-    value: function encode() {
-      for (var _len = arguments.length, numbers = new Array(_len), _key = 0; _key < _len; _key++) {
-        numbers[_key] = arguments[_key];
-      }
-
-      var ret = '';
-
-      if (!numbers.length) {
-        return ret;
-      }
-
-      if (numbers[0] && numbers[0].constructor === Array) {
-        numbers = numbers[0];
-
-        if (!numbers.length) {
-          return ret;
-        }
-      }
-
-      for (var i = 0; i !== numbers.length; i++) {
-        numbers[i] = this.parseInt(numbers[i], 10);
-
-        if (numbers[i] >= 0) {
-          continue;
-        } else {
-          return ret;
-        }
-      }
-
-      return this._encode(numbers);
-    }
-  }, {
-    key: "decode",
-    value: function decode(id) {
-      var ret = [];
-
-      if (!id || !id.length || typeof id !== 'string') {
-        return ret;
-      }
-
-      return this._decode(id, this.alphabet);
-    }
-  }, {
-    key: "encodeHex",
-    value: function encodeHex(hex) {
-      hex = hex.toString();
-
-      if (!/^[0-9a-fA-F]+$/.test(hex)) {
-        return '';
-      }
-
-      var numbers = hex.match(/[\w\W]{1,12}/g);
-
-      for (var i = 0; i !== numbers.length; i++) {
-        numbers[i] = parseInt('1' + numbers[i], 16);
-      }
-
-      return this.encode.apply(this, numbers);
-    }
-  }, {
-    key: "decodeHex",
-    value: function decodeHex(id) {
-      var ret = [];
-      var numbers = this.decode(id);
-
-      for (var i = 0; i !== numbers.length; i++) {
-        ret += numbers[i].toString(16).substr(1);
-      }
-
-      return ret;
-    }
-  }, {
-    key: "_encode",
-    value: function _encode(numbers) {
-      var ret,
-          alphabet = this.alphabet,
-          numbersIdInt = 0;
-
-      for (var i = 0; i !== numbers.length; i++) {
-        numbersIdInt += numbers[i] % (i + 100);
-      }
-
-      ret = alphabet.charAt(numbersIdInt % alphabet.length);
-      var lottery = ret;
-
-      for (var _i2 = 0; _i2 !== numbers.length; _i2++) {
-        var number = numbers[_i2];
-        var buffer = lottery + this.salt + alphabet;
-        alphabet = this._shuffle(alphabet, buffer.substr(0, alphabet.length));
-
-        var last = this._toAlphabet(number, alphabet);
-
-        ret += last;
-
-        if (_i2 + 1 < numbers.length) {
-          number %= last.charCodeAt(0) + _i2;
-          var sepsIndex = number % this.seps.length;
-          ret += this.seps.charAt(sepsIndex);
-        }
-      }
-
-      if (ret.length < this.minLength) {
-        var guardIndex = (numbersIdInt + ret[0].charCodeAt(0)) % this.guards.length;
-        var guard = this.guards[guardIndex];
-        ret = guard + ret;
-
-        if (ret.length < this.minLength) {
-          guardIndex = (numbersIdInt + ret[2].charCodeAt(0)) % this.guards.length;
-          guard = this.guards[guardIndex];
-          ret += guard;
-        }
-      }
-
-      var halfLength = parseInt(alphabet.length / 2, 10);
-
-      while (ret.length < this.minLength) {
-        alphabet = this._shuffle(alphabet, alphabet);
-        ret = alphabet.substr(halfLength) + ret + alphabet.substr(0, halfLength);
-        var excess = ret.length - this.minLength;
-
-        if (excess > 0) {
-          ret = ret.substr(excess / 2, this.minLength);
-        }
-      }
-
-      return ret;
-    }
-  }, {
-    key: "_decode",
-    value: function _decode(id, alphabet) {
-      var ret = [],
-          i = 0,
-          r = new RegExp("[".concat(this.escapeRegExp(this.guards), "]"), 'g'),
-          idBreakdown = id.replace(r, ' '),
-          idArray = idBreakdown.split(' ');
-
-      if (idArray.length === 3 || idArray.length === 2) {
-        i = 1;
-      }
-
-      idBreakdown = idArray[i];
-
-      if (typeof idBreakdown[0] !== 'undefined') {
-        var lottery = idBreakdown[0];
-        idBreakdown = idBreakdown.substr(1);
-        r = new RegExp("[".concat(this.escapeRegExp(this.seps), "]"), 'g');
-        idBreakdown = idBreakdown.replace(r, ' ');
-        idArray = idBreakdown.split(' ');
-
-        for (var j = 0; j !== idArray.length; j++) {
-          var subId = idArray[j];
-          var buffer = lottery + this.salt + alphabet;
-          alphabet = this._shuffle(alphabet, buffer.substr(0, alphabet.length));
-          ret.push(this._fromAlphabet(subId, alphabet));
-        }
-
-        if (this.encode(ret) !== id) {
-          ret = [];
-        }
-      }
-
-      return ret;
-    }
-  }, {
-    key: "_shuffle",
-    value: function _shuffle(alphabet, salt) {
-      var integer;
-
-      if (!salt.length) {
-        return alphabet;
-      }
-
-      alphabet = alphabet.split("");
-
-      for (var i = alphabet.length - 1, v = 0, p = 0, j = 0; i > 0; i--, v++) {
-        v %= salt.length;
-        p += integer = salt.charCodeAt(v);
-        j = (integer + v + p) % i;
-        var tmp = alphabet[j];
-        alphabet[j] = alphabet[i];
-        alphabet[i] = tmp;
-      }
-
-      alphabet = alphabet.join("");
-      return alphabet;
-    }
-  }, {
-    key: "_toAlphabet",
-    value: function _toAlphabet(input, alphabet) {
-      var id = '';
-
-      do {
-        id = alphabet.charAt(input % alphabet.length) + id;
-        input = parseInt(input / alphabet.length, 10);
-      } while (input);
-
-      return id;
-    }
-  }, {
-    key: "_fromAlphabet",
-    value: function _fromAlphabet(input, alphabet) {
-      return input.split("").map(function (item) {
-        return alphabet.indexOf(item);
-      }).reduce(function (carry, item) {
-        return carry * alphabet.length + item;
-      }, 0);
-    }
-  }]);
-
-  return Hashids;
-}();
-
-export { Hashids as default };
-
-//# sourceMappingURL=hashids.mjs.map

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
node_modules/hashids/dist/hashids.mjs.map


+ 0 - 339
node_modules/hashids/dist/index.js

@@ -1,339 +0,0 @@
-(function (global, factory) {
-  if (typeof define === "function" && define.amd) {
-    define(["exports"], factory);
-  } else if (typeof exports !== "undefined") {
-    factory(exports);
-  } else {
-    var mod = {
-      exports: {}
-    };
-    factory(mod.exports);
-    global.Hashids = mod.exports;
-  }
-})(this, function (_exports) {
-  "use strict";
-
-  Object.defineProperty(_exports, "__esModule", {
-    value: true
-  });
-  _exports.default = void 0;
-
-  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-
-  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
-
-  var Hashids =
-  /*#__PURE__*/
-  function () {
-    function Hashids() {
-      var salt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
-      var minLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
-      var alphabet = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
-
-      _classCallCheck(this, Hashids);
-
-      var minAlphabetLength = 16;
-      var sepDiv = 3.5;
-      var guardDiv = 12;
-      var errorAlphabetLength = 'error: alphabet must contain at least X unique characters';
-      var errorAlphabetSpace = 'error: alphabet cannot contain spaces';
-      var uniqueAlphabet = '',
-          sepsLength,
-          diff;
-      /* funcs */
-
-      this.escapeRegExp = function (s) {
-        return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
-      };
-
-      this.parseInt = function (v, radix) {
-        return /^(-|\+)?([0-9]+|Infinity)$/.test(v) ? parseInt(v, radix) : NaN;
-      };
-      /* alphabet vars */
-
-
-      this.seps = 'cfhistuCFHISTU';
-      this.minLength = parseInt(minLength, 10) > 0 ? minLength : 0;
-      this.salt = typeof salt === 'string' ? salt : '';
-
-      if (typeof alphabet === 'string') {
-        this.alphabet = alphabet;
-      }
-
-      for (var i = 0; i !== this.alphabet.length; i++) {
-        if (uniqueAlphabet.indexOf(this.alphabet.charAt(i)) === -1) {
-          uniqueAlphabet += this.alphabet.charAt(i);
-        }
-      }
-
-      this.alphabet = uniqueAlphabet;
-
-      if (this.alphabet.length < minAlphabetLength) {
-        throw errorAlphabetLength.replace('X', minAlphabetLength);
-      }
-
-      if (this.alphabet.search(' ') !== -1) {
-        throw errorAlphabetSpace;
-      }
-      /*
-      	`this.seps` should contain only characters present in `this.alphabet`
-      	`this.alphabet` should not contains `this.seps`
-      */
-
-
-      for (var _i = 0; _i !== this.seps.length; _i++) {
-        var j = this.alphabet.indexOf(this.seps.charAt(_i));
-
-        if (j === -1) {
-          this.seps = this.seps.substr(0, _i) + ' ' + this.seps.substr(_i + 1);
-        } else {
-          this.alphabet = this.alphabet.substr(0, j) + ' ' + this.alphabet.substr(j + 1);
-        }
-      }
-
-      this.alphabet = this.alphabet.replace(/ /g, '');
-      this.seps = this.seps.replace(/ /g, '');
-      this.seps = this._shuffle(this.seps, this.salt);
-
-      if (!this.seps.length || this.alphabet.length / this.seps.length > sepDiv) {
-        sepsLength = Math.ceil(this.alphabet.length / sepDiv);
-
-        if (sepsLength > this.seps.length) {
-          diff = sepsLength - this.seps.length;
-          this.seps += this.alphabet.substr(0, diff);
-          this.alphabet = this.alphabet.substr(diff);
-        }
-      }
-
-      this.alphabet = this._shuffle(this.alphabet, this.salt);
-      var guardCount = Math.ceil(this.alphabet.length / guardDiv);
-
-      if (this.alphabet.length < 3) {
-        this.guards = this.seps.substr(0, guardCount);
-        this.seps = this.seps.substr(guardCount);
-      } else {
-        this.guards = this.alphabet.substr(0, guardCount);
-        this.alphabet = this.alphabet.substr(guardCount);
-      }
-    }
-
-    _createClass(Hashids, [{
-      key: "encode",
-      value: function encode() {
-        for (var _len = arguments.length, numbers = new Array(_len), _key = 0; _key < _len; _key++) {
-          numbers[_key] = arguments[_key];
-        }
-
-        var ret = '';
-
-        if (!numbers.length) {
-          return ret;
-        }
-
-        if (numbers[0] && numbers[0].constructor === Array) {
-          numbers = numbers[0];
-
-          if (!numbers.length) {
-            return ret;
-          }
-        }
-
-        for (var i = 0; i !== numbers.length; i++) {
-          numbers[i] = this.parseInt(numbers[i], 10);
-
-          if (numbers[i] >= 0) {
-            continue;
-          } else {
-            return ret;
-          }
-        }
-
-        return this._encode(numbers);
-      }
-    }, {
-      key: "decode",
-      value: function decode(id) {
-        var ret = [];
-
-        if (!id || !id.length || typeof id !== 'string') {
-          return ret;
-        }
-
-        return this._decode(id, this.alphabet);
-      }
-    }, {
-      key: "encodeHex",
-      value: function encodeHex(hex) {
-        hex = hex.toString();
-
-        if (!/^[0-9a-fA-F]+$/.test(hex)) {
-          return '';
-        }
-
-        var numbers = hex.match(/[\w\W]{1,12}/g);
-
-        for (var i = 0; i !== numbers.length; i++) {
-          numbers[i] = parseInt('1' + numbers[i], 16);
-        }
-
-        return this.encode.apply(this, numbers);
-      }
-    }, {
-      key: "decodeHex",
-      value: function decodeHex(id) {
-        var ret = [];
-        var numbers = this.decode(id);
-
-        for (var i = 0; i !== numbers.length; i++) {
-          ret += numbers[i].toString(16).substr(1);
-        }
-
-        return ret;
-      }
-    }, {
-      key: "_encode",
-      value: function _encode(numbers) {
-        var ret,
-            alphabet = this.alphabet,
-            numbersIdInt = 0;
-
-        for (var i = 0; i !== numbers.length; i++) {
-          numbersIdInt += numbers[i] % (i + 100);
-        }
-
-        ret = alphabet.charAt(numbersIdInt % alphabet.length);
-        var lottery = ret;
-
-        for (var _i2 = 0; _i2 !== numbers.length; _i2++) {
-          var number = numbers[_i2];
-          var buffer = lottery + this.salt + alphabet;
-          alphabet = this._shuffle(alphabet, buffer.substr(0, alphabet.length));
-
-          var last = this._toAlphabet(number, alphabet);
-
-          ret += last;
-
-          if (_i2 + 1 < numbers.length) {
-            number %= last.charCodeAt(0) + _i2;
-            var sepsIndex = number % this.seps.length;
-            ret += this.seps.charAt(sepsIndex);
-          }
-        }
-
-        if (ret.length < this.minLength) {
-          var guardIndex = (numbersIdInt + ret[0].charCodeAt(0)) % this.guards.length;
-          var guard = this.guards[guardIndex];
-          ret = guard + ret;
-
-          if (ret.length < this.minLength) {
-            guardIndex = (numbersIdInt + ret[2].charCodeAt(0)) % this.guards.length;
-            guard = this.guards[guardIndex];
-            ret += guard;
-          }
-        }
-
-        var halfLength = parseInt(alphabet.length / 2, 10);
-
-        while (ret.length < this.minLength) {
-          alphabet = this._shuffle(alphabet, alphabet);
-          ret = alphabet.substr(halfLength) + ret + alphabet.substr(0, halfLength);
-          var excess = ret.length - this.minLength;
-
-          if (excess > 0) {
-            ret = ret.substr(excess / 2, this.minLength);
-          }
-        }
-
-        return ret;
-      }
-    }, {
-      key: "_decode",
-      value: function _decode(id, alphabet) {
-        var ret = [],
-            i = 0,
-            r = new RegExp("[".concat(this.escapeRegExp(this.guards), "]"), 'g'),
-            idBreakdown = id.replace(r, ' '),
-            idArray = idBreakdown.split(' ');
-
-        if (idArray.length === 3 || idArray.length === 2) {
-          i = 1;
-        }
-
-        idBreakdown = idArray[i];
-
-        if (typeof idBreakdown[0] !== 'undefined') {
-          var lottery = idBreakdown[0];
-          idBreakdown = idBreakdown.substr(1);
-          r = new RegExp("[".concat(this.escapeRegExp(this.seps), "]"), 'g');
-          idBreakdown = idBreakdown.replace(r, ' ');
-          idArray = idBreakdown.split(' ');
-
-          for (var j = 0; j !== idArray.length; j++) {
-            var subId = idArray[j];
-            var buffer = lottery + this.salt + alphabet;
-            alphabet = this._shuffle(alphabet, buffer.substr(0, alphabet.length));
-            ret.push(this._fromAlphabet(subId, alphabet));
-          }
-
-          if (this.encode(ret) !== id) {
-            ret = [];
-          }
-        }
-
-        return ret;
-      }
-    }, {
-      key: "_shuffle",
-      value: function _shuffle(alphabet, salt) {
-        var integer;
-
-        if (!salt.length) {
-          return alphabet;
-        }
-
-        alphabet = alphabet.split("");
-
-        for (var i = alphabet.length - 1, v = 0, p = 0, j = 0; i > 0; i--, v++) {
-          v %= salt.length;
-          p += integer = salt.charCodeAt(v);
-          j = (integer + v + p) % i;
-          var tmp = alphabet[j];
-          alphabet[j] = alphabet[i];
-          alphabet[i] = tmp;
-        }
-
-        alphabet = alphabet.join("");
-        return alphabet;
-      }
-    }, {
-      key: "_toAlphabet",
-      value: function _toAlphabet(input, alphabet) {
-        var id = '';
-
-        do {
-          id = alphabet.charAt(input % alphabet.length) + id;
-          input = parseInt(input / alphabet.length, 10);
-        } while (input);
-
-        return id;
-      }
-    }, {
-      key: "_fromAlphabet",
-      value: function _fromAlphabet(input, alphabet) {
-        return input.split("").map(function (item) {
-          return alphabet.indexOf(item);
-        }).reduce(function (carry, item) {
-          return carry * alphabet.length + item;
-        }, 0);
-      }
-    }]);
-
-    return Hashids;
-  }();
-
-  _exports.default = Hashids;
-});
-
-//# sourceMappingURL=index.js.map

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
node_modules/hashids/dist/index.js.map


+ 0 - 324
node_modules/hashids/lib/hashids.js

@@ -1,324 +0,0 @@
-
-export default class Hashids {
-
-	constructor(salt = '', minLength = 0, alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890') {
-
-		const minAlphabetLength = 16;
-		const sepDiv = 3.5;
-		const guardDiv = 12;
-
-		const errorAlphabetLength = 'error: alphabet must contain at least X unique characters';
-		const errorAlphabetSpace = 'error: alphabet cannot contain spaces';
-
-		let uniqueAlphabet = '', sepsLength, diff;
-
-		/* funcs */
-
-		this.escapeRegExp = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
-		this.parseInt = (v, radix) => (/^(-|\+)?([0-9]+|Infinity)$/.test(v)) ? parseInt(v, radix) : NaN;
-
-		/* alphabet vars */
-
-		this.seps = 'cfhistuCFHISTU';
-		this.minLength = parseInt(minLength, 10) > 0 ? minLength : 0;
-		this.salt = (typeof salt === 'string') ? salt : '';
-
-		if (typeof alphabet === 'string') {
-			this.alphabet = alphabet;
-		}
-
-		for (let i = 0; i !== this.alphabet.length; i++) {
-			if (uniqueAlphabet.indexOf(this.alphabet.charAt(i)) === -1) {
-				uniqueAlphabet += this.alphabet.charAt(i);
-			}
-		}
-
-		this.alphabet = uniqueAlphabet;
-
-		if (this.alphabet.length < minAlphabetLength) {
-			throw errorAlphabetLength.replace('X', minAlphabetLength);
-		}
-
-		if (this.alphabet.search(' ') !== -1) {
-			throw errorAlphabetSpace;
-		}
-
-		/*
-			`this.seps` should contain only characters present in `this.alphabet`
-			`this.alphabet` should not contains `this.seps`
-		*/
-
-		for (let i = 0; i !== this.seps.length; i++) {
-
-			const j = this.alphabet.indexOf(this.seps.charAt(i));
-			if (j === -1) {
-				this.seps = this.seps.substr(0, i) + ' ' + this.seps.substr(i + 1);
-			} else {
-				this.alphabet = this.alphabet.substr(0, j) + ' ' + this.alphabet.substr(j + 1);
-			}
-
-		}
-
-		this.alphabet = this.alphabet.replace(/ /g, '');
-
-		this.seps = this.seps.replace(/ /g, '');
-		this.seps = this._shuffle(this.seps, this.salt);
-
-		if (!this.seps.length || (this.alphabet.length / this.seps.length) > sepDiv) {
-
-			sepsLength = Math.ceil(this.alphabet.length / sepDiv);
-
-			if (sepsLength > this.seps.length) {
-
-				diff = sepsLength - this.seps.length;
-				this.seps += this.alphabet.substr(0, diff);
-				this.alphabet = this.alphabet.substr(diff);
-
-			}
-
-		}
-
-		this.alphabet = this._shuffle(this.alphabet, this.salt);
-		const guardCount = Math.ceil(this.alphabet.length / guardDiv);
-
-		if (this.alphabet.length < 3) {
-			this.guards = this.seps.substr(0, guardCount);
-			this.seps = this.seps.substr(guardCount);
-		} else {
-			this.guards = this.alphabet.substr(0, guardCount);
-			this.alphabet = this.alphabet.substr(guardCount);
-		}
-
-	}
-
-	encode(...numbers) {
-
-		const ret = '';
-
-		if (!numbers.length) {
-			return ret;
-		}
-
-		if (numbers[0] && numbers[0].constructor === Array) {
-			numbers = numbers[0];
-			if (!numbers.length) {
-				return ret;
-			}
-		}
-
-		for (let i = 0; i !== numbers.length; i++) {
-			numbers[i] = this.parseInt(numbers[i], 10);
-			if (numbers[i] >= 0) {
-				continue;
-			} else {
-				return ret;
-			}
-		}
-
-		return this._encode(numbers);
-
-	}
-
-	decode(id) {
-
-		const ret = [];
-
-		if (!id || !id.length || typeof id !== 'string') {
-			return ret;
-		}
-
-		return this._decode(id, this.alphabet);
-
-	}
-
-	encodeHex(hex) {
-
-		hex = hex.toString();
-		if (!/^[0-9a-fA-F]+$/.test(hex)) {
-			return '';
-		}
-
-		const numbers = hex.match(/[\w\W]{1,12}/g);
-
-		for (let i = 0; i !== numbers.length; i++) {
-			numbers[i] = parseInt('1' + numbers[i], 16);
-		}
-
-		return this.encode.apply(this, numbers);
-
-	}
-
-	decodeHex(id) {
-
-		let ret = [];
-
-		const numbers = this.decode(id);
-
-		for (let i = 0; i !== numbers.length; i++) {
-			ret += (numbers[i]).toString(16).substr(1);
-		}
-
-		return ret;
-
-	}
-
-	_encode(numbers) {
-
-		let ret,
-			alphabet = this.alphabet,
-			numbersIdInt = 0;
-
-		for (let i = 0; i !== numbers.length; i++) {
-			numbersIdInt += (numbers[i] % (i + 100));
-		}
-
-		ret = alphabet.charAt(numbersIdInt % alphabet.length);
-		const lottery = ret;
-
-		for (let i = 0; i !== numbers.length; i++) {
-
-			let number = numbers[i];
-			const buffer = lottery + this.salt + alphabet;
-
-			alphabet = this._shuffle(alphabet, buffer.substr(0, alphabet.length));
-			const last = this._toAlphabet(number, alphabet);
-
-			ret += last;
-
-			if (i + 1 < numbers.length) {
-				number %= (last.charCodeAt(0) + i);
-				const sepsIndex = number % this.seps.length;
-				ret += this.seps.charAt(sepsIndex);
-			}
-
-		}
-
-		if (ret.length < this.minLength) {
-
-			let guardIndex = (numbersIdInt + ret[0].charCodeAt(0)) % this.guards.length;
-			let guard = this.guards[guardIndex];
-
-			ret = guard + ret;
-
-			if (ret.length < this.minLength) {
-
-				guardIndex = (numbersIdInt + ret[2].charCodeAt(0)) % this.guards.length;
-				guard = this.guards[guardIndex];
-
-				ret += guard;
-
-			}
-
-		}
-
-		const halfLength = parseInt(alphabet.length / 2, 10);
-		while (ret.length < this.minLength) {
-
-			alphabet = this._shuffle(alphabet, alphabet);
-			ret = alphabet.substr(halfLength) + ret + alphabet.substr(0, halfLength);
-
-			const excess = ret.length - this.minLength;
-			if (excess > 0) {
-				ret = ret.substr(excess / 2, this.minLength);
-			}
-
-		}
-
-		return ret;
-
-	}
-
-	_decode(id, alphabet) {
-
-		let ret = [], i = 0,
-			r = new RegExp(`[${this.escapeRegExp(this.guards)}]`, 'g'),
-			idBreakdown = id.replace(r, ' '),
-			idArray = idBreakdown.split(' ');
-
-		if (idArray.length === 3 || idArray.length === 2) {
-			i = 1;
-		}
-
-		idBreakdown = idArray[i];
-		if (typeof idBreakdown[0] !== 'undefined') {
-
-			const lottery = idBreakdown[0];
-			idBreakdown = idBreakdown.substr(1);
-
-			r = new RegExp(`[${this.escapeRegExp(this.seps)}]`, 'g');
-			idBreakdown = idBreakdown.replace(r, ' ');
-			idArray = idBreakdown.split(' ');
-
-			for (let j = 0; j !== idArray.length; j++) {
-
-				const subId = idArray[j];
-				const buffer = lottery + this.salt + alphabet;
-
-				alphabet = this._shuffle(alphabet, buffer.substr(0, alphabet.length));
-				ret.push(this._fromAlphabet(subId, alphabet));
-
-			}
-
-			if (this.encode(ret) !== id) {
-				ret = [];
-			}
-
-		}
-
-		return ret;
-
-	}
-
-	_shuffle(alphabet, salt) {
-
-		let integer;
-
-		if (!salt.length) {
-			return alphabet;
-		}
-
-		alphabet = alphabet.split("");
-
-		for (let i = alphabet.length - 1, v = 0, p = 0, j = 0; i > 0; i--, v++) {
-
-			v %= salt.length;
-			p += integer = salt.charCodeAt(v);
-			j = (integer + v + p) % i;
-
-			const tmp = alphabet[j];
-			alphabet[j] = alphabet[i];
-			alphabet[i] = tmp;
-
-		}
-
-		alphabet = alphabet.join("");
-
-		return alphabet;
-
-	}
-
-	_toAlphabet(input, alphabet) {
-
-		let id = '';
-
-		do {
-			id = alphabet.charAt(input % alphabet.length) + id;
-			input = parseInt(input / alphabet.length, 10);
-		} while (input);
-
-		return id;
-
-	}
-
-	_fromAlphabet(input, alphabet) {
-
-		return input.split("").map(
-			(item) => alphabet.indexOf(item)
-		).reduce(
-			(carry, item) => carry * alphabet.length + item,
-			0
-		);
-
-	}
-
-}

+ 0 - 97
node_modules/hashids/package.json

@@ -1,97 +0,0 @@
-{
-  "_from": "hashids",
-  "_id": "hashids@1.2.2",
-  "_inBundle": false,
-  "_integrity": "sha512-dEHCG2LraR6PNvSGxosZHIRgxF5sNLOIBFEHbj8lfP9WWmu/PWPMzsip1drdVSOFi51N2pU7gZavrgn7sbGFuw==",
-  "_location": "/hashids",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "tag",
-    "registry": true,
-    "raw": "hashids",
-    "name": "hashids",
-    "escapedName": "hashids",
-    "rawSpec": "",
-    "saveSpec": null,
-    "fetchSpec": "latest"
-  },
-  "_requiredBy": [
-    "#USER",
-    "/"
-  ],
-  "_resolved": "https://registry.npmjs.org/hashids/-/hashids-1.2.2.tgz",
-  "_shasum": "28635c7f2f7360ba463686078eee837479e8eafb",
-  "_spec": "hashids",
-  "_where": "/home/zorro/Documents/schild.report/reports/mein-bk",
-  "author": {
-    "name": "Ivan Akimov",
-    "email": "ivan@barreleye.com",
-    "url": "https://twitter.com/IvanAkimov"
-  },
-  "browser": "dist/hashids.min",
-  "browserslist": [
-    "last 2 version",
-    "> 0.5%",
-    "maintained node versions",
-    "not dead"
-  ],
-  "bugs": {
-    "url": "https://github.com/ivanakimov/hashids.js/issues"
-  },
-  "bundleDependencies": false,
-  "dependencies": {},
-  "deprecated": false,
-  "description": "Generate YouTube-like ids from numbers. Use Hashids when you do not want to expose your database ids to the user.",
-  "devDependencies": {
-    "@babel/cli": "^7.0.0",
-    "@babel/core": "^7.0.0",
-    "@babel/plugin-syntax-dynamic-import": "7.0.0",
-    "@babel/preset-env": "^7.0.0",
-    "@babel/register": "^7.0.0",
-    "babel-eslint": "9.0.0",
-    "chai": "^4.1.2",
-    "coveralls": "^3.0.2",
-    "eslint": "^5.4.0",
-    "husky": "^0.14.3",
-    "mocha": "^5.2.0",
-    "nyc": "^13.0.1",
-    "uglify-js": "^3.4.8"
-  },
-  "homepage": "http://hashids.org/javascript",
-  "keywords": [
-    "hashids",
-    "hashid",
-    "hash",
-    "ids",
-    "youtube",
-    "bitly",
-    "obfuscate",
-    "encode",
-    "decode",
-    "encrypt",
-    "decrypt"
-  ],
-  "license": "MIT",
-  "main": "dist/hashids",
-  "module": "dist/hashids-esm",
-  "name": "hashids",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/ivanakimov/hashids.js.git"
-  },
-  "scripts": {
-    "all": "npm run lint && npm run coverage && npm run build && npm run clean",
-    "build": "npm run test && npm run build:node && npm run build:modules && npm run rename:global && npm run minify",
-    "build:modules": "BABEL_MODULES=1 babel lib/hashids.js --source-maps -o dist/hashids.mjs && cp dist/hashids.mjs dist/hashids-esm.js",
-    "build:node": "babel lib/hashids.js --source-maps -o dist/index.js",
-    "clean": "rm -rf coverage .nyc_output npm-debug.log",
-    "coverage": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
-    "lint": "eslint lib tests",
-    "minify": "cd dist && uglifyjs index.js -o hashids.min.js --source-map \"url=hashids.min.js.map\" --compress --mangle",
-    "precommit": "npm run lint && npm run test",
-    "rename:global": "sed -i '' 's/global.hashids/global.Hashids/g' dist/index.js",
-    "test": "mocha tests --require @babel/register",
-    "test-modules": "node --experimental-modules node_modules/mocha/bin/_mocha tests-mjs"
-  },
-  "version": "1.2.2"
-}

+ 0 - 8
node_modules/hashids/tests-mjs/importing.js

@@ -1,8 +0,0 @@
-// this will only parse and run if you're using node >= 10 with the --experimental-modules flag
-// alternatively, if you use something like webpack
-// that's why it is in a separate file
-describe('importing', () => {
-	it('loads via .mjs', () => {
-		return import('./importing.mjs');
-	});
-});

+ 0 - 8
node_modules/hashids/tests-mjs/importing.mjs

@@ -1,8 +0,0 @@
-import Hashids from '../';
-import chai from 'chai';
-
-const {assert} = chai;
-
-assert.isFunction(Hashids);
-const instance = new Hashids('Not Real', 5, 'ABCDEFGHJKMNPQRTWXY234689');
-assert.instanceOf(instance, Hashids);

+ 0 - 91
node_modules/hashids/tests/bad-input.js

@@ -1,91 +0,0 @@
-
-import Hashids from '../lib/hashids';
-import { assert } from 'chai';
-
-const hashids = new Hashids();
-
-describe('bad input', () => {
-
-	it(`should throw an error when small alphabet`, () => {
-		assert.throws(() => {
-			const hashidsIgnored = new Hashids('', 0, '1234567890');
-		});
-	});
-
-	it(`should throw an error when alphabet has spaces`, () => {
-		assert.throws(() => {
-			const hashidsIgnored = new Hashids('', 0, 'a cdefghijklmnopqrstuvwxyz');
-		});
-	});
-
-	it(`should return an empty string when encoding nothing`, () => {
-		const id = hashids.encode();
-		assert.equal(id, '');
-	});
-
-	it(`should return an empty string when encoding an empty array`, () => {
-		const id = hashids.encode([]);
-		assert.equal(id, '');
-	});
-
-	it(`should return an empty string when encoding a negative number`, () => {
-		const id = hashids.encode(-1);
-		assert.equal(id, '');
-	});
-
-	it(`should return an empty string when encoding a string with non-numeric characters`, () => {
-		assert.equal(hashids.encode('6B'), '');
-		assert.equal(hashids.encode('123a'), '');
-	});
-
-	it(`should return an empty string when encoding infinity`, () => {
-		const id = hashids.encode(Infinity);
-		assert.equal(id, '');
-	});
-
-	it(`should return an empty string when encoding a null`, () => {
-		const id = hashids.encode(null);
-		assert.equal(id, '');
-	});
-
-	it(`should return an empty string when encoding a NaN`, () => {
-		const id = hashids.encode(NaN);
-		assert.equal(id, '');
-	});
-
-	it(`should return an empty string when encoding an undefined`, () => {
-		const id = hashids.encode(undefined);
-		assert.equal(id, '');
-	});
-
-	it(`should return an empty string when encoding an array with non-numeric input`, () => {
-		const id = hashids.encode(['z']);
-		assert.equal(id, '');
-	});
-
-	it(`should return an empty array when decoding nothing`, () => {
-		const numbers = hashids.decode();
-		assert.deepEqual(numbers, []);
-	});
-
-	it(`should return an empty string when encoding non-numeric input`, () => {
-		const id = hashids.encode('z');
-		assert.equal(id, '');
-	});
-
-	it(`should return an empty array when decoding invalid id`, () => {
-		const numbers = hashids.decode('f');
-		assert.deepEqual(numbers, []);
-	});
-
-	it(`should return an empty string when encoding non-hex input`, () => {
-		const id = hashids.encodeHex('z');
-		assert.equal(id, '');
-	});
-
-	it(`should return an empty array when hex-decoding invalid id`, () => {
-		const numbers = hashids.decodeHex('f');
-		assert.deepEqual(numbers, []);
-	});
-
-});

+ 0 - 43
node_modules/hashids/tests/custom-alphabet.js

@@ -1,43 +0,0 @@
-
-import Hashids from '../lib/hashids';
-import { assert } from 'chai';
-
-describe('custom alphabet', () => {
-
-	const testAlphabet = (alphabet) => {
-
-		const hashids = new Hashids('', 0, alphabet);
-		const numbers = [1, 2, 3];
-
-		const id = hashids.encode(numbers);
-		const decodedNumbers = hashids.decode(id);
-
-		assert.deepEqual(decodedNumbers, numbers);
-
-	};
-
-	it(`should work with the worst alphabet`, () => {
-		testAlphabet('cCsSfFhHuUiItT01');
-	});
-
-	it(`should work with half the alphabet being separators`, () => {
-		testAlphabet('abdegjklCFHISTUc');
-	});
-
-	it(`should work with exactly 2 separators`, () => {
-		testAlphabet('abdegjklmnopqrSF');
-	});
-
-	it(`should work with no separators`, () => {
-		testAlphabet('abdegjklmnopqrvwxyzABDEGJKLMNOPQRVWXYZ1234567890');
-	});
-
-	it(`should work with super long alphabet`, () => {
-		testAlphabet('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890`~!@#$%^&*()-_=+\\|\'";:/?.>,<{[}]');
-	});
-
-	it(`should work with a weird alphabet`, () => {
-		testAlphabet('`~!@#$%^&*()-_=+\\|\'";:/?.>,<{[}]');
-	});
-
-});

+ 0 - 44
node_modules/hashids/tests/custom-params-hex.js

@@ -1,44 +0,0 @@
-
-import Hashids from '../lib/hashids';
-import { assert } from 'chai';
-
-const minLength = 30;
-const hashids = new Hashids('this is my salt', minLength, 'xzal86grmb4jhysfoqp3we7291kuct5iv0nd');
-
-const map = {
-	'0dbq3jwa8p4b3gk6gb8bv21goerm96': 'deadbeef',
-	'190obdnk4j02pajjdande7aqj628mr': 'abcdef123456',
-	'a1nvl5d9m3yo8pj1fqag8p9pqw4dyl': 'ABCDDD6666DDEEEEEEEEE',
-	'1nvlml93k3066oas3l9lr1wn1k67dy': '507f1f77bcf86cd799439011',
-	'mgyband33ye3c6jj16yq1jayh6krqjbo': 'f00000fddddddeeeee4444444ababab',
-	'9mnwgllqg1q2tdo63yya35a9ukgl6bbn6qn8': 'abcdef123456abcdef123456abcdef123456',
-	'edjrkn9m6o69s0ewnq5lqanqsmk6loayorlohwd963r53e63xmml29': 'f000000000000000000000000000000000000000000000000000f',
-	'grekpy53r2pjxwyjkl9aw0k3t5la1b8d5r1ex9bgeqmy93eata0eq0': 'fffffffffffffffffffffffffffffffffffffffffffffffffffff'
-};
-
-describe('encodeHex/decodeHex using default params', () => {
-
-	for (const id in map) {
-
-		const hex = map[id];
-
-		it(`should encode '0x${hex.toUpperCase()}' to '${id}'`, () => {
-			assert.equal(id, hashids.encodeHex(hex));
-		});
-
-		it(`should encode '0x${hex.toUpperCase()}' to '${id}' and decode back correctly`, () => {
-
-			const encodedId = hashids.encodeHex(hex);
-			const decodedHex = hashids.decodeHex(encodedId);
-
-			assert.deepEqual(hex.toLowerCase(), decodedHex);
-
-		});
-
-		it(`id length should be at least ${minLength}`, () => {
-			assert.isAtLeast(hashids.encodeHex(hex).length, minLength);
-		});
-
-	}
-
-});

+ 0 - 54
node_modules/hashids/tests/custom-params.js

@@ -1,54 +0,0 @@
-
-import Hashids from '../lib/hashids';
-import { assert } from 'chai';
-
-const minLength = 30;
-const hashids = new Hashids('this is my salt', minLength, 'xzal86grmb4jhysfoqp3we7291kuct5iv0nd');
-
-const map = {
-	'nej1m3d5a6yn875e7gr9kbwpqol02q': [0],
-	'dw1nqdp92yrajvl9v6k3gl5mb0o8ea': [1],
-	'onqr0bk58p642wldq14djmw21ygl39': [928728],
-	'18apy3wlqkjvd5h1id7mn5ore2d06b': [1, 2, 3],
-	'o60edky1ng3vl9hbfavwr5pa2q8mb9': [1, 0, 0],
-	'o60edky1ng3vlqfbfp4wr5pa2q8mb9': [0, 0, 1],
-	'qek2a08gpl575efrfd7yomj9dwbr63': [0, 0, 0],
-	'm3d5a6yn875rae8y81a94gr9kbwpqo': [1000000000000],
-	'1q3y98ln48w96kpo0wgk314w5mak2d': [9007199254740991],
-	'op7qrcdc3cgc2c0cbcrcoc5clce4d6': [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
-	'5430bd2jo0lxyfkfjfyojej5adqdy4': [10000000000, 0, 0, 0, 999999999999999],
-	'aa5kow86ano1pt3e1aqm239awkt9pk380w9l3q6': [9007199254740991, 9007199254740991, 9007199254740991],
-	'mmmykr5nuaabgwnohmml6dakt00jmo3ainnpy2mk': [1000000001, 1000000002, 1000000003, 1000000004, 1000000005],
-	'w1hwinuwt1cbs6xwzafmhdinuotpcosrxaz0fahl': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
-};
-
-describe('encode/decode using custom params', () => {
-
-	for (const id in map) {
-
-		const numbers = map[id];
-
-		it(`should encode [${numbers}] to '${id}' (passing array of numbers)`, () => {
-			assert.equal(id, hashids.encode(numbers));
-		});
-
-		it(`should encode [${numbers}] to '${id}' (passing numbers)`, () => {
-			assert.equal(id, hashids.encode.apply(hashids, numbers));
-		});
-
-		it(`should encode [${numbers}] to '${id}' and decode back correctly`, () => {
-
-			const encodedId = hashids.encode(numbers);
-			const decodedNumbers = hashids.decode(encodedId);
-
-			assert.deepEqual(numbers, decodedNumbers);
-
-		});
-
-		it(`id length should be at least ${minLength}`, () => {
-			assert.isAtLeast(hashids.encode(numbers).length, minLength);
-		});
-
-	}
-
-});

+ 0 - 39
node_modules/hashids/tests/custom-salt.js

@@ -1,39 +0,0 @@
-
-import Hashids from '../lib/hashids';
-import { assert } from 'chai';
-
-describe('custom salt', () => {
-
-	const testSalt = (salt) => {
-
-		const hashids = new Hashids(salt);
-		const numbers = [1, 2, 3];
-
-		const id = hashids.encode(numbers);
-		const decodedNumbers = hashids.decode(id);
-
-		assert.deepEqual(decodedNumbers, numbers);
-
-	};
-
-	it(`should work with ''`, () => {
-		testSalt('');
-	});
-
-	it(`should work with '   '`, () => {
-		testSalt('   ');
-	});
-
-	it(`should work with 'this is my salt'`, () => {
-		testSalt('this is my salt');
-	});
-
-	it(`should work with a really long salt`, () => {
-		testSalt('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890`~!@#$%^&*()-_=+\\|\'";:/?.>,<{[}]');
-	});
-
-	it(`should work with a weird salt`, () => {
-		testSalt('`~!@#$%^&*()-_=+\\|\'";:/?.>,<{[}]');
-	});
-
-});

+ 0 - 39
node_modules/hashids/tests/default-params-hex.js

@@ -1,39 +0,0 @@
-
-import Hashids from '../lib/hashids';
-import { assert } from 'chai';
-
-const hashids = new Hashids();
-
-const map = {
-	'wpVL4j9g': 'deadbeef',
-	'kmP69lB3xv': 'abcdef123456',
-	'47JWg0kv4VU0G2KBO2': 'ABCDDD6666DDEEEEEEEEE',
-	'y42LW46J9luq3Xq9XMly': '507f1f77bcf86cd799439011',
-	'm1rO8xBQNquXmLvmO65BUO9KQmj': 'f00000fddddddeeeee4444444ababab',
-	'wBlnMA23NLIQDgw7XxErc2mlNyAjpw': 'abcdef123456abcdef123456abcdef123456',
-	'VwLAoD9BqlT7xn4ZnBXJFmGZ51ZqrBhqrymEyvYLIP199': 'f000000000000000000000000000000000000000000000000000f',
-	'nBrz1rYyV0C0XKNXxB54fWN0yNvVjlip7127Jo3ri0Pqw': 'fffffffffffffffffffffffffffffffffffffffffffffffffffff'
-};
-
-describe('encodeHex/decodeHex using default params', () => {
-
-	for (const id in map) {
-
-		const hex = map[id];
-
-		it(`should encode '0x${hex.toUpperCase()}' to '${id}'`, () => {
-			assert.equal(id, hashids.encodeHex(hex));
-		});
-
-		it(`should encode '0x${hex.toUpperCase()}' to '${id}' and decode back correctly`, () => {
-
-			const encodedId = hashids.encodeHex(hex);
-			const decodedHex = hashids.decodeHex(encodedId);
-
-			assert.deepEqual(hex.toLowerCase(), decodedHex);
-
-		});
-
-	}
-
-});

+ 0 - 49
node_modules/hashids/tests/default-params.js

@@ -1,49 +0,0 @@
-
-import Hashids from '../lib/hashids';
-import { assert } from 'chai';
-
-const hashids = new Hashids();
-
-const map = {
-	'gY': [0],
-	'jR': [1],
-	'R8ZN0': [928728],
-	'o2fXhV': [1, 2, 3],
-	'jRfMcP': [1, 0, 0],
-	'jQcMcW': [0, 0, 1],
-	'gYcxcr': [0, 0, 0],
-	'gLpmopgO6': [1000000000000],
-	'lEW77X7g527': [9007199254740991],
-	'BrtltWt2tyt1tvt7tJt2t1tD': [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
-	'G6XOnGQgIpcVcXcqZ4B8Q8B9y': [10000000000, 0, 0, 0, 999999999999999],
-	'5KoLLVL49RLhYkppOplM6piwWNNANny8N': [9007199254740991, 9007199254740991, 9007199254740991],
-	'BPg3Qx5f8VrvQkS16wpmwIgj9Q4Jsr93gqx': [1000000001, 1000000002, 1000000003, 1000000004, 1000000005],
-	'1wfphpilsMtNumCRFRHXIDSqT2UPcWf1hZi3s7tN': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
-};
-
-describe('encode/decode using default params', () => {
-
-	for (const id in map) {
-
-		const numbers = map[id];
-
-		it(`should encode [${numbers}] to '${id}' (passing array of numbers)`, () => {
-			assert.equal(id, hashids.encode(numbers));
-		});
-
-		it(`should encode [${numbers}] to '${id}' (passing numbers)`, () => {
-			assert.equal(id, hashids.encode.apply(hashids, numbers));
-		});
-
-		it(`should encode [${numbers}] to '${id}' and decode back correctly`, () => {
-
-			const encodedId = hashids.encode(numbers);
-			const decodedNumbers = hashids.decode(encodedId);
-
-			assert.deepEqual(numbers, decodedNumbers);
-
-		});
-
-	}
-
-});

+ 0 - 36
node_modules/hashids/tests/encode-types.js

@@ -1,36 +0,0 @@
-
-import Hashids from '../lib/hashids';
-import { assert } from 'chai';
-
-describe('encode types', () => {
-
-	const testParams = (...numbers) => {
-
-		const hashids = new Hashids();
-
-		const id = hashids.encode.apply(hashids, numbers);
-		const decodedNumbers = hashids.decode(id);
-		const encodedId = hashids.encode(decodedNumbers);
-
-		assert.isOk(id);
-		assert.equal(id, encodedId);
-
-	};
-
-	it(`should encode 1, 2, 3`, () => {
-		testParams(1, 2, 3);
-	});
-
-	it(`should encode [1, 2, 3]`, () => {
-		testParams('1', '2', '3');
-	});
-
-	it(`should encode '1', '2', '3'`, () => {
-		testParams([1, 2, 3]);
-	});
-
-	it(`should encode ['1', '2', '3']`, () => {
-		testParams(['1', '2', '3']);
-	});
-
-});

+ 0 - 40
node_modules/hashids/tests/min-length.js

@@ -1,40 +0,0 @@
-
-import Hashids from '../lib/hashids';
-import { assert } from 'chai';
-
-describe('min length', () => {
-
-	const testMinLength = (minLength) => {
-
-		const hashids = new Hashids('', minLength);
-		const numbers = [1, 2, 3];
-
-		const id = hashids.encode(numbers);
-		const decodedNumbers = hashids.decode(id);
-
-		assert.deepEqual(decodedNumbers, numbers);
-		assert.isAtLeast(id.length, minLength);
-
-	};
-
-	it(`should work when 0`, () => {
-		testMinLength(0);
-	});
-
-	it(`should work when 1`, () => {
-		testMinLength(1);
-	});
-
-	it(`should work when 10`, () => {
-		testMinLength(10);
-	});
-
-	it(`should work when 999`, () => {
-		testMinLength(999);
-	});
-
-	it(`should work when 1000`, () => {
-		testMinLength(1000);
-	});
-
-});

+ 0 - 36
node_modules/hashids/tests/requiring.js

@@ -1,36 +0,0 @@
-import ImportedHashids from '../';
-import * as AsteriskImportedHashids from '../';
-import { assert } from 'chai';
-
-describe('requiring', () => {
-	it('via node', () => {
-		const Hashids = require('../');
-		assert.isFunction(Hashids);
-		const instance = new Hashids('Not Real', 5, 'ABCDEFGHJKMNPQRTWXY234689');
-		assert.instanceOf(instance, Hashids);
-	});
-
-	it('via babel-es interop', () => {
-		function _interopRequireDefault(obj) {
-			return obj && obj.__esModule ? obj : { default: obj };
-		}
-		const _hashids = require('../');
-		const _hashids2 = _interopRequireDefault(_hashids);
-		assert.isFunction(_hashids2.default);
-		const Hashids = _hashids2.default;
-		const instance = new Hashids('Not Real', 5, 'ABCDEFGHJKMNPQRTWXY234689');
-		assert.instanceOf(instance, Hashids);
-	});
-
-	it('via babel default import', () => {
-		assert.isFunction(ImportedHashids);
-		const instance = new ImportedHashids('Not Real', 5, 'ABCDEFGHJKMNPQRTWXY234689');
-		assert.instanceOf(instance, ImportedHashids);
-	});
-
-	it('via babel asterisk import', () => {
-		assert.isFunction(AsteriskImportedHashids);
-		const instance = new AsteriskImportedHashids('Not Real', 5, 'ABCDEFGHJKMNPQRTWXY234689');
-		assert.instanceOf(instance, AsteriskImportedHashids);
-	});
-});

+ 0 - 5
package-lock.json

@@ -14,11 +14,6 @@
       "resolved": "https://registry.npmjs.org/bulma-tooltip/-/bulma-tooltip-2.0.2.tgz",
       "integrity": "sha512-xsqWeWV7tsUn3uH04SqJeP7/CyC1RaDVIyVzr4/sIO3friIIOi7L6jc5g7qUwDxuBQl72yH/yRPuefpXoQ4hWg=="
     },
-    "hashids": {
-      "version": "1.2.2",
-      "resolved": "https://registry.npmjs.org/hashids/-/hashids-1.2.2.tgz",
-      "integrity": "sha512-dEHCG2LraR6PNvSGxosZHIRgxF5sNLOIBFEHbj8lfP9WWmu/PWPMzsip1drdVSOFi51N2pU7gZavrgn7sbGFuw=="
-    },
     "marked": {
       "version": "0.7.0",
       "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz",

+ 0 - 1
package.json

@@ -11,7 +11,6 @@
   "dependencies": {
     "bulma": "^0.7.5",
     "bulma-tooltip": "^2.0.2",
-    "hashids": "^1.2.2",
     "marked": "^0.7.0"
   }
 }

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác