@mjhls/mjh-framework 1.0.850-beta.0 → 1.0.850-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/cjs/AdSlotsProvider.js +2 -895
  2. package/dist/cjs/AlgoliaSearch.js +336 -237
  3. package/dist/cjs/ArticleProgramLandingPage.js +2 -3
  4. package/dist/cjs/ArticleSeriesLandingPage.js +1 -1
  5. package/dist/cjs/ArticleSeriesListing.js +1 -1
  6. package/dist/cjs/DeckContent.js +1 -1
  7. package/dist/cjs/DeckQueue.js +1 -1
  8. package/dist/cjs/ExternalResources.js +2 -3
  9. package/dist/cjs/GridContent.js +1 -1
  10. package/dist/cjs/HorizontalArticleListing.js +2 -3
  11. package/dist/cjs/IssueLanding.js +2 -3
  12. package/dist/cjs/MasterDeck.js +1 -1
  13. package/dist/cjs/MediaSeriesLanding.js +5 -6
  14. package/dist/cjs/PartnerDetailListing.js +6 -1105
  15. package/dist/cjs/QueueDeckExpanded.js +1097 -112
  16. package/dist/cjs/TaxonomyDescription.js +2 -3
  17. package/dist/cjs/VideoProgramLandingPage.js +2 -3
  18. package/dist/cjs/VideoSeriesCard.js +2 -2
  19. package/dist/cjs/VideoSeriesLandingPage.js +3 -3
  20. package/dist/cjs/VideoSeriesListing.js +1 -1
  21. package/dist/cjs/View.js +5 -7
  22. package/dist/cjs/faundadb.js +321 -4
  23. package/dist/cjs/getRelatedArticle.js +21 -438
  24. package/dist/cjs/getSerializers.js +2 -3
  25. package/dist/cjs/{index-bc88f898.js → index-4151deb3.js} +587 -15
  26. package/dist/cjs/index.js +6 -13
  27. package/dist/cjs/{inherits-452ff02c.js → inherits-9953db94.js} +4 -4
  28. package/dist/esm/AdSlotsProvider.js +6 -898
  29. package/dist/esm/AlgoliaSearch.js +100 -1
  30. package/dist/esm/ArticleProgramLandingPage.js +1 -2
  31. package/dist/esm/ExternalResources.js +1 -2
  32. package/dist/esm/HorizontalArticleListing.js +1 -2
  33. package/dist/esm/IssueLanding.js +1 -2
  34. package/dist/esm/MediaSeriesLanding.js +1 -2
  35. package/dist/esm/PartnerDetailListing.js +5 -1103
  36. package/dist/esm/QueueDeckExpanded.js +1098 -113
  37. package/dist/esm/TaxonomyDescription.js +1 -2
  38. package/dist/esm/VideoProgramLandingPage.js +1 -2
  39. package/dist/esm/View.js +2 -4
  40. package/dist/esm/faundadb.js +319 -2
  41. package/dist/esm/getRelatedArticle.js +21 -438
  42. package/dist/esm/getSerializers.js +1 -2
  43. package/dist/esm/{index-f2a0d400.js → index-d6dc592a.js} +575 -3
  44. package/dist/esm/index.js +4 -10
  45. package/package.json +8 -3
  46. package/dist/cjs/Auth.js +0 -3428
  47. package/dist/cjs/index-bd6c9f56.js +0 -211
  48. package/dist/cjs/inherits-8d29278d.js +0 -110
  49. package/dist/cjs/md5-5039b1a6.js +0 -323
  50. package/dist/cjs/util-f2c1b65b.js +0 -576
  51. package/dist/esm/Auth.js +0 -3412
  52. package/dist/esm/index-db3bb315.js +0 -207
  53. package/dist/esm/inherits-77d5e4fc.js +0 -101
  54. package/dist/esm/md5-9be0e905.js +0 -321
  55. package/dist/esm/util-7700fc59.js +0 -574
@@ -1,211 +0,0 @@
1
- 'use strict';
2
-
3
- /*!
4
- * cookie
5
- * Copyright(c) 2012-2014 Roman Shtylman
6
- * Copyright(c) 2015 Douglas Christopher Wilson
7
- * MIT Licensed
8
- */
9
-
10
- /**
11
- * Module exports.
12
- * @public
13
- */
14
-
15
- var parse_1 = parse;
16
- var serialize_1 = serialize;
17
-
18
- /**
19
- * Module variables.
20
- * @private
21
- */
22
-
23
- var decode = decodeURIComponent;
24
- var encode = encodeURIComponent;
25
- var pairSplitRegExp = /; */;
26
-
27
- /**
28
- * RegExp to match field-content in RFC 7230 sec 3.2
29
- *
30
- * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
31
- * field-vchar = VCHAR / obs-text
32
- * obs-text = %x80-FF
33
- */
34
-
35
- var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
36
-
37
- /**
38
- * Parse a cookie header.
39
- *
40
- * Parse the given cookie header string into an object
41
- * The object has the various cookies as keys(names) => values
42
- *
43
- * @param {string} str
44
- * @param {object} [options]
45
- * @return {object}
46
- * @public
47
- */
48
-
49
- function parse(str, options) {
50
- if (typeof str !== 'string') {
51
- throw new TypeError('argument str must be a string');
52
- }
53
-
54
- var obj = {};
55
- var opt = options || {};
56
- var pairs = str.split(pairSplitRegExp);
57
- var dec = opt.decode || decode;
58
-
59
- for (var i = 0; i < pairs.length; i++) {
60
- var pair = pairs[i];
61
- var eq_idx = pair.indexOf('=');
62
-
63
- // skip things that don't look like key=value
64
- if (eq_idx < 0) {
65
- continue;
66
- }
67
-
68
- var key = pair.substr(0, eq_idx).trim();
69
- var val = pair.substr(++eq_idx, pair.length).trim();
70
-
71
- // quoted values
72
- if ('"' == val[0]) {
73
- val = val.slice(1, -1);
74
- }
75
-
76
- // only assign once
77
- if (undefined == obj[key]) {
78
- obj[key] = tryDecode(val, dec);
79
- }
80
- }
81
-
82
- return obj;
83
- }
84
-
85
- /**
86
- * Serialize data into a cookie header.
87
- *
88
- * Serialize the a name value pair into a cookie string suitable for
89
- * http headers. An optional options object specified cookie parameters.
90
- *
91
- * serialize('foo', 'bar', { httpOnly: true })
92
- * => "foo=bar; httpOnly"
93
- *
94
- * @param {string} name
95
- * @param {string} val
96
- * @param {object} [options]
97
- * @return {string}
98
- * @public
99
- */
100
-
101
- function serialize(name, val, options) {
102
- var opt = options || {};
103
- var enc = opt.encode || encode;
104
-
105
- if (typeof enc !== 'function') {
106
- throw new TypeError('option encode is invalid');
107
- }
108
-
109
- if (!fieldContentRegExp.test(name)) {
110
- throw new TypeError('argument name is invalid');
111
- }
112
-
113
- var value = enc(val);
114
-
115
- if (value && !fieldContentRegExp.test(value)) {
116
- throw new TypeError('argument val is invalid');
117
- }
118
-
119
- var str = name + '=' + value;
120
-
121
- if (null != opt.maxAge) {
122
- var maxAge = opt.maxAge - 0;
123
-
124
- if (isNaN(maxAge) || !isFinite(maxAge)) {
125
- throw new TypeError('option maxAge is invalid')
126
- }
127
-
128
- str += '; Max-Age=' + Math.floor(maxAge);
129
- }
130
-
131
- if (opt.domain) {
132
- if (!fieldContentRegExp.test(opt.domain)) {
133
- throw new TypeError('option domain is invalid');
134
- }
135
-
136
- str += '; Domain=' + opt.domain;
137
- }
138
-
139
- if (opt.path) {
140
- if (!fieldContentRegExp.test(opt.path)) {
141
- throw new TypeError('option path is invalid');
142
- }
143
-
144
- str += '; Path=' + opt.path;
145
- }
146
-
147
- if (opt.expires) {
148
- if (typeof opt.expires.toUTCString !== 'function') {
149
- throw new TypeError('option expires is invalid');
150
- }
151
-
152
- str += '; Expires=' + opt.expires.toUTCString();
153
- }
154
-
155
- if (opt.httpOnly) {
156
- str += '; HttpOnly';
157
- }
158
-
159
- if (opt.secure) {
160
- str += '; Secure';
161
- }
162
-
163
- if (opt.sameSite) {
164
- var sameSite = typeof opt.sameSite === 'string'
165
- ? opt.sameSite.toLowerCase() : opt.sameSite;
166
-
167
- switch (sameSite) {
168
- case true:
169
- str += '; SameSite=Strict';
170
- break;
171
- case 'lax':
172
- str += '; SameSite=Lax';
173
- break;
174
- case 'strict':
175
- str += '; SameSite=Strict';
176
- break;
177
- case 'none':
178
- str += '; SameSite=None';
179
- break;
180
- default:
181
- throw new TypeError('option sameSite is invalid');
182
- }
183
- }
184
-
185
- return str;
186
- }
187
-
188
- /**
189
- * Try decoding a string using a decoding function.
190
- *
191
- * @param {string} str
192
- * @param {function} decode
193
- * @private
194
- */
195
-
196
- function tryDecode(str, decode) {
197
- try {
198
- return decode(str);
199
- } catch (e) {
200
- return str;
201
- }
202
- }
203
-
204
- var cookie = {
205
- parse: parse_1,
206
- serialize: serialize_1
207
- };
208
-
209
- exports.cookie = cookie;
210
- exports.parse_1 = parse_1;
211
- exports.serialize_1 = serialize_1;
@@ -1,110 +0,0 @@
1
- 'use strict';
2
-
3
- function _defineProperty(obj, key, value) {
4
- if (key in obj) {
5
- Object.defineProperty(obj, key, {
6
- value: value,
7
- enumerable: true,
8
- configurable: true,
9
- writable: true
10
- });
11
- } else {
12
- obj[key] = value;
13
- }
14
-
15
- return obj;
16
- }
17
-
18
- function _classCallCheck(instance, Constructor) {
19
- if (!(instance instanceof Constructor)) {
20
- throw new TypeError("Cannot call a class as a function");
21
- }
22
- }
23
-
24
- function _defineProperties(target, props) {
25
- for (var i = 0; i < props.length; i++) {
26
- var descriptor = props[i];
27
- descriptor.enumerable = descriptor.enumerable || false;
28
- descriptor.configurable = true;
29
- if ("value" in descriptor) descriptor.writable = true;
30
- Object.defineProperty(target, descriptor.key, descriptor);
31
- }
32
- }
33
-
34
- function _createClass(Constructor, protoProps, staticProps) {
35
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
36
- if (staticProps) _defineProperties(Constructor, staticProps);
37
- return Constructor;
38
- }
39
-
40
- function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
41
-
42
- function _typeof(obj) {
43
- if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
44
- _typeof = function _typeof(obj) {
45
- return _typeof2(obj);
46
- };
47
- } else {
48
- _typeof = function _typeof(obj) {
49
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
50
- };
51
- }
52
-
53
- return _typeof(obj);
54
- }
55
-
56
- function _assertThisInitialized(self) {
57
- if (self === void 0) {
58
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
59
- }
60
-
61
- return self;
62
- }
63
-
64
- function _possibleConstructorReturn(self, call) {
65
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
66
- return call;
67
- }
68
-
69
- return _assertThisInitialized(self);
70
- }
71
-
72
- function _getPrototypeOf(o) {
73
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
74
- return o.__proto__ || Object.getPrototypeOf(o);
75
- };
76
- return _getPrototypeOf(o);
77
- }
78
-
79
- function _setPrototypeOf(o, p) {
80
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
81
- o.__proto__ = p;
82
- return o;
83
- };
84
-
85
- return _setPrototypeOf(o, p);
86
- }
87
-
88
- function _inherits(subClass, superClass) {
89
- if (typeof superClass !== "function" && superClass !== null) {
90
- throw new TypeError("Super expression must either be null or a function");
91
- }
92
-
93
- subClass.prototype = Object.create(superClass && superClass.prototype, {
94
- constructor: {
95
- value: subClass,
96
- writable: true,
97
- configurable: true
98
- }
99
- });
100
- if (superClass) _setPrototypeOf(subClass, superClass);
101
- }
102
-
103
- exports._assertThisInitialized = _assertThisInitialized;
104
- exports._classCallCheck = _classCallCheck;
105
- exports._createClass = _createClass;
106
- exports._defineProperty = _defineProperty;
107
- exports._getPrototypeOf = _getPrototypeOf;
108
- exports._inherits = _inherits;
109
- exports._possibleConstructorReturn = _possibleConstructorReturn;
110
- exports._typeof = _typeof;
@@ -1,323 +0,0 @@
1
- 'use strict';
2
-
3
- var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
4
-
5
- var crypt = _commonjsHelpers.createCommonjsModule(function (module) {
6
- (function() {
7
- var base64map
8
- = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
9
-
10
- crypt = {
11
- // Bit-wise rotation left
12
- rotl: function(n, b) {
13
- return (n << b) | (n >>> (32 - b));
14
- },
15
-
16
- // Bit-wise rotation right
17
- rotr: function(n, b) {
18
- return (n << (32 - b)) | (n >>> b);
19
- },
20
-
21
- // Swap big-endian to little-endian and vice versa
22
- endian: function(n) {
23
- // If number given, swap endian
24
- if (n.constructor == Number) {
25
- return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
26
- }
27
-
28
- // Else, assume array and swap all items
29
- for (var i = 0; i < n.length; i++)
30
- n[i] = crypt.endian(n[i]);
31
- return n;
32
- },
33
-
34
- // Generate an array of any length of random bytes
35
- randomBytes: function(n) {
36
- for (var bytes = []; n > 0; n--)
37
- bytes.push(Math.floor(Math.random() * 256));
38
- return bytes;
39
- },
40
-
41
- // Convert a byte array to big-endian 32-bit words
42
- bytesToWords: function(bytes) {
43
- for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
44
- words[b >>> 5] |= bytes[i] << (24 - b % 32);
45
- return words;
46
- },
47
-
48
- // Convert big-endian 32-bit words to a byte array
49
- wordsToBytes: function(words) {
50
- for (var bytes = [], b = 0; b < words.length * 32; b += 8)
51
- bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
52
- return bytes;
53
- },
54
-
55
- // Convert a byte array to a hex string
56
- bytesToHex: function(bytes) {
57
- for (var hex = [], i = 0; i < bytes.length; i++) {
58
- hex.push((bytes[i] >>> 4).toString(16));
59
- hex.push((bytes[i] & 0xF).toString(16));
60
- }
61
- return hex.join('');
62
- },
63
-
64
- // Convert a hex string to a byte array
65
- hexToBytes: function(hex) {
66
- for (var bytes = [], c = 0; c < hex.length; c += 2)
67
- bytes.push(parseInt(hex.substr(c, 2), 16));
68
- return bytes;
69
- },
70
-
71
- // Convert a byte array to a base-64 string
72
- bytesToBase64: function(bytes) {
73
- for (var base64 = [], i = 0; i < bytes.length; i += 3) {
74
- var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
75
- for (var j = 0; j < 4; j++)
76
- if (i * 8 + j * 6 <= bytes.length * 8)
77
- base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
78
- else
79
- base64.push('=');
80
- }
81
- return base64.join('');
82
- },
83
-
84
- // Convert a base-64 string to a byte array
85
- base64ToBytes: function(base64) {
86
- // Remove non-base-64 characters
87
- base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
88
-
89
- for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
90
- imod4 = ++i % 4) {
91
- if (imod4 == 0) continue;
92
- bytes.push(((base64map.indexOf(base64.charAt(i - 1))
93
- & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
94
- | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
95
- }
96
- return bytes;
97
- }
98
- };
99
-
100
- module.exports = crypt;
101
- })();
102
- });
103
-
104
- var charenc = {
105
- // UTF-8 encoding
106
- utf8: {
107
- // Convert a string to a byte array
108
- stringToBytes: function(str) {
109
- return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
110
- },
111
-
112
- // Convert a byte array to a string
113
- bytesToString: function(bytes) {
114
- return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
115
- }
116
- },
117
-
118
- // Binary encoding
119
- bin: {
120
- // Convert a string to a byte array
121
- stringToBytes: function(str) {
122
- for (var bytes = [], i = 0; i < str.length; i++)
123
- bytes.push(str.charCodeAt(i) & 0xFF);
124
- return bytes;
125
- },
126
-
127
- // Convert a byte array to a string
128
- bytesToString: function(bytes) {
129
- for (var str = [], i = 0; i < bytes.length; i++)
130
- str.push(String.fromCharCode(bytes[i]));
131
- return str.join('');
132
- }
133
- }
134
- };
135
-
136
- var charenc_1 = charenc;
137
-
138
- /*!
139
- * Determine if an object is a Buffer
140
- *
141
- * @author Feross Aboukhadijeh <https://feross.org>
142
- * @license MIT
143
- */
144
-
145
- // The _isBuffer check is for Safari 5-7 support, because it's missing
146
- // Object.prototype.constructor. Remove this eventually
147
- var isBuffer_1 = function (obj) {
148
- return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
149
- };
150
-
151
- function isBuffer (obj) {
152
- return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
153
- }
154
-
155
- // For Node v0.10 support. Remove this eventually.
156
- function isSlowBuffer (obj) {
157
- return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
158
- }
159
-
160
- var md5 = _commonjsHelpers.createCommonjsModule(function (module) {
161
- (function(){
162
- var crypt$1 = crypt,
163
- utf8 = charenc_1.utf8,
164
- isBuffer = isBuffer_1,
165
- bin = charenc_1.bin,
166
-
167
- // The core
168
- md5 = function (message, options) {
169
- // Convert to byte array
170
- if (message.constructor == String)
171
- if (options && options.encoding === 'binary')
172
- message = bin.stringToBytes(message);
173
- else
174
- message = utf8.stringToBytes(message);
175
- else if (isBuffer(message))
176
- message = Array.prototype.slice.call(message, 0);
177
- else if (!Array.isArray(message))
178
- message = message.toString();
179
- // else, assume byte array already
180
-
181
- var m = crypt$1.bytesToWords(message),
182
- l = message.length * 8,
183
- a = 1732584193,
184
- b = -271733879,
185
- c = -1732584194,
186
- d = 271733878;
187
-
188
- // Swap endian
189
- for (var i = 0; i < m.length; i++) {
190
- m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
191
- ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
192
- }
193
-
194
- // Padding
195
- m[l >>> 5] |= 0x80 << (l % 32);
196
- m[(((l + 64) >>> 9) << 4) + 14] = l;
197
-
198
- // Method shortcuts
199
- var FF = md5._ff,
200
- GG = md5._gg,
201
- HH = md5._hh,
202
- II = md5._ii;
203
-
204
- for (var i = 0; i < m.length; i += 16) {
205
-
206
- var aa = a,
207
- bb = b,
208
- cc = c,
209
- dd = d;
210
-
211
- a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
212
- d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
213
- c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
214
- b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
215
- a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
216
- d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
217
- c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
218
- b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
219
- a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
220
- d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
221
- c = FF(c, d, a, b, m[i+10], 17, -42063);
222
- b = FF(b, c, d, a, m[i+11], 22, -1990404162);
223
- a = FF(a, b, c, d, m[i+12], 7, 1804603682);
224
- d = FF(d, a, b, c, m[i+13], 12, -40341101);
225
- c = FF(c, d, a, b, m[i+14], 17, -1502002290);
226
- b = FF(b, c, d, a, m[i+15], 22, 1236535329);
227
-
228
- a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
229
- d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
230
- c = GG(c, d, a, b, m[i+11], 14, 643717713);
231
- b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
232
- a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
233
- d = GG(d, a, b, c, m[i+10], 9, 38016083);
234
- c = GG(c, d, a, b, m[i+15], 14, -660478335);
235
- b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
236
- a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
237
- d = GG(d, a, b, c, m[i+14], 9, -1019803690);
238
- c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
239
- b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
240
- a = GG(a, b, c, d, m[i+13], 5, -1444681467);
241
- d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
242
- c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
243
- b = GG(b, c, d, a, m[i+12], 20, -1926607734);
244
-
245
- a = HH(a, b, c, d, m[i+ 5], 4, -378558);
246
- d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
247
- c = HH(c, d, a, b, m[i+11], 16, 1839030562);
248
- b = HH(b, c, d, a, m[i+14], 23, -35309556);
249
- a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
250
- d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
251
- c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
252
- b = HH(b, c, d, a, m[i+10], 23, -1094730640);
253
- a = HH(a, b, c, d, m[i+13], 4, 681279174);
254
- d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
255
- c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
256
- b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
257
- a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
258
- d = HH(d, a, b, c, m[i+12], 11, -421815835);
259
- c = HH(c, d, a, b, m[i+15], 16, 530742520);
260
- b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
261
-
262
- a = II(a, b, c, d, m[i+ 0], 6, -198630844);
263
- d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
264
- c = II(c, d, a, b, m[i+14], 15, -1416354905);
265
- b = II(b, c, d, a, m[i+ 5], 21, -57434055);
266
- a = II(a, b, c, d, m[i+12], 6, 1700485571);
267
- d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
268
- c = II(c, d, a, b, m[i+10], 15, -1051523);
269
- b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
270
- a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
271
- d = II(d, a, b, c, m[i+15], 10, -30611744);
272
- c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
273
- b = II(b, c, d, a, m[i+13], 21, 1309151649);
274
- a = II(a, b, c, d, m[i+ 4], 6, -145523070);
275
- d = II(d, a, b, c, m[i+11], 10, -1120210379);
276
- c = II(c, d, a, b, m[i+ 2], 15, 718787259);
277
- b = II(b, c, d, a, m[i+ 9], 21, -343485551);
278
-
279
- a = (a + aa) >>> 0;
280
- b = (b + bb) >>> 0;
281
- c = (c + cc) >>> 0;
282
- d = (d + dd) >>> 0;
283
- }
284
-
285
- return crypt$1.endian([a, b, c, d]);
286
- };
287
-
288
- // Auxiliary functions
289
- md5._ff = function (a, b, c, d, x, s, t) {
290
- var n = a + (b & c | ~b & d) + (x >>> 0) + t;
291
- return ((n << s) | (n >>> (32 - s))) + b;
292
- };
293
- md5._gg = function (a, b, c, d, x, s, t) {
294
- var n = a + (b & d | c & ~d) + (x >>> 0) + t;
295
- return ((n << s) | (n >>> (32 - s))) + b;
296
- };
297
- md5._hh = function (a, b, c, d, x, s, t) {
298
- var n = a + (b ^ c ^ d) + (x >>> 0) + t;
299
- return ((n << s) | (n >>> (32 - s))) + b;
300
- };
301
- md5._ii = function (a, b, c, d, x, s, t) {
302
- var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
303
- return ((n << s) | (n >>> (32 - s))) + b;
304
- };
305
-
306
- // Package private blocksize
307
- md5._blocksize = 16;
308
- md5._digestsize = 16;
309
-
310
- module.exports = function (message, options) {
311
- if (message === undefined || message === null)
312
- throw new Error('Illegal argument ' + message);
313
-
314
- var digestbytes = crypt$1.wordsToBytes(md5(message, options));
315
- return options && options.asBytes ? digestbytes :
316
- options && options.asString ? bin.bytesToString(digestbytes) :
317
- crypt$1.bytesToHex(digestbytes);
318
- };
319
-
320
- })();
321
- });
322
-
323
- exports.md5 = md5;