@learncard/react 2.12.2 → 2.12.3
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/dist/cjs/{BoostGenericCard-06bedec7.js → BoostGenericCard-72cab860.js} +2 -2
- package/dist/cjs/{BoostGenericCard-06bedec7.js.map → BoostGenericCard-72cab860.js.map} +1 -1
- package/dist/cjs/{CertificateDisplayCard-9c1d58da.js → CertificateDisplayCard-a036cdc5.js} +4 -4
- package/dist/cjs/{CertificateDisplayCard-9c1d58da.js.map → CertificateDisplayCard-a036cdc5.js.map} +1 -1
- package/dist/cjs/{MeritBadgeDisplayCard-201bf5ad.js → MeritBadgeDisplayCard-2e4edd20.js} +4 -4
- package/dist/cjs/MeritBadgeDisplayCard-2e4edd20.js.map +1 -0
- package/dist/cjs/{MeritBadgeSkillsCount-ef283e0d.js → MeritBadgeSkillsCount-472542c1.js} +2 -2
- package/dist/cjs/{MeritBadgeSkillsCount-ef283e0d.js.map → MeritBadgeSkillsCount-472542c1.js.map} +1 -1
- package/dist/cjs/{VCCard-d72176f3.js → VCCard-ebbbda88.js} +3 -3
- package/dist/cjs/{VCCard-d72176f3.js.map → VCCard-ebbbda88.js.map} +1 -1
- package/dist/cjs/{VCDisplayBackFace-27460538.js → VCDisplayBackFace-13c73f23.js} +3 -3
- package/dist/cjs/{VCDisplayBackFace-27460538.js.map → VCDisplayBackFace-13c73f23.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard-b05125ab.js → VCDisplayCard-3720145a.js} +3 -3
- package/dist/cjs/{VCDisplayCard-b05125ab.js.map → VCDisplayCard-3720145a.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard2-78d4cc3f.js → VCDisplayCard2-ae93ccd2.js} +19 -19
- package/dist/cjs/VCDisplayCard2-ae93ccd2.js.map +1 -0
- package/dist/cjs/{VCVerificationPill-3c130965.js → VCVerificationPill-a1607dff.js} +2 -2
- package/dist/cjs/{VCVerificationPill-3c130965.js.map → VCVerificationPill-a1607dff.js.map} +1 -1
- package/dist/cjs/{VerifierStateBadgeAndText-57a7b85f.js → VerifierStateBadgeAndText-5f10743e.js} +127 -105
- package/dist/cjs/VerifierStateBadgeAndText-5f10743e.js.map +1 -0
- package/dist/cjs/{credential.helpers-3d0256cf.js → credential.helpers-65ea507a.js} +2 -2
- package/dist/cjs/{credential.helpers-3d0256cf.js.map → credential.helpers-65ea507a.js.map} +1 -1
- package/dist/cjs/index.js +12 -12
- package/dist/cjs/index14.js +12 -12
- package/dist/cjs/index22.js +5 -5
- package/dist/cjs/index39.js +10 -10
- package/dist/cjs/index4.js +3 -3
- package/dist/cjs/index40.js +4 -4
- package/dist/cjs/index41.js +5 -5
- package/dist/cjs/index42.js +6 -6
- package/dist/cjs/index43.js +1 -1
- package/dist/cjs/index46.js +2 -2
- package/dist/cjs/index7.js +4 -4
- package/dist/cjs/{types.esm-228757cd.js → types.esm-50b3eecd.js} +17 -2
- package/dist/cjs/types.esm-50b3eecd.js.map +1 -0
- package/dist/esm/{BoostGenericCard-d4ea46de.js → BoostGenericCard-2f586072.js} +2 -2
- package/dist/esm/{BoostGenericCard-d4ea46de.js.map → BoostGenericCard-2f586072.js.map} +1 -1
- package/dist/esm/{CertificateDisplayCard-487a3b4e.js → CertificateDisplayCard-ff1ae869.js} +4 -4
- package/dist/esm/{CertificateDisplayCard-487a3b4e.js.map → CertificateDisplayCard-ff1ae869.js.map} +1 -1
- package/dist/esm/{MeritBadgeDisplayCard-13622cd4.js → MeritBadgeDisplayCard-b8b904d2.js} +4 -4
- package/dist/esm/MeritBadgeDisplayCard-b8b904d2.js.map +1 -0
- package/dist/esm/{MeritBadgeSkillsCount-11bd0ae3.js → MeritBadgeSkillsCount-46d9c24b.js} +2 -2
- package/dist/esm/{MeritBadgeSkillsCount-11bd0ae3.js.map → MeritBadgeSkillsCount-46d9c24b.js.map} +1 -1
- package/dist/esm/{VCCard-7fa8f15b.js → VCCard-e2ebb922.js} +3 -3
- package/dist/esm/{VCCard-7fa8f15b.js.map → VCCard-e2ebb922.js.map} +1 -1
- package/dist/esm/{VCDisplayBackFace-314c1107.js → VCDisplayBackFace-4f2d700d.js} +3 -3
- package/dist/esm/{VCDisplayBackFace-314c1107.js.map → VCDisplayBackFace-4f2d700d.js.map} +1 -1
- package/dist/esm/{VCDisplayCard-652910f5.js → VCDisplayCard-32e126f8.js} +3 -3
- package/dist/esm/{VCDisplayCard-652910f5.js.map → VCDisplayCard-32e126f8.js.map} +1 -1
- package/dist/esm/{VCDisplayCard2-a8b9a519.js → VCDisplayCard2-ec2177de.js} +19 -19
- package/dist/esm/VCDisplayCard2-ec2177de.js.map +1 -0
- package/dist/esm/{VCVerificationPill-be1140c5.js → VCVerificationPill-0c336075.js} +2 -2
- package/dist/esm/{VCVerificationPill-be1140c5.js.map → VCVerificationPill-0c336075.js.map} +1 -1
- package/dist/esm/{VerifierStateBadgeAndText-97117c5d.js → VerifierStateBadgeAndText-0a4e0c63.js} +128 -106
- package/dist/esm/VerifierStateBadgeAndText-0a4e0c63.js.map +1 -0
- package/dist/esm/{credential.helpers-3dfe6b60.js → credential.helpers-61005784.js} +2 -2
- package/dist/esm/{credential.helpers-3dfe6b60.js.map → credential.helpers-61005784.js.map} +1 -1
- package/dist/esm/index.js +12 -12
- package/dist/esm/index14.js +12 -12
- package/dist/esm/index22.js +5 -5
- package/dist/esm/index39.js +10 -10
- package/dist/esm/index4.js +3 -3
- package/dist/esm/index40.js +4 -4
- package/dist/esm/index41.js +5 -5
- package/dist/esm/index42.js +6 -6
- package/dist/esm/index43.js +1 -1
- package/dist/esm/index46.js +2 -2
- package/dist/esm/index7.js +4 -4
- package/dist/esm/{types.esm-a67e86b1.js → types.esm-2762569e.js} +13 -3
- package/dist/esm/types.esm-2762569e.js.map +1 -0
- package/dist/index.d.ts +20 -2
- package/package.json +3 -3
- package/src/assets/styles/main.css +24 -18
- package/src/components/MeritBadgeDisplayCard/MediaAttachmentsBox.tsx +3 -2
- package/src/components/VCDisplayCard2/VC2FrontFaceInfo.tsx +19 -21
- package/dist/cjs/MeritBadgeDisplayCard-201bf5ad.js.map +0 -1
- package/dist/cjs/VCDisplayCard2-78d4cc3f.js.map +0 -1
- package/dist/cjs/VerifierStateBadgeAndText-57a7b85f.js.map +0 -1
- package/dist/cjs/types.esm-228757cd.js.map +0 -1
- package/dist/esm/MeritBadgeDisplayCard-13622cd4.js.map +0 -1
- package/dist/esm/VCDisplayCard2-a8b9a519.js.map +0 -1
- package/dist/esm/VerifierStateBadgeAndText-97117c5d.js.map +0 -1
- package/dist/esm/types.esm-a67e86b1.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VCVerificationPill-
|
|
1
|
+
{"version":3,"file":"VCVerificationPill-0c336075.js","sources":["../../src/components/VCVerificationPill/VCVerificationPill.tsx"],"sourcesContent":["import React from 'react';\nimport { VerificationStatus, VerificationStatusEnum } from '@learncard/types';\n\nimport VerificationFailedIcon from '../../assets/images/RedXCircle.svg';\nimport VerificationPassedIcon from '../../assets/images/GreenCheckCircle.svg';\nimport VerificationWarningIcon from '../../assets/images/YellowWarningCircle.svg';\n\ntype VerificationDisplayItemProps = {\n status?: VerificationStatus;\n message?: string;\n details?: string;\n};\n\ntype VerifiableStateIndicatorProps = {\n status: VerificationStatus;\n};\n\nconst StatusToBgColor = {\n [VerificationStatusEnum.Success]: 'bg-emerald-500',\n [VerificationStatusEnum.Failed]: 'bg-yellow-400',\n [VerificationStatusEnum.Error]: 'bg-rose-600',\n};\n\nconst StatusToTextColor = {\n [VerificationStatusEnum.Success]: 'text-emerald-700',\n [VerificationStatusEnum.Failed]: 'text-yellow-400',\n [VerificationStatusEnum.Error]: 'text-rose-600',\n};\n\nconst StatusToIcon = {\n [VerificationStatusEnum.Success]: VerificationPassedIcon,\n [VerificationStatusEnum.Failed]: VerificationWarningIcon,\n [VerificationStatusEnum.Error]: VerificationFailedIcon,\n};\n\nconst StatusToText = {\n [VerificationStatusEnum.Success]: 'Verification Success',\n [VerificationStatusEnum.Error]: 'Verification Error ',\n [VerificationStatusEnum.Failed]: 'Verification Failed',\n};\n\nexport const ValidationStateIndicator: React.FC<VerifiableStateIndicatorProps> = ({ status }) => {\n const bgColor = StatusToBgColor[status];\n const source = StatusToIcon[status];\n\n return (\n <div className={`relative rounded-full w-[30px] h-[30px] ${bgColor}`}>\n <div className=\"relative w-[100%] h-[100%] flex items-center justify-center rounded-[50%] bg-white rounded-full overflow-hidden\">\n <img\n className=\"h-full w-full object-contain p-1\"\n src={source ?? ''}\n alt=\"Verification Status Icon\"\n />\n </div>\n </div>\n );\n};\n\nconst VCVerificationPill: React.FC<VerificationDisplayItemProps> = ({\n message = '',\n details,\n status = VerificationStatusEnum.Success,\n}) => {\n const statusColor = StatusToTextColor[status];\n const statusInfoText = StatusToText[status];\n\n return (\n <section className=\"flex width-full bg-white p-2 px-5 my-3.5 justify-between items-center relative vc-verification-checklist-pill rounded-[22px]\">\n <div className=\"vc-pill-left\">\n <p className={`text-[10px] font-bold status-text uppercase ${statusColor}`}>\n {statusInfoText}\n </p>\n\n <p className=\"text-[12px] text-grayscale-900 vc-pill-text\">{message}</p>\n\n {details && <p className=\"text-[12px] text-gray-600\"> {details}</p>}\n </div>\n <div className=\"vc-pill-right\">\n <ValidationStateIndicator status={status} />\n </div>\n </section>\n );\n};\n\nexport default VCVerificationPill;\n"],"names":[],"mappings":";;;;;;AAiBA,MAAM,eAAkB,GAAA;AAAA,EACpB,CAAC,sBAAuB,CAAA,OAAO,GAAG,gBAAA;AAAA,EAClC,CAAC,sBAAuB,CAAA,MAAM,GAAG,eAAA;AAAA,EACjC,CAAC,sBAAuB,CAAA,KAAK,GAAG,aAAA;AACpC,CAAA,CAAA;AAEA,MAAM,iBAAoB,GAAA;AAAA,EACtB,CAAC,sBAAuB,CAAA,OAAO,GAAG,kBAAA;AAAA,EAClC,CAAC,sBAAuB,CAAA,MAAM,GAAG,iBAAA;AAAA,EACjC,CAAC,sBAAuB,CAAA,KAAK,GAAG,eAAA;AACpC,CAAA,CAAA;AAEA,MAAM,YAAe,GAAA;AAAA,EACjB,CAAC,sBAAuB,CAAA,OAAO,GAAG,sBAAA;AAAA,EAClC,CAAC,sBAAuB,CAAA,MAAM,GAAG,uBAAA;AAAA,EACjC,CAAC,sBAAuB,CAAA,KAAK,GAAG,sBAAA;AACpC,CAAA,CAAA;AAEA,MAAM,YAAe,GAAA;AAAA,EACjB,CAAC,sBAAuB,CAAA,OAAO,GAAG,sBAAA;AAAA,EAClC,CAAC,sBAAuB,CAAA,KAAK,GAAG,qBAAA;AAAA,EAChC,CAAC,sBAAuB,CAAA,MAAM,GAAG,qBAAA;AACrC,CAAA,CAAA;AAEO,MAAM,wBAAoE,GAAA,CAAC,EAAE,MAAA,EAAa,KAAA;AAC7F,EAAM,MAAA,OAAA,GAAU,gBAAgB,MAAM,CAAA,CAAA;AACtC,EAAM,MAAA,MAAA,GAAS,aAAa,MAAM,CAAA,CAAA;AAElC,EACI,uBAAA,KAAA,CAAA,aAAA,CAAC,SAAI,SAAW,EAAA,CAAA,wCAAA,EAA2C,OAAO,CAC9D,CAAA,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAU,iHACX,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACG,SAAU,EAAA,kCAAA;AAAA,MACV,KAAK,MAAU,IAAA,IAAA,GAAA,MAAA,GAAA,EAAA;AAAA,MACf,GAAI,EAAA,0BAAA;AAAA,KAAA;AAAA,GAEZ,CACJ,CAAA,CAAA;AAER,EAAA;AAEA,MAAM,qBAA6D,CAAC;AAAA,EAChE,OAAU,GAAA,EAAA;AAAA,EACV,OAAA;AAAA,EACA,SAAS,sBAAuB,CAAA,OAAA;AACpC,CAAM,KAAA;AACF,EAAM,MAAA,WAAA,GAAc,kBAAkB,MAAM,CAAA,CAAA;AAC5C,EAAM,MAAA,cAAA,GAAiB,aAAa,MAAM,CAAA,CAAA;AAE1C,EAAA,2CACK,SAAQ,EAAA,EAAA,SAAA,EAAU,8HACf,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,SAAI,SAAU,EAAA,cAAA,EAAA,kBACV,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAE,WAAW,CAA+C,4CAAA,EAAA,WAAW,MACnE,cACL,CAAA,sCAEC,GAAE,EAAA,EAAA,SAAA,EAAU,6CAA+C,EAAA,EAAA,OAAQ,GAEnE,OAAW,oBAAA,KAAA,CAAA,aAAA,CAAC,OAAE,SAAU,EAAA,2BAAA,EAAA,EAA4B,KAAE,OAAQ,CACnE,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,SAAI,SAAU,EAAA,eAAA,EAAA,sCACV,wBAAyB,EAAA,EAAA,MAAA,EAAgB,CAC9C,CACJ,CAAA,CAAA;AAER;;;;"}
|
package/dist/esm/{VerifierStateBadgeAndText-97117c5d.js → VerifierStateBadgeAndText-0a4e0c63.js}
RENAMED
|
@@ -9,7 +9,7 @@ import Social from './social.png';
|
|
|
9
9
|
import Stem from './stem.png';
|
|
10
10
|
import Trade from './trade.png';
|
|
11
11
|
import { P as PuzzlePiece } from './PuzzlePiece-a3d9cc62.js';
|
|
12
|
-
import { o as object, l as literal, n as number, s as string, u as union } from './types.esm-
|
|
12
|
+
import { _ as _coercedNumber, Z as ZodNumber, o as object, l as literal, n as number$1, s as string, u as union, p as preprocess, a as url, b as _enum } from './types.esm-2762569e.js';
|
|
13
13
|
import { u as useT } from './i18n-35209bfa.js';
|
|
14
14
|
|
|
15
15
|
const AcuteCheckmark = ({ className = "" }) => {
|
|
@@ -420,6 +420,10 @@ const VideoIcon = ({ className = "", size = "25" }) => {
|
|
|
420
420
|
);
|
|
421
421
|
};
|
|
422
422
|
|
|
423
|
+
function number(params) {
|
|
424
|
+
return _coercedNumber(ZodNumber, params);
|
|
425
|
+
}
|
|
426
|
+
|
|
423
427
|
const capitalize = (string) => {
|
|
424
428
|
return string ? string[0].toUpperCase() + string.slice(1) : "";
|
|
425
429
|
};
|
|
@@ -3147,12 +3151,11 @@ var produce = immer.produce;
|
|
|
3147
3151
|
*
|
|
3148
3152
|
* @author Dan Kogai (https://github.com/dankogai)
|
|
3149
3153
|
*/
|
|
3150
|
-
const version = '3.
|
|
3154
|
+
const version = '3.9.3';
|
|
3151
3155
|
/**
|
|
3152
3156
|
* @deprecated use lowercase `version`.
|
|
3153
3157
|
*/
|
|
3154
3158
|
const VERSION = version;
|
|
3155
|
-
const _hasBuffer = typeof Buffer === 'function';
|
|
3156
3159
|
const _TD = typeof TextDecoder === 'function' ? new TextDecoder('utf-8', { ignoreBOM: true }) : undefined;
|
|
3157
3160
|
const _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;
|
|
3158
3161
|
const b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
@@ -3196,10 +3199,8 @@ const btoaPolyfill = (bin) => {
|
|
|
3196
3199
|
* @returns {string} Base64-encoded string
|
|
3197
3200
|
*/
|
|
3198
3201
|
const _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)
|
|
3199
|
-
:
|
|
3200
|
-
|
|
3201
|
-
const _fromUint8Array = _hasBuffer
|
|
3202
|
-
? (u8a) => Buffer.from(u8a).toString('base64')
|
|
3202
|
+
: btoaPolyfill;
|
|
3203
|
+
const _fromUint8Array = typeof Uint8Array.prototype.toBase64 === 'function' ? (u8a) => u8a.toBase64()
|
|
3203
3204
|
: (u8a) => {
|
|
3204
3205
|
// cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326
|
|
3205
3206
|
const maxargs = 0x1000;
|
|
@@ -3238,7 +3239,7 @@ const cb_utob = (c) => {
|
|
|
3238
3239
|
+ _fromCC(0x80 | (cc & 0x3f)));
|
|
3239
3240
|
}
|
|
3240
3241
|
};
|
|
3241
|
-
const re_utob = /[\uD800-\uDBFF][\uDC00-\
|
|
3242
|
+
const re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\x00-\x7F]/g;
|
|
3242
3243
|
/**
|
|
3243
3244
|
* @deprecated should have been internal use only.
|
|
3244
3245
|
* @param {string} src UTF-8 string
|
|
@@ -3246,11 +3247,9 @@ const re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
|
|
3246
3247
|
*/
|
|
3247
3248
|
const utob = (u) => u.replace(re_utob, cb_utob);
|
|
3248
3249
|
//
|
|
3249
|
-
const _encode =
|
|
3250
|
-
? (s) =>
|
|
3251
|
-
:
|
|
3252
|
-
? (s) => _fromUint8Array(_TE.encode(s))
|
|
3253
|
-
: (s) => _btoa(utob(s));
|
|
3250
|
+
const _encode = _TE
|
|
3251
|
+
? (s) => _fromUint8Array(_TE.encode(s))
|
|
3252
|
+
: (s) => _btoa(utob(s));
|
|
3254
3253
|
/**
|
|
3255
3254
|
* converts a UTF-8-encoded string to a Base64 string.
|
|
3256
3255
|
* @param {boolean} [urlsafe] if `true` make the result URL-safe
|
|
@@ -3326,22 +3325,18 @@ const atobPolyfill = (asc) => {
|
|
|
3326
3325
|
* @returns {string} binary string
|
|
3327
3326
|
*/
|
|
3328
3327
|
const _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))
|
|
3329
|
-
:
|
|
3330
|
-
: atobPolyfill;
|
|
3328
|
+
: atobPolyfill;
|
|
3331
3329
|
//
|
|
3332
|
-
const _toUint8Array =
|
|
3333
|
-
? (a) => _U8Afrom(
|
|
3334
|
-
: (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));
|
|
3330
|
+
const _toUint8Array = typeof Uint8Array.fromBase64 === 'function'
|
|
3331
|
+
? (a) => Uint8Array.fromBase64(a) : (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));
|
|
3335
3332
|
/**
|
|
3336
3333
|
* converts a Base64 string to a Uint8Array.
|
|
3337
3334
|
*/
|
|
3338
3335
|
const toUint8Array = (a) => _toUint8Array(_unURI(a));
|
|
3339
3336
|
//
|
|
3340
|
-
const _decode =
|
|
3341
|
-
? (a) =>
|
|
3342
|
-
:
|
|
3343
|
-
? (a) => _TD.decode(_toUint8Array(a))
|
|
3344
|
-
: (a) => btou(_atob(a));
|
|
3337
|
+
const _decode = _TD
|
|
3338
|
+
? (a) => _TD.decode(_toUint8Array(a))
|
|
3339
|
+
: (a) => btou(_atob(a));
|
|
3345
3340
|
const _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));
|
|
3346
3341
|
/**
|
|
3347
3342
|
* converts a Base64 string to a UTF-8 string.
|
|
@@ -3469,6 +3464,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3469
3464
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
3470
3465
|
});
|
|
3471
3466
|
};
|
|
3467
|
+
var _a;
|
|
3472
3468
|
var __create = Object.create;
|
|
3473
3469
|
var __defProp2 = Object.defineProperty;
|
|
3474
3470
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -4330,7 +4326,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
4330
4326
|
util: /* @__PURE__ */ __name(() => util_exports, "util"),
|
|
4331
4327
|
version: /* @__PURE__ */ __name(() => version, "version")
|
|
4332
4328
|
});
|
|
4333
|
-
var
|
|
4329
|
+
var _a2;
|
|
4334
4330
|
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
4335
4331
|
status: "aborted"
|
|
4336
4332
|
});
|
|
@@ -4410,7 +4406,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
4410
4406
|
this.name = "ZodEncodeError";
|
|
4411
4407
|
}
|
|
4412
4408
|
}, __name(_b, "$ZodEncodeError"), __name2(_b, "$ZodEncodeError"), _b);
|
|
4413
|
-
(_c = (
|
|
4409
|
+
(_c = (_a2 = globalThis).__zod_globalConfig) != null ? _c : _a2.__zod_globalConfig = {};
|
|
4414
4410
|
var globalConfig = globalThis.__zod_globalConfig;
|
|
4415
4411
|
function config(newConfig) {
|
|
4416
4412
|
if (newConfig)
|
|
@@ -14602,7 +14598,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
14602
14598
|
}
|
|
14603
14599
|
__name(yo_default, "yo_default");
|
|
14604
14600
|
__name2(yo_default, "default");
|
|
14605
|
-
var
|
|
14601
|
+
var _a22;
|
|
14606
14602
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
14607
14603
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
14608
14604
|
var $ZodRegistry = (_f = class {
|
|
@@ -14651,7 +14647,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
14651
14647
|
}
|
|
14652
14648
|
__name(registry, "registry");
|
|
14653
14649
|
__name2(registry, "registry");
|
|
14654
|
-
(_g = (
|
|
14650
|
+
(_g = (_a22 = globalThis).__zod_globalRegistry) != null ? _g : _a22.__zod_globalRegistry = registry();
|
|
14655
14651
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
14656
14652
|
// @__NO_SIDE_EFFECTS__
|
|
14657
14653
|
function _string(Class2, params) {
|
|
@@ -18616,7 +18612,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18616
18612
|
var ZodFirstPartyTypeKind;
|
|
18617
18613
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
|
|
18618
18614
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
18619
|
-
var
|
|
18615
|
+
var z3 = __spreadProps(__spreadValues(__spreadValues({}, schemas_exports2), checks_exports2), {
|
|
18620
18616
|
iso: iso_exports
|
|
18621
18617
|
});
|
|
18622
18618
|
var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -18728,7 +18724,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18728
18724
|
function convertBaseSchema(schema, ctx) {
|
|
18729
18725
|
if (schema.not !== void 0) {
|
|
18730
18726
|
if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
|
|
18731
|
-
return
|
|
18727
|
+
return z3.never();
|
|
18732
18728
|
}
|
|
18733
18729
|
throw new Error("not is not supported in Zod (except { not: {} } for never)");
|
|
18734
18730
|
}
|
|
@@ -18750,7 +18746,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18750
18746
|
return ctx.refs.get(refPath);
|
|
18751
18747
|
}
|
|
18752
18748
|
if (ctx.processing.has(refPath)) {
|
|
18753
|
-
return
|
|
18749
|
+
return z3.lazy(() => {
|
|
18754
18750
|
if (!ctx.refs.has(refPath)) {
|
|
18755
18751
|
throw new Error(`Circular reference not resolved: ${refPath}`);
|
|
18756
18752
|
}
|
|
@@ -18767,25 +18763,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18767
18763
|
if (schema.enum !== void 0) {
|
|
18768
18764
|
const enumValues = schema.enum;
|
|
18769
18765
|
if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
|
|
18770
|
-
return
|
|
18766
|
+
return z3.null();
|
|
18771
18767
|
}
|
|
18772
18768
|
if (enumValues.length === 0) {
|
|
18773
|
-
return
|
|
18769
|
+
return z3.never();
|
|
18774
18770
|
}
|
|
18775
18771
|
if (enumValues.length === 1) {
|
|
18776
|
-
return
|
|
18772
|
+
return z3.literal(enumValues[0]);
|
|
18777
18773
|
}
|
|
18778
18774
|
if (enumValues.every((v) => typeof v === "string")) {
|
|
18779
|
-
return
|
|
18775
|
+
return z3.enum(enumValues);
|
|
18780
18776
|
}
|
|
18781
|
-
const literalSchemas = enumValues.map((v) =>
|
|
18777
|
+
const literalSchemas = enumValues.map((v) => z3.literal(v));
|
|
18782
18778
|
if (literalSchemas.length < 2) {
|
|
18783
18779
|
return literalSchemas[0];
|
|
18784
18780
|
}
|
|
18785
|
-
return
|
|
18781
|
+
return z3.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
|
|
18786
18782
|
}
|
|
18787
18783
|
if (schema.const !== void 0) {
|
|
18788
|
-
return
|
|
18784
|
+
return z3.literal(schema.const);
|
|
18789
18785
|
}
|
|
18790
18786
|
const type = schema.type;
|
|
18791
18787
|
if (Array.isArray(type)) {
|
|
@@ -18794,68 +18790,68 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18794
18790
|
return convertBaseSchema(typeSchema, ctx);
|
|
18795
18791
|
});
|
|
18796
18792
|
if (typeSchemas.length === 0) {
|
|
18797
|
-
return
|
|
18793
|
+
return z3.never();
|
|
18798
18794
|
}
|
|
18799
18795
|
if (typeSchemas.length === 1) {
|
|
18800
18796
|
return typeSchemas[0];
|
|
18801
18797
|
}
|
|
18802
|
-
return
|
|
18798
|
+
return z3.union(typeSchemas);
|
|
18803
18799
|
}
|
|
18804
18800
|
if (!type) {
|
|
18805
|
-
return
|
|
18801
|
+
return z3.any();
|
|
18806
18802
|
}
|
|
18807
18803
|
let zodSchema;
|
|
18808
18804
|
switch (type) {
|
|
18809
18805
|
case "string": {
|
|
18810
|
-
let stringSchema =
|
|
18806
|
+
let stringSchema = z3.string();
|
|
18811
18807
|
if (schema.format) {
|
|
18812
18808
|
const format = schema.format;
|
|
18813
18809
|
if (format === "email") {
|
|
18814
|
-
stringSchema = stringSchema.check(
|
|
18810
|
+
stringSchema = stringSchema.check(z3.email());
|
|
18815
18811
|
} else if (format === "uri" || format === "uri-reference") {
|
|
18816
|
-
stringSchema = stringSchema.check(
|
|
18812
|
+
stringSchema = stringSchema.check(z3.url());
|
|
18817
18813
|
} else if (format === "uuid" || format === "guid") {
|
|
18818
|
-
stringSchema = stringSchema.check(
|
|
18814
|
+
stringSchema = stringSchema.check(z3.uuid());
|
|
18819
18815
|
} else if (format === "date-time") {
|
|
18820
|
-
stringSchema = stringSchema.check(
|
|
18816
|
+
stringSchema = stringSchema.check(z3.iso.datetime());
|
|
18821
18817
|
} else if (format === "date") {
|
|
18822
|
-
stringSchema = stringSchema.check(
|
|
18818
|
+
stringSchema = stringSchema.check(z3.iso.date());
|
|
18823
18819
|
} else if (format === "time") {
|
|
18824
|
-
stringSchema = stringSchema.check(
|
|
18820
|
+
stringSchema = stringSchema.check(z3.iso.time());
|
|
18825
18821
|
} else if (format === "duration") {
|
|
18826
|
-
stringSchema = stringSchema.check(
|
|
18822
|
+
stringSchema = stringSchema.check(z3.iso.duration());
|
|
18827
18823
|
} else if (format === "ipv4") {
|
|
18828
|
-
stringSchema = stringSchema.check(
|
|
18824
|
+
stringSchema = stringSchema.check(z3.ipv4());
|
|
18829
18825
|
} else if (format === "ipv6") {
|
|
18830
|
-
stringSchema = stringSchema.check(
|
|
18826
|
+
stringSchema = stringSchema.check(z3.ipv6());
|
|
18831
18827
|
} else if (format === "mac") {
|
|
18832
|
-
stringSchema = stringSchema.check(
|
|
18828
|
+
stringSchema = stringSchema.check(z3.mac());
|
|
18833
18829
|
} else if (format === "cidr") {
|
|
18834
|
-
stringSchema = stringSchema.check(
|
|
18830
|
+
stringSchema = stringSchema.check(z3.cidrv4());
|
|
18835
18831
|
} else if (format === "cidr-v6") {
|
|
18836
|
-
stringSchema = stringSchema.check(
|
|
18832
|
+
stringSchema = stringSchema.check(z3.cidrv6());
|
|
18837
18833
|
} else if (format === "base64") {
|
|
18838
|
-
stringSchema = stringSchema.check(
|
|
18834
|
+
stringSchema = stringSchema.check(z3.base64());
|
|
18839
18835
|
} else if (format === "base64url") {
|
|
18840
|
-
stringSchema = stringSchema.check(
|
|
18836
|
+
stringSchema = stringSchema.check(z3.base64url());
|
|
18841
18837
|
} else if (format === "e164") {
|
|
18842
|
-
stringSchema = stringSchema.check(
|
|
18838
|
+
stringSchema = stringSchema.check(z3.e164());
|
|
18843
18839
|
} else if (format === "jwt") {
|
|
18844
|
-
stringSchema = stringSchema.check(
|
|
18840
|
+
stringSchema = stringSchema.check(z3.jwt());
|
|
18845
18841
|
} else if (format === "emoji") {
|
|
18846
|
-
stringSchema = stringSchema.check(
|
|
18842
|
+
stringSchema = stringSchema.check(z3.emoji());
|
|
18847
18843
|
} else if (format === "nanoid") {
|
|
18848
|
-
stringSchema = stringSchema.check(
|
|
18844
|
+
stringSchema = stringSchema.check(z3.nanoid());
|
|
18849
18845
|
} else if (format === "cuid") {
|
|
18850
|
-
stringSchema = stringSchema.check(
|
|
18846
|
+
stringSchema = stringSchema.check(z3.cuid());
|
|
18851
18847
|
} else if (format === "cuid2") {
|
|
18852
|
-
stringSchema = stringSchema.check(
|
|
18848
|
+
stringSchema = stringSchema.check(z3.cuid2());
|
|
18853
18849
|
} else if (format === "ulid") {
|
|
18854
|
-
stringSchema = stringSchema.check(
|
|
18850
|
+
stringSchema = stringSchema.check(z3.ulid());
|
|
18855
18851
|
} else if (format === "xid") {
|
|
18856
|
-
stringSchema = stringSchema.check(
|
|
18852
|
+
stringSchema = stringSchema.check(z3.xid());
|
|
18857
18853
|
} else if (format === "ksuid") {
|
|
18858
|
-
stringSchema = stringSchema.check(
|
|
18854
|
+
stringSchema = stringSchema.check(z3.ksuid());
|
|
18859
18855
|
}
|
|
18860
18856
|
}
|
|
18861
18857
|
if (typeof schema.minLength === "number") {
|
|
@@ -18872,7 +18868,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18872
18868
|
}
|
|
18873
18869
|
case "number":
|
|
18874
18870
|
case "integer": {
|
|
18875
|
-
let numberSchema = type === "integer" ?
|
|
18871
|
+
let numberSchema = type === "integer" ? z3.number().int() : z3.number();
|
|
18876
18872
|
if (typeof schema.minimum === "number") {
|
|
18877
18873
|
numberSchema = numberSchema.min(schema.minimum);
|
|
18878
18874
|
}
|
|
@@ -18896,11 +18892,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18896
18892
|
break;
|
|
18897
18893
|
}
|
|
18898
18894
|
case "boolean": {
|
|
18899
|
-
zodSchema =
|
|
18895
|
+
zodSchema = z3.boolean();
|
|
18900
18896
|
break;
|
|
18901
18897
|
}
|
|
18902
18898
|
case "null": {
|
|
18903
|
-
zodSchema =
|
|
18899
|
+
zodSchema = z3.null();
|
|
18904
18900
|
break;
|
|
18905
18901
|
}
|
|
18906
18902
|
case "object": {
|
|
@@ -18913,14 +18909,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18913
18909
|
}
|
|
18914
18910
|
if (schema.propertyNames) {
|
|
18915
18911
|
const keySchema = convertSchema(schema.propertyNames, ctx);
|
|
18916
|
-
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) :
|
|
18912
|
+
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z3.any();
|
|
18917
18913
|
if (Object.keys(shape).length === 0) {
|
|
18918
|
-
zodSchema =
|
|
18914
|
+
zodSchema = z3.record(keySchema, valueSchema);
|
|
18919
18915
|
break;
|
|
18920
18916
|
}
|
|
18921
|
-
const objectSchema2 =
|
|
18922
|
-
const recordSchema =
|
|
18923
|
-
zodSchema =
|
|
18917
|
+
const objectSchema2 = z3.object(shape).passthrough();
|
|
18918
|
+
const recordSchema = z3.looseRecord(keySchema, valueSchema);
|
|
18919
|
+
zodSchema = z3.intersection(objectSchema2, recordSchema);
|
|
18924
18920
|
break;
|
|
18925
18921
|
}
|
|
18926
18922
|
if (schema.patternProperties) {
|
|
@@ -18929,28 +18925,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18929
18925
|
const looseRecords = [];
|
|
18930
18926
|
for (const pattern of patternKeys) {
|
|
18931
18927
|
const patternValue = convertSchema(patternProps[pattern], ctx);
|
|
18932
|
-
const keySchema =
|
|
18933
|
-
looseRecords.push(
|
|
18928
|
+
const keySchema = z3.string().regex(new RegExp(pattern));
|
|
18929
|
+
looseRecords.push(z3.looseRecord(keySchema, patternValue));
|
|
18934
18930
|
}
|
|
18935
18931
|
const schemasToIntersect = [];
|
|
18936
18932
|
if (Object.keys(shape).length > 0) {
|
|
18937
|
-
schemasToIntersect.push(
|
|
18933
|
+
schemasToIntersect.push(z3.object(shape).passthrough());
|
|
18938
18934
|
}
|
|
18939
18935
|
schemasToIntersect.push(...looseRecords);
|
|
18940
18936
|
if (schemasToIntersect.length === 0) {
|
|
18941
|
-
zodSchema =
|
|
18937
|
+
zodSchema = z3.object({}).passthrough();
|
|
18942
18938
|
} else if (schemasToIntersect.length === 1) {
|
|
18943
18939
|
zodSchema = schemasToIntersect[0];
|
|
18944
18940
|
} else {
|
|
18945
|
-
let result =
|
|
18941
|
+
let result = z3.intersection(schemasToIntersect[0], schemasToIntersect[1]);
|
|
18946
18942
|
for (let i = 2; i < schemasToIntersect.length; i++) {
|
|
18947
|
-
result =
|
|
18943
|
+
result = z3.intersection(result, schemasToIntersect[i]);
|
|
18948
18944
|
}
|
|
18949
18945
|
zodSchema = result;
|
|
18950
18946
|
}
|
|
18951
18947
|
break;
|
|
18952
18948
|
}
|
|
18953
|
-
const objectSchema =
|
|
18949
|
+
const objectSchema = z3.object(shape);
|
|
18954
18950
|
if (schema.additionalProperties === false) {
|
|
18955
18951
|
zodSchema = objectSchema.strict();
|
|
18956
18952
|
} else if (typeof schema.additionalProperties === "object") {
|
|
@@ -18967,33 +18963,33 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18967
18963
|
const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
|
|
18968
18964
|
const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
|
|
18969
18965
|
if (rest) {
|
|
18970
|
-
zodSchema =
|
|
18966
|
+
zodSchema = z3.tuple(tupleItems).rest(rest);
|
|
18971
18967
|
} else {
|
|
18972
|
-
zodSchema =
|
|
18968
|
+
zodSchema = z3.tuple(tupleItems);
|
|
18973
18969
|
}
|
|
18974
18970
|
if (typeof schema.minItems === "number") {
|
|
18975
|
-
zodSchema = zodSchema.check(
|
|
18971
|
+
zodSchema = zodSchema.check(z3.minLength(schema.minItems));
|
|
18976
18972
|
}
|
|
18977
18973
|
if (typeof schema.maxItems === "number") {
|
|
18978
|
-
zodSchema = zodSchema.check(
|
|
18974
|
+
zodSchema = zodSchema.check(z3.maxLength(schema.maxItems));
|
|
18979
18975
|
}
|
|
18980
18976
|
} else if (Array.isArray(items)) {
|
|
18981
18977
|
const tupleItems = items.map((item) => convertSchema(item, ctx));
|
|
18982
18978
|
const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
|
|
18983
18979
|
if (rest) {
|
|
18984
|
-
zodSchema =
|
|
18980
|
+
zodSchema = z3.tuple(tupleItems).rest(rest);
|
|
18985
18981
|
} else {
|
|
18986
|
-
zodSchema =
|
|
18982
|
+
zodSchema = z3.tuple(tupleItems);
|
|
18987
18983
|
}
|
|
18988
18984
|
if (typeof schema.minItems === "number") {
|
|
18989
|
-
zodSchema = zodSchema.check(
|
|
18985
|
+
zodSchema = zodSchema.check(z3.minLength(schema.minItems));
|
|
18990
18986
|
}
|
|
18991
18987
|
if (typeof schema.maxItems === "number") {
|
|
18992
|
-
zodSchema = zodSchema.check(
|
|
18988
|
+
zodSchema = zodSchema.check(z3.maxLength(schema.maxItems));
|
|
18993
18989
|
}
|
|
18994
18990
|
} else if (items !== void 0) {
|
|
18995
18991
|
const element = convertSchema(items, ctx);
|
|
18996
|
-
let arraySchema =
|
|
18992
|
+
let arraySchema = z3.array(element);
|
|
18997
18993
|
if (typeof schema.minItems === "number") {
|
|
18998
18994
|
arraySchema = arraySchema.min(schema.minItems);
|
|
18999
18995
|
}
|
|
@@ -19002,7 +18998,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19002
18998
|
}
|
|
19003
18999
|
zodSchema = arraySchema;
|
|
19004
19000
|
} else {
|
|
19005
|
-
zodSchema =
|
|
19001
|
+
zodSchema = z3.array(z3.any());
|
|
19006
19002
|
}
|
|
19007
19003
|
break;
|
|
19008
19004
|
}
|
|
@@ -19015,37 +19011,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19015
19011
|
__name2(convertBaseSchema, "convertBaseSchema");
|
|
19016
19012
|
function convertSchema(schema, ctx) {
|
|
19017
19013
|
if (typeof schema === "boolean") {
|
|
19018
|
-
return schema ?
|
|
19014
|
+
return schema ? z3.any() : z3.never();
|
|
19019
19015
|
}
|
|
19020
19016
|
let baseSchema = convertBaseSchema(schema, ctx);
|
|
19021
19017
|
const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
|
|
19022
19018
|
if (schema.anyOf && Array.isArray(schema.anyOf)) {
|
|
19023
19019
|
const options = schema.anyOf.map((s) => convertSchema(s, ctx));
|
|
19024
|
-
const anyOfUnion =
|
|
19025
|
-
baseSchema = hasExplicitType ?
|
|
19020
|
+
const anyOfUnion = z3.union(options);
|
|
19021
|
+
baseSchema = hasExplicitType ? z3.intersection(baseSchema, anyOfUnion) : anyOfUnion;
|
|
19026
19022
|
}
|
|
19027
19023
|
if (schema.oneOf && Array.isArray(schema.oneOf)) {
|
|
19028
19024
|
const options = schema.oneOf.map((s) => convertSchema(s, ctx));
|
|
19029
|
-
const oneOfUnion =
|
|
19030
|
-
baseSchema = hasExplicitType ?
|
|
19025
|
+
const oneOfUnion = z3.xor(options);
|
|
19026
|
+
baseSchema = hasExplicitType ? z3.intersection(baseSchema, oneOfUnion) : oneOfUnion;
|
|
19031
19027
|
}
|
|
19032
19028
|
if (schema.allOf && Array.isArray(schema.allOf)) {
|
|
19033
19029
|
if (schema.allOf.length === 0) {
|
|
19034
|
-
baseSchema = hasExplicitType ? baseSchema :
|
|
19030
|
+
baseSchema = hasExplicitType ? baseSchema : z3.any();
|
|
19035
19031
|
} else {
|
|
19036
19032
|
let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
|
|
19037
19033
|
const startIdx = hasExplicitType ? 0 : 1;
|
|
19038
19034
|
for (let i = startIdx; i < schema.allOf.length; i++) {
|
|
19039
|
-
result =
|
|
19035
|
+
result = z3.intersection(result, convertSchema(schema.allOf[i], ctx));
|
|
19040
19036
|
}
|
|
19041
19037
|
baseSchema = result;
|
|
19042
19038
|
}
|
|
19043
19039
|
}
|
|
19044
19040
|
if (schema.nullable === true && ctx.version === "openapi-3.0") {
|
|
19045
|
-
baseSchema =
|
|
19041
|
+
baseSchema = z3.nullable(baseSchema);
|
|
19046
19042
|
}
|
|
19047
19043
|
if (schema.readOnly === true) {
|
|
19048
|
-
baseSchema =
|
|
19044
|
+
baseSchema = z3.readonly(baseSchema);
|
|
19049
19045
|
}
|
|
19050
19046
|
if (schema.default !== void 0) {
|
|
19051
19047
|
baseSchema = baseSchema.default(schema.default);
|
|
@@ -19081,7 +19077,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19081
19077
|
function fromJSONSchema(schema, params) {
|
|
19082
19078
|
var _a4;
|
|
19083
19079
|
if (typeof schema === "boolean") {
|
|
19084
|
-
return schema ?
|
|
19080
|
+
return schema ? z3.any() : z3.never();
|
|
19085
19081
|
}
|
|
19086
19082
|
let normalized;
|
|
19087
19083
|
try {
|
|
@@ -19806,7 +19802,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19806
19802
|
did: LCNProfileValidator.shape.did
|
|
19807
19803
|
});
|
|
19808
19804
|
var LCNConnectionProfileValidator = LCNAuthedProfileValidator.extend({
|
|
19809
|
-
email: LCNProfileValidator.shape.email
|
|
19805
|
+
email: LCNProfileValidator.shape.email,
|
|
19806
|
+
connectedAt: external_exports.iso.datetime().optional().describe("When the viewer and this profile became connected.")
|
|
19810
19807
|
});
|
|
19811
19808
|
var LCNVisibleProfileValidator = external_exports.union([
|
|
19812
19809
|
LCNConnectionProfileValidator.strict(),
|
|
@@ -21251,11 +21248,11 @@ var getFilestackHandle = /* @__PURE__ */ __name((url) => {
|
|
|
21251
21248
|
return urlParams[urlParams.length - 1];
|
|
21252
21249
|
}, "getFilestackHandle");
|
|
21253
21250
|
var getFileType = /* @__PURE__ */ __name((url) => __async(null, null, function* () {
|
|
21254
|
-
var
|
|
21251
|
+
var _a2;
|
|
21255
21252
|
const handle = getFilestackHandle(url);
|
|
21256
21253
|
try {
|
|
21257
21254
|
const data = yield (yield fetch(`https://www.filestackapi.com/api/file/${handle}/metadata`)).json();
|
|
21258
|
-
return (
|
|
21255
|
+
return (_a2 = data.mimetype) != null ? _a2 : "";
|
|
21259
21256
|
} catch (error) {
|
|
21260
21257
|
console.error(error);
|
|
21261
21258
|
return "";
|
|
@@ -21488,8 +21485,8 @@ function innerReactOuterReact(setState, field, value) {
|
|
|
21488
21485
|
__name(innerReactOuterReact, "innerReactOuterReact");
|
|
21489
21486
|
var curriedInnerReactOuterReact = /* @__PURE__ */ __name((setState) => (field, value) => innerReactOuterReact(setState, field, value), "curriedInnerReactOuterReact");
|
|
21490
21487
|
function curriedStateSlice(setState, options) {
|
|
21491
|
-
var
|
|
21492
|
-
if (((
|
|
21488
|
+
var _a2, _b, _c;
|
|
21489
|
+
if (((_a2 = options == null ? void 0 : options.outer) != null ? _a2 : "immer") === "immer") {
|
|
21493
21490
|
return ((_b = options == null ? void 0 : options.inner) != null ? _b : "immer") === "immer" ? curriedInnerImmerOuterImmer(setState) : curriedInnerReactOuterImmer(setState);
|
|
21494
21491
|
}
|
|
21495
21492
|
return ((_c = options == null ? void 0 : options.inner) != null ? _c : "immer") === "immer" ? curriedInnerImmerOuterReact(setState) : curriedInnerReactOuterReact(setState);
|
|
@@ -21498,13 +21495,38 @@ __name(curriedStateSlice, "curriedStateSlice");
|
|
|
21498
21495
|
var ImageResizingValidator = object({ type: literal("resizing") });
|
|
21499
21496
|
var ImageUploadingValidator = object({
|
|
21500
21497
|
type: literal("uploading"),
|
|
21501
|
-
progress: number().optional()
|
|
21498
|
+
progress: number$1().optional()
|
|
21502
21499
|
});
|
|
21503
21500
|
object({
|
|
21504
21501
|
image: string(),
|
|
21505
21502
|
loading: union([ImageResizingValidator, ImageUploadingValidator]).optional()
|
|
21506
21503
|
});
|
|
21507
21504
|
__toESM(require_dist());
|
|
21505
|
+
(_a = class extends Error {
|
|
21506
|
+
constructor(message) {
|
|
21507
|
+
super(message);
|
|
21508
|
+
this.name = "EnvironmentConfigurationError";
|
|
21509
|
+
}
|
|
21510
|
+
}, __name(_a, "EnvironmentConfigurationError"), _a);
|
|
21511
|
+
var requiredEnvironmentString = string().trim().min(1, "Required but missing");
|
|
21512
|
+
preprocess(
|
|
21513
|
+
(value) => value === "" ? void 0 : value,
|
|
21514
|
+
requiredEnvironmentString.optional()
|
|
21515
|
+
);
|
|
21516
|
+
preprocess(
|
|
21517
|
+
(value) => value === "" ? void 0 : value,
|
|
21518
|
+
url("Expected a valid URL").optional()
|
|
21519
|
+
);
|
|
21520
|
+
var environmentBoolean = _enum(["true", "false", "1", "0"]).transform((value) => value === "true" || value === "1");
|
|
21521
|
+
preprocess(
|
|
21522
|
+
(value) => value === "" || value === void 0 ? void 0 : value,
|
|
21523
|
+
environmentBoolean.optional()
|
|
21524
|
+
);
|
|
21525
|
+
var environmentPort = number().int().min(1).max(65535);
|
|
21526
|
+
preprocess(
|
|
21527
|
+
(value) => value === "" || value === void 0 ? void 0 : value,
|
|
21528
|
+
environmentPort.optional()
|
|
21529
|
+
);
|
|
21508
21530
|
var isAppDidWeb = /* @__PURE__ */ __name((did) => {
|
|
21509
21531
|
if (!did) return false;
|
|
21510
21532
|
const LCN_APP_DID_WEB_REGEX = /^did:web:.*:app:([^:]+)$/;
|
|
@@ -21667,4 +21689,4 @@ const VerifierStateBadgeAndText = forwardRef(
|
|
|
21667
21689
|
VerifierStateBadgeAndText.displayName = "VerifierStateBadgeAndText";
|
|
21668
21690
|
|
|
21669
21691
|
export { AcuteCheckmark as A, Camera as C, ExclamationPoint as E, FatArrow as F, GenericDocumentIcon as G, InfoIcon as I, LinkIcon as L, PersonBadge as P, RoundedCorner as R, SelectedSkills as S, UnknownVerifierBadge as U, VERIFIER_STATES as V, isLearnCardNetworkDid as a, getAvatarColorFromString as b, capitalize as c, getBaseUrl as d, VideoIcon as e, formatDidDisplayName as f, getAvatarLetterFromDid as g, LeftArrow as h, isDid as i, SkillsBox as j, IssuerSeal as k, isAppDidWeb as l, VerifierStateBadgeAndText as m, VerifiedBadge as n, RedFlag as o, prettyBytes as p, resolveProfileDisplay as r };
|
|
21670
|
-
//# sourceMappingURL=VerifierStateBadgeAndText-
|
|
21692
|
+
//# sourceMappingURL=VerifierStateBadgeAndText-0a4e0c63.js.map
|