lightswitch-js-sdk
Version:
light switch javascript sdk
1,355 lines (1,354 loc) • 182 kB
JavaScript
var be = Object.defineProperty;
var ke = (C, u, x) => u in C ? be(C, u, { enumerable: !0, configurable: !0, writable: !0, value: x }) : C[u] = x;
var Y = (C, u, x) => (ke(C, typeof u != "symbol" ? u + "" : u, x), x);
var M = /* @__PURE__ */ ((C) => (C[C.DEBUG = 0] = "DEBUG", C[C.INFO = 1] = "INFO", C[C.WARNING = 2] = "WARNING", C[C.ERROR = 3] = "ERROR", C))(M || {});
const se = (C = M.INFO) => ({
debug: (u) => D0(M.DEBUG, u, C),
info: (u) => D0(M.INFO, u, C),
warning: (u) => D0(M.WARNING, u, C),
error: (u) => D0(M.ERROR, u, C)
}), D0 = (C, u, x) => {
if (C >= x) {
const r = /* @__PURE__ */ new Date(), i = r.getMilliseconds().toString().padStart(3, "0"), y = `[${`${r.toLocaleTimeString("en-US", {
hour12: !1,
hour: "2-digit",
minute: "2-digit",
second: "2-digit"
})}.${i}`} LightSwitch ${M[C]}] :`;
switch (C) {
case M.DEBUG:
console.debug(`${y} ${u}`);
break;
case M.INFO:
console.log(`${y} ${u}`);
break;
case M.WARNING:
console.warn(`${y} ${u}`);
break;
case M.ERROR:
console.error(`${y} ${u}`);
break;
default:
console.log(`${y} ${u}`);
break;
}
}
};
var O = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function we(C) {
return C && C.__esModule && Object.prototype.hasOwnProperty.call(C, "default") ? C.default : C;
}
function Se(C) {
if (C.__esModule)
return C;
var u = C.default;
if (typeof u == "function") {
var x = function r() {
return this instanceof r ? Reflect.construct(u, arguments, this.constructor) : u.apply(this, arguments);
};
x.prototype = u.prototype;
} else
x = {};
return Object.defineProperty(x, "__esModule", { value: !0 }), Object.keys(C).forEach(function(r) {
var i = Object.getOwnPropertyDescriptor(C, r);
Object.defineProperty(x, r, i.get ? i : {
enumerable: !0,
get: function() {
return C[r];
}
});
}), x;
}
var fe = { exports: {} };
function me(C) {
throw new Error('Could not dynamically require "' + C + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}
var b0 = { exports: {} };
const He = {}, Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: He
}, Symbol.toStringTag, { value: "Module" })), ze = /* @__PURE__ */ Se(Re);
var Dr;
function T() {
return Dr || (Dr = 1, function(C, u) {
(function(x, r) {
C.exports = r();
})(O, function() {
var x = x || function(r, i) {
var d;
if (typeof window < "u" && window.crypto && (d = window.crypto), typeof self < "u" && self.crypto && (d = self.crypto), typeof globalThis < "u" && globalThis.crypto && (d = globalThis.crypto), !d && typeof window < "u" && window.msCrypto && (d = window.msCrypto), !d && typeof O < "u" && O.crypto && (d = O.crypto), !d && typeof me == "function")
try {
d = ze;
} catch {
}
var y = function() {
if (d) {
if (typeof d.getRandomValues == "function")
try {
return d.getRandomValues(new Uint32Array(1))[0];
} catch {
}
if (typeof d.randomBytes == "function")
try {
return d.randomBytes(4).readInt32LE();
} catch {
}
}
throw new Error("Native crypto module could not be used to get secure random number.");
}, h = Object.create || /* @__PURE__ */ function() {
function n() {
}
return function(o) {
var f;
return n.prototype = o, f = new n(), n.prototype = null, f;
};
}(), B = {}, e = B.lib = {}, a = e.Base = /* @__PURE__ */ function() {
return {
/**
* Creates a new object that inherits from this object.
*
* @param {Object} overrides Properties to copy into the new object.
*
* @return {Object} The new object.
*
* @static
*
* @example
*
* var MyType = CryptoJS.lib.Base.extend({
* field: 'value',
*
* method: function () {
* }
* });
*/
extend: function(n) {
var o = h(this);
return n && o.mixIn(n), (!o.hasOwnProperty("init") || this.init === o.init) && (o.init = function() {
o.$super.init.apply(this, arguments);
}), o.init.prototype = o, o.$super = this, o;
},
/**
* Extends this object and runs the init method.
* Arguments to create() will be passed to init().
*
* @return {Object} The new object.
*
* @static
*
* @example
*
* var instance = MyType.create();
*/
create: function() {
var n = this.extend();
return n.init.apply(n, arguments), n;
},
/**
* Initializes a newly created object.
* Override this method to add some logic when your objects are created.
*
* @example
*
* var MyType = CryptoJS.lib.Base.extend({
* init: function () {
* // ...
* }
* });
*/
init: function() {
},
/**
* Copies properties into this object.
*
* @param {Object} properties The properties to mix in.
*
* @example
*
* MyType.mixIn({
* field: 'value'
* });
*/
mixIn: function(n) {
for (var o in n)
n.hasOwnProperty(o) && (this[o] = n[o]);
n.hasOwnProperty("toString") && (this.toString = n.toString);
},
/**
* Creates a copy of this object.
*
* @return {Object} The clone.
*
* @example
*
* var clone = instance.clone();
*/
clone: function() {
return this.init.prototype.extend(this);
}
};
}(), p = e.WordArray = a.extend({
/**
* Initializes a newly created word array.
*
* @param {Array} words (Optional) An array of 32-bit words.
* @param {number} sigBytes (Optional) The number of significant bytes in the words.
*
* @example
*
* var wordArray = CryptoJS.lib.WordArray.create();
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
*/
init: function(n, o) {
n = this.words = n || [], o != i ? this.sigBytes = o : this.sigBytes = n.length * 4;
},
/**
* Converts this word array to a string.
*
* @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
*
* @return {string} The stringified word array.
*
* @example
*
* var string = wordArray + '';
* var string = wordArray.toString();
* var string = wordArray.toString(CryptoJS.enc.Utf8);
*/
toString: function(n) {
return (n || v).stringify(this);
},
/**
* Concatenates a word array to this word array.
*
* @param {WordArray} wordArray The word array to append.
*
* @return {WordArray} This word array.
*
* @example
*
* wordArray1.concat(wordArray2);
*/
concat: function(n) {
var o = this.words, f = n.words, D = this.sigBytes, F = n.sigBytes;
if (this.clamp(), D % 4)
for (var _ = 0; _ < F; _++) {
var b = f[_ >>> 2] >>> 24 - _ % 4 * 8 & 255;
o[D + _ >>> 2] |= b << 24 - (D + _) % 4 * 8;
}
else
for (var z = 0; z < F; z += 4)
o[D + z >>> 2] = f[z >>> 2];
return this.sigBytes += F, this;
},
/**
* Removes insignificant bits.
*
* @example
*
* wordArray.clamp();
*/
clamp: function() {
var n = this.words, o = this.sigBytes;
n[o >>> 2] &= 4294967295 << 32 - o % 4 * 8, n.length = r.ceil(o / 4);
},
/**
* Creates a copy of this word array.
*
* @return {WordArray} The clone.
*
* @example
*
* var clone = wordArray.clone();
*/
clone: function() {
var n = a.clone.call(this);
return n.words = this.words.slice(0), n;
},
/**
* Creates a word array filled with random bytes.
*
* @param {number} nBytes The number of random bytes to generate.
*
* @return {WordArray} The random word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.lib.WordArray.random(16);
*/
random: function(n) {
for (var o = [], f = 0; f < n; f += 4)
o.push(y());
return new p.init(o, n);
}
}), t = B.enc = {}, v = t.Hex = {
/**
* Converts a word array to a hex string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The hex string.
*
* @static
*
* @example
*
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
*/
stringify: function(n) {
for (var o = n.words, f = n.sigBytes, D = [], F = 0; F < f; F++) {
var _ = o[F >>> 2] >>> 24 - F % 4 * 8 & 255;
D.push((_ >>> 4).toString(16)), D.push((_ & 15).toString(16));
}
return D.join("");
},
/**
* Converts a hex string to a word array.
*
* @param {string} hexStr The hex string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Hex.parse(hexString);
*/
parse: function(n) {
for (var o = n.length, f = [], D = 0; D < o; D += 2)
f[D >>> 3] |= parseInt(n.substr(D, 2), 16) << 24 - D % 8 * 4;
return new p.init(f, o / 2);
}
}, s = t.Latin1 = {
/**
* Converts a word array to a Latin1 string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The Latin1 string.
*
* @static
*
* @example
*
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
*/
stringify: function(n) {
for (var o = n.words, f = n.sigBytes, D = [], F = 0; F < f; F++) {
var _ = o[F >>> 2] >>> 24 - F % 4 * 8 & 255;
D.push(String.fromCharCode(_));
}
return D.join("");
},
/**
* Converts a Latin1 string to a word array.
*
* @param {string} latin1Str The Latin1 string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
*/
parse: function(n) {
for (var o = n.length, f = [], D = 0; D < o; D++)
f[D >>> 2] |= (n.charCodeAt(D) & 255) << 24 - D % 4 * 8;
return new p.init(f, o);
}
}, l = t.Utf8 = {
/**
* Converts a word array to a UTF-8 string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The UTF-8 string.
*
* @static
*
* @example
*
* var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
*/
stringify: function(n) {
try {
return decodeURIComponent(escape(s.stringify(n)));
} catch {
throw new Error("Malformed UTF-8 data");
}
},
/**
* Converts a UTF-8 string to a word array.
*
* @param {string} utf8Str The UTF-8 string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
*/
parse: function(n) {
return s.parse(unescape(encodeURIComponent(n)));
}
}, c = e.BufferedBlockAlgorithm = a.extend({
/**
* Resets this block algorithm's data buffer to its initial state.
*
* @example
*
* bufferedBlockAlgorithm.reset();
*/
reset: function() {
this._data = new p.init(), this._nDataBytes = 0;
},
/**
* Adds new data to this block algorithm's buffer.
*
* @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
*
* @example
*
* bufferedBlockAlgorithm._append('data');
* bufferedBlockAlgorithm._append(wordArray);
*/
_append: function(n) {
typeof n == "string" && (n = l.parse(n)), this._data.concat(n), this._nDataBytes += n.sigBytes;
},
/**
* Processes available data blocks.
*
* This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
*
* @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
*
* @return {WordArray} The processed data.
*
* @example
*
* var processedData = bufferedBlockAlgorithm._process();
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
*/
_process: function(n) {
var o, f = this._data, D = f.words, F = f.sigBytes, _ = this.blockSize, b = _ * 4, z = F / b;
n ? z = r.ceil(z) : z = r.max((z | 0) - this._minBufferSize, 0);
var E = z * _, g = r.min(E * 4, F);
if (E) {
for (var w = 0; w < E; w += _)
this._doProcessBlock(D, w);
o = D.splice(0, E), f.sigBytes -= g;
}
return new p.init(o, g);
},
/**
* Creates a copy of this object.
*
* @return {Object} The clone.
*
* @example
*
* var clone = bufferedBlockAlgorithm.clone();
*/
clone: function() {
var n = a.clone.call(this);
return n._data = this._data.clone(), n;
},
_minBufferSize: 0
});
e.Hasher = c.extend({
/**
* Configuration options.
*/
cfg: a.extend(),
/**
* Initializes a newly created hasher.
*
* @param {Object} cfg (Optional) The configuration options to use for this hash computation.
*
* @example
*
* var hasher = CryptoJS.algo.SHA256.create();
*/
init: function(n) {
this.cfg = this.cfg.extend(n), this.reset();
},
/**
* Resets this hasher to its initial state.
*
* @example
*
* hasher.reset();
*/
reset: function() {
c.reset.call(this), this._doReset();
},
/**
* Updates this hasher with a message.
*
* @param {WordArray|string} messageUpdate The message to append.
*
* @return {Hasher} This hasher.
*
* @example
*
* hasher.update('message');
* hasher.update(wordArray);
*/
update: function(n) {
return this._append(n), this._process(), this;
},
/**
* Finalizes the hash computation.
* Note that the finalize operation is effectively a destructive, read-once operation.
*
* @param {WordArray|string} messageUpdate (Optional) A final message update.
*
* @return {WordArray} The hash.
*
* @example
*
* var hash = hasher.finalize();
* var hash = hasher.finalize('message');
* var hash = hasher.finalize(wordArray);
*/
finalize: function(n) {
n && this._append(n);
var o = this._doFinalize();
return o;
},
blockSize: 16,
/**
* Creates a shortcut function to a hasher's object interface.
*
* @param {Hasher} hasher The hasher to create a helper for.
*
* @return {Function} The shortcut function.
*
* @static
*
* @example
*
* var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
*/
_createHelper: function(n) {
return function(o, f) {
return new n.init(f).finalize(o);
};
},
/**
* Creates a shortcut function to the HMAC's object interface.
*
* @param {Hasher} hasher The hasher to use in this HMAC helper.
*
* @return {Function} The shortcut function.
*
* @static
*
* @example
*
* var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
*/
_createHmacHelper: function(n) {
return function(o, f) {
return new A.HMAC.init(n, f).finalize(o);
};
}
});
var A = B.algo = {};
return B;
}(Math);
return x;
});
}(b0)), b0.exports;
}
var k0 = { exports: {} }, _r;
function _0() {
return _r || (_r = 1, function(C, u) {
(function(x, r) {
C.exports = r(T());
})(O, function(x) {
return function(r) {
var i = x, d = i.lib, y = d.Base, h = d.WordArray, B = i.x64 = {};
B.Word = y.extend({
/**
* Initializes a newly created 64-bit word.
*
* @param {number} high The high 32 bits.
* @param {number} low The low 32 bits.
*
* @example
*
* var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
*/
init: function(e, a) {
this.high = e, this.low = a;
}
/**
* Bitwise NOTs this word.
*
* @return {X64Word} A new x64-Word object after negating.
*
* @example
*
* var negated = x64Word.not();
*/
// not: function () {
// var high = ~this.high;
// var low = ~this.low;
// return X64Word.create(high, low);
// },
/**
* Bitwise ANDs this word with the passed word.
*
* @param {X64Word} word The x64-Word to AND with this word.
*
* @return {X64Word} A new x64-Word object after ANDing.
*
* @example
*
* var anded = x64Word.and(anotherX64Word);
*/
// and: function (word) {
// var high = this.high & word.high;
// var low = this.low & word.low;
// return X64Word.create(high, low);
// },
/**
* Bitwise ORs this word with the passed word.
*
* @param {X64Word} word The x64-Word to OR with this word.
*
* @return {X64Word} A new x64-Word object after ORing.
*
* @example
*
* var ored = x64Word.or(anotherX64Word);
*/
// or: function (word) {
// var high = this.high | word.high;
// var low = this.low | word.low;
// return X64Word.create(high, low);
// },
/**
* Bitwise XORs this word with the passed word.
*
* @param {X64Word} word The x64-Word to XOR with this word.
*
* @return {X64Word} A new x64-Word object after XORing.
*
* @example
*
* var xored = x64Word.xor(anotherX64Word);
*/
// xor: function (word) {
// var high = this.high ^ word.high;
// var low = this.low ^ word.low;
// return X64Word.create(high, low);
// },
/**
* Shifts this word n bits to the left.
*
* @param {number} n The number of bits to shift.
*
* @return {X64Word} A new x64-Word object after shifting.
*
* @example
*
* var shifted = x64Word.shiftL(25);
*/
// shiftL: function (n) {
// if (n < 32) {
// var high = (this.high << n) | (this.low >>> (32 - n));
// var low = this.low << n;
// } else {
// var high = this.low << (n - 32);
// var low = 0;
// }
// return X64Word.create(high, low);
// },
/**
* Shifts this word n bits to the right.
*
* @param {number} n The number of bits to shift.
*
* @return {X64Word} A new x64-Word object after shifting.
*
* @example
*
* var shifted = x64Word.shiftR(7);
*/
// shiftR: function (n) {
// if (n < 32) {
// var low = (this.low >>> n) | (this.high << (32 - n));
// var high = this.high >>> n;
// } else {
// var low = this.high >>> (n - 32);
// var high = 0;
// }
// return X64Word.create(high, low);
// },
/**
* Rotates this word n bits to the left.
*
* @param {number} n The number of bits to rotate.
*
* @return {X64Word} A new x64-Word object after rotating.
*
* @example
*
* var rotated = x64Word.rotL(25);
*/
// rotL: function (n) {
// return this.shiftL(n).or(this.shiftR(64 - n));
// },
/**
* Rotates this word n bits to the right.
*
* @param {number} n The number of bits to rotate.
*
* @return {X64Word} A new x64-Word object after rotating.
*
* @example
*
* var rotated = x64Word.rotR(7);
*/
// rotR: function (n) {
// return this.shiftR(n).or(this.shiftL(64 - n));
// },
/**
* Adds this word with the passed word.
*
* @param {X64Word} word The x64-Word to add with this word.
*
* @return {X64Word} A new x64-Word object after adding.
*
* @example
*
* var added = x64Word.add(anotherX64Word);
*/
// add: function (word) {
// var low = (this.low + word.low) | 0;
// var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
// var high = (this.high + word.high + carry) | 0;
// return X64Word.create(high, low);
// }
}), B.WordArray = y.extend({
/**
* Initializes a newly created word array.
*
* @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
* @param {number} sigBytes (Optional) The number of significant bytes in the words.
*
* @example
*
* var wordArray = CryptoJS.x64.WordArray.create();
*
* var wordArray = CryptoJS.x64.WordArray.create([
* CryptoJS.x64.Word.create(0x00010203, 0x04050607),
* CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
* ]);
*
* var wordArray = CryptoJS.x64.WordArray.create([
* CryptoJS.x64.Word.create(0x00010203, 0x04050607),
* CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
* ], 10);
*/
init: function(e, a) {
e = this.words = e || [], a != r ? this.sigBytes = a : this.sigBytes = e.length * 8;
},
/**
* Converts this 64-bit word array to a 32-bit word array.
*
* @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
*
* @example
*
* var x32WordArray = x64WordArray.toX32();
*/
toX32: function() {
for (var e = this.words, a = e.length, p = [], t = 0; t < a; t++) {
var v = e[t];
p.push(v.high), p.push(v.low);
}
return h.create(p, this.sigBytes);
},
/**
* Creates a copy of this word array.
*
* @return {X64WordArray} The clone.
*
* @example
*
* var clone = x64WordArray.clone();
*/
clone: function() {
for (var e = y.clone.call(this), a = e.words = this.words.slice(0), p = a.length, t = 0; t < p; t++)
a[t] = a[t].clone();
return e;
}
});
}(), x;
});
}(k0)), k0.exports;
}
var w0 = { exports: {} }, gr;
function Pe() {
return gr || (gr = 1, function(C, u) {
(function(x, r) {
C.exports = r(T());
})(O, function(x) {
return function() {
if (typeof ArrayBuffer == "function") {
var r = x, i = r.lib, d = i.WordArray, y = d.init, h = d.init = function(B) {
if (B instanceof ArrayBuffer && (B = new Uint8Array(B)), (B instanceof Int8Array || typeof Uint8ClampedArray < "u" && B instanceof Uint8ClampedArray || B instanceof Int16Array || B instanceof Uint16Array || B instanceof Int32Array || B instanceof Uint32Array || B instanceof Float32Array || B instanceof Float64Array) && (B = new Uint8Array(B.buffer, B.byteOffset, B.byteLength)), B instanceof Uint8Array) {
for (var e = B.byteLength, a = [], p = 0; p < e; p++)
a[p >>> 2] |= B[p] << 24 - p % 4 * 8;
y.call(this, a, e);
} else
y.apply(this, arguments);
};
h.prototype = d;
}
}(), x.lib.WordArray;
});
}(w0)), w0.exports;
}
var S0 = { exports: {} }, yr;
function qe() {
return yr || (yr = 1, function(C, u) {
(function(x, r) {
C.exports = r(T());
})(O, function(x) {
return function() {
var r = x, i = r.lib, d = i.WordArray, y = r.enc;
y.Utf16 = y.Utf16BE = {
/**
* Converts a word array to a UTF-16 BE string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The UTF-16 BE string.
*
* @static
*
* @example
*
* var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
*/
stringify: function(B) {
for (var e = B.words, a = B.sigBytes, p = [], t = 0; t < a; t += 2) {
var v = e[t >>> 2] >>> 16 - t % 4 * 8 & 65535;
p.push(String.fromCharCode(v));
}
return p.join("");
},
/**
* Converts a UTF-16 BE string to a word array.
*
* @param {string} utf16Str The UTF-16 BE string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
*/
parse: function(B) {
for (var e = B.length, a = [], p = 0; p < e; p++)
a[p >>> 1] |= B.charCodeAt(p) << 16 - p % 2 * 16;
return d.create(a, e * 2);
}
}, y.Utf16LE = {
/**
* Converts a word array to a UTF-16 LE string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The UTF-16 LE string.
*
* @static
*
* @example
*
* var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
*/
stringify: function(B) {
for (var e = B.words, a = B.sigBytes, p = [], t = 0; t < a; t += 2) {
var v = h(e[t >>> 2] >>> 16 - t % 4 * 8 & 65535);
p.push(String.fromCharCode(v));
}
return p.join("");
},
/**
* Converts a UTF-16 LE string to a word array.
*
* @param {string} utf16Str The UTF-16 LE string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
*/
parse: function(B) {
for (var e = B.length, a = [], p = 0; p < e; p++)
a[p >>> 1] |= h(B.charCodeAt(p) << 16 - p % 2 * 16);
return d.create(a, e * 2);
}
};
function h(B) {
return B << 8 & 4278255360 | B >>> 8 & 16711935;
}
}(), x.enc.Utf16;
});
}(S0)), S0.exports;
}
var m0 = { exports: {} }, br;
function i0() {
return br || (br = 1, function(C, u) {
(function(x, r) {
C.exports = r(T());
})(O, function(x) {
return function() {
var r = x, i = r.lib, d = i.WordArray, y = r.enc;
y.Base64 = {
/**
* Converts a word array to a Base64 string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The Base64 string.
*
* @static
*
* @example
*
* var base64String = CryptoJS.enc.Base64.stringify(wordArray);
*/
stringify: function(B) {
var e = B.words, a = B.sigBytes, p = this._map;
B.clamp();
for (var t = [], v = 0; v < a; v += 3)
for (var s = e[v >>> 2] >>> 24 - v % 4 * 8 & 255, l = e[v + 1 >>> 2] >>> 24 - (v + 1) % 4 * 8 & 255, c = e[v + 2 >>> 2] >>> 24 - (v + 2) % 4 * 8 & 255, A = s << 16 | l << 8 | c, n = 0; n < 4 && v + n * 0.75 < a; n++)
t.push(p.charAt(A >>> 6 * (3 - n) & 63));
var o = p.charAt(64);
if (o)
for (; t.length % 4; )
t.push(o);
return t.join("");
},
/**
* Converts a Base64 string to a word array.
*
* @param {string} base64Str The Base64 string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Base64.parse(base64String);
*/
parse: function(B) {
var e = B.length, a = this._map, p = this._reverseMap;
if (!p) {
p = this._reverseMap = [];
for (var t = 0; t < a.length; t++)
p[a.charCodeAt(t)] = t;
}
var v = a.charAt(64);
if (v) {
var s = B.indexOf(v);
s !== -1 && (e = s);
}
return h(B, e, p);
},
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
};
function h(B, e, a) {
for (var p = [], t = 0, v = 0; v < e; v++)
if (v % 4) {
var s = a[B.charCodeAt(v - 1)] << v % 4 * 2, l = a[B.charCodeAt(v)] >>> 6 - v % 4 * 2, c = s | l;
p[t >>> 2] |= c << 24 - t % 4 * 8, t++;
}
return d.create(p, t);
}
}(), x.enc.Base64;
});
}(m0)), m0.exports;
}
var H0 = { exports: {} }, kr;
function Ie() {
return kr || (kr = 1, function(C, u) {
(function(x, r) {
C.exports = r(T());
})(O, function(x) {
return function() {
var r = x, i = r.lib, d = i.WordArray, y = r.enc;
y.Base64url = {
/**
* Converts a word array to a Base64url string.
*
* @param {WordArray} wordArray The word array.
*
* @param {boolean} urlSafe Whether to use url safe
*
* @return {string} The Base64url string.
*
* @static
*
* @example
*
* var base64String = CryptoJS.enc.Base64url.stringify(wordArray);
*/
stringify: function(B, e) {
e === void 0 && (e = !0);
var a = B.words, p = B.sigBytes, t = e ? this._safe_map : this._map;
B.clamp();
for (var v = [], s = 0; s < p; s += 3)
for (var l = a[s >>> 2] >>> 24 - s % 4 * 8 & 255, c = a[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255, A = a[s + 2 >>> 2] >>> 24 - (s + 2) % 4 * 8 & 255, n = l << 16 | c << 8 | A, o = 0; o < 4 && s + o * 0.75 < p; o++)
v.push(t.charAt(n >>> 6 * (3 - o) & 63));
var f = t.charAt(64);
if (f)
for (; v.length % 4; )
v.push(f);
return v.join("");
},
/**
* Converts a Base64url string to a word array.
*
* @param {string} base64Str The Base64url string.
*
* @param {boolean} urlSafe Whether to use url safe
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Base64url.parse(base64String);
*/
parse: function(B, e) {
e === void 0 && (e = !0);
var a = B.length, p = e ? this._safe_map : this._map, t = this._reverseMap;
if (!t) {
t = this._reverseMap = [];
for (var v = 0; v < p.length; v++)
t[p.charCodeAt(v)] = v;
}
var s = p.charAt(64);
if (s) {
var l = B.indexOf(s);
l !== -1 && (a = l);
}
return h(B, a, t);
},
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
_safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
};
function h(B, e, a) {
for (var p = [], t = 0, v = 0; v < e; v++)
if (v % 4) {
var s = a[B.charCodeAt(v - 1)] << v % 4 * 2, l = a[B.charCodeAt(v)] >>> 6 - v % 4 * 2, c = s | l;
p[t >>> 2] |= c << 24 - t % 4 * 8, t++;
}
return d.create(p, t);
}
}(), x.enc.Base64url;
});
}(H0)), H0.exports;
}
var R0 = { exports: {} }, wr;
function s0() {
return wr || (wr = 1, function(C, u) {
(function(x, r) {
C.exports = r(T());
})(O, function(x) {
return function(r) {
var i = x, d = i.lib, y = d.WordArray, h = d.Hasher, B = i.algo, e = [];
(function() {
for (var l = 0; l < 64; l++)
e[l] = r.abs(r.sin(l + 1)) * 4294967296 | 0;
})();
var a = B.MD5 = h.extend({
_doReset: function() {
this._hash = new y.init([
1732584193,
4023233417,
2562383102,
271733878
]);
},
_doProcessBlock: function(l, c) {
for (var A = 0; A < 16; A++) {
var n = c + A, o = l[n];
l[n] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
}
var f = this._hash.words, D = l[c + 0], F = l[c + 1], _ = l[c + 2], b = l[c + 3], z = l[c + 4], E = l[c + 5], g = l[c + 6], w = l[c + 7], S = l[c + 8], P = l[c + 9], q = l[c + 10], I = l[c + 11], G = l[c + 12], W = l[c + 13], K = l[c + 14], L = l[c + 15], k = f[0], H = f[1], R = f[2], m = f[3];
k = p(k, H, R, m, D, 7, e[0]), m = p(m, k, H, R, F, 12, e[1]), R = p(R, m, k, H, _, 17, e[2]), H = p(H, R, m, k, b, 22, e[3]), k = p(k, H, R, m, z, 7, e[4]), m = p(m, k, H, R, E, 12, e[5]), R = p(R, m, k, H, g, 17, e[6]), H = p(H, R, m, k, w, 22, e[7]), k = p(k, H, R, m, S, 7, e[8]), m = p(m, k, H, R, P, 12, e[9]), R = p(R, m, k, H, q, 17, e[10]), H = p(H, R, m, k, I, 22, e[11]), k = p(k, H, R, m, G, 7, e[12]), m = p(m, k, H, R, W, 12, e[13]), R = p(R, m, k, H, K, 17, e[14]), H = p(H, R, m, k, L, 22, e[15]), k = t(k, H, R, m, F, 5, e[16]), m = t(m, k, H, R, g, 9, e[17]), R = t(R, m, k, H, I, 14, e[18]), H = t(H, R, m, k, D, 20, e[19]), k = t(k, H, R, m, E, 5, e[20]), m = t(m, k, H, R, q, 9, e[21]), R = t(R, m, k, H, L, 14, e[22]), H = t(H, R, m, k, z, 20, e[23]), k = t(k, H, R, m, P, 5, e[24]), m = t(m, k, H, R, K, 9, e[25]), R = t(R, m, k, H, b, 14, e[26]), H = t(H, R, m, k, S, 20, e[27]), k = t(k, H, R, m, W, 5, e[28]), m = t(m, k, H, R, _, 9, e[29]), R = t(R, m, k, H, w, 14, e[30]), H = t(H, R, m, k, G, 20, e[31]), k = v(k, H, R, m, E, 4, e[32]), m = v(m, k, H, R, S, 11, e[33]), R = v(R, m, k, H, I, 16, e[34]), H = v(H, R, m, k, K, 23, e[35]), k = v(k, H, R, m, F, 4, e[36]), m = v(m, k, H, R, z, 11, e[37]), R = v(R, m, k, H, w, 16, e[38]), H = v(H, R, m, k, q, 23, e[39]), k = v(k, H, R, m, W, 4, e[40]), m = v(m, k, H, R, D, 11, e[41]), R = v(R, m, k, H, b, 16, e[42]), H = v(H, R, m, k, g, 23, e[43]), k = v(k, H, R, m, P, 4, e[44]), m = v(m, k, H, R, G, 11, e[45]), R = v(R, m, k, H, L, 16, e[46]), H = v(H, R, m, k, _, 23, e[47]), k = s(k, H, R, m, D, 6, e[48]), m = s(m, k, H, R, w, 10, e[49]), R = s(R, m, k, H, K, 15, e[50]), H = s(H, R, m, k, E, 21, e[51]), k = s(k, H, R, m, G, 6, e[52]), m = s(m, k, H, R, b, 10, e[53]), R = s(R, m, k, H, q, 15, e[54]), H = s(H, R, m, k, F, 21, e[55]), k = s(k, H, R, m, S, 6, e[56]), m = s(m, k, H, R, L, 10, e[57]), R = s(R, m, k, H, g, 15, e[58]), H = s(H, R, m, k, W, 21, e[59]), k = s(k, H, R, m, z, 6, e[60]), m = s(m, k, H, R, I, 10, e[61]), R = s(R, m, k, H, _, 15, e[62]), H = s(H, R, m, k, P, 21, e[63]), f[0] = f[0] + k | 0, f[1] = f[1] + H | 0, f[2] = f[2] + R | 0, f[3] = f[3] + m | 0;
},
_doFinalize: function() {
var l = this._data, c = l.words, A = this._nDataBytes * 8, n = l.sigBytes * 8;
c[n >>> 5] |= 128 << 24 - n % 32;
var o = r.floor(A / 4294967296), f = A;
c[(n + 64 >>> 9 << 4) + 15] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, c[(n + 64 >>> 9 << 4) + 14] = (f << 8 | f >>> 24) & 16711935 | (f << 24 | f >>> 8) & 4278255360, l.sigBytes = (c.length + 1) * 4, this._process();
for (var D = this._hash, F = D.words, _ = 0; _ < 4; _++) {
var b = F[_];
F[_] = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360;
}
return D;
},
clone: function() {
var l = h.clone.call(this);
return l._hash = this._hash.clone(), l;
}
});
function p(l, c, A, n, o, f, D) {
var F = l + (c & A | ~c & n) + o + D;
return (F << f | F >>> 32 - f) + c;
}
function t(l, c, A, n, o, f, D) {
var F = l + (c & n | A & ~n) + o + D;
return (F << f | F >>> 32 - f) + c;
}
function v(l, c, A, n, o, f, D) {
var F = l + (c ^ A ^ n) + o + D;
return (F << f | F >>> 32 - f) + c;
}
function s(l, c, A, n, o, f, D) {
var F = l + (A ^ (c | ~n)) + o + D;
return (F << f | F >>> 32 - f) + c;
}
i.MD5 = h._createHelper(a), i.HmacMD5 = h._createHmacHelper(a);
}(Math), x.MD5;
});
}(R0)), R0.exports;
}
var z0 = { exports: {} }, Sr;
function ce() {
return Sr || (Sr = 1, function(C, u) {
(function(x, r) {
C.exports = r(T());
})(O, function(x) {
return function() {
var r = x, i = r.lib, d = i.WordArray, y = i.Hasher, h = r.algo, B = [], e = h.SHA1 = y.extend({
_doReset: function() {
this._hash = new d.init([
1732584193,
4023233417,
2562383102,
271733878,
3285377520
]);
},
_doProcessBlock: function(a, p) {
for (var t = this._hash.words, v = t[0], s = t[1], l = t[2], c = t[3], A = t[4], n = 0; n < 80; n++) {
if (n < 16)
B[n] = a[p + n] | 0;
else {
var o = B[n - 3] ^ B[n - 8] ^ B[n - 14] ^ B[n - 16];
B[n] = o << 1 | o >>> 31;
}
var f = (v << 5 | v >>> 27) + A + B[n];
n < 20 ? f += (s & l | ~s & c) + 1518500249 : n < 40 ? f += (s ^ l ^ c) + 1859775393 : n < 60 ? f += (s & l | s & c | l & c) - 1894007588 : f += (s ^ l ^ c) - 899497514, A = c, c = l, l = s << 30 | s >>> 2, s = v, v = f;
}
t[0] = t[0] + v | 0, t[1] = t[1] + s | 0, t[2] = t[2] + l | 0, t[3] = t[3] + c | 0, t[4] = t[4] + A | 0;
},
_doFinalize: function() {
var a = this._data, p = a.words, t = this._nDataBytes * 8, v = a.sigBytes * 8;
return p[v >>> 5] |= 128 << 24 - v % 32, p[(v + 64 >>> 9 << 4) + 14] = Math.floor(t / 4294967296), p[(v + 64 >>> 9 << 4) + 15] = t, a.sigBytes = p.length * 4, this._process(), this._hash;
},
clone: function() {
var a = y.clone.call(this);
return a._hash = this._hash.clone(), a;
}
});
r.SHA1 = y._createHelper(e), r.HmacSHA1 = y._createHmacHelper(e);
}(), x.SHA1;
});
}(z0)), z0.exports;
}
var P0 = { exports: {} }, mr;
function sr() {
return mr || (mr = 1, function(C, u) {
(function(x, r) {
C.exports = r(T());
})(O, function(x) {
return function(r) {
var i = x, d = i.lib, y = d.WordArray, h = d.Hasher, B = i.algo, e = [], a = [];
(function() {
function v(A) {
for (var n = r.sqrt(A), o = 2; o <= n; o++)
if (!(A % o))
return !1;
return !0;
}
function s(A) {
return (A - (A | 0)) * 4294967296 | 0;
}
for (var l = 2, c = 0; c < 64; )
v(l) && (c < 8 && (e[c] = s(r.pow(l, 1 / 2))), a[c] = s(r.pow(l, 1 / 3)), c++), l++;
})();
var p = [], t = B.SHA256 = h.extend({
_doReset: function() {
this._hash = new y.init(e.slice(0));
},
_doProcessBlock: function(v, s) {
for (var l = this._hash.words, c = l[0], A = l[1], n = l[2], o = l[3], f = l[4], D = l[5], F = l[6], _ = l[7], b = 0; b < 64; b++) {
if (b < 16)
p[b] = v[s + b] | 0;
else {
var z = p[b - 15], E = (z << 25 | z >>> 7) ^ (z << 14 | z >>> 18) ^ z >>> 3, g = p[b - 2], w = (g << 15 | g >>> 17) ^ (g << 13 | g >>> 19) ^ g >>> 10;
p[b] = E + p[b - 7] + w + p[b - 16];
}
var S = f & D ^ ~f & F, P = c & A ^ c & n ^ A & n, q = (c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22), I = (f << 26 | f >>> 6) ^ (f << 21 | f >>> 11) ^ (f << 7 | f >>> 25), G = _ + I + S + a[b] + p[b], W = q + P;
_ = F, F = D, D = f, f = o + G | 0, o = n, n = A, A = c, c = G + W | 0;
}
l[0] = l[0] + c | 0, l[1] = l[1] + A | 0, l[2] = l[2] + n | 0, l[3] = l[3] + o | 0, l[4] = l[4] + f | 0, l[5] = l[5] + D | 0, l[6] = l[6] + F | 0, l[7] = l[7] + _ | 0;
},
_doFinalize: function() {
var v = this._data, s = v.words, l = this._nDataBytes * 8, c = v.sigBytes * 8;
return s[c >>> 5] |= 128 << 24 - c % 32, s[(c + 64 >>> 9 << 4) + 14] = r.floor(l / 4294967296), s[(c + 64 >>> 9 << 4) + 15] = l, v.sigBytes = s.length * 4, this._process(), this._hash;
},
clone: function() {
var v = h.clone.call(this);
return v._hash = this._hash.clone(), v;
}
});
i.SHA256 = h._createHelper(t), i.HmacSHA256 = h._createHmacHelper(t);
}(Math), x.SHA256;
});
}(P0)), P0.exports;
}
var q0 = { exports: {} }, Hr;
function Oe() {
return Hr || (Hr = 1, function(C, u) {
(function(x, r, i) {
C.exports = r(T(), sr());
})(O, function(x) {
return function() {
var r = x, i = r.lib, d = i.WordArray, y = r.algo, h = y.SHA256, B = y.SHA224 = h.extend({
_doReset: function() {
this._hash = new d.init([
3238371032,
914150663,
812702999,
4144912697,
4290775857,
1750603025,
1694076839,
3204075428
]);
},
_doFinalize: function() {
var e = h._doFinalize.call(this);
return e.sigBytes -= 4, e;
}
});
r.SHA224 = h._createHelper(B), r.HmacSHA224 = h._createHmacHelper(B);
}(), x.SHA224;
});
}(q0)), q0.exports;
}
var I0 = { exports: {} }, Rr;
function ve() {
return Rr || (Rr = 1, function(C, u) {
(function(x, r, i) {
C.exports = r(T(), _0());
})(O, function(x) {
return function() {
var r = x, i = r.lib, d = i.Hasher, y = r.x64, h = y.Word, B = y.WordArray, e = r.algo;
function a() {
return h.create.apply(h, arguments);
}
var p = [
a(1116352408, 3609767458),
a(1899447441, 602891725),
a(3049323471, 3964484399),
a(3921009573, 2173295548),
a(961987163, 4081628472),
a(1508970993, 3053834265),
a(2453635748, 2937671579),
a(2870763221, 3664609560),
a(3624381080, 2734883394),
a(310598401, 1164996542),
a(607225278, 1323610764),
a(1426881987, 3590304994),
a(1925078388, 4068182383),
a(2162078206, 991336113),
a(2614888103, 633803317),
a(3248222580, 3479774868),
a(3835390401, 2666613458),
a(4022224774, 944711139),
a(264347078, 2341262773),
a(604807628, 2007800933),
a(770255983, 1495990901),
a(1249150122, 1856431235),
a(1555081692, 3175218132),
a(1996064986, 2198950837),
a(2554220882, 3999719339),
a(2821834349, 766784016),
a(2952996808, 2566594879),
a(3210313671, 3203337956),
a(3336571891, 1034457026),
a(3584528711, 2466948901),
a(113926993, 3758326383),
a(338241895, 168717936),
a(666307205, 1188179964),
a(773529912, 1546045734),
a(1294757372, 1522805485),
a(1396182291, 2643833823),
a(1695183700, 2343527390),
a(1986661051, 1014477480),
a(2177026350, 1206759142),
a(2456956037, 344077627),
a(2730485921, 1290863460),
a(2820302411, 3158454273),
a(3259730800, 3505952657),
a(3345764771, 106217008),
a(3516065817, 3606008344),
a(3600352804, 1432725776),
a(4094571909, 1467031594),
a(275423344, 851169720),
a(430227734, 3100823752),
a(506948616, 1363258195),
a(659060556, 3750685593),
a(883997877, 3785050280),
a(958139571, 3318307427),
a(1322822218, 3812723403),
a(1537002063, 2003034995),
a(1747873779, 3602036899),
a(1955562222, 1575990012),
a(2024104815, 1125592928),
a(2227730452, 2716904306),
a(2361852424, 442776044),
a(2428436474, 593698344),
a(2756734187, 3733110249),
a(3204031479, 2999351573),
a(3329325298, 3815920427),
a(3391569614, 3928383900),
a(3515267271, 566280711),
a(3940187606, 3454069534),
a(4118630271, 4000239992),
a(116418474, 1914138554),
a(174292421, 2731055270),
a(289380356, 3203993006),
a(460393269, 320620315),
a(685471733, 587496836),
a(852142971, 1086792851),
a(1017036298, 365543100),
a(1126000580, 2618297676),