@solar-taro/ui-sun 1.6.5 → 2.0.0

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 (103) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/accordion/index.vue.d.ts +22 -16
  3. package/chip/index.vue.d.ts +15 -36
  4. package/circular-progress/index.vue.d.ts +4 -30
  5. package/fab/fab-group.vue.d.ts +9 -3
  6. package/fab/fab.vue.d.ts +9 -3
  7. package/fab/index.scss +11 -3
  8. package/icon/index.scss +4 -3
  9. package/icon/index.vue.d.ts +3 -22
  10. package/index.d.ts +2 -0
  11. package/index.js +24 -20
  12. package/index10.js +24 -33
  13. package/index11.js +33 -75
  14. package/index12.js +75 -19
  15. package/index13.js +19 -49
  16. package/index14.js +46 -141
  17. package/index15.js +142 -27
  18. package/index16.js +29 -21
  19. package/index17.js +18 -21
  20. package/index18.js +42 -11
  21. package/index19.js +21 -26
  22. package/index20.js +11 -118
  23. package/index21.js +33 -10
  24. package/index22.js +123 -10
  25. package/index23.js +12 -8
  26. package/index24.js +10 -2
  27. package/index25.js +10 -2
  28. package/index26.js +1 -1
  29. package/index27.js +1 -1
  30. package/index28.js +1 -1
  31. package/index29.js +7 -2
  32. package/index30.js +2 -7
  33. package/index31.js +1 -1
  34. package/index33.js +1 -1
  35. package/index34.js +1 -1
  36. package/index35.js +1 -1
  37. package/index36.js +1 -1
  38. package/index37.js +1 -1
  39. package/index38.js +1 -1
  40. package/index39.js +1 -1
  41. package/index40.js +1 -1
  42. package/index41.js +1 -1
  43. package/index42.js +1 -1
  44. package/index43.js +2 -526
  45. package/index44.js +2 -3
  46. package/index45.js +2 -66
  47. package/index46.js +2 -12
  48. package/index47.js +3 -25
  49. package/index48.js +65 -13
  50. package/index49.js +12 -5
  51. package/index50.js +25 -26
  52. package/index51.js +14 -2
  53. package/index52.js +4 -505
  54. package/index53.js +524 -77
  55. package/index54.js +24 -68
  56. package/index55.js +2 -69
  57. package/index56.js +331 -368
  58. package/index57.js +79 -2
  59. package/index58.js +70 -2
  60. package/index59.js +69 -2
  61. package/index60.js +542 -3
  62. package/index62.js +2 -4
  63. package/index63.js +2 -2
  64. package/index64.js +4 -2
  65. package/index66.js +4 -48
  66. package/index67.js +2 -82
  67. package/index69.js +2 -2
  68. package/index7.js +7 -9
  69. package/index70.js +2 -2
  70. package/index71.js +48 -2
  71. package/index72.js +84 -0
  72. package/index73.js +4 -0
  73. package/index74.js +4 -0
  74. package/index75.js +4 -0
  75. package/index8.js +29 -17
  76. package/index9.js +19 -25
  77. package/item/index.d.ts +1 -0
  78. package/item/index.scss +40 -0
  79. package/item/index.vue.d.ts +26 -0
  80. package/lazy-render/index.vue.d.ts +13 -29
  81. package/list-header/index.scss +1 -1
  82. package/list-header/index.vue.d.ts +9 -3
  83. package/navbar/index.vue.d.ts +10 -4
  84. package/package.json +2 -2
  85. package/plugin.d.ts +0 -1
  86. package/popover/index.vue.d.ts +24 -41
  87. package/qrcode/index.vue.d.ts +6 -31
  88. package/segment/injection.d.ts +0 -1
  89. package/segment/segment-btn.vue.d.ts +12 -16
  90. package/segment/segment.vue.d.ts +16 -20
  91. package/slider-captcha/index.vue.d.ts +7 -36
  92. package/spinner/index.scss +1 -0
  93. package/spinner/index.vue.d.ts +14 -33
  94. package/sudoku/sudoku-item.vue.d.ts +9 -3
  95. package/sudoku/sudoku.vue.d.ts +9 -3
  96. package/tabbar/index.d.ts +1 -0
  97. package/tabbar/index.scss +74 -0
  98. package/tabbar/index.vue.d.ts +38 -0
  99. package/table/_table.scss +1 -1
  100. package/table/table-cell.vue.d.ts +13 -24
  101. package/table/table-row.vue.d.ts +12 -17
  102. package/table/table.vue.d.ts +17 -43
  103. package/virtual-scroll/index.vue.d.ts +35 -74
package/index56.js CHANGED
@@ -1,545 +1,508 @@
1
- import { commonjsGlobal as X } from "./index50.js";
2
- import { __module as m } from "./index68.js";
3
- import { __require as A } from "./index52.js";
4
- import { __require as W } from "./index55.js";
5
- var B;
6
- function j() {
7
- return B ? m.exports : (B = 1, function(S, L) {
8
- (function(u, v, c) {
9
- S.exports = v(A(), W());
10
- })(X, function(u) {
11
- u.lib.Cipher || function(v) {
12
- var c = u, s = c.lib, p = s.Base, h = s.WordArray, y = s.BufferedBlockAlgorithm, x = c.enc;
13
- x.Utf8;
14
- var C = x.Base64, g = c.algo, k = g.EvpKDF, f = s.Cipher = y.extend({
15
- /**
16
- * Configuration options.
17
- *
18
- * @property {WordArray} iv The IV to use for this operation.
19
- */
20
- cfg: p.extend(),
1
+ import { commonjsGlobal as p } from "./index54.js";
2
+ import { commonjsRequire as W } from "./index64.js";
3
+ import { __module as w } from "./index65.js";
4
+ import q from "./index66.js";
5
+ var S;
6
+ function T() {
7
+ return S ? w.exports : (S = 1, function(C, L) {
8
+ (function(y, f) {
9
+ C.exports = f();
10
+ })(p, function() {
11
+ var y = y || function(f, b) {
12
+ var s;
13
+ if (typeof window != "undefined" && window.crypto && (s = window.crypto), typeof self != "undefined" && self.crypto && (s = self.crypto), typeof globalThis != "undefined" && globalThis.crypto && (s = globalThis.crypto), !s && typeof window != "undefined" && window.msCrypto && (s = window.msCrypto), !s && typeof p != "undefined" && p.crypto && (s = p.crypto), !s && typeof W == "function")
14
+ try {
15
+ s = q;
16
+ } catch {
17
+ }
18
+ var R = function() {
19
+ if (s) {
20
+ if (typeof s.getRandomValues == "function")
21
+ try {
22
+ return s.getRandomValues(new Uint32Array(1))[0];
23
+ } catch {
24
+ }
25
+ if (typeof s.randomBytes == "function")
26
+ try {
27
+ return s.randomBytes(4).readInt32LE();
28
+ } catch {
29
+ }
30
+ }
31
+ throw new Error("Native crypto module could not be used to get secure random number.");
32
+ }, z = Object.create || /* @__PURE__ */ function() {
33
+ function t() {
34
+ }
35
+ return function(r) {
36
+ var n;
37
+ return t.prototype = r, n = new t(), t.prototype = null, n;
38
+ };
39
+ }(), h = {}, d = h.lib = {}, c = d.Base = /* @__PURE__ */ function() {
40
+ return {
41
+ /**
42
+ * Creates a new object that inherits from this object.
43
+ *
44
+ * @param {Object} overrides Properties to copy into the new object.
45
+ *
46
+ * @return {Object} The new object.
47
+ *
48
+ * @static
49
+ *
50
+ * @example
51
+ *
52
+ * var MyType = CryptoJS.lib.Base.extend({
53
+ * field: 'value',
54
+ *
55
+ * method: function () {
56
+ * }
57
+ * });
58
+ */
59
+ extend: function(t) {
60
+ var r = z(this);
61
+ return t && r.mixIn(t), (!r.hasOwnProperty("init") || this.init === r.init) && (r.init = function() {
62
+ r.$super.init.apply(this, arguments);
63
+ }), r.init.prototype = r, r.$super = this, r;
64
+ },
65
+ /**
66
+ * Extends this object and runs the init method.
67
+ * Arguments to create() will be passed to init().
68
+ *
69
+ * @return {Object} The new object.
70
+ *
71
+ * @static
72
+ *
73
+ * @example
74
+ *
75
+ * var instance = MyType.create();
76
+ */
77
+ create: function() {
78
+ var t = this.extend();
79
+ return t.init.apply(t, arguments), t;
80
+ },
81
+ /**
82
+ * Initializes a newly created object.
83
+ * Override this method to add some logic when your objects are created.
84
+ *
85
+ * @example
86
+ *
87
+ * var MyType = CryptoJS.lib.Base.extend({
88
+ * init: function () {
89
+ * // ...
90
+ * }
91
+ * });
92
+ */
93
+ init: function() {
94
+ },
95
+ /**
96
+ * Copies properties into this object.
97
+ *
98
+ * @param {Object} properties The properties to mix in.
99
+ *
100
+ * @example
101
+ *
102
+ * MyType.mixIn({
103
+ * field: 'value'
104
+ * });
105
+ */
106
+ mixIn: function(t) {
107
+ for (var r in t)
108
+ t.hasOwnProperty(r) && (this[r] = t[r]);
109
+ t.hasOwnProperty("toString") && (this.toString = t.toString);
110
+ },
111
+ /**
112
+ * Creates a copy of this object.
113
+ *
114
+ * @return {Object} The clone.
115
+ *
116
+ * @example
117
+ *
118
+ * var clone = instance.clone();
119
+ */
120
+ clone: function() {
121
+ return this.init.prototype.extend(this);
122
+ }
123
+ };
124
+ }(), u = d.WordArray = c.extend({
21
125
  /**
22
- * Creates this cipher in encryption mode.
23
- *
24
- * @param {WordArray} key The key.
25
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
126
+ * Initializes a newly created word array.
26
127
  *
27
- * @return {Cipher} A cipher instance.
28
- *
29
- * @static
128
+ * @param {Array} words (Optional) An array of 32-bit words.
129
+ * @param {number} sigBytes (Optional) The number of significant bytes in the words.
30
130
  *
31
131
  * @example
32
132
  *
33
- * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
133
+ * var wordArray = CryptoJS.lib.WordArray.create();
134
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
135
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
34
136
  */
35
- createEncryptor: function(e, t) {
36
- return this.create(this._ENC_XFORM_MODE, e, t);
137
+ init: function(t, r) {
138
+ t = this.words = t || [], r != b ? this.sigBytes = r : this.sigBytes = t.length * 4;
37
139
  },
38
140
  /**
39
- * Creates this cipher in decryption mode.
141
+ * Converts this word array to a string.
40
142
  *
41
- * @param {WordArray} key The key.
42
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
143
+ * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
43
144
  *
44
- * @return {Cipher} A cipher instance.
45
- *
46
- * @static
145
+ * @return {string} The stringified word array.
47
146
  *
48
147
  * @example
49
148
  *
50
- * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
149
+ * var string = wordArray + '';
150
+ * var string = wordArray.toString();
151
+ * var string = wordArray.toString(CryptoJS.enc.Utf8);
51
152
  */
52
- createDecryptor: function(e, t) {
53
- return this.create(this._DEC_XFORM_MODE, e, t);
153
+ toString: function(t) {
154
+ return (t || k).stringify(this);
54
155
  },
55
156
  /**
56
- * Initializes a newly created cipher.
157
+ * Concatenates a word array to this word array.
57
158
  *
58
- * @param {number} xformMode Either the encryption or decryption transormation mode constant.
59
- * @param {WordArray} key The key.
60
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
159
+ * @param {WordArray} wordArray The word array to append.
160
+ *
161
+ * @return {WordArray} This word array.
61
162
  *
62
163
  * @example
63
164
  *
64
- * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
165
+ * wordArray1.concat(wordArray2);
65
166
  */
66
- init: function(e, t, i) {
67
- this.cfg = this.cfg.extend(i), this._xformMode = e, this._key = t, this.reset();
167
+ concat: function(t) {
168
+ var r = this.words, n = t.words, e = this.sigBytes, i = t.sigBytes;
169
+ if (this.clamp(), e % 4)
170
+ for (var o = 0; o < i; o++) {
171
+ var g = n[o >>> 2] >>> 24 - o % 4 * 8 & 255;
172
+ r[e + o >>> 2] |= g << 24 - (e + o) % 4 * 8;
173
+ }
174
+ else
175
+ for (var a = 0; a < i; a += 4)
176
+ r[e + a >>> 2] = n[a >>> 2];
177
+ return this.sigBytes += i, this;
68
178
  },
69
179
  /**
70
- * Resets this cipher to its initial state.
180
+ * Removes insignificant bits.
71
181
  *
72
182
  * @example
73
183
  *
74
- * cipher.reset();
184
+ * wordArray.clamp();
75
185
  */
76
- reset: function() {
77
- y.reset.call(this), this._doReset();
186
+ clamp: function() {
187
+ var t = this.words, r = this.sigBytes;
188
+ t[r >>> 2] &= 4294967295 << 32 - r % 4 * 8, t.length = f.ceil(r / 4);
78
189
  },
79
190
  /**
80
- * Adds data to be encrypted or decrypted.
81
- *
82
- * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.
191
+ * Creates a copy of this word array.
83
192
  *
84
- * @return {WordArray} The data after processing.
193
+ * @return {WordArray} The clone.
85
194
  *
86
195
  * @example
87
196
  *
88
- * var encrypted = cipher.process('data');
89
- * var encrypted = cipher.process(wordArray);
197
+ * var clone = wordArray.clone();
90
198
  */
91
- process: function(e) {
92
- return this._append(e), this._process();
199
+ clone: function() {
200
+ var t = c.clone.call(this);
201
+ return t.words = this.words.slice(0), t;
93
202
  },
94
203
  /**
95
- * Finalizes the encryption or decryption process.
96
- * Note that the finalize operation is effectively a destructive, read-once operation.
204
+ * Creates a word array filled with random bytes.
205
+ *
206
+ * @param {number} nBytes The number of random bytes to generate.
97
207
  *
98
- * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.
208
+ * @return {WordArray} The random word array.
99
209
  *
100
- * @return {WordArray} The data after final processing.
210
+ * @static
101
211
  *
102
212
  * @example
103
213
  *
104
- * var encrypted = cipher.finalize();
105
- * var encrypted = cipher.finalize('data');
106
- * var encrypted = cipher.finalize(wordArray);
214
+ * var wordArray = CryptoJS.lib.WordArray.random(16);
107
215
  */
108
- finalize: function(e) {
109
- e && this._append(e);
110
- var t = this._doFinalize();
111
- return t;
112
- },
113
- keySize: 128 / 32,
114
- ivSize: 128 / 32,
115
- _ENC_XFORM_MODE: 1,
116
- _DEC_XFORM_MODE: 2,
216
+ random: function(t) {
217
+ for (var r = [], n = 0; n < t; n += 4)
218
+ r.push(R());
219
+ return new u.init(r, t);
220
+ }
221
+ }), v = h.enc = {}, k = v.Hex = {
117
222
  /**
118
- * Creates shortcut functions to a cipher's object interface.
223
+ * Converts a word array to a hex string.
119
224
  *
120
- * @param {Cipher} cipher The cipher to create a helper for.
225
+ * @param {WordArray} wordArray The word array.
121
226
  *
122
- * @return {Object} An object with encrypt and decrypt shortcut functions.
227
+ * @return {string} The hex string.
123
228
  *
124
229
  * @static
125
230
  *
126
231
  * @example
127
232
  *
128
- * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
233
+ * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
129
234
  */
130
- _createHelper: /* @__PURE__ */ function() {
131
- function e(t) {
132
- return typeof t == "string" ? q : l;
235
+ stringify: function(t) {
236
+ for (var r = t.words, n = t.sigBytes, e = [], i = 0; i < n; i++) {
237
+ var o = r[i >>> 2] >>> 24 - i % 4 * 8 & 255;
238
+ e.push((o >>> 4).toString(16)), e.push((o & 15).toString(16));
133
239
  }
134
- return function(t) {
135
- return {
136
- encrypt: function(i, r, n) {
137
- return e(r).encrypt(t, i, r, n);
138
- },
139
- decrypt: function(i, r, n) {
140
- return e(r).decrypt(t, i, r, n);
141
- }
142
- };
143
- };
144
- }()
145
- });
146
- s.StreamCipher = f.extend({
147
- _doFinalize: function() {
148
- var e = this._process(!0);
149
- return e;
240
+ return e.join("");
150
241
  },
151
- blockSize: 1
152
- });
153
- var z = c.mode = {}, E = s.BlockCipherMode = p.extend({
154
242
  /**
155
- * Creates this mode for encryption.
243
+ * Converts a hex string to a word array.
156
244
  *
157
- * @param {Cipher} cipher A block cipher instance.
158
- * @param {Array} iv The IV words.
245
+ * @param {string} hexStr The hex string.
246
+ *
247
+ * @return {WordArray} The word array.
159
248
  *
160
249
  * @static
161
250
  *
162
251
  * @example
163
252
  *
164
- * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
253
+ * var wordArray = CryptoJS.enc.Hex.parse(hexString);
165
254
  */
166
- createEncryptor: function(e, t) {
167
- return this.Encryptor.create(e, t);
168
- },
255
+ parse: function(t) {
256
+ for (var r = t.length, n = [], e = 0; e < r; e += 2)
257
+ n[e >>> 3] |= parseInt(t.substr(e, 2), 16) << 24 - e % 8 * 4;
258
+ return new u.init(n, r / 2);
259
+ }
260
+ }, B = v.Latin1 = {
169
261
  /**
170
- * Creates this mode for decryption.
262
+ * Converts a word array to a Latin1 string.
263
+ *
264
+ * @param {WordArray} wordArray The word array.
171
265
  *
172
- * @param {Cipher} cipher A block cipher instance.
173
- * @param {Array} iv The IV words.
266
+ * @return {string} The Latin1 string.
174
267
  *
175
268
  * @static
176
269
  *
177
270
  * @example
178
271
  *
179
- * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
272
+ * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
180
273
  */
181
- createDecryptor: function(e, t) {
182
- return this.Decryptor.create(e, t);
274
+ stringify: function(t) {
275
+ for (var r = t.words, n = t.sigBytes, e = [], i = 0; i < n; i++) {
276
+ var o = r[i >>> 2] >>> 24 - i % 4 * 8 & 255;
277
+ e.push(String.fromCharCode(o));
278
+ }
279
+ return e.join("");
183
280
  },
184
281
  /**
185
- * Initializes a newly created mode.
282
+ * Converts a Latin1 string to a word array.
283
+ *
284
+ * @param {string} latin1Str The Latin1 string.
186
285
  *
187
- * @param {Cipher} cipher A block cipher instance.
188
- * @param {Array} iv The IV words.
286
+ * @return {WordArray} The word array.
287
+ *
288
+ * @static
189
289
  *
190
290
  * @example
191
291
  *
192
- * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
292
+ * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
193
293
  */
194
- init: function(e, t) {
195
- this._cipher = e, this._iv = t;
294
+ parse: function(t) {
295
+ for (var r = t.length, n = [], e = 0; e < r; e++)
296
+ n[e >>> 2] |= (t.charCodeAt(e) & 255) << 24 - e % 4 * 8;
297
+ return new u.init(n, r);
196
298
  }
197
- }), b = z.CBC = function() {
198
- var e = E.extend();
199
- e.Encryptor = e.extend({
200
- /**
201
- * Processes the data block at offset.
202
- *
203
- * @param {Array} words The data words to operate on.
204
- * @param {number} offset The offset where the block starts.
205
- *
206
- * @example
207
- *
208
- * mode.processBlock(data.words, offset);
209
- */
210
- processBlock: function(i, r) {
211
- var n = this._cipher, a = n.blockSize;
212
- t.call(this, i, r, a), n.encryptBlock(i, r), this._prevBlock = i.slice(r, r + a);
213
- }
214
- }), e.Decryptor = e.extend({
215
- /**
216
- * Processes the data block at offset.
217
- *
218
- * @param {Array} words The data words to operate on.
219
- * @param {number} offset The offset where the block starts.
220
- *
221
- * @example
222
- *
223
- * mode.processBlock(data.words, offset);
224
- */
225
- processBlock: function(i, r) {
226
- var n = this._cipher, a = n.blockSize, o = i.slice(r, r + a);
227
- n.decryptBlock(i, r), t.call(this, i, r, a), this._prevBlock = o;
228
- }
229
- });
230
- function t(i, r, n) {
231
- var a, o = this._iv;
232
- o ? (a = o, this._iv = v) : a = this._prevBlock;
233
- for (var d = 0; d < n; d++)
234
- i[r + d] ^= a[d];
235
- }
236
- return e;
237
- }(), D = c.pad = {}, M = D.Pkcs7 = {
299
+ }, H = v.Utf8 = {
238
300
  /**
239
- * Pads data using the algorithm defined in PKCS #5/7.
301
+ * Converts a word array to a UTF-8 string.
240
302
  *
241
- * @param {WordArray} data The data to pad.
242
- * @param {number} blockSize The multiple that the data should be padded to.
303
+ * @param {WordArray} wordArray The word array.
304
+ *
305
+ * @return {string} The UTF-8 string.
243
306
  *
244
307
  * @static
245
308
  *
246
309
  * @example
247
310
  *
248
- * CryptoJS.pad.Pkcs7.pad(wordArray, 4);
311
+ * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
249
312
  */
250
- pad: function(e, t) {
251
- for (var i = t * 4, r = i - e.sigBytes % i, n = r << 24 | r << 16 | r << 8 | r, a = [], o = 0; o < r; o += 4)
252
- a.push(n);
253
- var d = h.create(a, r);
254
- e.concat(d);
313
+ stringify: function(t) {
314
+ try {
315
+ return decodeURIComponent(escape(B.stringify(t)));
316
+ } catch {
317
+ throw new Error("Malformed UTF-8 data");
318
+ }
255
319
  },
256
320
  /**
257
- * Unpads data that had been padded using the algorithm defined in PKCS #5/7.
321
+ * Converts a UTF-8 string to a word array.
258
322
  *
259
- * @param {WordArray} data The data to unpad.
323
+ * @param {string} utf8Str The UTF-8 string.
324
+ *
325
+ * @return {WordArray} The word array.
260
326
  *
261
327
  * @static
262
328
  *
263
329
  * @example
264
330
  *
265
- * CryptoJS.pad.Pkcs7.unpad(wordArray);
331
+ * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
266
332
  */
267
- unpad: function(e) {
268
- var t = e.words[e.sigBytes - 1 >>> 2] & 255;
269
- e.sigBytes -= t;
333
+ parse: function(t) {
334
+ return B.parse(unescape(encodeURIComponent(t)));
270
335
  }
271
- };
272
- s.BlockCipher = f.extend({
273
- /**
274
- * Configuration options.
275
- *
276
- * @property {Mode} mode The block mode to use. Default: CBC
277
- * @property {Padding} padding The padding strategy to use. Default: Pkcs7
278
- */
279
- cfg: f.cfg.extend({
280
- mode: b,
281
- padding: M
282
- }),
283
- reset: function() {
284
- var e;
285
- f.reset.call(this);
286
- var t = this.cfg, i = t.iv, r = t.mode;
287
- this._xformMode == this._ENC_XFORM_MODE ? e = r.createEncryptor : (e = r.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == e ? this._mode.init(this, i && i.words) : (this._mode = e.call(r, this, i && i.words), this._mode.__creator = e);
288
- },
289
- _doProcessBlock: function(e, t) {
290
- this._mode.processBlock(e, t);
291
- },
292
- _doFinalize: function() {
293
- var e, t = this.cfg.padding;
294
- return this._xformMode == this._ENC_XFORM_MODE ? (t.pad(this._data, this.blockSize), e = this._process(!0)) : (e = this._process(!0), t.unpad(e)), e;
295
- },
296
- blockSize: 128 / 32
297
- });
298
- var _ = s.CipherParams = p.extend({
336
+ }, _ = d.BufferedBlockAlgorithm = c.extend({
299
337
  /**
300
- * Initializes a newly created cipher params object.
301
- *
302
- * @param {Object} cipherParams An object with any of the possible cipher parameters.
338
+ * Resets this block algorithm's data buffer to its initial state.
303
339
  *
304
340
  * @example
305
341
  *
306
- * var cipherParams = CryptoJS.lib.CipherParams.create({
307
- * ciphertext: ciphertextWordArray,
308
- * key: keyWordArray,
309
- * iv: ivWordArray,
310
- * salt: saltWordArray,
311
- * algorithm: CryptoJS.algo.AES,
312
- * mode: CryptoJS.mode.CBC,
313
- * padding: CryptoJS.pad.PKCS7,
314
- * blockSize: 4,
315
- * formatter: CryptoJS.format.OpenSSL
316
- * });
342
+ * bufferedBlockAlgorithm.reset();
317
343
  */
318
- init: function(e) {
319
- this.mixIn(e);
344
+ reset: function() {
345
+ this._data = new u.init(), this._nDataBytes = 0;
320
346
  },
321
347
  /**
322
- * Converts this cipher params object to a string.
348
+ * Adds new data to this block algorithm's buffer.
323
349
  *
324
- * @param {Format} formatter (Optional) The formatting strategy to use.
325
- *
326
- * @return {string} The stringified cipher params.
327
- *
328
- * @throws Error If neither the formatter nor the default formatter is set.
350
+ * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
329
351
  *
330
352
  * @example
331
353
  *
332
- * var string = cipherParams + '';
333
- * var string = cipherParams.toString();
334
- * var string = cipherParams.toString(CryptoJS.format.OpenSSL);
354
+ * bufferedBlockAlgorithm._append('data');
355
+ * bufferedBlockAlgorithm._append(wordArray);
335
356
  */
336
- toString: function(e) {
337
- return (e || this.formatter).stringify(this);
338
- }
339
- }), O = c.format = {}, P = O.OpenSSL = {
357
+ _append: function(t) {
358
+ typeof t == "string" && (t = H.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes;
359
+ },
340
360
  /**
341
- * Converts a cipher params object to an OpenSSL-compatible string.
361
+ * Processes available data blocks.
342
362
  *
343
- * @param {CipherParams} cipherParams The cipher params object.
363
+ * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
344
364
  *
345
- * @return {string} The OpenSSL-compatible string.
365
+ * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
346
366
  *
347
- * @static
367
+ * @return {WordArray} The processed data.
348
368
  *
349
369
  * @example
350
370
  *
351
- * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
371
+ * var processedData = bufferedBlockAlgorithm._process();
372
+ * var processedData = bufferedBlockAlgorithm._process(!!'flush');
352
373
  */
353
- stringify: function(e) {
354
- var t, i = e.ciphertext, r = e.salt;
355
- return r ? t = h.create([1398893684, 1701076831]).concat(r).concat(i) : t = i, t.toString(C);
374
+ _process: function(t) {
375
+ var r, n = this._data, e = n.words, i = n.sigBytes, o = this.blockSize, g = o * 4, a = i / g;
376
+ t ? a = f.ceil(a) : a = f.max((a | 0) - this._minBufferSize, 0);
377
+ var l = a * o, x = f.min(l * 4, i);
378
+ if (l) {
379
+ for (var m = 0; m < l; m += o)
380
+ this._doProcessBlock(e, m);
381
+ r = e.splice(0, l), n.sigBytes -= x;
382
+ }
383
+ return new u.init(r, x);
356
384
  },
357
385
  /**
358
- * Converts an OpenSSL-compatible string to a cipher params object.
359
- *
360
- * @param {string} openSSLStr The OpenSSL-compatible string.
386
+ * Creates a copy of this object.
361
387
  *
362
- * @return {CipherParams} The cipher params object.
363
- *
364
- * @static
388
+ * @return {Object} The clone.
365
389
  *
366
390
  * @example
367
391
  *
368
- * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
392
+ * var clone = bufferedBlockAlgorithm.clone();
369
393
  */
370
- parse: function(e) {
371
- var t, i = C.parse(e), r = i.words;
372
- return r[0] == 1398893684 && r[1] == 1701076831 && (t = h.create(r.slice(2, 4)), r.splice(0, 4), i.sigBytes -= 16), _.create({ ciphertext: i, salt: t });
373
- }
374
- }, l = s.SerializableCipher = p.extend({
394
+ clone: function() {
395
+ var t = c.clone.call(this);
396
+ return t._data = this._data.clone(), t;
397
+ },
398
+ _minBufferSize: 0
399
+ });
400
+ d.Hasher = _.extend({
375
401
  /**
376
402
  * Configuration options.
377
- *
378
- * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
379
403
  */
380
- cfg: p.extend({
381
- format: P
382
- }),
404
+ cfg: c.extend(),
383
405
  /**
384
- * Encrypts a message.
406
+ * Initializes a newly created hasher.
385
407
  *
386
- * @param {Cipher} cipher The cipher algorithm to use.
387
- * @param {WordArray|string} message The message to encrypt.
388
- * @param {WordArray} key The key.
389
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
390
- *
391
- * @return {CipherParams} A cipher params object.
392
- *
393
- * @static
408
+ * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
394
409
  *
395
410
  * @example
396
411
  *
397
- * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
398
- * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
399
- * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
412
+ * var hasher = CryptoJS.algo.SHA256.create();
400
413
  */
401
- encrypt: function(e, t, i, r) {
402
- r = this.cfg.extend(r);
403
- var n = e.createEncryptor(i, r), a = n.finalize(t), o = n.cfg;
404
- return _.create({
405
- ciphertext: a,
406
- key: i,
407
- iv: o.iv,
408
- algorithm: e,
409
- mode: o.mode,
410
- padding: o.padding,
411
- blockSize: e.blockSize,
412
- formatter: r.format
413
- });
414
+ init: function(t) {
415
+ this.cfg = this.cfg.extend(t), this.reset();
414
416
  },
415
417
  /**
416
- * Decrypts serialized ciphertext.
417
- *
418
- * @param {Cipher} cipher The cipher algorithm to use.
419
- * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
420
- * @param {WordArray} key The key.
421
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
422
- *
423
- * @return {WordArray} The plaintext.
424
- *
425
- * @static
418
+ * Resets this hasher to its initial state.
426
419
  *
427
420
  * @example
428
421
  *
429
- * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
430
- * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
422
+ * hasher.reset();
431
423
  */
432
- decrypt: function(e, t, i, r) {
433
- r = this.cfg.extend(r), t = this._parse(t, r.format);
434
- var n = e.createDecryptor(i, r).finalize(t.ciphertext);
435
- return n;
424
+ reset: function() {
425
+ _.reset.call(this), this._doReset();
436
426
  },
437
427
  /**
438
- * Converts serialized ciphertext to CipherParams,
439
- * else assumed CipherParams already and returns ciphertext unchanged.
428
+ * Updates this hasher with a message.
440
429
  *
441
- * @param {CipherParams|string} ciphertext The ciphertext.
442
- * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.
430
+ * @param {WordArray|string} messageUpdate The message to append.
443
431
  *
444
- * @return {CipherParams} The unserialized ciphertext.
445
- *
446
- * @static
432
+ * @return {Hasher} This hasher.
447
433
  *
448
434
  * @example
449
435
  *
450
- * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
436
+ * hasher.update('message');
437
+ * hasher.update(wordArray);
451
438
  */
452
- _parse: function(e, t) {
453
- return typeof e == "string" ? t.parse(e, this) : e;
454
- }
455
- }), F = c.kdf = {}, R = F.OpenSSL = {
439
+ update: function(t) {
440
+ return this._append(t), this._process(), this;
441
+ },
456
442
  /**
457
- * Derives a key and IV from a password.
458
- *
459
- * @param {string} password The password to derive from.
460
- * @param {number} keySize The size in words of the key to generate.
461
- * @param {number} ivSize The size in words of the IV to generate.
462
- * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
443
+ * Finalizes the hash computation.
444
+ * Note that the finalize operation is effectively a destructive, read-once operation.
463
445
  *
464
- * @return {CipherParams} A cipher params object with the key, IV, and salt.
446
+ * @param {WordArray|string} messageUpdate (Optional) A final message update.
465
447
  *
466
- * @static
448
+ * @return {WordArray} The hash.
467
449
  *
468
450
  * @example
469
451
  *
470
- * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
471
- * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
472
- */
473
- execute: function(e, t, i, r, n) {
474
- if (r || (r = h.random(64 / 8)), n)
475
- var a = k.create({ keySize: t + i, hasher: n }).compute(e, r);
476
- else
477
- var a = k.create({ keySize: t + i }).compute(e, r);
478
- var o = h.create(a.words.slice(t), i * 4);
479
- return a.sigBytes = t * 4, _.create({ key: a, iv: o, salt: r });
480
- }
481
- }, q = s.PasswordBasedCipher = l.extend({
482
- /**
483
- * Configuration options.
484
- *
485
- * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
452
+ * var hash = hasher.finalize();
453
+ * var hash = hasher.finalize('message');
454
+ * var hash = hasher.finalize(wordArray);
486
455
  */
487
- cfg: l.cfg.extend({
488
- kdf: R
489
- }),
456
+ finalize: function(t) {
457
+ t && this._append(t);
458
+ var r = this._doFinalize();
459
+ return r;
460
+ },
461
+ blockSize: 16,
490
462
  /**
491
- * Encrypts a message using a password.
463
+ * Creates a shortcut function to a hasher's object interface.
492
464
  *
493
- * @param {Cipher} cipher The cipher algorithm to use.
494
- * @param {WordArray|string} message The message to encrypt.
495
- * @param {string} password The password.
496
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
465
+ * @param {Hasher} hasher The hasher to create a helper for.
497
466
  *
498
- * @return {CipherParams} A cipher params object.
467
+ * @return {Function} The shortcut function.
499
468
  *
500
469
  * @static
501
470
  *
502
471
  * @example
503
472
  *
504
- * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
505
- * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
473
+ * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
506
474
  */
507
- encrypt: function(e, t, i, r) {
508
- r = this.cfg.extend(r);
509
- var n = r.kdf.execute(i, e.keySize, e.ivSize, r.salt, r.hasher);
510
- r.iv = n.iv;
511
- var a = l.encrypt.call(this, e, t, n.key, r);
512
- return a.mixIn(n), a;
475
+ _createHelper: function(t) {
476
+ return function(r, n) {
477
+ return new t.init(n).finalize(r);
478
+ };
513
479
  },
514
480
  /**
515
- * Decrypts serialized ciphertext using a password.
481
+ * Creates a shortcut function to the HMAC's object interface.
516
482
  *
517
- * @param {Cipher} cipher The cipher algorithm to use.
518
- * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
519
- * @param {string} password The password.
520
- * @param {Object} cfg (Optional) The configuration options to use for this operation.
483
+ * @param {Hasher} hasher The hasher to use in this HMAC helper.
521
484
  *
522
- * @return {WordArray} The plaintext.
485
+ * @return {Function} The shortcut function.
523
486
  *
524
487
  * @static
525
488
  *
526
489
  * @example
527
490
  *
528
- * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
529
- * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
491
+ * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
530
492
  */
531
- decrypt: function(e, t, i, r) {
532
- r = this.cfg.extend(r), t = this._parse(t, r.format);
533
- var n = r.kdf.execute(i, e.keySize, e.ivSize, t.salt, r.hasher);
534
- r.iv = n.iv;
535
- var a = l.decrypt.call(this, e, t, n.key, r);
536
- return a;
493
+ _createHmacHelper: function(t) {
494
+ return function(r, n) {
495
+ return new I.HMAC.init(t, n).finalize(r);
496
+ };
537
497
  }
538
498
  });
539
- }();
499
+ var I = h.algo = {};
500
+ return h;
501
+ }(Math);
502
+ return y;
540
503
  });
541
- }(m), m.exports);
504
+ }(w), w.exports);
542
505
  }
543
506
  export {
544
- j as __require
507
+ T as __require
545
508
  };