>>2]>>>(24-(n%4)*8))&255;q.push((s>>>4).toString(16));q.push((s&15).toString(16))}return q.join("")},parse:function(p){var n=p.length;var q=[];for(var o=0;o >>2]>>>(24-(o%4)*8))&255;n.push(String.fromCharCode(s))}return n.join("")},parse:function(p){var n=p.length;var q=[];for(var o=0;o >>0?1:0),b=b+c,j=j+u+(b>>>0 >>32-p[b],a=a+r|0,t=r,r=j,j=h<<10|h>>>22,h=g,g=a,a=u+e[v+q[b]]|0,a=16>b?a+((k^(l|~m))+d[0]):32>b?a+((k&m|l&~m)+d[1]):48>b?a+(((k|~l)^m)+d[2]):64>b?a+((k&l|~k&m)+d[3]):a+((k^l^m)+d[4]),a|=0,a=a< =0){var c=(g[--u]==b)?this.DM:Math.floor(g[u]*A+(g[u-1]+x)*z);if((g[u]+=d.am(0,c,g,s,0,p)) >>2]>>>(24-(n%4)*8))&255;q.push((s>>>4).toString(16));q.push((s&15).toString(16))}return q.join("")},parse:function(p){var n=p.length;var q=[];for(var o=0;o >>2]>>>(24-(o%4)*8))&255;n.push(String.fromCharCode(s))}return n.join("")},parse:function(p){var n=p.length;var q=[];for(var o=0;o >>0?1:0),b=b+c,j=j+u+(b>>>0 >>32-p[b],a=a+r|0,t=r,r=j,j=h<<10|h>>>22,h=g,g=a,a=u+e[v+q[b]]|0,a=16>b?a+((k^(l|~m))+d[0]):32>b?a+((k&m|l&~m)+d[1]):48>b?a+(((k|~l)^m)+d[2]):64>b?a+((k&l|~k&m)+d[3]):a+((k^l^m)+d[4]),a|=0,a=a<>>2]&255}};f.BlockCipher=n.extend({cfg:n.cfg.extend({mode:m,padding:h}),reset:function(){n.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;
+this._mode=c.call(a,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var p=f.CipherParams=k.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),m=(g.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;
+return(a?l.create([1398893684,1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=l.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return p.create({ciphertext:a,salt:c})}},j=f.SerializableCipher=k.extend({cfg:k.extend({format:m}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return p.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding,
+blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),g=(g.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=l.random(8));a=v.create({keySize:b+c}).compute(a,d);c=l.create(a.words.slice(b),4*c);a.sigBytes=4*b;return p.create({key:a,iv:c,salt:d})}},s=f.PasswordBasedCipher=j.extend({cfg:j.cfg.extend({kdf:g}),encrypt:function(a,
+b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=c.iv;a=j.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=c.iv;return j.decrypt.call(this,a,b,c.key,d)}})}();
- --session[kCurrentStreamsCount];
+/*
+CryptoJS v3.1.2 aes.js
+code.google.com/p/crypto-js
+(c) 2009-2013 by Jeff Mott. All rights reserved.
+code.google.com/p/crypto-js/wiki/License
+*/
+(function(){for(var q=CryptoJS,x=q.lib.BlockCipher,r=q.algo,j=[],y=[],z=[],A=[],B=[],C=[],s=[],u=[],v=[],w=[],g=[],k=0;256>k;k++)g[k]=128>k?k<<1:k<<1^283;for(var n=0,l=0,k=0;256>k;k++){var f=l^l<<1^l<<2^l<<3^l<<4,f=f>>>8^f&255^99;j[n]=f;y[f]=n;var t=g[n],D=g[t],E=g[D],b=257*g[f]^16843008*f;z[n]=b<<24|b>>>8;A[n]=b<<16|b>>>16;B[n]=b<<8|b>>>24;C[n]=b;b=16843009*E^65537*D^257*t^16843008*n;s[f]=b<<24|b>>>8;u[f]=b<<16|b>>>16;v[f]=b<<8|b>>>24;w[f]=b;n?(n=t^g[g[g[E^t]]],l^=g[g[l]]):n=l=1}var F=[0,1,2,4,8,
+16,32,64,128,27,54],r=r.AES=x.extend({_doReset:function(){for(var c=this._key,e=c.words,a=c.sigBytes/4,c=4*((this._nRounds=a+6)+1),b=this._keySchedule=[],h=0;h>
- staticFrame.bind('join', defineFunction(fn.join, 's?:s>'));
- staticFrame.bind('formatNumber', defineFunction(fn.formatNumber, ''));
- staticFrame.bind('assert', defineFunction(fn.assert, ''));
- environment.bind('millis', defineFunction(function() {
- return timestamp.getTime();
- }, '<:n>'));
-
- if(options && options.RegexEngine) {
- jsonata.RegexEngine = options.RegexEngine;
- } else {
- jsonata.RegexEngine = RegExp;
- }
-
- return {
- evaluate: async function (input, bindings, callback) {
- // throw if the expression compiled with syntax errors
- if(typeof errors !== 'undefined') {
- var err = {
- code: 'S0500',
- position: 0
- };
- populateMessage(err); // possible side-effects on `err`
- throw err;
- }
-
- if (typeof bindings !== 'undefined') {
- var exec_env;
- // the variable bindings have been passed in - create a frame to hold these
- exec_env = createFrame(environment);
- for (var v in bindings) {
- exec_env.bind(v, bindings[v]);
- }
- } else {
- exec_env = environment;
- }
- // put the input document into the environment as the root object
- exec_env.bind('$', input);
-
- // capture the timestamp and put it in the execution environment
- // the $now() and $millis() functions will return this value - whenever it is called
- timestamp = new Date();
- exec_env.timestamp = timestamp;
-
- // if the input is a JSON array, then wrap it in a singleton sequence so it gets treated as a single input
- if(Array.isArray(input) && !isSequence(input)) {
- input = createSequence(input);
- input.outerWrapper = true;
- }
-
- var it;
- try {
- it = await evaluate(ast, input, exec_env);
- if (typeof callback === "function") {
- callback(null, it);
- }
- return it;
- } catch (err) {
- // insert error message into structure
- populateMessage(err); // possible side-effects on `err`
- throw err;
- }
- },
- assign: function (name, value) {
- environment.bind(name, value);
- },
- registerFunction: function(name, implementation, signature) {
- var func = defineFunction(implementation, signature);
- environment.bind(name, func);
- },
- ast: function() {
- return ast;
- },
- errors: function() {
- return errors;
- }
- };
+}
+function assertUint8ClampedArray(value) {
+ if (!isUint8ClampedArray(value)) {
+ throw new TypeError(typeErrorMessage('Uint8ClampedArray', value));
+ }
+}
+function assertUndefined(value) {
+ if (!isUndefined(value)) {
+ throw new TypeError(typeErrorMessage('undefined', value));
+ }
+}
+function assertUrlInstance(value) {
+ if (!isUrlInstance(value)) {
+ throw new TypeError(typeErrorMessage('URL', value));
}
+}
+// eslint-disable-next-line unicorn/prevent-abbreviations
+function assertUrlSearchParams(value) {
+ if (!isUrlSearchParams(value)) {
+ throw new TypeError(typeErrorMessage('URLSearchParams', value));
+ }
+}
+function assertUrlString(value) {
+ if (!isUrlString(value)) {
+ throw new TypeError(typeErrorMessage('string with a URL', value));
+ }
+}
+function assertValidDate(value) {
+ if (!isValidDate(value)) {
+ throw new TypeError(typeErrorMessage('valid Date', value));
+ }
+}
+function assertValidLength(value) {
+ if (!isValidLength(value)) {
+ throw new TypeError(typeErrorMessage('valid length', value));
+ }
+}
+// eslint-disable-next-line @typescript-eslint/ban-types
+function assertWeakMap(value) {
+ if (!isWeakMap(value)) {
+ throw new TypeError(typeErrorMessage('WeakMap', value));
+ }
+}
+// eslint-disable-next-line @typescript-eslint/ban-types
+function assertWeakRef(value) {
+ if (!isWeakRef(value)) {
+ throw new TypeError(typeErrorMessage('WeakRef', value));
+ }
+}
+// eslint-disable-next-line @typescript-eslint/ban-types
+function assertWeakSet(value) {
+ if (!isWeakSet(value)) {
+ throw new TypeError(typeErrorMessage('WeakSet', value));
+ }
+}
+function assertWhitespaceString(value) {
+ if (!isWhitespaceString(value)) {
+ throw new TypeError(typeErrorMessage('whitespace string', value));
+ }
+}
+/* harmony default export */ const dist = (is);
- jsonata.parser = parser; // TODO remove this in a future release - use ast() instead
-
- return jsonata;
-
-})();
-
-module.exports = jsonata;
-
-},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(require,module,exports){
-/**
- * © Copyright IBM Corp. 2016, 2018 All Rights Reserved
- * Project name: JSONata
- * This project is licensed under the MIT License, see LICENSE
- */
-
-var parseSignature = require('./signature');
-
-const parser = (() => {
- 'use strict';
-
- var operators = {
- '.': 75,
- '[': 80,
- ']': 0,
- '{': 70,
- '}': 0,
- '(': 80,
- ')': 0,
- ',': 0,
- '@': 80,
- '#': 80,
- ';': 80,
- ':': 80,
- '?': 20,
- '+': 50,
- '-': 50,
- '*': 60,
- '/': 60,
- '%': 60,
- '|': 20,
- '=': 40,
- '<': 40,
- '>': 40,
- '^': 40,
- '**': 60,
- '..': 20,
- ':=': 10,
- '!=': 40,
- '<=': 40,
- '>=': 40,
- '~>': 40,
- 'and': 30,
- 'or': 25,
- 'in': 40,
- '&': 50,
- '!': 0, // not an operator, but needed as a stop character for name tokens
- '~': 0 // not an operator, but needed as a stop character for name tokens
- };
-
- var escapes = { // JSON string escape sequences - see json.org
- '"': '"',
- '\\': '\\',
- '/': '/',
- 'b': '\b',
- 'f': '\f',
- 'n': '\n',
- 'r': '\r',
- 't': '\t'
- };
-
- // Tokenizer (lexer) - invoked by the parser to return one token at a time
- var tokenizer = function (path) {
- var position = 0;
- var length = path.length;
-
- var create = function (type, value) {
- var obj = {type: type, value: value, position: position};
- return obj;
- };
-
- var scanRegex = function () {
- // the prefix '/' will have been previously scanned. Find the end of the regex.
- // search for closing '/' ignoring any that are escaped, or within brackets
- var start = position;
- var depth = 0;
- var pattern;
- var flags;
-
- var isClosingSlash = function (position) {
- if (path.charAt(position) === '/' && depth === 0) {
- var backslashCount = 0;
- while (path.charAt(position - (backslashCount + 1)) === '\\') {
- backslashCount++;
- }
- if (backslashCount % 2 === 0) {
- return true;
- }
- }
- return false;
- };
-
- while (position < length) {
- var currentChar = path.charAt(position);
- if (isClosingSlash(position)) {
- // end of regex found
- pattern = path.substring(start, position);
- if (pattern === '') {
- throw {
- code: "S0301",
- stack: (new Error()).stack,
- position: position
- };
- }
- position++;
- currentChar = path.charAt(position);
- // flags
- start = position;
- while (currentChar === 'i' || currentChar === 'm') {
- position++;
- currentChar = path.charAt(position);
- }
- flags = path.substring(start, position) + 'g';
- return new RegExp(pattern, flags);
- }
- if ((currentChar === '(' || currentChar === '[' || currentChar === '{') && path.charAt(position - 1) !== '\\') {
- depth++;
- }
- if ((currentChar === ')' || currentChar === ']' || currentChar === '}') && path.charAt(position - 1) !== '\\') {
- depth--;
- }
-
- position++;
- }
- throw {
- code: "S0302",
- stack: (new Error()).stack,
- position: position
- };
- };
+;// CONCATENATED MODULE: external "node:events"
+const external_node_events_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:events");
+;// CONCATENATED MODULE: ./node_modules/p-cancelable/index.js
+class CancelError extends Error {
+ constructor(reason) {
+ super(reason || 'Promise was canceled');
+ this.name = 'CancelError';
+ }
- var next = function (prefix) {
- if (position >= length) return null;
- var currentChar = path.charAt(position);
- // skip whitespace
- while (position < length && ' \t\n\r\v'.indexOf(currentChar) > -1) {
- position++;
- currentChar = path.charAt(position);
- }
- // skip comments
- if (currentChar === '/' && path.charAt(position + 1) === '*') {
- var commentStart = position;
- position += 2;
- currentChar = path.charAt(position);
- while (!(currentChar === '*' && path.charAt(position + 1) === '/')) {
- currentChar = path.charAt(++position);
- if (position >= length) {
- // no closing tag
- throw {
- code: "S0106",
- stack: (new Error()).stack,
- position: commentStart
- };
- }
- }
- position += 2;
- currentChar = path.charAt(position);
- return next(prefix); // need this to swallow any following whitespace
- }
- // test for regex
- if (prefix !== true && currentChar === '/') {
- position++;
- return create('regex', scanRegex());
- }
- // handle double-char operators
- if (currentChar === '.' && path.charAt(position + 1) === '.') {
- // double-dot .. range operator
- position += 2;
- return create('operator', '..');
- }
- if (currentChar === ':' && path.charAt(position + 1) === '=') {
- // := assignment
- position += 2;
- return create('operator', ':=');
- }
- if (currentChar === '!' && path.charAt(position + 1) === '=') {
- // !=
- position += 2;
- return create('operator', '!=');
- }
- if (currentChar === '>' && path.charAt(position + 1) === '=') {
- // >=
- position += 2;
- return create('operator', '>=');
- }
- if (currentChar === '<' && path.charAt(position + 1) === '=') {
- // <=
- position += 2;
- return create('operator', '<=');
- }
- if (currentChar === '*' && path.charAt(position + 1) === '*') {
- // ** descendant wildcard
- position += 2;
- return create('operator', '**');
- }
- if (currentChar === '~' && path.charAt(position + 1) === '>') {
- // ~> chain function
- position += 2;
- return create('operator', '~>');
- }
- // test for single char operators
- if (Object.prototype.hasOwnProperty.call(operators, currentChar)) {
- position++;
- return create('operator', currentChar);
- }
- // test for string literals
- if (currentChar === '"' || currentChar === "'") {
- var quoteType = currentChar;
- // double quoted string literal - find end of string
- position++;
- var qstr = "";
- while (position < length) {
- currentChar = path.charAt(position);
- if (currentChar === '\\') { // escape sequence
- position++;
- currentChar = path.charAt(position);
- if (Object.prototype.hasOwnProperty.call(escapes, currentChar)) {
- qstr += escapes[currentChar];
- } else if (currentChar === 'u') {
- // \u should be followed by 4 hex digits
- var octets = path.substr(position + 1, 4);
- if (/^[0-9a-fA-F]+$/.test(octets)) {
- var codepoint = parseInt(octets, 16);
- qstr += String.fromCharCode(codepoint);
- position += 4;
- } else {
- throw {
- code: "S0104",
- stack: (new Error()).stack,
- position: position
- };
- }
- } else {
- // illegal escape sequence
- throw {
- code: "S0103",
- stack: (new Error()).stack,
- position: position,
- token: currentChar
- };
+ get isCanceled() {
+ return true;
+ }
+}
- }
- } else if (currentChar === quoteType) {
- position++;
- return create('string', qstr);
- } else {
- qstr += currentChar;
- }
- position++;
- }
- throw {
- code: "S0101",
- stack: (new Error()).stack,
- position: position
- };
- }
- // test for numbers
- var numregex = /^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/;
- var match = numregex.exec(path.substring(position));
- if (match !== null) {
- var num = parseFloat(match[0]);
- if (!isNaN(num) && isFinite(num)) {
- position += match[0].length;
- return create('number', num);
- } else {
- throw {
- code: "S0102",
- stack: (new Error()).stack,
- position: position,
- token: match[0]
- };
- }
- }
- // test for quoted names (backticks)
- var name;
- if (currentChar === '`') {
- // scan for closing quote
- position++;
- var end = path.indexOf('`', position);
- if (end !== -1) {
- name = path.substring(position, end);
- position = end + 1;
- return create('name', name);
- }
- position = length;
- throw {
- code: "S0105",
- stack: (new Error()).stack,
- position: position
- };
- }
- // test for names
- var i = position;
- var ch;
- for (; ;) {
- ch = path.charAt(i);
- if (i === length || ' \t\n\r\v'.indexOf(ch) > -1 || Object.prototype.hasOwnProperty.call(operators, ch)) {
- if (path.charAt(position) === '$') {
- // variable reference
- name = path.substring(position + 1, i);
- position = i;
- return create('variable', name);
- } else {
- name = path.substring(position, i);
- position = i;
- switch (name) {
- case 'or':
- case 'in':
- case 'and':
- return create('operator', name);
- case 'true':
- return create('value', true);
- case 'false':
- return create('value', false);
- case 'null':
- return create('value', null);
- default:
- if (position === length && name === '') {
- // whitespace at end of input
- return null;
- }
- return create('name', name);
- }
- }
- } else {
- i++;
- }
- }
- };
+const promiseState = Object.freeze({
+ pending: Symbol('pending'),
+ canceled: Symbol('canceled'),
+ resolved: Symbol('resolved'),
+ rejected: Symbol('rejected'),
+});
- return next;
- };
+class PCancelable {
+ static fn(userFunction) {
+ return (...arguments_) => new PCancelable((resolve, reject, onCancel) => {
+ arguments_.push(onCancel);
+ userFunction(...arguments_).then(resolve, reject);
+ });
+ }
- // This parser implements the 'Top down operator precedence' algorithm developed by Vaughan R Pratt; http://dl.acm.org/citation.cfm?id=512931.
- // and builds on the Javascript framework described by Douglas Crockford at http://javascript.crockford.com/tdop/tdop.html
- // and in 'Beautiful Code', edited by Andy Oram and Greg Wilson, Copyright 2007 O'Reilly Media, Inc. 798-0-596-51004-6
+ #cancelHandlers = [];
+ #rejectOnCancel = true;
+ #state = promiseState.pending;
+ #promise;
+ #reject;
- var parser = function (source, recover) {
- var node;
- var lexer;
+ constructor(executor) {
+ this.#promise = new Promise((resolve, reject) => {
+ this.#reject = reject;
- var symbol_table = {};
- var errors = [];
+ const onResolve = value => {
+ if (this.#state !== promiseState.canceled || !onCancel.shouldReject) {
+ resolve(value);
+ this.#setState(promiseState.resolved);
+ }
+ };
- var remainingTokens = function () {
- var remaining = [];
- if (node.id !== '(end)') {
- remaining.push({type: node.type, value: node.value, position: node.position});
- }
- var nxt = lexer();
- while (nxt !== null) {
- remaining.push(nxt);
- nxt = lexer();
- }
- return remaining;
- };
+ const onReject = error => {
+ if (this.#state !== promiseState.canceled || !onCancel.shouldReject) {
+ reject(error);
+ this.#setState(promiseState.rejected);
+ }
+ };
- var base_symbol = {
- nud: function () {
- // error - symbol has been invoked as a unary operator
- var err = {
- code: 'S0211',
- token: this.value,
- position: this.position
- };
+ const onCancel = handler => {
+ if (this.#state !== promiseState.pending) {
+ throw new Error(`The \`onCancel\` handler was attached after the promise ${this.#state.description}.`);
+ }
- if (recover) {
- err.remaining = remainingTokens();
- err.type = 'error';
- errors.push(err);
- return err;
- } else {
- err.stack = (new Error()).stack;
- throw err;
- }
- }
- };
+ this.#cancelHandlers.push(handler);
+ };
- var symbol = function (id, bp) {
- var s = symbol_table[id];
- bp = bp || 0;
- if (s) {
- if (bp >= s.lbp) {
- s.lbp = bp;
- }
- } else {
- s = Object.create(base_symbol);
- s.id = s.value = id;
- s.lbp = bp;
- symbol_table[id] = s;
- }
- return s;
- };
+ Object.defineProperties(onCancel, {
+ shouldReject: {
+ get: () => this.#rejectOnCancel,
+ set: boolean => {
+ this.#rejectOnCancel = boolean;
+ },
+ },
+ });
- var handleError = function (err) {
- if (recover) {
- // tokenize the rest of the buffer and add it to an error token
- err.remaining = remainingTokens();
- errors.push(err);
- var symbol = symbol_table["(error)"];
- node = Object.create(symbol);
- node.error = err;
- node.type = "(error)";
- return node;
- } else {
- err.stack = (new Error()).stack;
- throw err;
- }
- };
+ executor(onResolve, onReject, onCancel);
+ });
+ }
- var advance = function (id, infix) {
- if (id && node.id !== id) {
- var code;
- if (node.id === '(end)') {
- // unexpected end of buffer
- code = "S0203";
- } else {
- code = "S0202";
- }
- var err = {
- code: code,
- position: node.position,
- token: node.value,
- value: id
- };
- return handleError(err);
- }
- var next_token = lexer(infix);
- if (next_token === null) {
- node = symbol_table["(end)"];
- node.position = source.length;
- return node;
- }
- var value = next_token.value;
- var type = next_token.type;
- var symbol;
- switch (type) {
- case 'name':
- case 'variable':
- symbol = symbol_table["(name)"];
- break;
- case 'operator':
- symbol = symbol_table[value];
- if (!symbol) {
- return handleError({
- code: "S0204",
- stack: (new Error()).stack,
- position: next_token.position,
- token: value
- });
- }
- break;
- case 'string':
- case 'number':
- case 'value':
- symbol = symbol_table["(literal)"];
- break;
- case 'regex':
- type = "regex";
- symbol = symbol_table["(regex)"];
- break;
- /* istanbul ignore next */
- default:
- return handleError({
- code: "S0205",
- stack: (new Error()).stack,
- position: next_token.position,
- token: value
- });
- }
+ // eslint-disable-next-line unicorn/no-thenable
+ then(onFulfilled, onRejected) {
+ return this.#promise.then(onFulfilled, onRejected);
+ }
- node = Object.create(symbol);
- node.value = value;
- node.type = type;
- node.position = next_token.position;
- return node;
- };
+ catch(onRejected) {
+ return this.#promise.catch(onRejected);
+ }
- // Pratt's algorithm
- var expression = function (rbp) {
- var left;
- var t = node;
- advance(null, true);
- left = t.nud();
- while (rbp < node.lbp) {
- t = node;
- advance();
- left = t.led(left);
- }
- return left;
- };
+ finally(onFinally) {
+ return this.#promise.finally(onFinally);
+ }
- var terminal = function (id) {
- var s = symbol(id, 0);
- s.nud = function () {
- return this;
- };
- };
+ cancel(reason) {
+ if (this.#state !== promiseState.pending) {
+ return;
+ }
- // match infix operators
- // >>2]>>>(24-(r%4)*8))&255;q[(n+r)>>>2]|=o<<(24-((n+r)%4)*8)}}else{for(var r=0;r>>2]=p[r>>>2]}}this.sigBytes+=s;return this},clamp:function(){var o=this.words;var n=this.sigBytes;o[n>>>2]&=4294967295<<(32-(n%4)*8);o.length=e.ceil(n/4)},clone:function(){var n=j.clone.call(this);n.words=this.words.slice(0);return n},random:function(p){var o=[];for(var n=0;n>>2]&255}};f.BlockCipher=n.extend({cfg:n.cfg.extend({mode:m,padding:h}),reset:function(){n.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;
-this._mode=c.call(a,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var p=f.CipherParams=k.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),m=(g.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;
-return(a?l.create([1398893684,1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=l.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return p.create({ciphertext:a,salt:c})}},j=f.SerializableCipher=k.extend({cfg:k.extend({format:m}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return p.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding,
-blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),g=(g.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=l.random(8));a=v.create({keySize:b+c}).compute(a,d);c=l.create(a.words.slice(b),4*c);a.sigBytes=4*b;return p.create({key:a,iv:c,salt:d})}},s=f.PasswordBasedCipher=j.extend({cfg:j.cfg.extend({kdf:g}),encrypt:function(a,
-b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=c.iv;a=j.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=c.iv;return j.decrypt.call(this,a,b,c.key,d)}})}();
-/*
-CryptoJS v3.1.2 aes.js
-code.google.com/p/crypto-js
-(c) 2009-2013 by Jeff Mott. All rights reserved.
-code.google.com/p/crypto-js/wiki/License
-*/
-(function(){for(var q=CryptoJS,x=q.lib.BlockCipher,r=q.algo,j=[],y=[],z=[],A=[],B=[],C=[],s=[],u=[],v=[],w=[],g=[],k=0;256>k;k++)g[k]=128>k?k<<1:k<<1^283;for(var n=0,l=0,k=0;256>k;k++){var f=l^l<<1^l<<2^l<<3^l<<4,f=f>>>8^f&255^99;j[n]=f;y[f]=n;var t=g[n],D=g[t],E=g[D],b=257*g[f]^16843008*f;z[n]=b<<24|b>>>8;A[n]=b<<16|b>>>16;B[n]=b<<8|b>>>24;C[n]=b;b=16843009*E^65537*D^257*t^16843008*n;s[f]=b<<24|b>>>8;u[f]=b<<16|b>>>16;v[f]=b<<8|b>>>24;w[f]=b;n?(n=t^g[g[g[E^t]]],l^=g[g[l]]):n=l=1}var F=[0,1,2,4,8,
-16,32,64,128,27,54],r=r.AES=x.extend({_doReset:function(){for(var c=this._key,e=c.words,a=c.sigBytes/4,c=4*((this._nRounds=a+6)+1),b=this._keySchedule=[],h=0;h