@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
package/README.md
CHANGED
|
@@ -9,25 +9,26 @@
|
|
|
9
9
|
The LearnCard Core is a pluggable, open-source, universal digital wallet to enable any individual or organization to seamlessly **issue, earn, store, share, and spend currency and credentials** built for the future of education and work.
|
|
10
10
|
|
|
11
11
|
## Documentation
|
|
12
|
+
|
|
12
13
|
All LearnCard documentation can be found at:
|
|
13
14
|
https://docs.learncard.com
|
|
14
15
|
|
|
15
16
|
## Install
|
|
16
17
|
|
|
17
18
|
```bash
|
|
18
|
-
|
|
19
|
+
bun add @learncard/core
|
|
19
20
|
```
|
|
20
21
|
|
|
21
22
|
## Usage
|
|
22
23
|
|
|
23
24
|
### Instantiation
|
|
24
25
|
|
|
25
|
-
Instantiate a wallet using `initLearnCard`. This method accepts a unique identifier string that is
|
|
26
|
+
Instantiate a wallet using `initLearnCard`. This method accepts a unique identifier string that is
|
|
26
27
|
up to 64 characters long. If it is less than 64 characters, `initLearnCard` will pad the start of
|
|
27
28
|
the string with 0's until it is 64 characters long.
|
|
28
29
|
|
|
29
30
|
```js
|
|
30
|
-
import { initLearnCard } from
|
|
31
|
+
import { initLearnCard } from '@learncard/core';
|
|
31
32
|
|
|
32
33
|
const wallet = await initLearnCard({ seed: 'a'.repeat(64) });
|
|
33
34
|
```
|
|
@@ -35,6 +36,7 @@ const wallet = await initLearnCard({ seed: 'a'.repeat(64) });
|
|
|
35
36
|
### Issuing/Verifying Credentials and Presentations
|
|
36
37
|
|
|
37
38
|
#### Issue a credential
|
|
39
|
+
|
|
38
40
|
```js
|
|
39
41
|
// Grab a test VC, or create your own!
|
|
40
42
|
const unsignedVc = await wallet.invoke.getTestVc();
|
|
@@ -43,6 +45,7 @@ const vc = await wallet.invoke.issueCredential(unsignedVc);
|
|
|
43
45
|
```
|
|
44
46
|
|
|
45
47
|
#### Verify a credential
|
|
48
|
+
|
|
46
49
|
```js
|
|
47
50
|
const result = await wallet.invoke.verifyCredential(vc, {}, true);
|
|
48
51
|
|
|
@@ -53,11 +56,13 @@ else console.log('This credential is valid!');
|
|
|
53
56
|
```
|
|
54
57
|
|
|
55
58
|
#### Issue a presentation
|
|
59
|
+
|
|
56
60
|
```js
|
|
57
61
|
const vp = await wallet.invoke.issuePresentation(vc);
|
|
58
62
|
```
|
|
59
63
|
|
|
60
64
|
#### Verify a presentation
|
|
65
|
+
|
|
61
66
|
```js
|
|
62
67
|
const result = await wallet.invoke.verifyPresentation(vp);
|
|
63
68
|
|
|
@@ -74,14 +79,14 @@ else console.log('This presentation is valid!');
|
|
|
74
79
|
To maintain co-ownership of credentials, it is best to store credentials in a public place, and then
|
|
75
80
|
store references to that public place. While this is not the only way to store credentials (and is
|
|
76
81
|
also definitely not a silver bullet! E.g. credentials containing private data), it is the opinion of
|
|
77
|
-
this library that it should be used by default. As a result, instantiating a wallet, will
|
|
78
|
-
automatically connect you to WeLibrary's ceramic node, and allow you to publish and retrieve
|
|
82
|
+
this library that it should be used by default. As a result, instantiating a wallet, will
|
|
83
|
+
automatically connect you to WeLibrary's ceramic node, and allow you to publish and retrieve
|
|
79
84
|
credentials there using IDX.
|
|
80
85
|
|
|
81
86
|
#### Publish Credential
|
|
82
87
|
|
|
83
88
|
After signing a VC, you may choose to publish that credential to Ceramic. Doing so will return a
|
|
84
|
-
stream ID, which you may share to the recipient. That stream ID can then be used to resolve the
|
|
89
|
+
stream ID, which you may share to the recipient. That stream ID can then be used to resolve the
|
|
85
90
|
issued credential. This means both the issuer and recipient may store the _stream ID_ instead of the
|
|
86
91
|
credential itself.
|
|
87
92
|
|
|
@@ -126,6 +131,7 @@ const vcs = await Promise.all(uris.map(async uri => wallet.read.get(uri)));
|
|
|
126
131
|
```
|
|
127
132
|
|
|
128
133
|
## Contributing
|
|
134
|
+
|
|
129
135
|
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
|
|
130
136
|
|
|
131
137
|
Please make sure to update tests as appropriate.
|
|
@@ -134,7 +140,6 @@ Please make sure to update tests as appropriate.
|
|
|
134
140
|
|
|
135
141
|
**[Learning Economy Foundation (LEF)](https://www.learningeconomy.io)** is a 501(c)(3) non-profit organization leveraging global standards and web3 protocols to bring quality skills and equal opportunity to every human on earth, and address the persistent inequities that exist around the globe in education and employment. We help you build the future of education and work with:
|
|
136
142
|
|
|
137
|
-
|
|
138
143
|
## License
|
|
139
144
|
|
|
140
145
|
MIT © [Learning Economy Foundation](https://github.com/Learning-Economy-Foundation)
|
|
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
30
30
|
// src/verify.ts
|
|
31
31
|
var import_types = require("@learncard/types");
|
|
32
32
|
|
|
33
|
-
// ../../../node_modules
|
|
33
|
+
// ../../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
34
34
|
function _typeof(o) {
|
|
35
35
|
"@babel/helpers - typeof";
|
|
36
36
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
|
@@ -41,7 +41,7 @@ function _typeof(o) {
|
|
|
41
41
|
}
|
|
42
42
|
__name(_typeof, "_typeof");
|
|
43
43
|
|
|
44
|
-
// ../../../node_modules
|
|
44
|
+
// ../../../node_modules/date-fns/esm/_lib/toInteger/index.js
|
|
45
45
|
function toInteger(dirtyNumber) {
|
|
46
46
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
47
47
|
return NaN;
|
|
@@ -54,7 +54,7 @@ function toInteger(dirtyNumber) {
|
|
|
54
54
|
}
|
|
55
55
|
__name(toInteger, "toInteger");
|
|
56
56
|
|
|
57
|
-
// ../../../node_modules
|
|
57
|
+
// ../../../node_modules/date-fns/esm/_lib/requiredArgs/index.js
|
|
58
58
|
function requiredArgs(required, args) {
|
|
59
59
|
if (args.length < required) {
|
|
60
60
|
throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
|
|
@@ -62,7 +62,7 @@ function requiredArgs(required, args) {
|
|
|
62
62
|
}
|
|
63
63
|
__name(requiredArgs, "requiredArgs");
|
|
64
64
|
|
|
65
|
-
// ../../../node_modules
|
|
65
|
+
// ../../../node_modules/date-fns/esm/toDate/index.js
|
|
66
66
|
function toDate(argument) {
|
|
67
67
|
requiredArgs(1, arguments);
|
|
68
68
|
var argStr = Object.prototype.toString.call(argument);
|
|
@@ -80,7 +80,7 @@ function toDate(argument) {
|
|
|
80
80
|
}
|
|
81
81
|
__name(toDate, "toDate");
|
|
82
82
|
|
|
83
|
-
// ../../../node_modules
|
|
83
|
+
// ../../../node_modules/date-fns/esm/addMilliseconds/index.js
|
|
84
84
|
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
85
85
|
requiredArgs(2, arguments);
|
|
86
86
|
var timestamp = toDate(dirtyDate).getTime();
|
|
@@ -89,14 +89,14 @@ function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
|
89
89
|
}
|
|
90
90
|
__name(addMilliseconds, "addMilliseconds");
|
|
91
91
|
|
|
92
|
-
// ../../../node_modules
|
|
92
|
+
// ../../../node_modules/date-fns/esm/_lib/defaultOptions/index.js
|
|
93
93
|
var defaultOptions = {};
|
|
94
94
|
function getDefaultOptions() {
|
|
95
95
|
return defaultOptions;
|
|
96
96
|
}
|
|
97
97
|
__name(getDefaultOptions, "getDefaultOptions");
|
|
98
98
|
|
|
99
|
-
// ../../../node_modules
|
|
99
|
+
// ../../../node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
|
|
100
100
|
function getTimezoneOffsetInMilliseconds(date) {
|
|
101
101
|
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
102
102
|
utcDate.setUTCFullYear(date.getFullYear());
|
|
@@ -104,14 +104,14 @@ function getTimezoneOffsetInMilliseconds(date) {
|
|
|
104
104
|
}
|
|
105
105
|
__name(getTimezoneOffsetInMilliseconds, "getTimezoneOffsetInMilliseconds");
|
|
106
106
|
|
|
107
|
-
// ../../../node_modules
|
|
107
|
+
// ../../../node_modules/date-fns/esm/isDate/index.js
|
|
108
108
|
function isDate(value) {
|
|
109
109
|
requiredArgs(1, arguments);
|
|
110
110
|
return value instanceof Date || _typeof(value) === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
111
111
|
}
|
|
112
112
|
__name(isDate, "isDate");
|
|
113
113
|
|
|
114
|
-
// ../../../node_modules
|
|
114
|
+
// ../../../node_modules/date-fns/esm/isValid/index.js
|
|
115
115
|
function isValid(dirtyDate) {
|
|
116
116
|
requiredArgs(1, arguments);
|
|
117
117
|
if (!isDate(dirtyDate) && typeof dirtyDate !== "number") {
|
|
@@ -122,7 +122,7 @@ function isValid(dirtyDate) {
|
|
|
122
122
|
}
|
|
123
123
|
__name(isValid, "isValid");
|
|
124
124
|
|
|
125
|
-
// ../../../node_modules
|
|
125
|
+
// ../../../node_modules/date-fns/esm/subMilliseconds/index.js
|
|
126
126
|
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
127
127
|
requiredArgs(2, arguments);
|
|
128
128
|
var amount = toInteger(dirtyAmount);
|
|
@@ -130,7 +130,7 @@ function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
|
130
130
|
}
|
|
131
131
|
__name(subMilliseconds, "subMilliseconds");
|
|
132
132
|
|
|
133
|
-
// ../../../node_modules
|
|
133
|
+
// ../../../node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js
|
|
134
134
|
var MILLISECONDS_IN_DAY = 864e5;
|
|
135
135
|
function getUTCDayOfYear(dirtyDate) {
|
|
136
136
|
requiredArgs(1, arguments);
|
|
@@ -144,7 +144,7 @@ function getUTCDayOfYear(dirtyDate) {
|
|
|
144
144
|
}
|
|
145
145
|
__name(getUTCDayOfYear, "getUTCDayOfYear");
|
|
146
146
|
|
|
147
|
-
// ../../../node_modules
|
|
147
|
+
// ../../../node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js
|
|
148
148
|
function startOfUTCISOWeek(dirtyDate) {
|
|
149
149
|
requiredArgs(1, arguments);
|
|
150
150
|
var weekStartsOn = 1;
|
|
@@ -157,7 +157,7 @@ function startOfUTCISOWeek(dirtyDate) {
|
|
|
157
157
|
}
|
|
158
158
|
__name(startOfUTCISOWeek, "startOfUTCISOWeek");
|
|
159
159
|
|
|
160
|
-
// ../../../node_modules
|
|
160
|
+
// ../../../node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js
|
|
161
161
|
function getUTCISOWeekYear(dirtyDate) {
|
|
162
162
|
requiredArgs(1, arguments);
|
|
163
163
|
var date = toDate(dirtyDate);
|
|
@@ -180,7 +180,7 @@ function getUTCISOWeekYear(dirtyDate) {
|
|
|
180
180
|
}
|
|
181
181
|
__name(getUTCISOWeekYear, "getUTCISOWeekYear");
|
|
182
182
|
|
|
183
|
-
// ../../../node_modules
|
|
183
|
+
// ../../../node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js
|
|
184
184
|
function startOfUTCISOWeekYear(dirtyDate) {
|
|
185
185
|
requiredArgs(1, arguments);
|
|
186
186
|
var year = getUTCISOWeekYear(dirtyDate);
|
|
@@ -192,7 +192,7 @@ function startOfUTCISOWeekYear(dirtyDate) {
|
|
|
192
192
|
}
|
|
193
193
|
__name(startOfUTCISOWeekYear, "startOfUTCISOWeekYear");
|
|
194
194
|
|
|
195
|
-
// ../../../node_modules
|
|
195
|
+
// ../../../node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js
|
|
196
196
|
var MILLISECONDS_IN_WEEK = 6048e5;
|
|
197
197
|
function getUTCISOWeek(dirtyDate) {
|
|
198
198
|
requiredArgs(1, arguments);
|
|
@@ -202,7 +202,7 @@ function getUTCISOWeek(dirtyDate) {
|
|
|
202
202
|
}
|
|
203
203
|
__name(getUTCISOWeek, "getUTCISOWeek");
|
|
204
204
|
|
|
205
|
-
// ../../../node_modules
|
|
205
|
+
// ../../../node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
|
|
206
206
|
function startOfUTCWeek(dirtyDate, options) {
|
|
207
207
|
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
208
208
|
requiredArgs(1, arguments);
|
|
@@ -220,7 +220,7 @@ function startOfUTCWeek(dirtyDate, options) {
|
|
|
220
220
|
}
|
|
221
221
|
__name(startOfUTCWeek, "startOfUTCWeek");
|
|
222
222
|
|
|
223
|
-
// ../../../node_modules
|
|
223
|
+
// ../../../node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js
|
|
224
224
|
function getUTCWeekYear(dirtyDate, options) {
|
|
225
225
|
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
226
226
|
requiredArgs(1, arguments);
|
|
@@ -249,7 +249,7 @@ function getUTCWeekYear(dirtyDate, options) {
|
|
|
249
249
|
}
|
|
250
250
|
__name(getUTCWeekYear, "getUTCWeekYear");
|
|
251
251
|
|
|
252
|
-
// ../../../node_modules
|
|
252
|
+
// ../../../node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js
|
|
253
253
|
function startOfUTCWeekYear(dirtyDate, options) {
|
|
254
254
|
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
255
255
|
requiredArgs(1, arguments);
|
|
@@ -264,7 +264,7 @@ function startOfUTCWeekYear(dirtyDate, options) {
|
|
|
264
264
|
}
|
|
265
265
|
__name(startOfUTCWeekYear, "startOfUTCWeekYear");
|
|
266
266
|
|
|
267
|
-
// ../../../node_modules
|
|
267
|
+
// ../../../node_modules/date-fns/esm/_lib/getUTCWeek/index.js
|
|
268
268
|
var MILLISECONDS_IN_WEEK2 = 6048e5;
|
|
269
269
|
function getUTCWeek(dirtyDate, options) {
|
|
270
270
|
requiredArgs(1, arguments);
|
|
@@ -274,7 +274,7 @@ function getUTCWeek(dirtyDate, options) {
|
|
|
274
274
|
}
|
|
275
275
|
__name(getUTCWeek, "getUTCWeek");
|
|
276
276
|
|
|
277
|
-
// ../../../node_modules
|
|
277
|
+
// ../../../node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
|
|
278
278
|
function addLeadingZeros(number, targetLength) {
|
|
279
279
|
var sign = number < 0 ? "-" : "";
|
|
280
280
|
var output = Math.abs(number).toString();
|
|
@@ -285,7 +285,7 @@ function addLeadingZeros(number, targetLength) {
|
|
|
285
285
|
}
|
|
286
286
|
__name(addLeadingZeros, "addLeadingZeros");
|
|
287
287
|
|
|
288
|
-
// ../../../node_modules
|
|
288
|
+
// ../../../node_modules/date-fns/esm/_lib/format/lightFormatters/index.js
|
|
289
289
|
var formatters = {
|
|
290
290
|
// Year
|
|
291
291
|
y: /* @__PURE__ */ __name(function y(date, token) {
|
|
@@ -344,7 +344,7 @@ var formatters = {
|
|
|
344
344
|
};
|
|
345
345
|
var lightFormatters_default = formatters;
|
|
346
346
|
|
|
347
|
-
// ../../../node_modules
|
|
347
|
+
// ../../../node_modules/date-fns/esm/_lib/format/formatters/index.js
|
|
348
348
|
var dayPeriodEnum = {
|
|
349
349
|
am: "am",
|
|
350
350
|
pm: "pm",
|
|
@@ -1053,7 +1053,7 @@ function formatTimezone(offset, dirtyDelimiter) {
|
|
|
1053
1053
|
__name(formatTimezone, "formatTimezone");
|
|
1054
1054
|
var formatters_default = formatters2;
|
|
1055
1055
|
|
|
1056
|
-
// ../../../node_modules
|
|
1056
|
+
// ../../../node_modules/date-fns/esm/_lib/format/longFormatters/index.js
|
|
1057
1057
|
var dateLongFormatter = /* @__PURE__ */ __name(function dateLongFormatter2(pattern, formatLong2) {
|
|
1058
1058
|
switch (pattern) {
|
|
1059
1059
|
case "P":
|
|
@@ -1135,7 +1135,7 @@ var longFormatters = {
|
|
|
1135
1135
|
};
|
|
1136
1136
|
var longFormatters_default = longFormatters;
|
|
1137
1137
|
|
|
1138
|
-
// ../../../node_modules
|
|
1138
|
+
// ../../../node_modules/date-fns/esm/_lib/protectedTokens/index.js
|
|
1139
1139
|
var protectedDayOfYearTokens = ["D", "DD"];
|
|
1140
1140
|
var protectedWeekYearTokens = ["YY", "YYYY"];
|
|
1141
1141
|
function isProtectedDayOfYearToken(token) {
|
|
@@ -1159,7 +1159,7 @@ function throwProtectedError(token, format2, input) {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
__name(throwProtectedError, "throwProtectedError");
|
|
1161
1161
|
|
|
1162
|
-
// ../../../node_modules
|
|
1162
|
+
// ../../../node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js
|
|
1163
1163
|
var formatDistanceLocale = {
|
|
1164
1164
|
lessThanXSeconds: {
|
|
1165
1165
|
one: "less than a second",
|
|
@@ -1244,7 +1244,7 @@ var formatDistance = /* @__PURE__ */ __name(function formatDistance2(token, coun
|
|
|
1244
1244
|
}, "formatDistance");
|
|
1245
1245
|
var formatDistance_default = formatDistance;
|
|
1246
1246
|
|
|
1247
|
-
// ../../../node_modules
|
|
1247
|
+
// ../../../node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js
|
|
1248
1248
|
function buildFormatLongFn(args) {
|
|
1249
1249
|
return function() {
|
|
1250
1250
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -1255,7 +1255,7 @@ function buildFormatLongFn(args) {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
__name(buildFormatLongFn, "buildFormatLongFn");
|
|
1257
1257
|
|
|
1258
|
-
// ../../../node_modules
|
|
1258
|
+
// ../../../node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js
|
|
1259
1259
|
var dateFormats = {
|
|
1260
1260
|
full: "EEEE, MMMM do, y",
|
|
1261
1261
|
long: "MMMM do, y",
|
|
@@ -1290,7 +1290,7 @@ var formatLong = {
|
|
|
1290
1290
|
};
|
|
1291
1291
|
var formatLong_default = formatLong;
|
|
1292
1292
|
|
|
1293
|
-
// ../../../node_modules
|
|
1293
|
+
// ../../../node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js
|
|
1294
1294
|
var formatRelativeLocale = {
|
|
1295
1295
|
lastWeek: "'last' eeee 'at' p",
|
|
1296
1296
|
yesterday: "'yesterday at' p",
|
|
@@ -1304,7 +1304,7 @@ var formatRelative = /* @__PURE__ */ __name(function formatRelative2(token, _dat
|
|
|
1304
1304
|
}, "formatRelative");
|
|
1305
1305
|
var formatRelative_default = formatRelative;
|
|
1306
1306
|
|
|
1307
|
-
// ../../../node_modules
|
|
1307
|
+
// ../../../node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js
|
|
1308
1308
|
function buildLocalizeFn(args) {
|
|
1309
1309
|
return function(dirtyIndex, options) {
|
|
1310
1310
|
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
|
|
@@ -1324,7 +1324,7 @@ function buildLocalizeFn(args) {
|
|
|
1324
1324
|
}
|
|
1325
1325
|
__name(buildLocalizeFn, "buildLocalizeFn");
|
|
1326
1326
|
|
|
1327
|
-
// ../../../node_modules
|
|
1327
|
+
// ../../../node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js
|
|
1328
1328
|
var eraValues = {
|
|
1329
1329
|
narrow: ["B", "A"],
|
|
1330
1330
|
abbreviated: ["BC", "AD"],
|
|
@@ -1455,7 +1455,7 @@ var localize = {
|
|
|
1455
1455
|
};
|
|
1456
1456
|
var localize_default = localize;
|
|
1457
1457
|
|
|
1458
|
-
// ../../../node_modules
|
|
1458
|
+
// ../../../node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js
|
|
1459
1459
|
function buildMatchFn(args) {
|
|
1460
1460
|
return function(string) {
|
|
1461
1461
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -1502,7 +1502,7 @@ function findIndex(array, predicate) {
|
|
|
1502
1502
|
}
|
|
1503
1503
|
__name(findIndex, "findIndex");
|
|
1504
1504
|
|
|
1505
|
-
// ../../../node_modules
|
|
1505
|
+
// ../../../node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js
|
|
1506
1506
|
function buildMatchPatternFn(args) {
|
|
1507
1507
|
return function(string) {
|
|
1508
1508
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -1522,7 +1522,7 @@ function buildMatchPatternFn(args) {
|
|
|
1522
1522
|
}
|
|
1523
1523
|
__name(buildMatchPatternFn, "buildMatchPatternFn");
|
|
1524
1524
|
|
|
1525
|
-
// ../../../node_modules
|
|
1525
|
+
// ../../../node_modules/date-fns/esm/locale/en-US/_lib/match/index.js
|
|
1526
1526
|
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
1527
1527
|
var parseOrdinalNumberPattern = /\d+/i;
|
|
1528
1528
|
var matchEraPatterns = {
|
|
@@ -1620,7 +1620,7 @@ var match = {
|
|
|
1620
1620
|
};
|
|
1621
1621
|
var match_default = match;
|
|
1622
1622
|
|
|
1623
|
-
// ../../../node_modules
|
|
1623
|
+
// ../../../node_modules/date-fns/esm/locale/en-US/index.js
|
|
1624
1624
|
var locale = {
|
|
1625
1625
|
code: "en-US",
|
|
1626
1626
|
formatDistance: formatDistance_default,
|
|
@@ -1635,10 +1635,10 @@ var locale = {
|
|
|
1635
1635
|
};
|
|
1636
1636
|
var en_US_default = locale;
|
|
1637
1637
|
|
|
1638
|
-
// ../../../node_modules
|
|
1638
|
+
// ../../../node_modules/date-fns/esm/_lib/defaultLocale/index.js
|
|
1639
1639
|
var defaultLocale_default = en_US_default;
|
|
1640
1640
|
|
|
1641
|
-
// ../../../node_modules
|
|
1641
|
+
// ../../../node_modules/date-fns/esm/format/index.js
|
|
1642
1642
|
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
1643
1643
|
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
1644
1644
|
var escapedStringRegExp = /^'([^]*?)'?$/;
|