@arkyn/shared 3.0.1-beta.14 → 3.0.1-beta.140
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 +452 -67
- package/dist/bundle.js +3749 -0
- package/dist/bundle.umd.cjs +10 -0
- package/dist/formats/formatDate.d.ts +44 -16
- package/dist/formats/formatDate.d.ts.map +1 -1
- package/dist/formats/formatDate.js +61 -26
- package/dist/formats/formatJsonObject.d.ts +6 -7
- package/dist/formats/formatJsonObject.d.ts.map +1 -1
- package/dist/formats/formatJsonObject.js +17 -17
- package/dist/formats/formatToCep.d.ts +5 -12
- package/dist/formats/formatToCep.d.ts.map +1 -1
- package/dist/formats/formatToCep.js +11 -16
- package/dist/formats/formatToCnpj.d.ts +3 -13
- package/dist/formats/formatToCnpj.d.ts.map +1 -1
- package/dist/formats/formatToCnpj.js +9 -17
- package/dist/formats/formatToCpf.d.ts +5 -13
- package/dist/formats/formatToCpf.d.ts.map +1 -1
- package/dist/formats/formatToCpf.js +11 -17
- package/dist/formats/formatToCurrency.d.ts +18 -14
- package/dist/formats/formatToCurrency.d.ts.map +1 -1
- package/dist/formats/formatToCurrency.js +21 -14
- package/dist/formats/formatToEllipsis.d.ts +8 -5
- package/dist/formats/formatToEllipsis.d.ts.map +1 -1
- package/dist/formats/formatToEllipsis.js +21 -7
- package/dist/formats/formatToHiddenDigits.d.ts +16 -16
- package/dist/formats/formatToHiddenDigits.d.ts.map +1 -1
- package/dist/formats/formatToHiddenDigits.js +19 -19
- package/dist/formats/formatToPhone.d.ts +11 -22
- package/dist/formats/formatToPhone.d.ts.map +1 -1
- package/dist/formats/formatToPhone.js +31 -118
- package/dist/generators/generateColorByString.d.ts +7 -4
- package/dist/generators/generateColorByString.d.ts.map +1 -1
- package/dist/generators/generateColorByString.js +10 -6
- package/dist/generators/generateId.d.ts +3 -3
- package/dist/generators/generateSlug.d.ts +10 -3
- package/dist/generators/generateSlug.d.ts.map +1 -1
- package/dist/generators/generateSlug.js +11 -4
- package/dist/index.d.ts +11 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -17
- package/dist/{services/truncateLargeFields.d.ts → parsers/parseLargeFields.d.ts} +9 -11
- package/dist/parsers/parseLargeFields.d.ts.map +1 -0
- package/dist/{services/truncateLargeFields.js → parsers/parseLargeFields.js} +12 -13
- package/dist/parsers/parseSensitiveData.d.ts +23 -0
- package/dist/parsers/parseSensitiveData.d.ts.map +1 -0
- package/dist/{services/maskSensitiveData.js → parsers/parseSensitiveData.js} +10 -12
- package/dist/parsers/parseToDate.d.ts +41 -0
- package/dist/parsers/parseToDate.d.ts.map +1 -0
- package/dist/parsers/parseToDate.js +67 -0
- package/dist/services/validateDateService.d.ts +85 -0
- package/dist/services/validateDateService.d.ts.map +1 -0
- package/dist/services/validateDateService.js +132 -0
- package/dist/{services → utilities}/calculateCardInstallment.d.ts +16 -18
- package/dist/utilities/calculateCardInstallment.d.ts.map +1 -0
- package/dist/{services → utilities}/calculateCardInstallment.js +12 -15
- package/dist/utilities/ensureQuotes.d.ts +21 -0
- package/dist/utilities/ensureQuotes.d.ts.map +1 -0
- package/dist/{services → utilities}/ensureQuotes.js +12 -4
- package/dist/utilities/findCountryMask.d.ts +45 -0
- package/dist/utilities/findCountryMask.d.ts.map +1 -0
- package/dist/utilities/findCountryMask.js +73 -0
- package/dist/utilities/isHtml.d.ts +22 -0
- package/dist/utilities/isHtml.d.ts.map +1 -0
- package/dist/utilities/isHtml.js +24 -0
- package/dist/{services → utilities}/removeCurrencySymbols.d.ts +6 -4
- package/dist/utilities/removeCurrencySymbols.d.ts.map +1 -0
- package/dist/{services → utilities}/removeCurrencySymbols.js +8 -7
- package/dist/utilities/removeNonNumeric.d.ts +16 -0
- package/dist/utilities/removeNonNumeric.d.ts.map +1 -0
- package/dist/utilities/removeNonNumeric.js +17 -0
- package/dist/utilities/stripHtmlTags.d.ts +19 -0
- package/dist/utilities/stripHtmlTags.d.ts.map +1 -0
- package/dist/utilities/stripHtmlTags.js +24 -0
- package/package.json +26 -6
- package/dist/formats/formatToCpfCnpj.d.ts +0 -24
- package/dist/formats/formatToCpfCnpj.d.ts.map +0 -1
- package/dist/formats/formatToCpfCnpj.js +0 -33
- package/dist/formats/formatToDate.d.ts +0 -32
- package/dist/formats/formatToDate.d.ts.map +0 -1
- package/dist/formats/formatToDate.js +0 -50
- package/dist/services/calculateCardInstallment.d.ts.map +0 -1
- package/dist/services/ensureQuotes.d.ts +0 -14
- package/dist/services/ensureQuotes.d.ts.map +0 -1
- package/dist/services/maskSensitiveData.d.ts +0 -26
- package/dist/services/maskSensitiveData.d.ts.map +0 -1
- package/dist/services/removeCurrencySymbols.d.ts.map +0 -1
- package/dist/services/removeNonNumeric.d.ts +0 -16
- package/dist/services/removeNonNumeric.d.ts.map +0 -1
- package/dist/services/removeNonNumeric.js +0 -16
- package/dist/services/stripHtmlTags.d.ts +0 -16
- package/dist/services/stripHtmlTags.d.ts.map +0 -1
- package/dist/services/stripHtmlTags.js +0 -16
- package/dist/services/truncateLargeFields.d.ts.map +0 -1
- package/dist/validations/validateCep.d.ts +0 -24
- package/dist/validations/validateCep.d.ts.map +0 -1
- package/dist/validations/validateCep.js +0 -33
- package/dist/validations/validateCnpj.d.ts +0 -22
- package/dist/validations/validateCnpj.d.ts.map +0 -1
- package/dist/validations/validateCnpj.js +0 -52
- package/dist/validations/validateCpf.d.ts +0 -24
- package/dist/validations/validateCpf.d.ts.map +0 -1
- package/dist/validations/validateCpf.js +0 -54
- package/dist/validations/validateDate.d.ts +0 -34
- package/dist/validations/validateDate.d.ts.map +0 -1
- package/dist/validations/validateDate.js +0 -73
- package/dist/validations/validatePassword.d.ts +0 -21
- package/dist/validations/validatePassword.d.ts.map +0 -1
- package/dist/validations/validatePassword.js +0 -34
- package/dist/validations/validatePhone.d.ts +0 -29
- package/dist/validations/validatePhone.d.ts.map +0 -1
- package/dist/validations/validatePhone.js +0 -44
- package/dist/validations/validateRg.d.ts +0 -22
- package/dist/validations/validateRg.d.ts.map +0 -1
- package/dist/validations/validateRg.js +0 -31
- package/src/formats/formatDate.ts +0 -92
- package/src/formats/formatJsonObject.ts +0 -90
- package/src/formats/formatJsonString.ts +0 -50
- package/src/formats/formatToCapitalizeFirstWordLetter.ts +0 -46
- package/src/formats/formatToCep.ts +0 -39
- package/src/formats/formatToCnpj.ts +0 -40
- package/src/formats/formatToCpf.ts +0 -40
- package/src/formats/formatToCpfCnpj.ts +0 -38
- package/src/formats/formatToCurrency.ts +0 -63
- package/src/formats/formatToDate.ts +0 -70
- package/src/formats/formatToEllipsis.ts +0 -25
- package/src/formats/formatToHiddenDigits.ts +0 -92
- package/src/formats/formatToPhone.ts +0 -170
- package/src/generators/generateColorByString.ts +0 -33
- package/src/generators/generateId.ts +0 -61
- package/src/generators/generateSlug.ts +0 -31
- package/src/index.ts +0 -37
- package/src/services/calculateCardInstallment.ts +0 -73
- package/src/services/ensureQuotes.ts +0 -25
- package/src/services/maskSensitiveData.ts +0 -68
- package/src/services/removeCurrencySymbols.ts +0 -29
- package/src/services/removeNonNumeric.ts +0 -20
- package/src/services/stripHtmlTags.ts +0 -20
- package/src/services/truncateLargeFields.ts +0 -69
- package/src/validations/validateCep.ts +0 -41
- package/src/validations/validateCnpj.ts +0 -65
- package/src/validations/validateCpf.ts +0 -62
- package/src/validations/validateDate.ts +0 -86
- package/src/validations/validatePassword.ts +0 -41
- package/src/validations/validatePhone.ts +0 -50
- package/src/validations/validateRg.ts +0 -37
- package/tsconfig.json +0 -20
- package/vitest.config.ts +0 -5
package/dist/index.js
CHANGED
|
@@ -6,9 +6,7 @@ export { formatToCapitalizeFirstWordLetter } from "./formats/formatToCapitalizeF
|
|
|
6
6
|
export { formatToCep } from "./formats/formatToCep";
|
|
7
7
|
export { formatToCnpj } from "./formats/formatToCnpj";
|
|
8
8
|
export { formatToCpf } from "./formats/formatToCpf";
|
|
9
|
-
export { formatToCpfCnpj } from "./formats/formatToCpfCnpj";
|
|
10
9
|
export { formatToCurrency } from "./formats/formatToCurrency";
|
|
11
|
-
export { formatToDate } from "./formats/formatToDate";
|
|
12
10
|
export { formatToEllipsis } from "./formats/formatToEllipsis";
|
|
13
11
|
export { formatToHiddenDigits } from "./formats/formatToHiddenDigits";
|
|
14
12
|
export { formatToPhone } from "./formats/formatToPhone";
|
|
@@ -16,19 +14,17 @@ export { formatToPhone } from "./formats/formatToPhone";
|
|
|
16
14
|
export { generateColorByString } from "./generators/generateColorByString";
|
|
17
15
|
export { generateId } from "./generators/generateId";
|
|
18
16
|
export { generateSlug } from "./generators/generateSlug";
|
|
17
|
+
// parsers
|
|
18
|
+
export { parseLargeFields } from "./parsers/parseLargeFields";
|
|
19
|
+
export { parseSensitiveData } from "./parsers/parseSensitiveData";
|
|
20
|
+
export { parseToDate } from "./parsers/parseToDate";
|
|
19
21
|
// services
|
|
20
|
-
export {
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
|
|
28
|
-
export {
|
|
29
|
-
export { validateCnpj } from "./validations/validateCnpj";
|
|
30
|
-
export { validateCpf } from "./validations/validateCpf";
|
|
31
|
-
export { validateDate } from "./validations/validateDate";
|
|
32
|
-
export { validatePassword } from "./validations/validatePassword";
|
|
33
|
-
export { validatePhone } from "./validations/validatePhone";
|
|
34
|
-
export { validateRg } from "./validations/validateRg";
|
|
22
|
+
export { ValidateDateService } from "./services/validateDateService";
|
|
23
|
+
// utilities
|
|
24
|
+
export { calculateCardInstallment } from "./utilities/calculateCardInstallment";
|
|
25
|
+
export { ensureQuotes } from "./utilities/ensureQuotes";
|
|
26
|
+
export { findCountryMask } from "./utilities/findCountryMask";
|
|
27
|
+
export { isHtml } from "./utilities/isHtml";
|
|
28
|
+
export { removeCurrencySymbols } from "./utilities/removeCurrencySymbols";
|
|
29
|
+
export { removeNonNumeric } from "./utilities/removeNonNumeric";
|
|
30
|
+
export { stripHtmlTags } from "./utilities/stripHtmlTags";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
type TruncateLargeFieldsFunction = (jsonString: string, maxLength?: number) => string;
|
|
2
1
|
/**
|
|
3
2
|
* Truncates large string fields in a JSON string to a specified maximum length.
|
|
4
3
|
*
|
|
@@ -6,9 +5,10 @@ type TruncateLargeFieldsFunction = (jsonString: string, maxLength?: number) => s
|
|
|
6
5
|
* any string fields that exceed the specified maximum length. If a string field is truncated,
|
|
7
6
|
* it is replaced with a message indicating the original length of the field.
|
|
8
7
|
*
|
|
9
|
-
* @param jsonString - The JSON string to process.
|
|
10
|
-
* @param maxLength - The maximum allowed length for string fields. Defaults to 1000.
|
|
11
|
-
*
|
|
8
|
+
* @param {string} jsonString - The JSON string to process.
|
|
9
|
+
* @param {number} maxLength - The maximum allowed length for string fields. Defaults to 1000.
|
|
10
|
+
*
|
|
11
|
+
* @returns {string} A JSON string with large string fields truncated.
|
|
12
12
|
*
|
|
13
13
|
* @throws {Error} Throws an error if the input is not a valid JSON string.
|
|
14
14
|
*
|
|
@@ -17,16 +17,14 @@ type TruncateLargeFieldsFunction = (jsonString: string, maxLength?: number) => s
|
|
|
17
17
|
* const json = JSON.stringify({
|
|
18
18
|
* name: "John",
|
|
19
19
|
* description: "A very long description that exceeds the maximum length...",
|
|
20
|
-
* nested: {
|
|
21
|
-
* details: "Another long string that needs truncation."
|
|
22
|
-
* }
|
|
20
|
+
* nested: { details: "Another long string that needs truncation." }
|
|
23
21
|
* });
|
|
24
22
|
*
|
|
25
|
-
* const result =
|
|
23
|
+
* const result = parseLargeFields(json, 50);
|
|
26
24
|
* console.log(result);
|
|
27
25
|
* // Output: '{"name":"John","description":"To large information: field as 57 characters","nested":{"details":"To large information: field as 43 characters"}}'
|
|
28
26
|
* ```
|
|
29
27
|
*/
|
|
30
|
-
declare
|
|
31
|
-
export {
|
|
32
|
-
//# sourceMappingURL=
|
|
28
|
+
declare function parseLargeFields(jsonString: string, maxLength?: number): string;
|
|
29
|
+
export { parseLargeFields };
|
|
30
|
+
//# sourceMappingURL=parseLargeFields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseLargeFields.d.ts","sourceRoot":"","sources":["../../src/parsers/parseLargeFields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,iBAAS,gBAAgB,CACvB,UAAU,EAAE,MAAM,EAClB,SAAS,GAAE,MAAa,GACvB,MAAM,CA6BR;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* any string fields that exceed the specified maximum length. If a string field is truncated,
|
|
6
6
|
* it is replaced with a message indicating the original length of the field.
|
|
7
7
|
*
|
|
8
|
-
* @param jsonString - The JSON string to process.
|
|
9
|
-
* @param maxLength - The maximum allowed length for string fields. Defaults to 1000.
|
|
10
|
-
*
|
|
8
|
+
* @param {string} jsonString - The JSON string to process.
|
|
9
|
+
* @param {number} maxLength - The maximum allowed length for string fields. Defaults to 1000.
|
|
10
|
+
*
|
|
11
|
+
* @returns {string} A JSON string with large string fields truncated.
|
|
11
12
|
*
|
|
12
13
|
* @throws {Error} Throws an error if the input is not a valid JSON string.
|
|
13
14
|
*
|
|
@@ -16,17 +17,15 @@
|
|
|
16
17
|
* const json = JSON.stringify({
|
|
17
18
|
* name: "John",
|
|
18
19
|
* description: "A very long description that exceeds the maximum length...",
|
|
19
|
-
* nested: {
|
|
20
|
-
* details: "Another long string that needs truncation."
|
|
21
|
-
* }
|
|
20
|
+
* nested: { details: "Another long string that needs truncation." }
|
|
22
21
|
* });
|
|
23
22
|
*
|
|
24
|
-
* const result =
|
|
23
|
+
* const result = parseLargeFields(json, 50);
|
|
25
24
|
* console.log(result);
|
|
26
25
|
* // Output: '{"name":"John","description":"To large information: field as 57 characters","nested":{"details":"To large information: field as 43 characters"}}'
|
|
27
26
|
* ```
|
|
28
27
|
*/
|
|
29
|
-
|
|
28
|
+
function parseLargeFields(jsonString, maxLength = 1000) {
|
|
30
29
|
function truncateValue(value) {
|
|
31
30
|
if (typeof value === "string" && value.length > maxLength) {
|
|
32
31
|
return `To large information: field as ${value.length} characters`;
|
|
@@ -35,15 +34,15 @@ const truncateLargeFields = (jsonString, maxLength = 1000) => {
|
|
|
35
34
|
}
|
|
36
35
|
function recursiveTruncate(obj) {
|
|
37
36
|
if (Array.isArray(obj)) {
|
|
38
|
-
return obj.map((item) => recursiveTruncate(item));
|
|
37
|
+
return obj.map((item) => recursiveTruncate(item));
|
|
39
38
|
}
|
|
40
39
|
else if (obj !== null && typeof obj === "object") {
|
|
41
40
|
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [
|
|
42
41
|
key,
|
|
43
|
-
recursiveTruncate(value),
|
|
42
|
+
recursiveTruncate(value),
|
|
44
43
|
]));
|
|
45
44
|
}
|
|
46
|
-
return truncateValue(obj);
|
|
45
|
+
return truncateValue(obj);
|
|
47
46
|
}
|
|
48
47
|
try {
|
|
49
48
|
const parsedJson = JSON.parse(jsonString);
|
|
@@ -53,5 +52,5 @@ const truncateLargeFields = (jsonString, maxLength = 1000) => {
|
|
|
53
52
|
catch (error) {
|
|
54
53
|
throw new Error("Invalid JSON string");
|
|
55
54
|
}
|
|
56
|
-
}
|
|
57
|
-
export {
|
|
55
|
+
}
|
|
56
|
+
export { parseLargeFields };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Masks sensitive data in a JSON string by replacing the values of specified keys with "****".
|
|
3
|
+
*
|
|
4
|
+
* @param {string} jsonString - The JSON string to be processed.
|
|
5
|
+
* @param {string[]} sensitiveKeys - An array of keys whose values should be masked. Defaults to `["password", "confirmPassword", "creditCard"]`.
|
|
6
|
+
*
|
|
7
|
+
* @returns {string} A JSON string with sensitive data masked. If the input is not a valid JSON string, it returns the original string.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const jsonString = JSON.stringify({
|
|
12
|
+
* username: "user123",
|
|
13
|
+
* password: "secret",
|
|
14
|
+
* profile: { creditCard: "1234-5678-9012-3456" },
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* const result = parseSensitiveData(jsonString, ["password", "creditCard"]);
|
|
18
|
+
* console.log(result); // Output: '{"username":"user123","password":"****","profile":{"creditCard":"****"}}'
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare function parseSensitiveData(jsonString: string, sensitiveKeys?: string[]): string;
|
|
22
|
+
export { parseSensitiveData };
|
|
23
|
+
//# sourceMappingURL=parseSensitiveData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseSensitiveData.d.ts","sourceRoot":"","sources":["../../src/parsers/parseSensitiveData.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,iBAAS,kBAAkB,CACzB,UAAU,EAAE,MAAM,EAClB,aAAa,GAAE,MAAM,EAAkD,GACtE,MAAM,CAkCR;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Masks sensitive data in a JSON string by replacing the values of specified keys with "****".
|
|
3
3
|
*
|
|
4
|
-
* @param jsonString - The JSON string to be processed.
|
|
5
|
-
* @param sensitiveKeys - An array of keys whose values should be masked. Defaults to `["password", "confirmPassword", "creditCard"]`.
|
|
6
|
-
*
|
|
4
|
+
* @param {string} jsonString - The JSON string to be processed.
|
|
5
|
+
* @param {string[]} sensitiveKeys - An array of keys whose values should be masked. Defaults to `["password", "confirmPassword", "creditCard"]`.
|
|
6
|
+
*
|
|
7
|
+
* @returns {string} A JSON string with sensitive data masked. If the input is not a valid JSON string, it returns the original string.
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
10
|
* ```typescript
|
|
10
11
|
* const jsonString = JSON.stringify({
|
|
11
12
|
* username: "user123",
|
|
12
13
|
* password: "secret",
|
|
13
|
-
* profile: {
|
|
14
|
-
* creditCard: "1234-5678-9012-3456",
|
|
15
|
-
* },
|
|
14
|
+
* profile: { creditCard: "1234-5678-9012-3456" },
|
|
16
15
|
* });
|
|
17
16
|
*
|
|
18
|
-
* const result =
|
|
19
|
-
* console.log(result);
|
|
20
|
-
* // Output: '{"username":"user123","password":"****","profile":{"creditCard":"****"}}'
|
|
17
|
+
* const result = parseSensitiveData(jsonString, ["password", "creditCard"]);
|
|
18
|
+
* console.log(result); // Output: '{"username":"user123","password":"****","profile":{"creditCard":"****"}}'
|
|
21
19
|
* ```
|
|
22
20
|
*/
|
|
23
|
-
|
|
21
|
+
function parseSensitiveData(jsonString, sensitiveKeys = ["password", "confirmPassword", "creditCard"]) {
|
|
24
22
|
function maskValue(key, value) {
|
|
25
23
|
if (sensitiveKeys.includes(key))
|
|
26
24
|
return "****";
|
|
@@ -56,5 +54,5 @@ const maskSensitiveData = (jsonString, sensitiveKeys = ["password", "confirmPass
|
|
|
56
54
|
catch (error) {
|
|
57
55
|
return jsonString;
|
|
58
56
|
}
|
|
59
|
-
}
|
|
60
|
-
export {
|
|
57
|
+
}
|
|
58
|
+
export { parseSensitiveData };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a date and time input into a JavaScript `Date` object, formatted according to the specified input format and timezone.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* **Note:** This function works with UTC+0 by default. The returned Date object is not automatically converted to the machine's local timezone.
|
|
6
|
+
* To adjust the timezone, you must manually specify the `timezone` parameter (e.g., -3 for UTC-3).
|
|
7
|
+
*
|
|
8
|
+
* @param {string[]} dateTime - An array containing the date and optional time.
|
|
9
|
+
* - The first element is the date string.
|
|
10
|
+
* - The second element is the time string (default is "00:00:00")
|
|
11
|
+
* @param {"brazilianDate" | "isoDate" | "timestamp"} inputFormat - The format of the input date.
|
|
12
|
+
* - "brazilianDate": Expects the date in "DD/MM/YYYY" or "D/M/YYYY" format.
|
|
13
|
+
* - "isoDate": Expects the date in "MM-DD-YYYY" or "M-D-YYYY" format.
|
|
14
|
+
* - "timestamp": Expects the date in "YYYY-MM-DD" or "YYYY-M-D" format.
|
|
15
|
+
* @param {number} [timezone=0] - The timezone offset in hours to apply to the date.
|
|
16
|
+
* - Defaults to 0 (UTC).
|
|
17
|
+
*
|
|
18
|
+
* @returns {Date} A `Date` object representing the parsed date and time, adjusted for the specified timezone.
|
|
19
|
+
*
|
|
20
|
+
* @throws {Error} If the `inputFormat` is invalid.
|
|
21
|
+
* @throws {Error} If the provided date or time is invalid.
|
|
22
|
+
*
|
|
23
|
+
* @example Format a Brazilian date to Date
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const date = parseToDate(["25/12/2023", "15:30:00"], "brazilianDate", -3);
|
|
26
|
+
* console.log(date); // Outputs a Date object for "2023-12-25T12:30:00.000Z" (UTC)
|
|
27
|
+
* ```
|
|
28
|
+
* @example Format an ISO date to Date
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const date = parseToDate(["12-25-2023", "15:30:00"], "isoDate", 2);
|
|
31
|
+
* console.log(date); // Outputs a Date object for "2023-12-25T13:30:00.000Z" (UTC)
|
|
32
|
+
* ```
|
|
33
|
+
* @example Format a timestamp date to Date
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const date = parseToDate(["2023-12-25", "15:30:00"], "timestamp");
|
|
36
|
+
* console.log(date); // Outputs a Date object for "2023-12-25T15:30:00.000Z" (UTC)
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare function parseToDate([date, time]: string[], inputFormat: "brazilianDate" | "isoDate" | "timestamp", timezone?: number): Date;
|
|
40
|
+
export { parseToDate };
|
|
41
|
+
//# sourceMappingURL=parseToDate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseToDate.d.ts","sourceRoot":"","sources":["../../src/parsers/parseToDate.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,iBAAS,WAAW,CAClB,CAAC,IAAI,EAAE,IAAiB,CAAC,EAAE,MAAM,EAAE,EACnC,WAAW,EAAE,eAAe,GAAG,SAAS,GAAG,WAAW,EACtD,QAAQ,GAAE,MAAU,GACnB,IAAI,CAkCN;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ValidateDateService } from "../services/validateDateService";
|
|
2
|
+
/**
|
|
3
|
+
* Converts a date and time input into a JavaScript `Date` object, formatted according to the specified input format and timezone.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* **Note:** This function works with UTC+0 by default. The returned Date object is not automatically converted to the machine's local timezone.
|
|
7
|
+
* To adjust the timezone, you must manually specify the `timezone` parameter (e.g., -3 for UTC-3).
|
|
8
|
+
*
|
|
9
|
+
* @param {string[]} dateTime - An array containing the date and optional time.
|
|
10
|
+
* - The first element is the date string.
|
|
11
|
+
* - The second element is the time string (default is "00:00:00")
|
|
12
|
+
* @param {"brazilianDate" | "isoDate" | "timestamp"} inputFormat - The format of the input date.
|
|
13
|
+
* - "brazilianDate": Expects the date in "DD/MM/YYYY" or "D/M/YYYY" format.
|
|
14
|
+
* - "isoDate": Expects the date in "MM-DD-YYYY" or "M-D-YYYY" format.
|
|
15
|
+
* - "timestamp": Expects the date in "YYYY-MM-DD" or "YYYY-M-D" format.
|
|
16
|
+
* @param {number} [timezone=0] - The timezone offset in hours to apply to the date.
|
|
17
|
+
* - Defaults to 0 (UTC).
|
|
18
|
+
*
|
|
19
|
+
* @returns {Date} A `Date` object representing the parsed date and time, adjusted for the specified timezone.
|
|
20
|
+
*
|
|
21
|
+
* @throws {Error} If the `inputFormat` is invalid.
|
|
22
|
+
* @throws {Error} If the provided date or time is invalid.
|
|
23
|
+
*
|
|
24
|
+
* @example Format a Brazilian date to Date
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const date = parseToDate(["25/12/2023", "15:30:00"], "brazilianDate", -3);
|
|
27
|
+
* console.log(date); // Outputs a Date object for "2023-12-25T12:30:00.000Z" (UTC)
|
|
28
|
+
* ```
|
|
29
|
+
* @example Format an ISO date to Date
|
|
30
|
+
* ```typescript
|
|
31
|
+
* const date = parseToDate(["12-25-2023", "15:30:00"], "isoDate", 2);
|
|
32
|
+
* console.log(date); // Outputs a Date object for "2023-12-25T13:30:00.000Z" (UTC)
|
|
33
|
+
* ```
|
|
34
|
+
* @example Format a timestamp date to Date
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const date = parseToDate(["2023-12-25", "15:30:00"], "timestamp");
|
|
37
|
+
* console.log(date); // Outputs a Date object for "2023-12-25T15:30:00.000Z" (UTC)
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
function parseToDate([date, time = "00:00:00"], inputFormat, timezone = 0) {
|
|
41
|
+
const validateDateService = new ValidateDateService();
|
|
42
|
+
validateDateService.validateInputFormat(inputFormat);
|
|
43
|
+
const dateParts = date.split(/[-/]/).map(Number);
|
|
44
|
+
const timeParts = time.split(".")[0].split(":").map(Number);
|
|
45
|
+
let day, month, year;
|
|
46
|
+
const [hours = 0, minutes = 0, seconds = 0] = timeParts;
|
|
47
|
+
switch (inputFormat) {
|
|
48
|
+
case "brazilianDate":
|
|
49
|
+
[day, month, year] = dateParts;
|
|
50
|
+
validateDateService.validateDateParts(year, month, day);
|
|
51
|
+
break;
|
|
52
|
+
case "isoDate":
|
|
53
|
+
[month, day, year] = dateParts;
|
|
54
|
+
validateDateService.validateDateParts(year, month, day);
|
|
55
|
+
break;
|
|
56
|
+
case "timestamp":
|
|
57
|
+
[year, month, day] = dateParts;
|
|
58
|
+
validateDateService.validateDateParts(year, month, day);
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
const formattedDate = new Date(Date.UTC(year, month - 1, day, hours, minutes, seconds));
|
|
62
|
+
if (isNaN(formattedDate.getTime()))
|
|
63
|
+
throw new Error("Invalid date");
|
|
64
|
+
formattedDate.setUTCHours(formattedDate.getUTCHours() + timezone);
|
|
65
|
+
return formattedDate;
|
|
66
|
+
}
|
|
67
|
+
export { parseToDate };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service for validating date components and input formats.
|
|
3
|
+
*
|
|
4
|
+
* This service provides methods to validate date parts (year, month, day) and
|
|
5
|
+
* input format strings used in date parsing operations. It includes leap year
|
|
6
|
+
* validation and month-specific day validation.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* The service validates:
|
|
10
|
+
* - Year must be exactly 4 digits (1000-9999)
|
|
11
|
+
* - Month must be between 1 and 12
|
|
12
|
+
* - Day must be between 1 and 31
|
|
13
|
+
* - Day must be valid for the specific month (e.g., no February 30)
|
|
14
|
+
* - Leap year rules for February 29
|
|
15
|
+
*
|
|
16
|
+
* @example Validate a valid date
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const service = new ValidateDateService();
|
|
19
|
+
* service.validateDateParts(2024, 1, 15); // No error thrown
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @example Validate an invalid date
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const service = new ValidateDateService();
|
|
25
|
+
* service.validateDateParts(2023, 2, 29); // Throws: "Day 29 is not valid for February 2023 (non-leap year)"
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @example Validate input format
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const service = new ValidateDateService();
|
|
31
|
+
* service.validateInputFormat("brazilianDate"); // No error thrown
|
|
32
|
+
* service.validateInputFormat("invalidFormat"); // Throws: "Invalid input format: invalidFormat"
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare class ValidateDateService {
|
|
36
|
+
private isLeapYear;
|
|
37
|
+
private getDaysInMonth;
|
|
38
|
+
private validateDayInMonth;
|
|
39
|
+
/**
|
|
40
|
+
* Validates the components of a date (year, month, and day).
|
|
41
|
+
*
|
|
42
|
+
* @param {number} year - The year to validate (must be 4 digits).
|
|
43
|
+
* @param {number} month - The month to validate (must be between 1 and 12).
|
|
44
|
+
* @param {number} day - The day to validate (must be between 1 and 31, and valid for the month).
|
|
45
|
+
*
|
|
46
|
+
* @throws {Error} "Year should be four digits" - If the year doesn't have exactly 4 digits.
|
|
47
|
+
* @throws {Error} "Month should be between 1 and 12" - If the month is out of valid range.
|
|
48
|
+
* @throws {Error} "Day should be between 1 and 31" - If the day is out of valid range.
|
|
49
|
+
* @throws {Error} Month-specific error - If the day is invalid for the specific month.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* const service = new ValidateDateService();
|
|
54
|
+
* service.validateDateParts(2024, 2, 29); // Valid leap year date
|
|
55
|
+
* service.validateDateParts(2023, 2, 29); // Throws error - not a leap year
|
|
56
|
+
* service.validateDateParts(2024, 4, 31); // Throws error - April has only 30 days
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
validateDateParts(year: number, month: number, day: number): void;
|
|
60
|
+
/**
|
|
61
|
+
* Validates that a given format string is supported.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} format - The format string to validate.
|
|
64
|
+
*
|
|
65
|
+
* @throws {Error} "Invalid input format: {format}" - If the format is not one of the valid formats.
|
|
66
|
+
*
|
|
67
|
+
* @remarks
|
|
68
|
+
* Valid formats are:
|
|
69
|
+
* - "brazilianDate": DD/MM/YYYY format
|
|
70
|
+
* - "isoDate": MM-DD-YYYY format
|
|
71
|
+
* - "timestamp": YYYY-MM-DD format
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* const service = new ValidateDateService();
|
|
76
|
+
* service.validateInputFormat("brazilianDate"); // Valid
|
|
77
|
+
* service.validateInputFormat("isoDate"); // Valid
|
|
78
|
+
* service.validateInputFormat("timestamp"); // Valid
|
|
79
|
+
* service.validateInputFormat("customFormat"); // Throws error
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
validateInputFormat(format: string): void;
|
|
83
|
+
}
|
|
84
|
+
export { ValidateDateService };
|
|
85
|
+
//# sourceMappingURL=validateDateService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateDateService.d.ts","sourceRoot":"","sources":["../../src/services/validateDateService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,cAAM,mBAAmB;IACvB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,kBAAkB;IA2B1B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAcjE;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAM1C;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service for validating date components and input formats.
|
|
3
|
+
*
|
|
4
|
+
* This service provides methods to validate date parts (year, month, day) and
|
|
5
|
+
* input format strings used in date parsing operations. It includes leap year
|
|
6
|
+
* validation and month-specific day validation.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* The service validates:
|
|
10
|
+
* - Year must be exactly 4 digits (1000-9999)
|
|
11
|
+
* - Month must be between 1 and 12
|
|
12
|
+
* - Day must be between 1 and 31
|
|
13
|
+
* - Day must be valid for the specific month (e.g., no February 30)
|
|
14
|
+
* - Leap year rules for February 29
|
|
15
|
+
*
|
|
16
|
+
* @example Validate a valid date
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const service = new ValidateDateService();
|
|
19
|
+
* service.validateDateParts(2024, 1, 15); // No error thrown
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @example Validate an invalid date
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const service = new ValidateDateService();
|
|
25
|
+
* service.validateDateParts(2023, 2, 29); // Throws: "Day 29 is not valid for February 2023 (non-leap year)"
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @example Validate input format
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const service = new ValidateDateService();
|
|
31
|
+
* service.validateInputFormat("brazilianDate"); // No error thrown
|
|
32
|
+
* service.validateInputFormat("invalidFormat"); // Throws: "Invalid input format: invalidFormat"
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
class ValidateDateService {
|
|
36
|
+
isLeapYear(year) {
|
|
37
|
+
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
|
|
38
|
+
}
|
|
39
|
+
getDaysInMonth(month, year) {
|
|
40
|
+
const daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
41
|
+
if (month === 2 && this.isLeapYear(year))
|
|
42
|
+
return 29;
|
|
43
|
+
return daysInMonth[month - 1];
|
|
44
|
+
}
|
|
45
|
+
validateDayInMonth(day, month, year) {
|
|
46
|
+
const maxDays = this.getDaysInMonth(month, year);
|
|
47
|
+
if (day > maxDays) {
|
|
48
|
+
const monthNames = [
|
|
49
|
+
"January",
|
|
50
|
+
"February",
|
|
51
|
+
"March",
|
|
52
|
+
"April",
|
|
53
|
+
"May",
|
|
54
|
+
"June",
|
|
55
|
+
"July",
|
|
56
|
+
"August",
|
|
57
|
+
"September",
|
|
58
|
+
"October",
|
|
59
|
+
"November",
|
|
60
|
+
"December",
|
|
61
|
+
];
|
|
62
|
+
const errorMessage = `Day ${day} is not valid for ${monthNames[month - 1]}`;
|
|
63
|
+
const leapYearMessage = `Day ${day} is not valid for February ${year} (non-leap year)`;
|
|
64
|
+
if (month === 2 && day === 29)
|
|
65
|
+
throw new Error(leapYearMessage);
|
|
66
|
+
throw new Error(errorMessage);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Validates the components of a date (year, month, and day).
|
|
71
|
+
*
|
|
72
|
+
* @param {number} year - The year to validate (must be 4 digits).
|
|
73
|
+
* @param {number} month - The month to validate (must be between 1 and 12).
|
|
74
|
+
* @param {number} day - The day to validate (must be between 1 and 31, and valid for the month).
|
|
75
|
+
*
|
|
76
|
+
* @throws {Error} "Year should be four digits" - If the year doesn't have exactly 4 digits.
|
|
77
|
+
* @throws {Error} "Month should be between 1 and 12" - If the month is out of valid range.
|
|
78
|
+
* @throws {Error} "Day should be between 1 and 31" - If the day is out of valid range.
|
|
79
|
+
* @throws {Error} Month-specific error - If the day is invalid for the specific month.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```typescript
|
|
83
|
+
* const service = new ValidateDateService();
|
|
84
|
+
* service.validateDateParts(2024, 2, 29); // Valid leap year date
|
|
85
|
+
* service.validateDateParts(2023, 2, 29); // Throws error - not a leap year
|
|
86
|
+
* service.validateDateParts(2024, 4, 31); // Throws error - April has only 30 days
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
validateDateParts(year, month, day) {
|
|
90
|
+
const messageErrors = {
|
|
91
|
+
year: "Year should be four digits",
|
|
92
|
+
month: "Month should be between 1 and 12",
|
|
93
|
+
day: "Day should be between 1 and 31",
|
|
94
|
+
};
|
|
95
|
+
if (`${year}`.length !== 4)
|
|
96
|
+
throw new Error(messageErrors.year);
|
|
97
|
+
if (month < 1 || month > 12)
|
|
98
|
+
throw new Error(messageErrors.month);
|
|
99
|
+
if (day < 1 || day > 31)
|
|
100
|
+
throw new Error(messageErrors.day);
|
|
101
|
+
this.validateDayInMonth(day, month, year);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Validates that a given format string is supported.
|
|
105
|
+
*
|
|
106
|
+
* @param {string} format - The format string to validate.
|
|
107
|
+
*
|
|
108
|
+
* @throws {Error} "Invalid input format: {format}" - If the format is not one of the valid formats.
|
|
109
|
+
*
|
|
110
|
+
* @remarks
|
|
111
|
+
* Valid formats are:
|
|
112
|
+
* - "brazilianDate": DD/MM/YYYY format
|
|
113
|
+
* - "isoDate": MM-DD-YYYY format
|
|
114
|
+
* - "timestamp": YYYY-MM-DD format
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```typescript
|
|
118
|
+
* const service = new ValidateDateService();
|
|
119
|
+
* service.validateInputFormat("brazilianDate"); // Valid
|
|
120
|
+
* service.validateInputFormat("isoDate"); // Valid
|
|
121
|
+
* service.validateInputFormat("timestamp"); // Valid
|
|
122
|
+
* service.validateInputFormat("customFormat"); // Throws error
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
validateInputFormat(format) {
|
|
126
|
+
const validFormats = ["brazilianDate", "isoDate", "timestamp"];
|
|
127
|
+
if (!validFormats.includes(format)) {
|
|
128
|
+
throw new Error(`Invalid input format: ${format}`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
export { ValidateDateService };
|
|
@@ -1,26 +1,18 @@
|
|
|
1
|
-
type CalculateCardInstallmentFunction = (props: {
|
|
2
|
-
cashPrice: number;
|
|
3
|
-
numberInstallments: number;
|
|
4
|
-
fees?: number;
|
|
5
|
-
}) => {
|
|
6
|
-
totalPrice: number;
|
|
7
|
-
installmentPrice: number;
|
|
8
|
-
};
|
|
9
1
|
/**
|
|
10
2
|
* Calculates the installment price and total price for a card payment plan.
|
|
11
3
|
*
|
|
12
4
|
* @remarks
|
|
13
5
|
* **Important:** When the interest amount (`fees`) is equal to 0 or the number of installments (`numberInstallments`) is equal to 1, no interest will be charged.
|
|
14
6
|
*
|
|
15
|
-
* @
|
|
16
|
-
* @
|
|
7
|
+
* @param {object} props - The input parameters for the calculation.
|
|
8
|
+
* @param {number} props.cashPrice - The total cash price of the product or service.
|
|
9
|
+
* @param {number} props.numberInstallments - The number of installments for the payment plan.
|
|
10
|
+
* @param {number} [props.fees=0.0349] - The interest rate per installment (default is 0.0349).
|
|
17
11
|
*
|
|
18
|
-
* @
|
|
19
|
-
* @
|
|
20
|
-
* @param props.numberInstallments - The number of installments for the payment plan.
|
|
21
|
-
* @param props.fees - The interest rate per installment (default is 0.0349).
|
|
12
|
+
* @throws {Error} If `numberInstallments` is less than or equal to 0.
|
|
13
|
+
* @throws {Error} If `fees` is less than 0.
|
|
22
14
|
*
|
|
23
|
-
* @returns An object containing:
|
|
15
|
+
* @returns {object} An object containing:
|
|
24
16
|
* - `totalPrice`: The total price to be paid, rounded to two decimal places.
|
|
25
17
|
* - `installmentPrice`: The price of each installment, rounded to two decimal places.
|
|
26
18
|
*
|
|
@@ -31,10 +23,16 @@ type CalculateCardInstallmentFunction = (props: {
|
|
|
31
23
|
* numberInstallments: 12,
|
|
32
24
|
* fees: 0.02,
|
|
33
25
|
* });
|
|
34
|
-
* console.log(result);
|
|
35
|
-
* // Output: { totalPrice: 1124.62, installmentPrice: 93.72 }
|
|
26
|
+
* console.log(result); // Output: { totalPrice: 1124.62, installmentPrice: 93.72 }
|
|
36
27
|
* ```
|
|
37
28
|
*/
|
|
38
|
-
declare
|
|
29
|
+
declare function calculateCardInstallment(props: {
|
|
30
|
+
cashPrice: number;
|
|
31
|
+
numberInstallments: number;
|
|
32
|
+
fees?: number;
|
|
33
|
+
}): {
|
|
34
|
+
totalPrice: number;
|
|
35
|
+
installmentPrice: number;
|
|
36
|
+
};
|
|
39
37
|
export { calculateCardInstallment };
|
|
40
38
|
//# sourceMappingURL=calculateCardInstallment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateCardInstallment.d.ts","sourceRoot":"","sources":["../../src/utilities/calculateCardInstallment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,iBAAS,wBAAwB,CAAC,KAAK,EAAE;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,CA4BnD;AAED,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
|