@solar-taro/ui-sun 2.3.0 → 2.4.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.
package/index60.js CHANGED
@@ -1,248 +1,44 @@
1
- import { commonjsGlobal as p } from "./index58.js";
2
- import { commonjsRequire as W } from "./index68.js";
3
- import { __module as w } from "./index69.js";
4
- import q from "./index70.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({
125
- /**
126
- * Initializes a newly created word array.
127
- *
128
- * @param {Array} words (Optional) An array of 32-bit words.
129
- * @param {number} sigBytes (Optional) The number of significant bytes in the words.
130
- *
131
- * @example
132
- *
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);
136
- */
137
- init: function(t, r) {
138
- t = this.words = t || [], r != b ? this.sigBytes = r : this.sigBytes = t.length * 4;
139
- },
140
- /**
141
- * Converts this word array to a string.
142
- *
143
- * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
144
- *
145
- * @return {string} The stringified word array.
146
- *
147
- * @example
148
- *
149
- * var string = wordArray + '';
150
- * var string = wordArray.toString();
151
- * var string = wordArray.toString(CryptoJS.enc.Utf8);
152
- */
153
- toString: function(t) {
154
- return (t || k).stringify(this);
155
- },
156
- /**
157
- * Concatenates a word array to this word array.
158
- *
159
- * @param {WordArray} wordArray The word array to append.
160
- *
161
- * @return {WordArray} This word array.
162
- *
163
- * @example
164
- *
165
- * wordArray1.concat(wordArray2);
166
- */
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;
178
- },
179
- /**
180
- * Removes insignificant bits.
181
- *
182
- * @example
183
- *
184
- * wordArray.clamp();
185
- */
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);
189
- },
190
- /**
191
- * Creates a copy of this word array.
192
- *
193
- * @return {WordArray} The clone.
194
- *
195
- * @example
196
- *
197
- * var clone = wordArray.clone();
198
- */
199
- clone: function() {
200
- var t = c.clone.call(this);
201
- return t.words = this.words.slice(0), t;
202
- },
203
- /**
204
- * Creates a word array filled with random bytes.
205
- *
206
- * @param {number} nBytes The number of random bytes to generate.
207
- *
208
- * @return {WordArray} The random word array.
209
- *
210
- * @static
211
- *
212
- * @example
213
- *
214
- * var wordArray = CryptoJS.lib.WordArray.random(16);
215
- */
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 = {
222
- /**
223
- * Converts a word array to a hex string.
1
+ import { commonjsGlobal as B } from "./index57.js";
2
+ import { __module as h } from "./index71.js";
3
+ import { __require as A } from "./index59.js";
4
+ var m;
5
+ function E() {
6
+ return m ? h.exports : (m = 1, function(_, q) {
7
+ (function(c, f) {
8
+ _.exports = f(A());
9
+ })(B, function(c) {
10
+ return function() {
11
+ var f = c, d = f.lib, l = d.WordArray, x = f.enc;
12
+ x.Base64 = {
13
+ /**
14
+ * Converts a word array to a Base64 string.
224
15
  *
225
16
  * @param {WordArray} wordArray The word array.
226
17
  *
227
- * @return {string} The hex string.
18
+ * @return {string} The Base64 string.
228
19
  *
229
20
  * @static
230
21
  *
231
22
  * @example
232
23
  *
233
- * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
24
+ * var base64String = CryptoJS.enc.Base64.stringify(wordArray);
234
25
  */
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));
239
- }
240
- return e.join("");
26
+ stringify: function(e) {
27
+ var n = e.words, o = e.sigBytes, t = this._map;
28
+ e.clamp();
29
+ for (var a = [], r = 0; r < o; r += 3)
30
+ for (var s = n[r >>> 2] >>> 24 - r % 4 * 8 & 255, i = n[r + 1 >>> 2] >>> 24 - (r + 1) % 4 * 8 & 255, u = n[r + 2 >>> 2] >>> 24 - (r + 2) % 4 * 8 & 255, g = s << 16 | i << 8 | u, v = 0; v < 4 && r + v * 0.75 < o; v++)
31
+ a.push(t.charAt(g >>> 6 * (3 - v) & 63));
32
+ var p = t.charAt(64);
33
+ if (p)
34
+ for (; a.length % 4; )
35
+ a.push(p);
36
+ return a.join("");
241
37
  },
242
38
  /**
243
- * Converts a hex string to a word array.
39
+ * Converts a Base64 string to a word array.
244
40
  *
245
- * @param {string} hexStr The hex string.
41
+ * @param {string} base64Str The Base64 string.
246
42
  *
247
43
  * @return {WordArray} The word array.
248
44
  *
@@ -250,259 +46,36 @@ function T() {
250
46
  *
251
47
  * @example
252
48
  *
253
- * var wordArray = CryptoJS.enc.Hex.parse(hexString);
49
+ * var wordArray = CryptoJS.enc.Base64.parse(base64String);
254
50
  */
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 = {
261
- /**
262
- * Converts a word array to a Latin1 string.
263
- *
264
- * @param {WordArray} wordArray The word array.
265
- *
266
- * @return {string} The Latin1 string.
267
- *
268
- * @static
269
- *
270
- * @example
271
- *
272
- * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
273
- */
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));
51
+ parse: function(e) {
52
+ var n = e.length, o = this._map, t = this._reverseMap;
53
+ if (!t) {
54
+ t = this._reverseMap = [];
55
+ for (var a = 0; a < o.length; a++)
56
+ t[o.charCodeAt(a)] = a;
278
57
  }
279
- return e.join("");
280
- },
281
- /**
282
- * Converts a Latin1 string to a word array.
283
- *
284
- * @param {string} latin1Str The Latin1 string.
285
- *
286
- * @return {WordArray} The word array.
287
- *
288
- * @static
289
- *
290
- * @example
291
- *
292
- * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
293
- */
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);
298
- }
299
- }, H = v.Utf8 = {
300
- /**
301
- * Converts a word array to a UTF-8 string.
302
- *
303
- * @param {WordArray} wordArray The word array.
304
- *
305
- * @return {string} The UTF-8 string.
306
- *
307
- * @static
308
- *
309
- * @example
310
- *
311
- * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
312
- */
313
- stringify: function(t) {
314
- try {
315
- return decodeURIComponent(escape(B.stringify(t)));
316
- } catch {
317
- throw new Error("Malformed UTF-8 data");
58
+ var r = o.charAt(64);
59
+ if (r) {
60
+ var s = e.indexOf(r);
61
+ s !== -1 && (n = s);
318
62
  }
319
- },
320
- /**
321
- * Converts a UTF-8 string to a word array.
322
- *
323
- * @param {string} utf8Str The UTF-8 string.
324
- *
325
- * @return {WordArray} The word array.
326
- *
327
- * @static
328
- *
329
- * @example
330
- *
331
- * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
332
- */
333
- parse: function(t) {
334
- return B.parse(unescape(encodeURIComponent(t)));
335
- }
336
- }, _ = d.BufferedBlockAlgorithm = c.extend({
337
- /**
338
- * Resets this block algorithm's data buffer to its initial state.
339
- *
340
- * @example
341
- *
342
- * bufferedBlockAlgorithm.reset();
343
- */
344
- reset: function() {
345
- this._data = new u.init(), this._nDataBytes = 0;
346
- },
347
- /**
348
- * Adds new data to this block algorithm's buffer.
349
- *
350
- * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
351
- *
352
- * @example
353
- *
354
- * bufferedBlockAlgorithm._append('data');
355
- * bufferedBlockAlgorithm._append(wordArray);
356
- */
357
- _append: function(t) {
358
- typeof t == "string" && (t = H.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes;
359
- },
360
- /**
361
- * Processes available data blocks.
362
- *
363
- * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
364
- *
365
- * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
366
- *
367
- * @return {WordArray} The processed data.
368
- *
369
- * @example
370
- *
371
- * var processedData = bufferedBlockAlgorithm._process();
372
- * var processedData = bufferedBlockAlgorithm._process(!!'flush');
373
- */
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;
63
+ return C(e, n, t);
64
+ },
65
+ _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
66
+ };
67
+ function C(e, n, o) {
68
+ for (var t = [], a = 0, r = 0; r < n; r++)
69
+ if (r % 4) {
70
+ var s = o[e.charCodeAt(r - 1)] << r % 4 * 2, i = o[e.charCodeAt(r)] >>> 6 - r % 4 * 2, u = s | i;
71
+ t[a >>> 2] |= u << 24 - a % 4 * 8, a++;
382
72
  }
383
- return new u.init(r, x);
384
- },
385
- /**
386
- * Creates a copy of this object.
387
- *
388
- * @return {Object} The clone.
389
- *
390
- * @example
391
- *
392
- * var clone = bufferedBlockAlgorithm.clone();
393
- */
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({
401
- /**
402
- * Configuration options.
403
- */
404
- cfg: c.extend(),
405
- /**
406
- * Initializes a newly created hasher.
407
- *
408
- * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
409
- *
410
- * @example
411
- *
412
- * var hasher = CryptoJS.algo.SHA256.create();
413
- */
414
- init: function(t) {
415
- this.cfg = this.cfg.extend(t), this.reset();
416
- },
417
- /**
418
- * Resets this hasher to its initial state.
419
- *
420
- * @example
421
- *
422
- * hasher.reset();
423
- */
424
- reset: function() {
425
- _.reset.call(this), this._doReset();
426
- },
427
- /**
428
- * Updates this hasher with a message.
429
- *
430
- * @param {WordArray|string} messageUpdate The message to append.
431
- *
432
- * @return {Hasher} This hasher.
433
- *
434
- * @example
435
- *
436
- * hasher.update('message');
437
- * hasher.update(wordArray);
438
- */
439
- update: function(t) {
440
- return this._append(t), this._process(), this;
441
- },
442
- /**
443
- * Finalizes the hash computation.
444
- * Note that the finalize operation is effectively a destructive, read-once operation.
445
- *
446
- * @param {WordArray|string} messageUpdate (Optional) A final message update.
447
- *
448
- * @return {WordArray} The hash.
449
- *
450
- * @example
451
- *
452
- * var hash = hasher.finalize();
453
- * var hash = hasher.finalize('message');
454
- * var hash = hasher.finalize(wordArray);
455
- */
456
- finalize: function(t) {
457
- t && this._append(t);
458
- var r = this._doFinalize();
459
- return r;
460
- },
461
- blockSize: 16,
462
- /**
463
- * Creates a shortcut function to a hasher's object interface.
464
- *
465
- * @param {Hasher} hasher The hasher to create a helper for.
466
- *
467
- * @return {Function} The shortcut function.
468
- *
469
- * @static
470
- *
471
- * @example
472
- *
473
- * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
474
- */
475
- _createHelper: function(t) {
476
- return function(r, n) {
477
- return new t.init(n).finalize(r);
478
- };
479
- },
480
- /**
481
- * Creates a shortcut function to the HMAC's object interface.
482
- *
483
- * @param {Hasher} hasher The hasher to use in this HMAC helper.
484
- *
485
- * @return {Function} The shortcut function.
486
- *
487
- * @static
488
- *
489
- * @example
490
- *
491
- * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
492
- */
493
- _createHmacHelper: function(t) {
494
- return function(r, n) {
495
- return new I.HMAC.init(t, n).finalize(r);
496
- };
497
- }
498
- });
499
- var I = h.algo = {};
500
- return h;
501
- }(Math);
502
- return y;
73
+ return l.create(t, a);
74
+ }
75
+ }(), c.enc.Base64;
503
76
  });
504
- }(w), w.exports);
77
+ }(h), h.exports);
505
78
  }
506
79
  export {
507
- T as __require
80
+ E as __require
508
81
  };