@learncard/react 2.6.53 → 2.6.55
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/{SchoolIDCard-1baf77e8.js → SchoolIDCard-c7b4153a.js} +3 -1184
- package/dist/cjs/SchoolIDCard-c7b4153a.js.map +1 -0
- package/dist/cjs/{VCCard-360a1d17.js → VCCard-34b194a2.js} +2 -2
- package/dist/cjs/{VCCard-360a1d17.js.map → VCCard-34b194a2.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard2-1f40af2b.js → VCDisplayCard2-c112b1d9.js} +210 -31
- package/dist/cjs/VCDisplayCard2-c112b1d9.js.map +1 -0
- package/dist/cjs/index-838fa72c.js +1186 -0
- package/dist/cjs/index-838fa72c.js.map +1 -0
- package/dist/cjs/index.js +4 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index12.js +4 -3
- package/dist/cjs/index12.js.map +1 -1
- package/dist/cjs/index28.js +2 -1
- package/dist/cjs/index28.js.map +1 -1
- package/dist/cjs/index35.js +3 -2
- package/dist/cjs/index35.js.map +1 -1
- package/dist/cjs/index38.js +2 -1
- package/dist/cjs/index38.js.map +1 -1
- package/dist/esm/{SchoolIDCard-3b746226.js → SchoolIDCard-01422d53.js} +2 -1183
- package/dist/esm/SchoolIDCard-01422d53.js.map +1 -0
- package/dist/esm/{VCCard-72b77d65.js → VCCard-ce237f01.js} +2 -2
- package/dist/esm/{VCCard-72b77d65.js.map → VCCard-ce237f01.js.map} +1 -1
- package/dist/esm/{VCDisplayCard2-b868c0b6.js → VCDisplayCard2-531202a8.js} +213 -34
- package/dist/esm/VCDisplayCard2-531202a8.js.map +1 -0
- package/dist/esm/index-4fa491c1.js +1184 -0
- package/dist/esm/index-4fa491c1.js.map +1 -0
- package/dist/esm/index.js +4 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index12.js +4 -3
- package/dist/esm/index12.js.map +1 -1
- package/dist/esm/index28.js +2 -1
- package/dist/esm/index28.js.map +1 -1
- package/dist/esm/index35.js +3 -2
- package/dist/esm/index35.js.map +1 -1
- package/dist/esm/index38.js +2 -1
- package/dist/esm/index38.js.map +1 -1
- package/dist/main.css +1 -1
- package/dist/main.js +1 -1
- package/package.json +2 -1
- package/dist/cjs/SchoolIDCard-1baf77e8.js.map +0 -1
- package/dist/cjs/VCDisplayCard2-1f40af2b.js.map +0 -1
- package/dist/esm/SchoolIDCard-3b746226.js.map +0 -1
- package/dist/esm/VCDisplayCard2-b868c0b6.js.map +0 -1
|
@@ -4,7 +4,7 @@ import { V as VCDisplayCard } from './VCDisplayCard-a35f3a6a.js';
|
|
|
4
4
|
import './default-face.jpeg';
|
|
5
5
|
import 'react-dom';
|
|
6
6
|
import './types.esm-b07820bb.js';
|
|
7
|
-
import { V as VCDisplayCard2 } from './VCDisplayCard2-
|
|
7
|
+
import { V as VCDisplayCard2 } from './VCDisplayCard2-531202a8.js';
|
|
8
8
|
|
|
9
9
|
var __async = (__this, __arguments, generator) => {
|
|
10
10
|
return new Promise((resolve, reject) => {
|
|
@@ -73,4 +73,4 @@ const VCCard = ({
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
export { VCCard as V };
|
|
76
|
-
//# sourceMappingURL=VCCard-
|
|
76
|
+
//# sourceMappingURL=VCCard-ce237f01.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VCCard-
|
|
1
|
+
{"version":3,"file":"VCCard-ce237f01.js","sources":["../../src/components/VCCard/VCCard.tsx"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport { initLearnCard } from '@learncard/init';\nimport { VC, Profile, VerificationItem } from '@learncard/types';\n\nimport { VCDisplayCard } from '../VCDisplayCard';\nimport {\n VCDisplayCard2,\n MediaMetadata,\n VideoMetadata,\n CredentialIconType,\n} from '../VCDisplayCard2';\n\nexport type VCCardProps = {\n credential: VC;\n issueeOverride?: Profile;\n className?: string;\n version?: '1' | '2';\n\n /* Only used for version 2 */\n subjectImageComponent?: React.ReactNode;\n // convertTagsToSkills?: (tags: string[]) => { [skill: string]: string[] };\n handleXClick?: () => void;\n getFileMetadata?: (url: string) => MediaMetadata;\n getVideoMetadata?: (url: string) => VideoMetadata;\n onMediaAttachmentClick?: (url: string) => void;\n bottomRightIcon?: CredentialIconType;\n};\n\nexport const VCCard: React.FC<VCCardProps> = ({\n credential,\n issueeOverride,\n className = '',\n version = '1',\n subjectImageComponent,\n // convertTagsToSkills,\n handleXClick,\n getFileMetadata,\n getVideoMetadata,\n onMediaAttachmentClick,\n bottomRightIcon,\n}) => {\n const [loading, setLoading] = useState(true);\n const [vcVerification, setVCVerification] = useState<VerificationItem[]>([]);\n\n useEffect(() => {\n const verify = async () => {\n const wallet = await initLearnCard();\n const verification = await wallet.invoke.verifyCredential(credential, {}, true);\n setVCVerification(verification);\n setLoading(false);\n };\n\n verify();\n }, [credential]);\n\n if (version === '1') {\n return (\n <VCDisplayCard\n credential={credential}\n issueeOverride={issueeOverride}\n className={className}\n loading={loading}\n verification={vcVerification}\n />\n );\n }\n return (\n <VCDisplayCard2\n credential={credential}\n issueeOverride={issueeOverride}\n verificationInProgress={loading}\n verificationItems={vcVerification}\n subjectImageComponent={subjectImageComponent}\n // convertTagsToSkills={convertTagsToSkills}\n handleXClick={handleXClick}\n getFileMetadata={getFileMetadata}\n getVideoMetadata={getVideoMetadata}\n onMediaAttachmentClick={onMediaAttachmentClick}\n bottomRightIcon={bottomRightIcon}\n />\n );\n};\n\nexport default VCCard;\n"],"names":["this"],"mappings":"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"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React, { useRef, useEffect, useState, useLayoutEffect } from 'react';
|
|
1
|
+
import React, { useRef, useEffect, useState, createContext, Component, Children, cloneElement, useLayoutEffect } from 'react';
|
|
2
|
+
import './index-4fa491c1.js';
|
|
2
3
|
import { a as VCVerificationCheckWithSpinner } from './VCVerificationCheck-80249524.js';
|
|
3
4
|
import DefaultFace from './default-face.jpeg';
|
|
4
|
-
import { c as getColorForVerificationStatus, f as format, g as getNameFromProfile, a as getImageFromProfile, b as getInfoFromCredential } from './credential.helpers-89728941.js';
|
|
5
|
+
import { c as getColorForVerificationStatus, f as format$1, g as getNameFromProfile, a as getImageFromProfile, b as getInfoFromCredential } from './credential.helpers-89728941.js';
|
|
5
6
|
import { L as Lightbox } from './Lightbox-a1aab9ea.js';
|
|
6
7
|
import { V as VerificationStatusEnum } from './types.esm-b07820bb.js';
|
|
7
8
|
import { A as AwardRibbon } from './AwardRibbon-3e682281.js';
|
|
@@ -758,7 +759,7 @@ const VC2BackFace = ({
|
|
|
758
759
|
enableLightbox
|
|
759
760
|
}) => {
|
|
760
761
|
var _a;
|
|
761
|
-
const expiration = credential.expirationDate ? format(new Date(credential.expirationDate), "MMM dd, yyyy") : void 0;
|
|
762
|
+
const expiration = credential.expirationDate ? format$1(new Date(credential.expirationDate), "MMM dd, yyyy") : void 0;
|
|
762
763
|
const isExpired = credential.expirationDate && Number(new Date(credential.expirationDate)) < Number(new Date());
|
|
763
764
|
const achievement = "achievement" in credential.credentialSubject ? credential.credentialSubject.achievement : void 0;
|
|
764
765
|
const criteria = (_a = achievement == null ? void 0 : achievement.criteria) == null ? void 0 : _a.narrative;
|
|
@@ -859,6 +860,188 @@ const VC2FrontFaceInfo = ({
|
|
|
859
860
|
}, issuerName))))));
|
|
860
861
|
};
|
|
861
862
|
|
|
863
|
+
/*! @license Rematrix v0.2.2
|
|
864
|
+
|
|
865
|
+
Copyright 2018 Fisssion LLC.
|
|
866
|
+
|
|
867
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
868
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
869
|
+
in the Software without restriction, including without limitation the rights
|
|
870
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
871
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
872
|
+
furnished to do so, subject to the following conditions:
|
|
873
|
+
|
|
874
|
+
The above copyright notice and this permission notice shall be included in
|
|
875
|
+
all copies or substantial portions of the Software.
|
|
876
|
+
|
|
877
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
878
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
879
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
880
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
881
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
882
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
883
|
+
THE SOFTWARE.
|
|
884
|
+
*/
|
|
885
|
+
/**
|
|
886
|
+
* @module Rematrix
|
|
887
|
+
*/
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* Transformation matrices in the browser come in two flavors:
|
|
891
|
+
*
|
|
892
|
+
* - `matrix` using 6 values (short)
|
|
893
|
+
* - `matrix3d` using 16 values (long)
|
|
894
|
+
*
|
|
895
|
+
* This utility follows this [conversion guide](https://goo.gl/EJlUQ1)
|
|
896
|
+
* to expand short form matrices to their equivalent long form.
|
|
897
|
+
*
|
|
898
|
+
* @param {array} source - Accepts both short and long form matrices.
|
|
899
|
+
* @return {array}
|
|
900
|
+
*/
|
|
901
|
+
function format(source) {
|
|
902
|
+
if (source.constructor !== Array) {
|
|
903
|
+
throw new TypeError('Expected array.')
|
|
904
|
+
}
|
|
905
|
+
if (source.length === 16) {
|
|
906
|
+
return source
|
|
907
|
+
}
|
|
908
|
+
if (source.length === 6) {
|
|
909
|
+
var matrix = identity();
|
|
910
|
+
matrix[0] = source[0];
|
|
911
|
+
matrix[1] = source[1];
|
|
912
|
+
matrix[4] = source[2];
|
|
913
|
+
matrix[5] = source[3];
|
|
914
|
+
matrix[12] = source[4];
|
|
915
|
+
matrix[13] = source[5];
|
|
916
|
+
return matrix
|
|
917
|
+
}
|
|
918
|
+
throw new RangeError('Expected array with either 6 or 16 values.')
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* Returns a matrix representing no transformation. The product of any matrix
|
|
923
|
+
* multiplied by the identity matrix will be the original matrix.
|
|
924
|
+
*
|
|
925
|
+
* > **Tip:** Similar to how `5 * 1 === 5`, where `1` is the identity.
|
|
926
|
+
*
|
|
927
|
+
* @return {array}
|
|
928
|
+
*/
|
|
929
|
+
function identity() {
|
|
930
|
+
var matrix = [];
|
|
931
|
+
for (var i = 0; i < 16; i++) {
|
|
932
|
+
i % 5 == 0 ? matrix.push(1) : matrix.push(0);
|
|
933
|
+
}
|
|
934
|
+
return matrix
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* Returns a 4x4 matrix describing the combined transformations
|
|
939
|
+
* of both arguments.
|
|
940
|
+
*
|
|
941
|
+
* > **Note:** Order is very important. For example, rotating 45°
|
|
942
|
+
* along the Z-axis, followed by translating 500 pixels along the
|
|
943
|
+
* Y-axis... is not the same as translating 500 pixels along the
|
|
944
|
+
* Y-axis, followed by rotating 45° along on the Z-axis.
|
|
945
|
+
*
|
|
946
|
+
* @param {array} m - Accepts both short and long form matrices.
|
|
947
|
+
* @param {array} x - Accepts both short and long form matrices.
|
|
948
|
+
* @return {array}
|
|
949
|
+
*/
|
|
950
|
+
function multiply(m, x) {
|
|
951
|
+
var fm = format(m);
|
|
952
|
+
var fx = format(x);
|
|
953
|
+
var product = [];
|
|
954
|
+
|
|
955
|
+
for (var i = 0; i < 4; i++) {
|
|
956
|
+
var row = [fm[i], fm[i + 4], fm[i + 8], fm[i + 12]];
|
|
957
|
+
for (var j = 0; j < 4; j++) {
|
|
958
|
+
var k = j * 4;
|
|
959
|
+
var col = [fx[k], fx[k + 1], fx[k + 2], fx[k + 3]];
|
|
960
|
+
var result =
|
|
961
|
+
row[0] * col[0] + row[1] * col[1] + row[2] * col[2] + row[3] * col[3];
|
|
962
|
+
|
|
963
|
+
product[i + k] = result;
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
return product
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Attempts to return a 4x4 matrix describing the CSS transform
|
|
972
|
+
* matrix passed in, but will return the identity matrix as a
|
|
973
|
+
* fallback.
|
|
974
|
+
*
|
|
975
|
+
* **Tip:** In virtually all cases, this method is used to convert
|
|
976
|
+
* a CSS matrix (retrieved as a `string` from computed styles) to
|
|
977
|
+
* its equivalent array format.
|
|
978
|
+
*
|
|
979
|
+
* @param {string} source - String containing a valid CSS `matrix` or `matrix3d` property.
|
|
980
|
+
* @return {array}
|
|
981
|
+
*/
|
|
982
|
+
function parse(source) {
|
|
983
|
+
if (typeof source === 'string') {
|
|
984
|
+
var match = source.match(/matrix(3d)?\(([^)]+)\)/);
|
|
985
|
+
if (match) {
|
|
986
|
+
var raw = match[2].split(', ').map(parseFloat);
|
|
987
|
+
return format(raw)
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
return identity()
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* Returns a 4x4 matrix describing X-axis scaling.
|
|
995
|
+
*
|
|
996
|
+
* @param {number} scalar - Decimal multiplier.
|
|
997
|
+
* @return {array}
|
|
998
|
+
*/
|
|
999
|
+
function scaleX(scalar) {
|
|
1000
|
+
var matrix = identity();
|
|
1001
|
+
matrix[0] = scalar;
|
|
1002
|
+
return matrix
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Returns a 4x4 matrix describing Y-axis scaling.
|
|
1007
|
+
*
|
|
1008
|
+
* @param {number} scalar - Decimal multiplier.
|
|
1009
|
+
* @return {array}
|
|
1010
|
+
*/
|
|
1011
|
+
function scaleY(scalar) {
|
|
1012
|
+
var matrix = identity();
|
|
1013
|
+
matrix[5] = scalar;
|
|
1014
|
+
return matrix
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Returns a 4x4 matrix describing X-axis translation.
|
|
1019
|
+
*
|
|
1020
|
+
* @param {number} distance - Measured in pixels.
|
|
1021
|
+
* @return {array}
|
|
1022
|
+
*/
|
|
1023
|
+
function translateX(distance) {
|
|
1024
|
+
var matrix = identity();
|
|
1025
|
+
matrix[12] = distance;
|
|
1026
|
+
return matrix
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Returns a 4x4 matrix describing Y-axis translation.
|
|
1031
|
+
*
|
|
1032
|
+
* @param {number} distance - Measured in pixels.
|
|
1033
|
+
* @return {array}
|
|
1034
|
+
*/
|
|
1035
|
+
function translateY(distance) {
|
|
1036
|
+
var matrix = identity();
|
|
1037
|
+
matrix[13] = distance;
|
|
1038
|
+
return matrix
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
var e=function(t){return "number"==typeof t},i=function(t){return "function"==typeof t},n=function(t){return "[object Object]"===Object.prototype.toString.call(t)},r=function(t){return Array.prototype.slice.apply(t)},s=function(t){var e=t.reduce(function(t,e){return t[e]=(t[e]||0)+1,t},{});return Object.keys(e).filter(function(t){return e[t]>1})};function a(t){return [].slice.call(arguments,1).forEach(function(e){if(e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);}),t}var o,l=function(t,e,i){return t+(e-t)*i},p={__proto__:null,isNumber:e,isFunction:i,isObject:n,toArray:r,getDuplicateValsAsStrings:s,assign:a,tweenProp:l},c$1="data-flip-id",u$1="data-inverse-flip-id",d$1="data-portal-key",f$1="data-exit-container",h$1={__proto__:null,DATA_FLIP_ID:c$1,DATA_INVERSE_FLIP_ID:u$1,DATA_FLIP_COMPONENT_ID:"data-flip-component-id",DATA_FLIP_CONFIG:"data-flip-config",DATA_PORTAL_KEY:d$1,DATA_EXIT_CONTAINER:f$1},g={noWobble:{stiffness:200,damping:26},gentle:{stiffness:120,damping:14},veryGentle:{stiffness:130,damping:17},wobbly:{stiffness:180,damping:12},stiff:{stiffness:260,damping:26}},m$1=function(t){return n(t)?t:Object.keys(g).indexOf(t)>-1?g[t]:{}};"undefined"!=typeof window&&(o=window.requestAnimationFrame);var v=o=o||function(t){window.setTimeout(t,1e3/60);},y$1=Date.now(),_="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()-y$1};function S(t,e){var i=t.indexOf(e);-1!==i&&t.splice(i,1);}var E=/*#__PURE__*/function(){function t(){}return t.prototype.run=function(){var t=this;v(function(){t.springSystem.loop(_());});},t}(),A=function(){this.position=0,this.velocity=0;},C=0,b=.001,I=/*#__PURE__*/function(){function t(t){this._id="s"+C++,this._springSystem=t,this.listeners=[],this._startValue=0,this._currentState=new A,this._displacementFromRestThreshold=.001,this._endValue=0,this._overshootClampingEnabled=!1,this._previousState=new A,this._restSpeedThreshold=.001,this._tempState=new A,this._timeAccumulator=0,this._wasAtRest=!0,this._cachedSpringConfig={};}var e=t.prototype;return e.getId=function(){return this._id},e.destroy=function(){this.listeners=[],this._springSystem.deregisterSpring(this);},e.setSpringConfig=function(t){return this._springConfig=t,this},e.getCurrentValue=function(){return this._currentState.position},e.getDisplacementDistanceForState=function(t){return Math.abs(this._endValue-t.position)},e.setEndValue=function(t){if(t===this._endValue)return this;if(this.prevEndValue=t,this._endValue===t&&this.isAtRest())return this;this._startValue=this.getCurrentValue(),this._endValue=t,this._springSystem.activateSpring(this.getId());for(var e=0,i=this.listeners.length;e<i;e++){var n=this.listeners[e].onSpringEndStateChange;n&&n(this);}return this},e.setVelocity=function(t){return t===this._currentState.velocity||(this._currentState.velocity=t,this._springSystem.activateSpring(this.getId())),this},e.setCurrentValue=function(t){this._startValue=t,this._currentState.position=t;for(var e=0,i=this.listeners.length;e<i;e++){var n=this.listeners[e];n.onSpringUpdate&&n.onSpringUpdate(this);}return this},e.setAtRest=function(){return this._endValue=this._currentState.position,this._tempState.position=this._currentState.position,this._currentState.velocity=0,this},e.setOvershootClampingEnabled=function(t){return this._overshootClampingEnabled=t,this},e.isOvershooting=function(){var t=this._startValue,e=this._endValue;return this._springConfig.tension>0&&(t<e&&this.getCurrentValue()>e||t>e&&this.getCurrentValue()<e)},e.advance=function(t,e){var i=this.isAtRest();if(!i||!this._wasAtRest){var n=e;e>.064&&(n=.064),this._timeAccumulator+=n;for(var r,s,a,o,l,p,c=this._springConfig.tension,u=this._springConfig.friction,d=this._currentState.position,f=this._currentState.velocity,h=this._tempState.position,g=this._tempState.velocity;this._timeAccumulator>=b;)this._timeAccumulator-=b,this._timeAccumulator<b&&(this._previousState.position=d,this._previousState.velocity=f),s=c*(this._endValue-h)-u*f,o=c*(this._endValue-(h=d+(r=f)*b*.5))-u*(g=f+s*b*.5),p=c*(this._endValue-(h=d+(a=g)*b*.5))-u*(g=f+o*b*.5),h=d+(l=g)*b,d+=1/6*(r+2*(a+l)+(g=f+p*b))*b,f+=1/6*(s+2*(o+p)+(c*(this._endValue-h)-u*g))*b;this._tempState.position=h,this._tempState.velocity=g,this._currentState.position=d,this._currentState.velocity=f,this._timeAccumulator>0&&this._interpolate(this._timeAccumulator/b),(this.isAtRest()||this._overshootClampingEnabled&&this.isOvershooting())&&(this._springConfig.tension>0?(this._startValue=this._endValue,this._currentState.position=this._endValue):(this._endValue=this._currentState.position,this._startValue=this._endValue),this.setVelocity(0),i=!0);var m=!1;this._wasAtRest&&(this._wasAtRest=!1,m=!0);var v=!1;i&&(this._wasAtRest=!0,v=!0),this.notifyPositionUpdated(m,v);}},e.notifyPositionUpdated=function(t,e){var i=this;this.listeners.filter(Boolean).forEach(function(n){t&&n.onSpringActivate&&!i._onActivateCalled&&(n.onSpringActivate(i),i._onActivateCalled=!0),n.onSpringUpdate&&n.onSpringUpdate(i),e&&n.onSpringAtRest&&n.onSpringAtRest(i);});},e.systemShouldAdvance=function(){return !this.isAtRest()||!this.wasAtRest()},e.wasAtRest=function(){return this._wasAtRest},e.isAtRest=function(){return Math.abs(this._currentState.velocity)<this._restSpeedThreshold&&(this.getDisplacementDistanceForState(this._currentState)<=this._displacementFromRestThreshold||0===this._springConfig.tension)},e._interpolate=function(t){this._currentState.position=this._currentState.position*t+this._previousState.position*(1-t),this._currentState.velocity=this._currentState.velocity*t+this._previousState.velocity*(1-t);},e.addListener=function(t){return this.listeners.push(t),this},e.addOneTimeListener=function(t){var e=this;return Object.keys(t).forEach(function(i){var n;t[i]=(n=t[i],function(){n.apply(void 0,[].slice.call(arguments)),e.removeListener(t);});}),this.listeners.push(t),this},e.removeListener=function(t){return S(this.listeners,t),this},t}(),w=/*#__PURE__*/function(){function t(t){this.looper=t||new E,this.looper.springSystem=this,this.listeners=[],this._activeSprings=[],this._idleSpringIndices=[],this._isIdle=!0,this._lastTimeMillis=-1,this._springRegistry={};}var e=t.prototype;return e.createSpring=function(t,e){return this.createSpringWithConfig({tension:t,friction:e})},e.createSpringWithConfig=function(t){var e=new I(this);return this.registerSpring(e),e.setSpringConfig(t),e},e.getIsIdle=function(){return this._isIdle},e.registerSpring=function(t){this._springRegistry[t.getId()]=t;},e.deregisterSpring=function(t){S(this._activeSprings,t),delete this._springRegistry[t.getId()];},e.advance=function(t,e){for(var i=this;this._idleSpringIndices.length>0;)this._idleSpringIndices.pop();for(this._activeSprings.filter(Boolean).forEach(function(n){n.systemShouldAdvance()?n.advance(t/1e3,e/1e3):i._idleSpringIndices.push(i._activeSprings.indexOf(n));});this._idleSpringIndices.length>0;){var n=this._idleSpringIndices.pop();n>=0&&this._activeSprings.splice(n,1);}},e.loop=function(t){var e;-1===this._lastTimeMillis&&(this._lastTimeMillis=t-1);var i=t-this._lastTimeMillis;this._lastTimeMillis=t;var n=0,r=this.listeners.length;for(n=0;n<r;n++)(e=this.listeners[n]).onBeforeIntegrate&&e.onBeforeIntegrate(this);for(this.advance(t,i),0===this._activeSprings.length&&(this._isIdle=!0,this._lastTimeMillis=-1),n=0;n<r;n++)(e=this.listeners[n]).onAfterIntegrate&&e.onAfterIntegrate(this);this._isIdle||this.looper.run();},e.activateSpring=function(t){var e=this._springRegistry[t];-1===this._activeSprings.indexOf(e)&&this._activeSprings.push(e),this.getIsIdle()&&(this._isIdle=!1,this.looper.run());},t}(),O=new w,x=function(t){var e=t.springConfig,i=e.overshootClamping,n=t.getOnUpdateFunc,r=t.onAnimationEnd,s=t.onSpringActivate,a=O.createSpring(e.stiffness,e.damping);a.setOvershootClampingEnabled(!!i);var o={onSpringActivate:s,onSpringAtRest:function(){a.destroy(),r();},onSpringUpdate:n({spring:a,onAnimationEnd:r})};return a.addListener(o),a},U=function(t){var e=x(t);return e.setEndValue(1),e},V=function(t,e){if(void 0===e&&(e={}),t&&t.length){e.reverse&&t.reverse();var i,n="number"!=typeof(i=e.speed)?1.1:1+Math.min(Math.max(5*i,0),5),r=1/Math.max(Math.min(t.length,100),10),s=t.map(function(t,e){var i=t.getOnUpdateFunc;return t.getOnUpdateFunc=function(t){var a=i(t);return function(t){var i=t.getCurrentValue();(i=i<.01?0:i>.99?1:i)>=r&&s[e+1]&&s[e+1](Math.max(Math.min(i*n,1),0)),a(t);}},t}).map(function(t){var e=x(t);if(e)return e.setEndValue.bind(e)}).filter(Boolean);s[0]&&s[0](1);}},F=function(t){return [0,1,4,5,12,13].map(function(e){return t[e]})},P=function(t){return t.top<window.innerHeight&&t.bottom>0&&t.left<window.innerWidth&&t.right>0};function D(t){return JSON.parse(t.dataset.flipConfig||"{}")}var R=function(t,e){var i;return a(t,((i={})[e[0]]=e[1],i))},T=function(t,e){return r(e?document.querySelectorAll("["+d$1+'="'+e+'"]'):t.querySelectorAll("["+c$1+"]"))},M=function(t){return t.map(function(t){return [t,t.getBoundingClientRect()]})},k=function(n){var o=n.cachedOrderedFlipIds,p=void 0===o?[]:o,f=n.inProgressAnimations,h=void 0===f?{}:f,v=n.flippedElementPositionsBeforeUpdate,y=void 0===v?{}:v,_=n.flipCallbacks,S=void 0===_?{}:_,E=n.containerEl,A=n.applyTransformOrigin,C=n.spring,b=n.debug,I=n.portalKey,w=n.staggerConfig,O=void 0===w?{}:w,x=n.decisionData,k=void 0===x?{}:x,j=n.handleEnterUpdateDelete,B=n.onComplete,N=n.onStart;if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var L,q=M(T((L={element:E,portalKey:I}).element,L.portalKey)).map(function(t){var e=t[0],i=t[1],n=window.getComputedStyle(e);return [e.dataset.flipId,{element:e,rect:i,opacity:parseFloat(n.opacity),transform:n.transform}]}).reduce(R,{}),X=function(t){var e=t.containerEl,i=t.portalKey;return i?function(t){return function(e){return r(document.querySelectorAll("["+d$1+'="'+t+'"]'+e))}}(i):e?function(t){var e=Math.random().toFixed(5);return t.dataset.flipperId=e,function(i){return r(t.querySelectorAll('[data-flipper-id="'+e+'"] '+i))}}(e):function(){return []}}({containerEl:E,portalKey:I}),Y=function(t){return function(e){return t("["+c$1+'="'+e+'"]')[0]}}(X),W=function(t){return y[t]&&q[t]},K=Object.keys(y).concat(Object.keys(q)).filter(function(t){return !W(t)}),H={flipCallbacks:S,getElement:Y,flippedElementPositionsBeforeUpdate:y,flippedElementPositionsAfterUpdate:q,inProgressAnimations:h,decisionData:k},J=function(t){var e,i=t.unflippedIds,n=t.flipCallbacks,r=t.getElement,s=t.flippedElementPositionsBeforeUpdate,a=t.flippedElementPositionsAfterUpdate,o=t.inProgressAnimations,l=t.decisionData,p=i.filter(function(t){return a[t]}).filter(function(t){return n[t]&&n[t].onAppear}),c=i.filter(function(t){return s[t]&&n[t]&&n[t].onExit}),u=new Promise(function(t){e=t;}),d=[],f=0,h=c.map(function(t,i){var r=s[t].domDataForExitAnimations,a=r.element,p=r.parent,c=r.childPosition,u=c.top,h=c.left,g=c.width,m=c.height;"static"===getComputedStyle(p).position&&(p.style.position="relative"),a.style.transform="matrix(1, 0, 0, 1, 0, 0)",a.style.position="absolute",a.style.top=u+"px",a.style.left=h+"px",a.style.height=m+"px",a.style.width=g+"px";var v=d.filter(function(t){return t[0]===p})[0];v||(v=[p,document.createDocumentFragment()],d.push(v)),v[1].appendChild(a),f+=1;var y=function(){try{p.removeChild(a);}catch(t){}finally{0==(f-=1)&&e();}};return o[t]={stop:y},function(){return n[t].onExit(a,i,y,l)}});return d.forEach(function(t){t[0].appendChild(t[1]);}),h.length||e(),{hideEnteringElements:function(){p.forEach(function(t){var e=r(t);e&&(e.style.opacity="0");});},animateEnteringElements:function(){p.forEach(function(t,e){var i=r(t);i&&n[t].onAppear(i,e,l);});},animateExitingElements:function(){return h.forEach(function(t){return t()}),u}}}(a({},H,{unflippedIds:K})),z=J.hideEnteringElements,G=J.animateEnteringElements,Q=J.animateExitingElements,Z=a({},H,{containerEl:E,flippedIds:p.filter(W),applyTransformOrigin:A,spring:C,debug:b,staggerConfig:O,scopedSelector:X,onComplete:B});N&&N(E,k);var $=function(n){var o,p=n.flippedIds,c=n.flipCallbacks,d=n.inProgressAnimations,f=n.flippedElementPositionsBeforeUpdate,h=n.flippedElementPositionsAfterUpdate,v=n.applyTransformOrigin,y=n.spring,_=n.getElement,S=n.debug,E=n.staggerConfig,A=void 0===E?{}:E,C=n.decisionData,b=void 0===C?{}:C,I=n.onComplete,w=n.containerEl,O=new Promise(function(t){o=t;});if(I&&O.then(function(){return I(w,b)}),!p.length)return function(){return o([]),O};var x=[],R=_(p[0]),T=R?R.ownerDocument.querySelector("body"):document.querySelector("body");s(p);var M=p.map(function(n){var s=f[n].rect,p=h[n].rect,_=f[n].opacity,S=h[n].opacity,E=p.width<1||p.height<1,A=h[n].element;if(!P(s)&&!P(p))return !1;if(!A)return !1;var C,I,w,O=D(A),U=(w=(I=void 0===(C={flipperSpring:y,flippedSpring:O.spring})?{}:C).flippedSpring,a({},g.noWobble,m$1(I.flipperSpring),m$1(w))),V=!0===O.stagger?"default":O.stagger,R={element:A,id:n,stagger:V,springConfig:U};if(c[n]&&c[n].shouldFlip&&!c[n].shouldFlip(b.previous,b.current))return !1;var k=Math.abs(s.left-p.left)+Math.abs(s.top-p.top),j=Math.abs(s.width-p.width)+Math.abs(s.height-p.height),B=Math.abs(S-_);if(0===s.height&&0===p.height||0===s.width&&0===p.width||k<.5&&j<.5&&B<.01)return !1;var N=parse(h[n].transform),L={matrix:N},q={matrix:[]},X=[N];O.translate&&(X.push(translateX(s.left-p.left)),X.push(translateY(s.top-p.top))),O.scale&&(X.push(scaleX(Math.max(s.width,1)/Math.max(p.width,1))),X.push(scaleY(Math.max(s.height,1)/Math.max(p.height,1)))),O.opacity&&(q.opacity=_,L.opacity=S);var Y=[];if(!c[n]||!c[n].shouldInvert||c[n].shouldInvert(b.previous,b.current)){var W=function(t,e){return r(t.querySelectorAll("["+u$1+'="'+e+'"]'))}(A,n);Y=W.map(function(t){return [t,D(t)]});}q.matrix=F(X.reduce(multiply)),L.matrix=F(L.matrix);var K,H=function(t){var i=t.element,n=t.invertedChildren,r=t.body;return function(t){var s=t.matrix,a=t.opacity,o=t.forceMinVals;if(e(a)&&(i.style.opacity=a+""),o&&(i.style.minHeight="1px",i.style.minWidth="1px"),s){var l=function(t){return "matrix("+t.join(", ")+")"}(s);i.style.transform=l,n&&function(t){var e=t.matrix,i=t.body;t.invertedChildren.forEach(function(t){var n=t[0],r=t[1];if(i.contains(n)){var s=e[0],a=e[3],o=e[5],l={translateX:0,translateY:0,scaleX:1,scaleY:1},p="";r.translate&&(l.translateX=-e[4]/s,l.translateY=-o/a,p+="translate("+l.translateX+"px, "+l.translateY+"px)"),r.scale&&(l.scaleX=1/s,l.scaleY=1/a,p+=" scale("+l.scaleX+", "+l.scaleY+")"),n.style.transform=p;}});}({invertedChildren:n,matrix:s,body:r});}}}({element:A,invertedChildren:Y,body:T});if(c[n]&&c[n].onComplete){var J=c[n].onComplete;K=function(){return J(A,b)};}var z=e(q.opacity)&&e(L.opacity)&&q.opacity!==L.opacity,G=!1;return a({},R,{stagger:V,springConfig:U,getOnUpdateFunc:function(t){var e=t.spring,i=t.onAnimationEnd;return d[n]={destroy:e.destroy.bind(e),onAnimationEnd:i},function(t){c[n]&&c[n].onSpringUpdate&&c[n].onSpringUpdate(t.getCurrentValue()),G||(G=!0,c[n]&&c[n].onStart&&c[n].onStart(A,b));var e=t.getCurrentValue();if(T.contains(A)){var i={matrix:[]};i.matrix=q.matrix.map(function(t,i){return l(t,L.matrix[i],e)}),z&&(i.opacity=l(q.opacity,L.opacity,e)),H(i);}else t.destroy();}},initializeFlip:function(){H({matrix:q.matrix,opacity:z?q.opacity:void 0,forceMinVals:E}),c[n]&&c[n].onStartImmediate&&c[n].onStartImmediate(A,b),O.transformOrigin?A.style.transformOrigin=O.transformOrigin:v&&(A.style.transformOrigin="0 0"),Y.forEach(function(t){var e=t[0],i=t[1];i.transformOrigin?e.style.transformOrigin=i.transformOrigin:v&&(e.style.transformOrigin="0 0");});},onAnimationEnd:function(t){delete d[n],i(K)&&K(),A.style.transform="",Y.forEach(function(t){t[0].style.transform="";}),E&&A&&(A.style.minHeight="",A.style.minWidth=""),t||(x.push(n),x.length>=M.length&&o(x));},delayUntil:O.delayUntil})}).filter(Boolean);if(M.forEach(function(t){return (0, t.initializeFlip)()}),S)return function(){};var k=M.filter(function(t){return t.delayUntil&&(e=t.delayUntil,M.filter(function(t){return t.id===e}).length);var e;}),j={},B={},N={};k.forEach(function(t){t.stagger?(N[t.stagger]=!0,B[t.delayUntil]?B[t.delayUntil].push(t.stagger):B[t.delayUntil]=[t.stagger]):j[t.delayUntil]?j[t.delayUntil].push(t):j[t.delayUntil]=[t];});var L=M.filter(function(t){return t.stagger}).reduce(function(t,e){return t[e.stagger]?t[e.stagger].push(e):t[e.stagger]=[e],t},{}),q=M.filter(function(t){return -1===k.indexOf(t)});return q.forEach(function(t){t.onSpringActivate=function(){j[t.id]&&j[t.id].forEach(U),B[t.id]&&Object.keys(B[t.id].reduce(function(t,e){var i;return a(t,((i={})[e]=!0,i))},{})).forEach(function(t){V(L[t],A[t]);});};}),function(){return M.length||o([]),q.filter(function(t){return !t.stagger}).forEach(U),Object.keys(L).forEach(function(t){N[t]||V(L[t],A[t]);}),O}}(Z);j?j({hideEnteringElements:z,animateEnteringElements:G,animateExitingElements:Q,animateFlippedElements:$}):(z(),Q().then(G),$());}},j=function(t){var e=t.element,i=t.flipCallbacks,n=void 0===i?{}:i,s=t.inProgressAnimations,o=void 0===s?{}:s,l=T(e,t.portalKey),p=r(e.querySelectorAll("["+u$1+"]")),c={},d=[],h={};l.filter(function(t){return n&&n[t.dataset.flipId]&&n[t.dataset.flipId].onExit}).forEach(function(t){var e=t.parentNode;if(t.closest){var i=t.closest("["+f$1+"]");i&&(e=i);}var n=d.findIndex(function(t){return t[0]===e});-1===n&&(d.push([e,e.getBoundingClientRect()]),n=d.length-1),c[t.dataset.flipId]=d[n][1],h[t.dataset.flipId]=e;});var g=M(l),m=g.map(function(t){var e=t[0],i=t[1],r={};if(n&&n[e.dataset.flipId]&&n[e.dataset.flipId].onExit){var s=c[e.dataset.flipId];a(r,{element:e,parent:h[e.dataset.flipId],childPosition:{top:i.top-s.top,left:i.left-s.left,width:i.width,height:i.height}});}return [e.dataset.flipId,{rect:i,opacity:parseFloat(window.getComputedStyle(e).opacity||"1"),domDataForExitAnimations:r}]}).reduce(R,{});return function(t,e){Object.keys(t).forEach(function(e){t[e].destroy&&t[e].destroy(),t[e].onAnimationEnd&&t[e].onAnimationEnd(!0),delete t[e];}),e.forEach(function(t){t.style.transform="",t.style.opacity="";});}(o,l.concat(p)),{flippedElementPositions:m,cachedOrderedFlipIds:g.map(function(t){return t[0].dataset.flipId})}};new w;
|
|
1042
|
+
|
|
1043
|
+
function c(e,t){return (c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){if(null==e)return {};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}var f=createContext({}),u=createContext("portal"),h=function(t){var r,n;function i(){var e;return (e=t.apply(this,arguments)||this).inProgressAnimations={},e.flipCallbacks={},e.el=void 0,e}n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,c(r,n);var l=i.prototype;return l.getSnapshotBeforeUpdate=function(e){return e.flipKey!==this.props.flipKey&&this.el?j({element:this.el,flipCallbacks:this.flipCallbacks,inProgressAnimations:this.inProgressAnimations,portalKey:this.props.portalKey}):null},l.componentDidUpdate=function(e,t,r){this.props.flipKey!==e.flipKey&&this.el&&k({flippedElementPositionsBeforeUpdate:r.flippedElementPositions,cachedOrderedFlipIds:r.cachedOrderedFlipIds,containerEl:this.el,inProgressAnimations:this.inProgressAnimations,flipCallbacks:this.flipCallbacks,applyTransformOrigin:this.props.applyTransformOrigin,spring:this.props.spring,debug:this.props.debug,portalKey:this.props.portalKey,staggerConfig:this.props.staggerConfig,handleEnterUpdateDelete:this.props.handleEnterUpdateDelete,decisionData:{previous:e.decisionData,current:this.props.decisionData},onComplete:this.props.onComplete,onStart:this.props.onStart});},l.render=function(){var t=this,r=this.props,n=r.portalKey,i=React.createElement(f.Provider,{value:this.flipCallbacks},React.createElement(r.element,{className:r.className,ref:function(e){return t.el=e}},this.props.children));return n&&(i=React.createElement(u.Provider,{value:n},i)),i},i}(Component);h.defaultProps={applyTransformOrigin:!0,element:"div"};var m=function(e){var t,r=e.children,o=e.flipId,p$1=e.inverseFlipId,a=e.portalKey,c=d(e,["children","flipId","inverseFlipId","portalKey"]),f=r,u=function(e){return "function"==typeof e}(f);if(!u)try{f=Children.only(r);}catch(e){throw new Error("Each Flipped component must wrap a single child")}c.scale||c.translate||c.opacity||p.assign(c,{translate:!0,scale:!0,opacity:!0});var h=((t={})[h$1.DATA_FLIP_CONFIG]=JSON.stringify(c),t);return void 0!==o?h[h$1.DATA_FLIP_ID]=String(o):p$1&&(h[h$1.DATA_INVERSE_FLIP_ID]=String(p$1)),void 0!==a&&(h[h$1.DATA_PORTAL_KEY]=a),u?f(h):cloneElement(f,h)},y=function(t){var r=t.children,n=t.flipId,i=t.shouldFlip,o=t.shouldInvert,p$1=t.onAppear,s=t.onStart,a=t.onStartImmediate,c=t.onComplete,h=t.onExit,y=t.onSpringUpdate,g=d(t,["children","flipId","shouldFlip","shouldInvert","onAppear","onStart","onStartImmediate","onComplete","onExit","onSpringUpdate"]);return r?g.inverseFlipId?React.createElement(m,Object.assign({},g),r):React.createElement(u.Consumer,null,function(t){return React.createElement(f.Consumer,null,function(d){return p.isObject(d)&&n&&(d[n]={shouldFlip:i,shouldInvert:o,onAppear:p$1,onStart:s,onStartImmediate:a,onComplete:c,onExit:h,onSpringUpdate:y}),React.createElement(m,Object.assign({flipId:n},g,{portalKey:t}),r)})}):null};y.displayName="Flipped";
|
|
1044
|
+
|
|
862
1045
|
const getCategoryTextColor = (category = LCCategoryEnum.achievement) => {
|
|
863
1046
|
if (category === LCCategoryEnum.socialBadge)
|
|
864
1047
|
return "text-cyan-700";
|
|
@@ -891,22 +1074,6 @@ const VCDisplayCardCategoryType = ({
|
|
|
891
1074
|
}, categoryType);
|
|
892
1075
|
};
|
|
893
1076
|
|
|
894
|
-
var __defProp = Object.defineProperty;
|
|
895
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
896
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
897
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
898
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
899
|
-
var __spreadValues = (a, b) => {
|
|
900
|
-
for (var prop in b || (b = {}))
|
|
901
|
-
if (__hasOwnProp.call(b, prop))
|
|
902
|
-
__defNormalProp(a, prop, b[prop]);
|
|
903
|
-
if (__getOwnPropSymbols)
|
|
904
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
905
|
-
if (__propIsEnum.call(b, prop))
|
|
906
|
-
__defNormalProp(a, prop, b[prop]);
|
|
907
|
-
}
|
|
908
|
-
return a;
|
|
909
|
-
};
|
|
910
1077
|
const VCDisplayCard2 = ({
|
|
911
1078
|
categoryType,
|
|
912
1079
|
credential,
|
|
@@ -970,13 +1137,18 @@ const VCDisplayCard2 = ({
|
|
|
970
1137
|
const backgroundStyle = {
|
|
971
1138
|
backgroundColor: (_a = credential.display) == null ? void 0 : _a.backgroundColor,
|
|
972
1139
|
backgroundImage: ((_b = credential.display) == null ? void 0 : _b.backgroundImage) ? `linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25)), url(${(_c = credential.display) == null ? void 0 : _c.backgroundImage})` : void 0,
|
|
973
|
-
backgroundSize: "
|
|
1140
|
+
backgroundSize: "cover",
|
|
974
1141
|
backgroundPosition: "center",
|
|
975
1142
|
backgroundAttachment: "fixed"
|
|
976
1143
|
};
|
|
977
1144
|
const _title = titleOverride || title;
|
|
978
|
-
return /* @__PURE__ */ React.createElement(
|
|
979
|
-
className: "
|
|
1145
|
+
return /* @__PURE__ */ React.createElement(h, {
|
|
1146
|
+
className: "w-full",
|
|
1147
|
+
flipKey: isFront
|
|
1148
|
+
}, /* @__PURE__ */ React.createElement(y, {
|
|
1149
|
+
flipId: "card"
|
|
1150
|
+
}, /* @__PURE__ */ React.createElement("section", {
|
|
1151
|
+
className: "vc-display-card font-mouse flex flex-col items-center border-solid border-[5px] border-white rounded-[30px] overflow-visible z-10 min-h-[800px] max-w-[400px] relative bg-white shadow-3xl"
|
|
980
1152
|
}, /* @__PURE__ */ React.createElement(RibbonEnd, {
|
|
981
1153
|
side: "left",
|
|
982
1154
|
className: "absolute left-[-30px] top-[50px] z-0",
|
|
@@ -1001,14 +1173,15 @@ const VCDisplayCard2 = ({
|
|
|
1001
1173
|
className: "vc-card-x-button absolute top-[-25px] bg-white rounded-full h-[50px] w-[50px] flex items-center justify-center z-50",
|
|
1002
1174
|
onClick: handleXClick
|
|
1003
1175
|
}, /* @__PURE__ */ React.createElement(RoundedX, null)), /* @__PURE__ */ React.createElement("div", {
|
|
1004
|
-
className: "vc-card-
|
|
1176
|
+
className: "relative pt-[114px] vc-card-content-container flex flex-col items-center grow basis-0 min-h-0 h-full w-full rounded-t-[30px] bg-[#353E64] rounded-b-[200px]",
|
|
1005
1177
|
style: backgroundStyle
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1178
|
+
}, /* @__PURE__ */ React.createElement(y, {
|
|
1179
|
+
flipId: "scroll-container"
|
|
1008
1180
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
1009
|
-
className: "vc-card-content-scroll-container w-full flex flex-col justify-
|
|
1010
|
-
|
|
1011
|
-
|
|
1181
|
+
className: "vc-card-content-scroll-container w-full pt-[20px] min-h-full flex flex-col justify-start items-center rounded-t-[30px] rounded-b-[200px] overflow-y-auto scrollbar-hide pb-[50px]"
|
|
1182
|
+
}, isFront && /* @__PURE__ */ React.createElement(y, {
|
|
1183
|
+
flipId: "face"
|
|
1184
|
+
}, /* @__PURE__ */ React.createElement(VC2FrontFaceInfo, {
|
|
1012
1185
|
issuee,
|
|
1013
1186
|
subjectDID,
|
|
1014
1187
|
issuer,
|
|
@@ -1019,7 +1192,9 @@ const VCDisplayCard2 = ({
|
|
|
1019
1192
|
customThumbComponent,
|
|
1020
1193
|
createdAt: createdAt != null ? createdAt : "",
|
|
1021
1194
|
imageUrl
|
|
1022
|
-
}), !isFront && /* @__PURE__ */ React.createElement(
|
|
1195
|
+
})), !isFront && /* @__PURE__ */ React.createElement(y, {
|
|
1196
|
+
flipId: "face"
|
|
1197
|
+
}, /* @__PURE__ */ React.createElement(VC2BackFace, {
|
|
1023
1198
|
credential,
|
|
1024
1199
|
verificationItems,
|
|
1025
1200
|
issueHistory,
|
|
@@ -1032,17 +1207,21 @@ const VCDisplayCard2 = ({
|
|
|
1032
1207
|
customCriteria,
|
|
1033
1208
|
customIssueHistoryComponent,
|
|
1034
1209
|
enableLightbox
|
|
1035
|
-
}), isFront && customFrontButton, isFront && !customFrontButton && /* @__PURE__ */ React.createElement(
|
|
1210
|
+
})), isFront && customFrontButton, isFront && !customFrontButton && /* @__PURE__ */ React.createElement(y, {
|
|
1211
|
+
flipId: "details-back-button"
|
|
1212
|
+
}, /* @__PURE__ */ React.createElement("button", {
|
|
1036
1213
|
type: "button",
|
|
1037
1214
|
className: "vc-toggle-side-button text-white shadow-bottom bg-[#00000099] px-[30px] py-[8px] rounded-[40px] text-[28px] tracking-[0.75px] uppercase leading-[28px] mt-[40px] w-fit select-none",
|
|
1038
1215
|
onClick: () => setIsFront(!isFront)
|
|
1039
|
-
}, "Details"), !isFront && /* @__PURE__ */ React.createElement(
|
|
1216
|
+
}, "Details")), !isFront && /* @__PURE__ */ React.createElement(y, {
|
|
1217
|
+
flipId: "details-back-button"
|
|
1218
|
+
}, /* @__PURE__ */ React.createElement("button", {
|
|
1040
1219
|
type: "button",
|
|
1041
1220
|
className: "vc-toggle-side-button text-white shadow-bottom bg-[#00000099] px-[30px] py-[8px] rounded-[40px] text-[28px] tracking-[0.75px] uppercase leading-[28px] mt-[40px] w-fit select-none",
|
|
1042
1221
|
onClick: () => setIsFront(!isFront)
|
|
1043
1222
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
1044
1223
|
className: "flex gap-[10px] items-center"
|
|
1045
|
-
}, /* @__PURE__ */ React.createElement(LeftArrow, null), "Back")))), /* @__PURE__ */ React.createElement("footer", {
|
|
1224
|
+
}, /* @__PURE__ */ React.createElement(LeftArrow, null), "Back")))))), /* @__PURE__ */ React.createElement("footer", {
|
|
1046
1225
|
className: "vc-card-footer w-full flex justify-between p-[5px] mt-[5px]"
|
|
1047
1226
|
}, customFooterComponent && customFooterComponent, !customFooterComponent && /* @__PURE__ */ React.createElement(React.Fragment, null, worstVerificationStatus === VerificationStatusEnum.Failed ? /* @__PURE__ */ React.createElement("div", {
|
|
1048
1227
|
className: "w-[40px]",
|
|
@@ -1061,8 +1240,8 @@ const VCDisplayCard2 = ({
|
|
|
1061
1240
|
}, worstVerificationStatus)), /* @__PURE__ */ React.createElement("div", {
|
|
1062
1241
|
className: "vc-footer-icon rounded-[20px] h-[40px] w-[40px] flex items-center justify-center overflow-hidden",
|
|
1063
1242
|
style: { backgroundColor: (_d = bottomRightIcon == null ? void 0 : bottomRightIcon.color) != null ? _d : "#6366F1" }
|
|
1064
|
-
}, (_e = bottomRightIcon == null ? void 0 : bottomRightIcon.image) != null ? _e : /* @__PURE__ */ React.createElement(AwardRibbon, null)))));
|
|
1243
|
+
}, (_e = bottomRightIcon == null ? void 0 : bottomRightIcon.image) != null ? _e : /* @__PURE__ */ React.createElement(AwardRibbon, null)))))));
|
|
1065
1244
|
};
|
|
1066
1245
|
|
|
1067
1246
|
export { VCDisplayCard2 as V };
|
|
1068
|
-
//# sourceMappingURL=VCDisplayCard2-
|
|
1247
|
+
//# sourceMappingURL=VCDisplayCard2-531202a8.js.map
|