@digipair/skill-imap 0.103.2 → 0.105.2
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/index.esm.js +113 -57
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -23902,14 +23902,14 @@ function indent(str, spaces) {
|
|
|
23902
23902
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23903
23903
|
// match is required
|
|
23904
23904
|
if (!match) {
|
|
23905
|
-
return tokens = tokens1,
|
|
23905
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
23906
23906
|
v: nextMatch1
|
|
23907
23907
|
};
|
|
23908
23908
|
}
|
|
23909
23909
|
var token = match.token, offset = match.offset;
|
|
23910
23910
|
i1 += offset;
|
|
23911
23911
|
if (token === " ") {
|
|
23912
|
-
return tokens = tokens1,
|
|
23912
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23913
23913
|
}
|
|
23914
23914
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
|
23915
23915
|
token
|
|
@@ -23928,7 +23928,7 @@ function indent(str, spaces) {
|
|
|
23928
23928
|
if (contextKeys.some(function(el) {
|
|
23929
23929
|
return el.startsWith(name);
|
|
23930
23930
|
})) {
|
|
23931
|
-
return tokens = tokens1,
|
|
23931
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23932
23932
|
}
|
|
23933
23933
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23934
23934
|
return el === name;
|
|
@@ -23947,9 +23947,9 @@ function indent(str, spaces) {
|
|
|
23947
23947
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23948
23948
|
return el.startsWith(name);
|
|
23949
23949
|
})) {
|
|
23950
|
-
return tokens = tokens1,
|
|
23950
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23951
23951
|
}
|
|
23952
|
-
return tokens = tokens1,
|
|
23952
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
23953
23953
|
v: nextMatch1
|
|
23954
23954
|
};
|
|
23955
23955
|
};
|
|
@@ -24813,7 +24813,7 @@ var parser = LRParser.deserialize({
|
|
|
24813
24813
|
2
|
|
24814
24814
|
],
|
|
24815
24815
|
repeatNodeCount: 14,
|
|
24816
|
-
tokenData: ".
|
|
24816
|
+
tokenData: ".V~RvXY#iYZ$^Z[#i]^$^pq#iqr$crs$nwx&bxy&gyz&lz{&q{|'O|}'T}!O'Y!O!P'g!P!Q(q!Q![*l![!]+T!]!^+Y!^!_+_!_!`$i!`!a+n!b!c+x!}#O+}#P#Q,S#Q#R&y#S#T,X#o#p-{#q#r.Q$f$g#i#BY#BZ#i$IS$I_#i$I|$I}$^$I}$JO$^$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~#nY#r~XY#iZ[#ipq#i$f$g#i#BY#BZ#i$IS$I_#i$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~$cO#s~~$fP!_!`$i~$nOr~~$qWOY$nZr$nrs%Zs#O$n#O#P%`#P;'S$n;'S;=`&[<%lO$n~%`O$j~~%cRO;'S$n;'S;=`%l;=`O$n~%oXOY$nZr$nrs%Zs#O$n#O#P%`#P;'S$n;'S;=`&[;=`<%l$n<%lO$n~&_P;=`<%l$n~&gO#{~~&lOv~~&qOx~~&vP^~z{&y~'OO_~~'TO[~~'YO$O~R'_PZP!`!a'bQ'gO$_Q~'lQ#z~!O!P'r!Q!['w~'wO#}~~'|R$i~!Q!['w!g!h(V#X#Y(V~(YR{|(c}!O(c!Q![(i~(fP!Q![(i~(nP$i~!Q![(i~(vQ]~z{(|!P!Q*T~)PTOz(|z{)`{;'S(|;'S;=`)}<%lO(|~)cVOz(|z{)`{!P(|!P!Q)x!Q;'S(|;'S;=`)}<%lO(|~)}OQ~~*QP;=`<%l(|~*YSP~OY*TZ;'S*T;'S;=`*f<%lO*T~*iP;=`<%l*T~*qS$i~!O!P*}!Q![*l!g!h(V#X#Y(V~+QP!Q!['w~+YO$]~~+_O$s~R+fP!]QsP!_!`+iP+nOsPR+uP!YQsP!_!`+i~+}O$l~~,SO!i~~,XO!g~~,[WOY,XZ#O,X#O#P,t#P#S,X#S#T-p#T;'S,X;'S;=`-u<%lO,X~,wRO;'S,X;'S;=`-Q;=`O,X~-TXOY,XZ#O,X#O#P,t#P#S,X#S#T-p#T;'S,X;'S;=`-u;=`<%l,X<%lO,X~-uO$Z~~-xP;=`<%l,X~.QO#S~~.VO#R~",
|
|
24817
24817
|
tokenizers: [
|
|
24818
24818
|
propertyIdentifiers,
|
|
24819
24819
|
identifiers,
|
|
@@ -25329,6 +25329,9 @@ function parseParameterNames(fn) {
|
|
|
25329
25329
|
function notImplemented(thing) {
|
|
25330
25330
|
return new Error("not implemented: ".concat(thing));
|
|
25331
25331
|
}
|
|
25332
|
+
function isNotImplemented(err) {
|
|
25333
|
+
return /^not implemented/.test(err.message);
|
|
25334
|
+
}
|
|
25332
25335
|
/**
|
|
25333
25336
|
* Returns a name from context or undefined if it does not exist.
|
|
25334
25337
|
*
|
|
@@ -25449,6 +25452,9 @@ var builtins = {
|
|
|
25449
25452
|
d = from;
|
|
25450
25453
|
}
|
|
25451
25454
|
if (year) {
|
|
25455
|
+
if (!isNumber(month) || !isNumber(day)) {
|
|
25456
|
+
return null;
|
|
25457
|
+
}
|
|
25452
25458
|
d = date().setZone("utc").set({
|
|
25453
25459
|
year: year,
|
|
25454
25460
|
month: month,
|
|
@@ -25503,7 +25509,7 @@ var builtins = {
|
|
|
25503
25509
|
from = hour;
|
|
25504
25510
|
hour = null;
|
|
25505
25511
|
}
|
|
25506
|
-
if (isString(from)) {
|
|
25512
|
+
if (isString(from) && from) {
|
|
25507
25513
|
t = date(null, from);
|
|
25508
25514
|
}
|
|
25509
25515
|
if (isDateTime(from)) {
|
|
@@ -25514,6 +25520,9 @@ var builtins = {
|
|
|
25514
25520
|
});
|
|
25515
25521
|
}
|
|
25516
25522
|
if (isNumber(hour)) {
|
|
25523
|
+
if (!isNumber(minute) || !isNumber(second)) {
|
|
25524
|
+
return null;
|
|
25525
|
+
}
|
|
25517
25526
|
// TODO: support offset = days and time duration
|
|
25518
25527
|
t = date().set({
|
|
25519
25528
|
hour: hour,
|
|
@@ -25623,7 +25632,8 @@ var builtins = {
|
|
|
25623
25632
|
"string"
|
|
25624
25633
|
]),
|
|
25625
25634
|
"replace": fn(function(input, pattern, replacement, flags) {
|
|
25626
|
-
|
|
25635
|
+
var regexp = createRegexp(pattern, flags || "", "g");
|
|
25636
|
+
return regexp && input.replace(regexp, replacement.replace(/\$0/g, "$$&"));
|
|
25627
25637
|
}, [
|
|
25628
25638
|
"string",
|
|
25629
25639
|
"string",
|
|
@@ -25636,9 +25646,9 @@ var builtins = {
|
|
|
25636
25646
|
"string",
|
|
25637
25647
|
"string"
|
|
25638
25648
|
]),
|
|
25639
|
-
// eslint-disable-next-line
|
|
25640
25649
|
"matches": fn(function(input, pattern, flags) {
|
|
25641
|
-
|
|
25650
|
+
var regexp = createRegexp(pattern, flags || "", "");
|
|
25651
|
+
return regexp && regexp.test(input);
|
|
25642
25652
|
}, [
|
|
25643
25653
|
"string",
|
|
25644
25654
|
"string",
|
|
@@ -25657,7 +25667,8 @@ var builtins = {
|
|
|
25657
25667
|
"string"
|
|
25658
25668
|
]),
|
|
25659
25669
|
"split": fn(function(string, delimiter) {
|
|
25660
|
-
|
|
25670
|
+
var regexp = createRegexp(delimiter, "", "");
|
|
25671
|
+
return regexp && string.split(regexp);
|
|
25661
25672
|
}, [
|
|
25662
25673
|
"string",
|
|
25663
25674
|
"string"
|
|
@@ -26573,6 +26584,35 @@ function mode(array) {
|
|
|
26573
26584
|
function ifValid(o) {
|
|
26574
26585
|
return o.isValid ? o : null;
|
|
26575
26586
|
}
|
|
26587
|
+
/**
|
|
26588
|
+
* Concatenates flags for a regular expression.
|
|
26589
|
+
*
|
|
26590
|
+
* Ensures that default flags are included without duplication, even if
|
|
26591
|
+
* user-specified flags overlap with the defaults.
|
|
26592
|
+
*/ function buildFlags(flags, defaultFlags) {
|
|
26593
|
+
var unsupportedFlags = flags.replace(/[smix]/g, "");
|
|
26594
|
+
if (unsupportedFlags) {
|
|
26595
|
+
throw new Error("illegal flags: " + unsupportedFlags);
|
|
26596
|
+
}
|
|
26597
|
+
// we don't implement the <x> flag
|
|
26598
|
+
if (/x/.test(flags)) {
|
|
26599
|
+
throw notImplemented("matches <x> flag");
|
|
26600
|
+
}
|
|
26601
|
+
return flags + defaultFlags;
|
|
26602
|
+
}
|
|
26603
|
+
/**
|
|
26604
|
+
* Creates a regular expression from a given pattern
|
|
26605
|
+
*/ function createRegexp(pattern, flags) {
|
|
26606
|
+
var defaultFlags = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
26607
|
+
try {
|
|
26608
|
+
return new RegExp(pattern, "u" + buildFlags(flags, defaultFlags));
|
|
26609
|
+
} catch (_err) {
|
|
26610
|
+
if (isNotImplemented(_err)) {
|
|
26611
|
+
throw _err;
|
|
26612
|
+
}
|
|
26613
|
+
}
|
|
26614
|
+
return null;
|
|
26615
|
+
}
|
|
26576
26616
|
function parseExpression(expression) {
|
|
26577
26617
|
var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, dialect = arguments.length > 2 ? arguments[2] : void 0;
|
|
26578
26618
|
return parser.configure({
|
|
@@ -27027,27 +27067,59 @@ function evalNode(node, input, args) {
|
|
|
27027
27067
|
};
|
|
27028
27068
|
case "Type":
|
|
27029
27069
|
return args[0];
|
|
27070
|
+
// (x in [ [1,2], [3,4] ]), (y in x)
|
|
27030
27071
|
case "InExpressions":
|
|
27031
27072
|
return function(context) {
|
|
27032
|
-
|
|
27033
|
-
|
|
27034
|
-
|
|
27035
|
-
|
|
27036
|
-
|
|
27037
|
-
|
|
27038
|
-
|
|
27039
|
-
|
|
27040
|
-
|
|
27041
|
-
|
|
27042
|
-
|
|
27043
|
-
|
|
27044
|
-
|
|
27045
|
-
|
|
27073
|
+
// we build up evaluation contexts from left to right,
|
|
27074
|
+
// ending up with the cartesian product over all available contexts
|
|
27075
|
+
//
|
|
27076
|
+
// previous context is provided to later context providers
|
|
27077
|
+
// producing <null> as a context during evaluation causes the
|
|
27078
|
+
// whole result to turn <null>
|
|
27079
|
+
var isValidContexts = function(contexts) {
|
|
27080
|
+
if (contexts === null || contexts.some(function(arr) {
|
|
27081
|
+
return getType(arr) === "nil";
|
|
27082
|
+
})) {
|
|
27083
|
+
return false;
|
|
27084
|
+
}
|
|
27085
|
+
return true;
|
|
27086
|
+
};
|
|
27087
|
+
var join = function(aContexts, bContextProducer) {
|
|
27088
|
+
var _instance;
|
|
27089
|
+
return (_instance = []).concat.apply(_instance, _to_consumable_array(aContexts.map(function(aContext) {
|
|
27090
|
+
var bContexts = bContextProducer(Object.assign(Object.assign({}, context), aContext));
|
|
27091
|
+
if (!isValidContexts(bContexts)) {
|
|
27092
|
+
return null;
|
|
27093
|
+
}
|
|
27094
|
+
return bContexts.map(function(bContext) {
|
|
27095
|
+
return Object.assign(Object.assign({}, aContext), bContext);
|
|
27096
|
+
});
|
|
27097
|
+
})));
|
|
27098
|
+
};
|
|
27099
|
+
var cartesian = function(aContexts, bContextProducer) {
|
|
27100
|
+
for(var _len = arguments.length, otherContextProducers = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
|
|
27101
|
+
otherContextProducers[_key - 2] = arguments[_key];
|
|
27102
|
+
}
|
|
27103
|
+
if (!isValidContexts(aContexts)) {
|
|
27104
|
+
return null;
|
|
27105
|
+
}
|
|
27106
|
+
if (!bContextProducer) {
|
|
27107
|
+
return aContexts;
|
|
27046
27108
|
}
|
|
27047
|
-
return
|
|
27048
|
-
|
|
27049
|
-
|
|
27050
|
-
|
|
27109
|
+
return cartesian.apply(void 0, [
|
|
27110
|
+
join(aContexts, bContextProducer)
|
|
27111
|
+
].concat(_to_consumable_array(otherContextProducers)));
|
|
27112
|
+
};
|
|
27113
|
+
var cartesianProduct = function(contextProducers) {
|
|
27114
|
+
var _contextProducers = _to_array(contextProducers), aContextProducer = _contextProducers[0], otherContextProducers = _contextProducers.slice(1);
|
|
27115
|
+
var aContexts = aContextProducer(context);
|
|
27116
|
+
return cartesian.apply(void 0, [
|
|
27117
|
+
aContexts
|
|
27118
|
+
].concat(_to_consumable_array(otherContextProducers)));
|
|
27119
|
+
};
|
|
27120
|
+
var product = cartesianProduct(args);
|
|
27121
|
+
return product && product.map(function(p) {
|
|
27122
|
+
return Object.assign(Object.assign({}, context), p);
|
|
27051
27123
|
});
|
|
27052
27124
|
};
|
|
27053
27125
|
// Name kw<"in"> Expr
|
|
@@ -27677,31 +27749,6 @@ function createDateTimeRange(start, end, startIncluded, endIncluded) {
|
|
|
27677
27749
|
includes: includes
|
|
27678
27750
|
});
|
|
27679
27751
|
}
|
|
27680
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27681
|
-
function cartesianProduct(arrays) {
|
|
27682
|
-
var _instance;
|
|
27683
|
-
if (arrays.some(function(arr) {
|
|
27684
|
-
return getType(arr) === "nil";
|
|
27685
|
-
})) {
|
|
27686
|
-
return null;
|
|
27687
|
-
}
|
|
27688
|
-
var f = function(a, b) {
|
|
27689
|
-
return (_instance = []).concat.apply(_instance, _to_consumable_array(a.map(function(d) {
|
|
27690
|
-
return b.map(function(e) {
|
|
27691
|
-
return [].concat(d, e);
|
|
27692
|
-
});
|
|
27693
|
-
})));
|
|
27694
|
-
};
|
|
27695
|
-
var cartesian = function(a, b) {
|
|
27696
|
-
for(var _len = arguments.length, c = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
|
|
27697
|
-
c[_key - 2] = arguments[_key];
|
|
27698
|
-
}
|
|
27699
|
-
return b ? cartesian.apply(void 0, [
|
|
27700
|
-
f(a, b)
|
|
27701
|
-
].concat(_to_consumable_array(c))) : a || [];
|
|
27702
|
-
};
|
|
27703
|
-
return cartesian.apply(void 0, _to_consumable_array(arrays));
|
|
27704
|
-
}
|
|
27705
27752
|
function coalecenseTypes(a, b) {
|
|
27706
27753
|
if (!b) {
|
|
27707
27754
|
return a.type;
|
|
@@ -27763,15 +27810,24 @@ function parseString(str) {
|
|
|
27763
27810
|
if (str.endsWith('"')) {
|
|
27764
27811
|
str = str.slice(0, -1);
|
|
27765
27812
|
}
|
|
27766
|
-
return str.replace(/(\\")|(\\\\)|(\\u[a-fA-F0-9]{5,6})|((?:\\u[a-fA-F0-9]{1,4})+)/ig, function(substring) {
|
|
27813
|
+
return str.replace(/(\\")|(\\\\)|(\\n)|(\\r)|(\\t)|(\\u[a-fA-F0-9]{5,6})|((?:\\u[a-fA-F0-9]{1,4})+)/ig, function(substring) {
|
|
27767
27814
|
for(var _len = arguments.length, groups = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
27768
27815
|
groups[_key - 1] = arguments[_key];
|
|
27769
27816
|
}
|
|
27770
|
-
var _groups = _sliced_to_array(groups,
|
|
27817
|
+
var _groups = _sliced_to_array(groups, 7), quotes = _groups[0], backslash = _groups[1], newline = _groups[2], carriageReturn = _groups[3], tab = _groups[4], codePoint = _groups[5], charCodes = _groups[6];
|
|
27771
27818
|
if (quotes) {
|
|
27772
27819
|
return '"';
|
|
27773
27820
|
}
|
|
27774
|
-
if (
|
|
27821
|
+
if (newline) {
|
|
27822
|
+
return "\n";
|
|
27823
|
+
}
|
|
27824
|
+
if (carriageReturn) {
|
|
27825
|
+
return "\r";
|
|
27826
|
+
}
|
|
27827
|
+
if (tab) {
|
|
27828
|
+
return " ";
|
|
27829
|
+
}
|
|
27830
|
+
if (backslash) {
|
|
27775
27831
|
return "\\";
|
|
27776
27832
|
}
|
|
27777
27833
|
var escapePattern = /\\u([a-fA-F0-9]+)/ig;
|