123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323 |
- import {
- __commonJS,
- __esm,
- __export,
- __require,
- __toCommonJS,
- init_define_APP_INFO
- } from "./chunk-XY75H3MP.js";
- // browser-external:crypto
- var crypto_exports = {};
- __export(crypto_exports, {
- default: () => crypto_default
- });
- var crypto_default;
- var init_crypto = __esm({
- "browser-external:crypto"() {
- init_define_APP_INFO();
- crypto_default = new Proxy({}, {
- get() {
- throw new Error('Module "crypto" has been externalized for browser compatibility and cannot be accessed in client code.');
- }
- });
- }
- });
- // node_modules/crypto-js/core.js
- var require_core = __commonJS({
- "node_modules/crypto-js/core.js"(exports, module) {
- init_define_APP_INFO();
- (function(root, factory) {
- if (typeof exports === "object") {
- module.exports = exports = factory();
- } else if (typeof define === "function" && define.amd) {
- define([], factory);
- } else {
- root.CryptoJS = factory();
- }
- })(exports, function() {
- var CryptoJS = CryptoJS || function(Math2, undefined) {
- var crypto;
- if (typeof window !== "undefined" && window.crypto) {
- crypto = window.crypto;
- }
- if (typeof self !== "undefined" && self.crypto) {
- crypto = self.crypto;
- }
- if (typeof globalThis !== "undefined" && globalThis.crypto) {
- crypto = globalThis.crypto;
- }
- if (!crypto && typeof window !== "undefined" && window.msCrypto) {
- crypto = window.msCrypto;
- }
- if (!crypto && typeof global !== "undefined" && global.crypto) {
- crypto = global.crypto;
- }
- if (!crypto && typeof __require === "function") {
- try {
- crypto = (init_crypto(), __toCommonJS(crypto_exports));
- } catch (err) {
- }
- }
- var cryptoSecureRandomInt = function() {
- if (crypto) {
- if (typeof crypto.getRandomValues === "function") {
- try {
- return crypto.getRandomValues(new Uint32Array(1))[0];
- } catch (err) {
- }
- }
- if (typeof crypto.randomBytes === "function") {
- try {
- return crypto.randomBytes(4).readInt32LE();
- } catch (err) {
- }
- }
- }
- throw new Error("Native crypto module could not be used to get secure random number.");
- };
- var create = Object.create || function() {
- function F() {
- }
- return function(obj) {
- var subtype;
- F.prototype = obj;
- subtype = new F();
- F.prototype = null;
- return subtype;
- };
- }();
- var C = {};
- var C_lib = C.lib = {};
- var Base = C_lib.Base = function() {
- return {
- extend: function(overrides) {
- var subtype = create(this);
- if (overrides) {
- subtype.mixIn(overrides);
- }
- if (!subtype.hasOwnProperty("init") || this.init === subtype.init) {
- subtype.init = function() {
- subtype.$super.init.apply(this, arguments);
- };
- }
- subtype.init.prototype = subtype;
- subtype.$super = this;
- return subtype;
- },
- create: function() {
- var instance = this.extend();
- instance.init.apply(instance, arguments);
- return instance;
- },
- init: function() {
- },
- mixIn: function(properties) {
- for (var propertyName in properties) {
- if (properties.hasOwnProperty(propertyName)) {
- this[propertyName] = properties[propertyName];
- }
- }
- if (properties.hasOwnProperty("toString")) {
- this.toString = properties.toString;
- }
- },
- clone: function() {
- return this.init.prototype.extend(this);
- }
- };
- }();
- var WordArray = C_lib.WordArray = Base.extend({
- init: function(words, sigBytes) {
- words = this.words = words || [];
- if (sigBytes != undefined) {
- this.sigBytes = sigBytes;
- } else {
- this.sigBytes = words.length * 4;
- }
- },
- toString: function(encoder) {
- return (encoder || Hex).stringify(this);
- },
- concat: function(wordArray) {
- var thisWords = this.words;
- var thatWords = wordArray.words;
- var thisSigBytes = this.sigBytes;
- var thatSigBytes = wordArray.sigBytes;
- this.clamp();
- if (thisSigBytes % 4) {
- for (var i = 0; i < thatSigBytes; i++) {
- var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255;
- thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
- }
- } else {
- for (var j = 0; j < thatSigBytes; j += 4) {
- thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];
- }
- }
- this.sigBytes += thatSigBytes;
- return this;
- },
- clamp: function() {
- var words = this.words;
- var sigBytes = this.sigBytes;
- words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8;
- words.length = Math2.ceil(sigBytes / 4);
- },
- clone: function() {
- var clone = Base.clone.call(this);
- clone.words = this.words.slice(0);
- return clone;
- },
- random: function(nBytes) {
- var words = [];
- for (var i = 0; i < nBytes; i += 4) {
- words.push(cryptoSecureRandomInt());
- }
- return new WordArray.init(words, nBytes);
- }
- });
- var C_enc = C.enc = {};
- var Hex = C_enc.Hex = {
- stringify: function(wordArray) {
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- var hexChars = [];
- for (var i = 0; i < sigBytes; i++) {
- var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
- hexChars.push((bite >>> 4).toString(16));
- hexChars.push((bite & 15).toString(16));
- }
- return hexChars.join("");
- },
- parse: function(hexStr) {
- var hexStrLength = hexStr.length;
- var words = [];
- for (var i = 0; i < hexStrLength; i += 2) {
- words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
- }
- return new WordArray.init(words, hexStrLength / 2);
- }
- };
- var Latin1 = C_enc.Latin1 = {
- stringify: function(wordArray) {
- var words = wordArray.words;
- var sigBytes = wordArray.sigBytes;
- var latin1Chars = [];
- for (var i = 0; i < sigBytes; i++) {
- var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
- latin1Chars.push(String.fromCharCode(bite));
- }
- return latin1Chars.join("");
- },
- parse: function(latin1Str) {
- var latin1StrLength = latin1Str.length;
- var words = [];
- for (var i = 0; i < latin1StrLength; i++) {
- words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8;
- }
- return new WordArray.init(words, latin1StrLength);
- }
- };
- var Utf8 = C_enc.Utf8 = {
- stringify: function(wordArray) {
- try {
- return decodeURIComponent(escape(Latin1.stringify(wordArray)));
- } catch (e) {
- throw new Error("Malformed UTF-8 data");
- }
- },
- parse: function(utf8Str) {
- return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
- }
- };
- var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
- reset: function() {
- this._data = new WordArray.init();
- this._nDataBytes = 0;
- },
- _append: function(data) {
- if (typeof data == "string") {
- data = Utf8.parse(data);
- }
- this._data.concat(data);
- this._nDataBytes += data.sigBytes;
- },
- _process: function(doFlush) {
- var processedWords;
- var data = this._data;
- var dataWords = data.words;
- var dataSigBytes = data.sigBytes;
- var blockSize = this.blockSize;
- var blockSizeBytes = blockSize * 4;
- var nBlocksReady = dataSigBytes / blockSizeBytes;
- if (doFlush) {
- nBlocksReady = Math2.ceil(nBlocksReady);
- } else {
- nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0);
- }
- var nWordsReady = nBlocksReady * blockSize;
- var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes);
- if (nWordsReady) {
- for (var offset = 0; offset < nWordsReady; offset += blockSize) {
- this._doProcessBlock(dataWords, offset);
- }
- processedWords = dataWords.splice(0, nWordsReady);
- data.sigBytes -= nBytesReady;
- }
- return new WordArray.init(processedWords, nBytesReady);
- },
- clone: function() {
- var clone = Base.clone.call(this);
- clone._data = this._data.clone();
- return clone;
- },
- _minBufferSize: 0
- });
- var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
- cfg: Base.extend(),
- init: function(cfg) {
- this.cfg = this.cfg.extend(cfg);
- this.reset();
- },
- reset: function() {
- BufferedBlockAlgorithm.reset.call(this);
- this._doReset();
- },
- update: function(messageUpdate) {
- this._append(messageUpdate);
- this._process();
- return this;
- },
- finalize: function(messageUpdate) {
- if (messageUpdate) {
- this._append(messageUpdate);
- }
- var hash = this._doFinalize();
- return hash;
- },
- blockSize: 512 / 32,
- _createHelper: function(hasher) {
- return function(message, cfg) {
- return new hasher.init(cfg).finalize(message);
- };
- },
- _createHmacHelper: function(hasher) {
- return function(message, key) {
- return new C_algo.HMAC.init(hasher, key).finalize(message);
- };
- }
- });
- var C_algo = C.algo = {};
- return C;
- }(Math);
- return CryptoJS;
- });
- }
- });
- export {
- require_core
- };
- //# sourceMappingURL=chunk-6Y2MJOYY.js.map
|