@learncard/learn-card-plugin 1.2.24 → 1.2.26
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/README.md +12 -7
- package/dist/learn-card-plugin.cjs.development.cjs +36 -36
- package/dist/learn-card-plugin.cjs.development.cjs.map +1 -1
- package/dist/learn-card-plugin.cjs.production.min.cjs.map +1 -1
- package/dist/learn-card-plugin.esm.js +36 -36
- package/dist/learn-card-plugin.esm.js.map +1 -1
- package/package.json +59 -57
- package/src/index.ts +20 -0
- package/src/test/verificationPrettifier.test.ts +412 -0
- package/src/test/verify.test.ts +118 -0
- package/src/types.ts +27 -0
- package/src/verificationPrettifier.ts +160 -0
- package/src/verify.ts +194 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
VerificationStatusEnum
|
|
7
7
|
} from "@learncard/types";
|
|
8
8
|
|
|
9
|
-
// ../../../node_modules
|
|
9
|
+
// ../../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
10
10
|
function _typeof(o) {
|
|
11
11
|
"@babel/helpers - typeof";
|
|
12
12
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
|
@@ -17,7 +17,7 @@ function _typeof(o) {
|
|
|
17
17
|
}
|
|
18
18
|
__name(_typeof, "_typeof");
|
|
19
19
|
|
|
20
|
-
// ../../../node_modules
|
|
20
|
+
// ../../../node_modules/date-fns/esm/_lib/toInteger/index.js
|
|
21
21
|
function toInteger(dirtyNumber) {
|
|
22
22
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
23
23
|
return NaN;
|
|
@@ -30,7 +30,7 @@ function toInteger(dirtyNumber) {
|
|
|
30
30
|
}
|
|
31
31
|
__name(toInteger, "toInteger");
|
|
32
32
|
|
|
33
|
-
// ../../../node_modules
|
|
33
|
+
// ../../../node_modules/date-fns/esm/_lib/requiredArgs/index.js
|
|
34
34
|
function requiredArgs(required, args) {
|
|
35
35
|
if (args.length < required) {
|
|
36
36
|
throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
|
|
@@ -38,7 +38,7 @@ function requiredArgs(required, args) {
|
|
|
38
38
|
}
|
|
39
39
|
__name(requiredArgs, "requiredArgs");
|
|
40
40
|
|
|
41
|
-
// ../../../node_modules
|
|
41
|
+
// ../../../node_modules/date-fns/esm/toDate/index.js
|
|
42
42
|
function toDate(argument) {
|
|
43
43
|
requiredArgs(1, arguments);
|
|
44
44
|
var argStr = Object.prototype.toString.call(argument);
|
|
@@ -56,7 +56,7 @@ function toDate(argument) {
|
|
|
56
56
|
}
|
|
57
57
|
__name(toDate, "toDate");
|
|
58
58
|
|
|
59
|
-
// ../../../node_modules
|
|
59
|
+
// ../../../node_modules/date-fns/esm/addMilliseconds/index.js
|
|
60
60
|
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
61
61
|
requiredArgs(2, arguments);
|
|
62
62
|
var timestamp = toDate(dirtyDate).getTime();
|
|
@@ -65,14 +65,14 @@ function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
|
65
65
|
}
|
|
66
66
|
__name(addMilliseconds, "addMilliseconds");
|
|
67
67
|
|
|
68
|
-
// ../../../node_modules
|
|
68
|
+
// ../../../node_modules/date-fns/esm/_lib/defaultOptions/index.js
|
|
69
69
|
var defaultOptions = {};
|
|
70
70
|
function getDefaultOptions() {
|
|
71
71
|
return defaultOptions;
|
|
72
72
|
}
|
|
73
73
|
__name(getDefaultOptions, "getDefaultOptions");
|
|
74
74
|
|
|
75
|
-
// ../../../node_modules
|
|
75
|
+
// ../../../node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
|
|
76
76
|
function getTimezoneOffsetInMilliseconds(date) {
|
|
77
77
|
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
78
78
|
utcDate.setUTCFullYear(date.getFullYear());
|
|
@@ -80,14 +80,14 @@ function getTimezoneOffsetInMilliseconds(date) {
|
|
|
80
80
|
}
|
|
81
81
|
__name(getTimezoneOffsetInMilliseconds, "getTimezoneOffsetInMilliseconds");
|
|
82
82
|
|
|
83
|
-
// ../../../node_modules
|
|
83
|
+
// ../../../node_modules/date-fns/esm/isDate/index.js
|
|
84
84
|
function isDate(value) {
|
|
85
85
|
requiredArgs(1, arguments);
|
|
86
86
|
return value instanceof Date || _typeof(value) === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
87
87
|
}
|
|
88
88
|
__name(isDate, "isDate");
|
|
89
89
|
|
|
90
|
-
// ../../../node_modules
|
|
90
|
+
// ../../../node_modules/date-fns/esm/isValid/index.js
|
|
91
91
|
function isValid(dirtyDate) {
|
|
92
92
|
requiredArgs(1, arguments);
|
|
93
93
|
if (!isDate(dirtyDate) && typeof dirtyDate !== "number") {
|
|
@@ -98,7 +98,7 @@ function isValid(dirtyDate) {
|
|
|
98
98
|
}
|
|
99
99
|
__name(isValid, "isValid");
|
|
100
100
|
|
|
101
|
-
// ../../../node_modules
|
|
101
|
+
// ../../../node_modules/date-fns/esm/subMilliseconds/index.js
|
|
102
102
|
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
103
103
|
requiredArgs(2, arguments);
|
|
104
104
|
var amount = toInteger(dirtyAmount);
|
|
@@ -106,7 +106,7 @@ function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
|
106
106
|
}
|
|
107
107
|
__name(subMilliseconds, "subMilliseconds");
|
|
108
108
|
|
|
109
|
-
// ../../../node_modules
|
|
109
|
+
// ../../../node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js
|
|
110
110
|
var MILLISECONDS_IN_DAY = 864e5;
|
|
111
111
|
function getUTCDayOfYear(dirtyDate) {
|
|
112
112
|
requiredArgs(1, arguments);
|
|
@@ -120,7 +120,7 @@ function getUTCDayOfYear(dirtyDate) {
|
|
|
120
120
|
}
|
|
121
121
|
__name(getUTCDayOfYear, "getUTCDayOfYear");
|
|
122
122
|
|
|
123
|
-
// ../../../node_modules
|
|
123
|
+
// ../../../node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js
|
|
124
124
|
function startOfUTCISOWeek(dirtyDate) {
|
|
125
125
|
requiredArgs(1, arguments);
|
|
126
126
|
var weekStartsOn = 1;
|
|
@@ -133,7 +133,7 @@ function startOfUTCISOWeek(dirtyDate) {
|
|
|
133
133
|
}
|
|
134
134
|
__name(startOfUTCISOWeek, "startOfUTCISOWeek");
|
|
135
135
|
|
|
136
|
-
// ../../../node_modules
|
|
136
|
+
// ../../../node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js
|
|
137
137
|
function getUTCISOWeekYear(dirtyDate) {
|
|
138
138
|
requiredArgs(1, arguments);
|
|
139
139
|
var date = toDate(dirtyDate);
|
|
@@ -156,7 +156,7 @@ function getUTCISOWeekYear(dirtyDate) {
|
|
|
156
156
|
}
|
|
157
157
|
__name(getUTCISOWeekYear, "getUTCISOWeekYear");
|
|
158
158
|
|
|
159
|
-
// ../../../node_modules
|
|
159
|
+
// ../../../node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js
|
|
160
160
|
function startOfUTCISOWeekYear(dirtyDate) {
|
|
161
161
|
requiredArgs(1, arguments);
|
|
162
162
|
var year = getUTCISOWeekYear(dirtyDate);
|
|
@@ -168,7 +168,7 @@ function startOfUTCISOWeekYear(dirtyDate) {
|
|
|
168
168
|
}
|
|
169
169
|
__name(startOfUTCISOWeekYear, "startOfUTCISOWeekYear");
|
|
170
170
|
|
|
171
|
-
// ../../../node_modules
|
|
171
|
+
// ../../../node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js
|
|
172
172
|
var MILLISECONDS_IN_WEEK = 6048e5;
|
|
173
173
|
function getUTCISOWeek(dirtyDate) {
|
|
174
174
|
requiredArgs(1, arguments);
|
|
@@ -178,7 +178,7 @@ function getUTCISOWeek(dirtyDate) {
|
|
|
178
178
|
}
|
|
179
179
|
__name(getUTCISOWeek, "getUTCISOWeek");
|
|
180
180
|
|
|
181
|
-
// ../../../node_modules
|
|
181
|
+
// ../../../node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
|
|
182
182
|
function startOfUTCWeek(dirtyDate, options) {
|
|
183
183
|
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
184
184
|
requiredArgs(1, arguments);
|
|
@@ -196,7 +196,7 @@ function startOfUTCWeek(dirtyDate, options) {
|
|
|
196
196
|
}
|
|
197
197
|
__name(startOfUTCWeek, "startOfUTCWeek");
|
|
198
198
|
|
|
199
|
-
// ../../../node_modules
|
|
199
|
+
// ../../../node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js
|
|
200
200
|
function getUTCWeekYear(dirtyDate, options) {
|
|
201
201
|
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
202
202
|
requiredArgs(1, arguments);
|
|
@@ -225,7 +225,7 @@ function getUTCWeekYear(dirtyDate, options) {
|
|
|
225
225
|
}
|
|
226
226
|
__name(getUTCWeekYear, "getUTCWeekYear");
|
|
227
227
|
|
|
228
|
-
// ../../../node_modules
|
|
228
|
+
// ../../../node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js
|
|
229
229
|
function startOfUTCWeekYear(dirtyDate, options) {
|
|
230
230
|
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
231
231
|
requiredArgs(1, arguments);
|
|
@@ -240,7 +240,7 @@ function startOfUTCWeekYear(dirtyDate, options) {
|
|
|
240
240
|
}
|
|
241
241
|
__name(startOfUTCWeekYear, "startOfUTCWeekYear");
|
|
242
242
|
|
|
243
|
-
// ../../../node_modules
|
|
243
|
+
// ../../../node_modules/date-fns/esm/_lib/getUTCWeek/index.js
|
|
244
244
|
var MILLISECONDS_IN_WEEK2 = 6048e5;
|
|
245
245
|
function getUTCWeek(dirtyDate, options) {
|
|
246
246
|
requiredArgs(1, arguments);
|
|
@@ -250,7 +250,7 @@ function getUTCWeek(dirtyDate, options) {
|
|
|
250
250
|
}
|
|
251
251
|
__name(getUTCWeek, "getUTCWeek");
|
|
252
252
|
|
|
253
|
-
// ../../../node_modules
|
|
253
|
+
// ../../../node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
|
|
254
254
|
function addLeadingZeros(number, targetLength) {
|
|
255
255
|
var sign = number < 0 ? "-" : "";
|
|
256
256
|
var output = Math.abs(number).toString();
|
|
@@ -261,7 +261,7 @@ function addLeadingZeros(number, targetLength) {
|
|
|
261
261
|
}
|
|
262
262
|
__name(addLeadingZeros, "addLeadingZeros");
|
|
263
263
|
|
|
264
|
-
// ../../../node_modules
|
|
264
|
+
// ../../../node_modules/date-fns/esm/_lib/format/lightFormatters/index.js
|
|
265
265
|
var formatters = {
|
|
266
266
|
// Year
|
|
267
267
|
y: /* @__PURE__ */ __name(function y(date, token) {
|
|
@@ -320,7 +320,7 @@ var formatters = {
|
|
|
320
320
|
};
|
|
321
321
|
var lightFormatters_default = formatters;
|
|
322
322
|
|
|
323
|
-
// ../../../node_modules
|
|
323
|
+
// ../../../node_modules/date-fns/esm/_lib/format/formatters/index.js
|
|
324
324
|
var dayPeriodEnum = {
|
|
325
325
|
am: "am",
|
|
326
326
|
pm: "pm",
|
|
@@ -1029,7 +1029,7 @@ function formatTimezone(offset, dirtyDelimiter) {
|
|
|
1029
1029
|
__name(formatTimezone, "formatTimezone");
|
|
1030
1030
|
var formatters_default = formatters2;
|
|
1031
1031
|
|
|
1032
|
-
// ../../../node_modules
|
|
1032
|
+
// ../../../node_modules/date-fns/esm/_lib/format/longFormatters/index.js
|
|
1033
1033
|
var dateLongFormatter = /* @__PURE__ */ __name(function dateLongFormatter2(pattern, formatLong2) {
|
|
1034
1034
|
switch (pattern) {
|
|
1035
1035
|
case "P":
|
|
@@ -1111,7 +1111,7 @@ var longFormatters = {
|
|
|
1111
1111
|
};
|
|
1112
1112
|
var longFormatters_default = longFormatters;
|
|
1113
1113
|
|
|
1114
|
-
// ../../../node_modules
|
|
1114
|
+
// ../../../node_modules/date-fns/esm/_lib/protectedTokens/index.js
|
|
1115
1115
|
var protectedDayOfYearTokens = ["D", "DD"];
|
|
1116
1116
|
var protectedWeekYearTokens = ["YY", "YYYY"];
|
|
1117
1117
|
function isProtectedDayOfYearToken(token) {
|
|
@@ -1135,7 +1135,7 @@ function throwProtectedError(token, format2, input) {
|
|
|
1135
1135
|
}
|
|
1136
1136
|
__name(throwProtectedError, "throwProtectedError");
|
|
1137
1137
|
|
|
1138
|
-
// ../../../node_modules
|
|
1138
|
+
// ../../../node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js
|
|
1139
1139
|
var formatDistanceLocale = {
|
|
1140
1140
|
lessThanXSeconds: {
|
|
1141
1141
|
one: "less than a second",
|
|
@@ -1220,7 +1220,7 @@ var formatDistance = /* @__PURE__ */ __name(function formatDistance2(token, coun
|
|
|
1220
1220
|
}, "formatDistance");
|
|
1221
1221
|
var formatDistance_default = formatDistance;
|
|
1222
1222
|
|
|
1223
|
-
// ../../../node_modules
|
|
1223
|
+
// ../../../node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js
|
|
1224
1224
|
function buildFormatLongFn(args) {
|
|
1225
1225
|
return function() {
|
|
1226
1226
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -1231,7 +1231,7 @@ function buildFormatLongFn(args) {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
__name(buildFormatLongFn, "buildFormatLongFn");
|
|
1233
1233
|
|
|
1234
|
-
// ../../../node_modules
|
|
1234
|
+
// ../../../node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js
|
|
1235
1235
|
var dateFormats = {
|
|
1236
1236
|
full: "EEEE, MMMM do, y",
|
|
1237
1237
|
long: "MMMM do, y",
|
|
@@ -1266,7 +1266,7 @@ var formatLong = {
|
|
|
1266
1266
|
};
|
|
1267
1267
|
var formatLong_default = formatLong;
|
|
1268
1268
|
|
|
1269
|
-
// ../../../node_modules
|
|
1269
|
+
// ../../../node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js
|
|
1270
1270
|
var formatRelativeLocale = {
|
|
1271
1271
|
lastWeek: "'last' eeee 'at' p",
|
|
1272
1272
|
yesterday: "'yesterday at' p",
|
|
@@ -1280,7 +1280,7 @@ var formatRelative = /* @__PURE__ */ __name(function formatRelative2(token, _dat
|
|
|
1280
1280
|
}, "formatRelative");
|
|
1281
1281
|
var formatRelative_default = formatRelative;
|
|
1282
1282
|
|
|
1283
|
-
// ../../../node_modules
|
|
1283
|
+
// ../../../node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js
|
|
1284
1284
|
function buildLocalizeFn(args) {
|
|
1285
1285
|
return function(dirtyIndex, options) {
|
|
1286
1286
|
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
|
|
@@ -1300,7 +1300,7 @@ function buildLocalizeFn(args) {
|
|
|
1300
1300
|
}
|
|
1301
1301
|
__name(buildLocalizeFn, "buildLocalizeFn");
|
|
1302
1302
|
|
|
1303
|
-
// ../../../node_modules
|
|
1303
|
+
// ../../../node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js
|
|
1304
1304
|
var eraValues = {
|
|
1305
1305
|
narrow: ["B", "A"],
|
|
1306
1306
|
abbreviated: ["BC", "AD"],
|
|
@@ -1431,7 +1431,7 @@ var localize = {
|
|
|
1431
1431
|
};
|
|
1432
1432
|
var localize_default = localize;
|
|
1433
1433
|
|
|
1434
|
-
// ../../../node_modules
|
|
1434
|
+
// ../../../node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js
|
|
1435
1435
|
function buildMatchFn(args) {
|
|
1436
1436
|
return function(string) {
|
|
1437
1437
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -1478,7 +1478,7 @@ function findIndex(array, predicate) {
|
|
|
1478
1478
|
}
|
|
1479
1479
|
__name(findIndex, "findIndex");
|
|
1480
1480
|
|
|
1481
|
-
// ../../../node_modules
|
|
1481
|
+
// ../../../node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js
|
|
1482
1482
|
function buildMatchPatternFn(args) {
|
|
1483
1483
|
return function(string) {
|
|
1484
1484
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -1498,7 +1498,7 @@ function buildMatchPatternFn(args) {
|
|
|
1498
1498
|
}
|
|
1499
1499
|
__name(buildMatchPatternFn, "buildMatchPatternFn");
|
|
1500
1500
|
|
|
1501
|
-
// ../../../node_modules
|
|
1501
|
+
// ../../../node_modules/date-fns/esm/locale/en-US/_lib/match/index.js
|
|
1502
1502
|
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
1503
1503
|
var parseOrdinalNumberPattern = /\d+/i;
|
|
1504
1504
|
var matchEraPatterns = {
|
|
@@ -1596,7 +1596,7 @@ var match = {
|
|
|
1596
1596
|
};
|
|
1597
1597
|
var match_default = match;
|
|
1598
1598
|
|
|
1599
|
-
// ../../../node_modules
|
|
1599
|
+
// ../../../node_modules/date-fns/esm/locale/en-US/index.js
|
|
1600
1600
|
var locale = {
|
|
1601
1601
|
code: "en-US",
|
|
1602
1602
|
formatDistance: formatDistance_default,
|
|
@@ -1611,10 +1611,10 @@ var locale = {
|
|
|
1611
1611
|
};
|
|
1612
1612
|
var en_US_default = locale;
|
|
1613
1613
|
|
|
1614
|
-
// ../../../node_modules
|
|
1614
|
+
// ../../../node_modules/date-fns/esm/_lib/defaultLocale/index.js
|
|
1615
1615
|
var defaultLocale_default = en_US_default;
|
|
1616
1616
|
|
|
1617
|
-
// ../../../node_modules
|
|
1617
|
+
// ../../../node_modules/date-fns/esm/format/index.js
|
|
1618
1618
|
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
1619
1619
|
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
1620
1620
|
var escapedStringRegExp = /^'([^]*?)'?$/;
|