catchup-library-web 1.5.3 → 1.5.4
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/index.mjs
CHANGED
|
@@ -2882,240 +2882,264 @@ var ShowBodyMediaByContentType = ({
|
|
|
2882
2882
|
const [showFullScreen, setShowFullScreen] = useState9(false);
|
|
2883
2883
|
const [selectedFullScreenItem, setSelectedFullScreenItem] = useState9("");
|
|
2884
2884
|
const convertToPercentage = (size2) => {
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2885
|
+
switch (size2) {
|
|
2886
|
+
case "1/3":
|
|
2887
|
+
return "w-small-media";
|
|
2888
|
+
case "1/2":
|
|
2889
|
+
return "w-medium-media";
|
|
2890
|
+
case "1":
|
|
2891
|
+
return "w-large-media";
|
|
2892
|
+
default:
|
|
2893
|
+
return "";
|
|
2891
2894
|
}
|
|
2892
2895
|
};
|
|
2896
|
+
const renderSpecialExpressions = (inputPart, partIndex, parentKey) => {
|
|
2897
|
+
return /* @__PURE__ */ jsx12(
|
|
2898
|
+
"span",
|
|
2899
|
+
{
|
|
2900
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
2901
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx12("span", { className: "text-2xl", children: /* @__PURE__ */ jsx12(InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
2902
|
+
},
|
|
2903
|
+
`${parentKey}-expr-${partIndex}`
|
|
2904
|
+
);
|
|
2905
|
+
};
|
|
2906
|
+
const balanceSpecialChars = (text) => {
|
|
2907
|
+
let result = text;
|
|
2908
|
+
if ((result.split("__").length - 1) % 2 === 1) {
|
|
2909
|
+
result = result + "__";
|
|
2910
|
+
}
|
|
2911
|
+
if ((result.split("**").length - 1) % 2 === 1) {
|
|
2912
|
+
result = result + "**";
|
|
2913
|
+
}
|
|
2914
|
+
if ((result.split("`").length - 1) % 2 === 1) {
|
|
2915
|
+
result = result + "`";
|
|
2916
|
+
}
|
|
2917
|
+
return result;
|
|
2918
|
+
};
|
|
2919
|
+
const renderTextContent = (text, itemKey) => {
|
|
2920
|
+
const balancedText = balanceSpecialChars(text);
|
|
2921
|
+
return /* @__PURE__ */ jsx12("span", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(balancedText).map(
|
|
2922
|
+
(inputPart, exprIndex) => renderSpecialExpressions(inputPart, exprIndex, itemKey)
|
|
2923
|
+
) }, itemKey);
|
|
2924
|
+
};
|
|
2925
|
+
const handleOpenFullScreen = (imageSource) => {
|
|
2926
|
+
setSelectedFullScreenItem(imageSource);
|
|
2927
|
+
setShowFullScreen(true);
|
|
2928
|
+
};
|
|
2893
2929
|
const retrieveValueParts = (value2) => {
|
|
2894
2930
|
let currentIndex = 0;
|
|
2895
2931
|
const valuePartList = [];
|
|
2896
2932
|
let copyValue = JSON.parse(JSON.stringify(value2));
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2933
|
+
const processTextTags = () => {
|
|
2934
|
+
const checkText = "--TEXT--";
|
|
2935
|
+
while (copyValue.includes(checkText)) {
|
|
2936
|
+
const firstIndex = copyValue.indexOf(checkText);
|
|
2937
|
+
const textBeforeTag = copyValue.substring(0, firstIndex);
|
|
2938
|
+
if (textBeforeTag.trim() !== "") {
|
|
2939
|
+
const balancedText = balanceSpecialChars(textBeforeTag);
|
|
2940
|
+
currentIndex++;
|
|
2941
|
+
const itemKey2 = `text-before-${index}-${currentIndex}`;
|
|
2942
|
+
valuePartList.push(renderTextContent(balancedText, itemKey2));
|
|
2907
2943
|
}
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2944
|
+
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
2945
|
+
const secondIndex = subValue.indexOf(checkText);
|
|
2946
|
+
if (secondIndex === -1) break;
|
|
2947
|
+
const textInsideTag = copyValue.substring(
|
|
2948
|
+
firstIndex + checkText.length,
|
|
2949
|
+
firstIndex + checkText.length + secondIndex
|
|
2950
|
+
);
|
|
2951
|
+
currentIndex++;
|
|
2952
|
+
const itemKey = `text-inside-${index}-${currentIndex}`;
|
|
2953
|
+
valuePartList.push(
|
|
2954
|
+
/* @__PURE__ */ jsx12("span", { className: "text-xl font-bold whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(textInsideTag).map(
|
|
2955
|
+
(inputPart, exprIndex) => renderSpecialExpressions(inputPart, exprIndex, itemKey)
|
|
2956
|
+
) }, itemKey)
|
|
2957
|
+
);
|
|
2958
|
+
copyValue = copyValue.substring(
|
|
2959
|
+
firstIndex + checkText.length + secondIndex + checkText.length
|
|
2960
|
+
);
|
|
2961
|
+
if ((copyValue.split("`").length - 1) % 2 === 1) {
|
|
2962
|
+
copyValue = "`" + copyValue;
|
|
2911
2963
|
}
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2964
|
+
}
|
|
2965
|
+
};
|
|
2966
|
+
const processImageTags = () => {
|
|
2967
|
+
const checkText = "--IMAGE--";
|
|
2968
|
+
while (copyValue.includes(checkText)) {
|
|
2969
|
+
const firstIndex = copyValue.indexOf(checkText);
|
|
2970
|
+
const textBeforeTag = copyValue.substring(0, firstIndex);
|
|
2971
|
+
if (textBeforeTag.trim() !== "") {
|
|
2972
|
+
currentIndex++;
|
|
2973
|
+
valuePartList.push(
|
|
2974
|
+
/* @__PURE__ */ jsx12(
|
|
2975
|
+
"p",
|
|
2976
|
+
{
|
|
2977
|
+
className: "text-xl",
|
|
2978
|
+
children: textBeforeTag
|
|
2979
|
+
},
|
|
2980
|
+
`text-before-img-${index}-${currentIndex}`
|
|
2981
|
+
)
|
|
2982
|
+
);
|
|
2915
2983
|
}
|
|
2984
|
+
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
2985
|
+
const secondIndex = subValue.indexOf(checkText);
|
|
2986
|
+
if (secondIndex === -1) break;
|
|
2987
|
+
const imageSource = copyValue.substring(
|
|
2988
|
+
firstIndex + checkText.length,
|
|
2989
|
+
firstIndex + checkText.length + secondIndex
|
|
2990
|
+
);
|
|
2991
|
+
currentIndex++;
|
|
2916
2992
|
valuePartList.push(
|
|
2917
|
-
/* @__PURE__ */
|
|
2918
|
-
"
|
|
2993
|
+
/* @__PURE__ */ jsxs8(
|
|
2994
|
+
"div",
|
|
2919
2995
|
{
|
|
2920
|
-
className: "
|
|
2921
|
-
children:
|
|
2922
|
-
|
|
2923
|
-
|
|
2996
|
+
className: "relative w-[200px]",
|
|
2997
|
+
children: [
|
|
2998
|
+
/* @__PURE__ */ jsx12(
|
|
2999
|
+
BaseImage_default,
|
|
2924
3000
|
{
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
3001
|
+
src: imageSource,
|
|
3002
|
+
alt: "media",
|
|
3003
|
+
size: "custom",
|
|
3004
|
+
className: "rounded-catchup-xlarge"
|
|
3005
|
+
}
|
|
3006
|
+
),
|
|
3007
|
+
/* @__PURE__ */ jsx12(
|
|
3008
|
+
"div",
|
|
3009
|
+
{
|
|
3010
|
+
className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1",
|
|
3011
|
+
onClick: () => handleOpenFullScreen(imageSource),
|
|
3012
|
+
children: /* @__PURE__ */ jsx12(
|
|
3013
|
+
BaseImage_default,
|
|
3014
|
+
{
|
|
3015
|
+
src: "/icons/arrow-up.webp",
|
|
3016
|
+
alt: "arrow-up",
|
|
3017
|
+
size: "custom",
|
|
3018
|
+
className: "w-full"
|
|
3019
|
+
}
|
|
3020
|
+
)
|
|
3021
|
+
}
|
|
2929
3022
|
)
|
|
2930
|
-
|
|
3023
|
+
]
|
|
2931
3024
|
},
|
|
2932
|
-
|
|
3025
|
+
`img-${index}-${currentIndex}`
|
|
2933
3026
|
)
|
|
2934
3027
|
);
|
|
3028
|
+
copyValue = copyValue.substring(
|
|
3029
|
+
firstIndex + checkText.length + secondIndex + checkText.length
|
|
3030
|
+
);
|
|
2935
3031
|
}
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
"span",
|
|
3032
|
+
};
|
|
3033
|
+
const processVideoTags = () => {
|
|
3034
|
+
const checkText = "--VIDEO--";
|
|
3035
|
+
while (copyValue.includes(checkText)) {
|
|
3036
|
+
const firstIndex = copyValue.indexOf(checkText);
|
|
3037
|
+
const textBeforeTag = copyValue.substring(0, firstIndex);
|
|
3038
|
+
if (textBeforeTag.trim() !== "") {
|
|
3039
|
+
currentIndex++;
|
|
3040
|
+
valuePartList.push(
|
|
3041
|
+
/* @__PURE__ */ jsx12(
|
|
3042
|
+
"p",
|
|
2948
3043
|
{
|
|
2949
|
-
className:
|
|
2950
|
-
children:
|
|
3044
|
+
className: "text-xl",
|
|
3045
|
+
children: textBeforeTag
|
|
2951
3046
|
},
|
|
2952
|
-
|
|
2953
|
-
)
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
)
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
checkText = "--IMAGE--";
|
|
2964
|
-
while (copyValue.includes(checkText)) {
|
|
2965
|
-
const firstIndex = copyValue.indexOf(checkText);
|
|
2966
|
-
const textValue = copyValue.substring(0, firstIndex);
|
|
2967
|
-
if (textValue.trim() !== "") {
|
|
3047
|
+
`text-before-video-${index}-${currentIndex}`
|
|
3048
|
+
)
|
|
3049
|
+
);
|
|
3050
|
+
}
|
|
3051
|
+
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
3052
|
+
const secondIndex = subValue.indexOf(checkText);
|
|
3053
|
+
if (secondIndex === -1) break;
|
|
3054
|
+
const videoSource = copyValue.substring(
|
|
3055
|
+
firstIndex + checkText.length,
|
|
3056
|
+
firstIndex + checkText.length + secondIndex
|
|
3057
|
+
);
|
|
2968
3058
|
currentIndex++;
|
|
2969
3059
|
valuePartList.push(
|
|
2970
|
-
/* @__PURE__ */ jsx12("p", { className: "text-xl", children: textValue }, `${index}_${currentIndex}`)
|
|
2971
|
-
);
|
|
2972
|
-
}
|
|
2973
|
-
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
2974
|
-
const secondIndex = subValue.indexOf(checkText) + checkText.length + textValue.length;
|
|
2975
|
-
const imageSource = copyValue.substring(
|
|
2976
|
-
firstIndex + checkText.length,
|
|
2977
|
-
secondIndex
|
|
2978
|
-
);
|
|
2979
|
-
currentIndex++;
|
|
2980
|
-
valuePartList.push(
|
|
2981
|
-
/* @__PURE__ */ jsxs8("div", { className: "relative w-[200px]", children: [
|
|
2982
3060
|
/* @__PURE__ */ jsx12(
|
|
2983
|
-
|
|
3061
|
+
"video",
|
|
2984
3062
|
{
|
|
2985
|
-
src:
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
}
|
|
2990
|
-
),
|
|
2991
|
-
/* @__PURE__ */ jsx12(
|
|
2992
|
-
"div",
|
|
2993
|
-
{
|
|
2994
|
-
className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1",
|
|
2995
|
-
onClick: (event) => {
|
|
2996
|
-
setShowFullScreen(true);
|
|
2997
|
-
setSelectedFullScreenItem(imageSource);
|
|
2998
|
-
},
|
|
2999
|
-
children: /* @__PURE__ */ jsx12(
|
|
3000
|
-
BaseImage_default,
|
|
3001
|
-
{
|
|
3002
|
-
src: "/icons/arrow-up.webp",
|
|
3003
|
-
alt: "arrow-up",
|
|
3004
|
-
size: "custom",
|
|
3005
|
-
className: "w-full"
|
|
3006
|
-
}
|
|
3007
|
-
)
|
|
3008
|
-
}
|
|
3063
|
+
src: videoSource,
|
|
3064
|
+
className: "w-[200px] rounded-catchup-xlarge",
|
|
3065
|
+
controls: true
|
|
3066
|
+
},
|
|
3067
|
+
`video-${index}-${currentIndex}`
|
|
3009
3068
|
)
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
}
|
|
3014
|
-
checkText = "--VIDEO--";
|
|
3015
|
-
while (copyValue.includes(checkText)) {
|
|
3016
|
-
const firstIndex = copyValue.indexOf(checkText);
|
|
3017
|
-
const textValue = copyValue.substring(0, firstIndex);
|
|
3018
|
-
if (textValue.trim() !== "") {
|
|
3019
|
-
currentIndex++;
|
|
3020
|
-
valuePartList.push(
|
|
3021
|
-
/* @__PURE__ */ jsx12("p", { className: "text-xl", children: textValue }, `${index}-${currentIndex}`)
|
|
3069
|
+
);
|
|
3070
|
+
copyValue = copyValue.substring(
|
|
3071
|
+
firstIndex + checkText.length + secondIndex + checkText.length
|
|
3022
3072
|
);
|
|
3023
3073
|
}
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
const
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3074
|
+
};
|
|
3075
|
+
const processAudioTags = () => {
|
|
3076
|
+
const checkText = "--AUDIO--";
|
|
3077
|
+
while (copyValue.includes(checkText)) {
|
|
3078
|
+
const firstIndex = copyValue.indexOf(checkText);
|
|
3079
|
+
const textBeforeTag = copyValue.substring(0, firstIndex);
|
|
3080
|
+
if (textBeforeTag.trim() !== "") {
|
|
3081
|
+
currentIndex++;
|
|
3082
|
+
valuePartList.push(
|
|
3083
|
+
/* @__PURE__ */ jsx12(
|
|
3084
|
+
"p",
|
|
3085
|
+
{
|
|
3086
|
+
className: "text-xl",
|
|
3087
|
+
children: textBeforeTag
|
|
3088
|
+
},
|
|
3089
|
+
`text-before-audio-${index}-${currentIndex}`
|
|
3090
|
+
)
|
|
3091
|
+
);
|
|
3092
|
+
}
|
|
3093
|
+
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
3094
|
+
const secondIndex = subValue.indexOf(checkText);
|
|
3095
|
+
if (secondIndex === -1) break;
|
|
3096
|
+
const audioSource = copyValue.substring(
|
|
3097
|
+
firstIndex + checkText.length,
|
|
3098
|
+
firstIndex + checkText.length + secondIndex
|
|
3099
|
+
);
|
|
3048
3100
|
currentIndex++;
|
|
3049
3101
|
valuePartList.push(
|
|
3050
|
-
/* @__PURE__ */ jsx12(
|
|
3102
|
+
/* @__PURE__ */ jsx12(
|
|
3103
|
+
"audio",
|
|
3104
|
+
{
|
|
3105
|
+
src: audioSource,
|
|
3106
|
+
className: "w-[200px] rounded-catchup-xlarge",
|
|
3107
|
+
controls: true
|
|
3108
|
+
},
|
|
3109
|
+
`audio-${index}-${currentIndex}`
|
|
3110
|
+
)
|
|
3111
|
+
);
|
|
3112
|
+
copyValue = copyValue.substring(
|
|
3113
|
+
firstIndex + checkText.length + secondIndex + checkText.length
|
|
3051
3114
|
);
|
|
3052
3115
|
}
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
);
|
|
3059
|
-
currentIndex++;
|
|
3060
|
-
valuePartList.push(
|
|
3061
|
-
/* @__PURE__ */ jsx12(
|
|
3062
|
-
"audio",
|
|
3063
|
-
{
|
|
3064
|
-
src: audioSource,
|
|
3065
|
-
className: `w-[200px] rounded-catchup-xlarge`
|
|
3066
|
-
},
|
|
3067
|
-
`${index}-${currentIndex}`
|
|
3068
|
-
)
|
|
3069
|
-
);
|
|
3070
|
-
copyValue = copyValue.substring(secondIndex + checkText.length);
|
|
3071
|
-
}
|
|
3116
|
+
};
|
|
3117
|
+
processTextTags();
|
|
3118
|
+
processImageTags();
|
|
3119
|
+
processVideoTags();
|
|
3120
|
+
processAudioTags();
|
|
3072
3121
|
if (copyValue.trim() !== "") {
|
|
3073
3122
|
currentIndex++;
|
|
3074
|
-
|
|
3075
|
-
copyValue = "__" + copyValue;
|
|
3076
|
-
}
|
|
3077
|
-
if ((copyValue.split("**").length - 1) % 2 === 1) {
|
|
3078
|
-
copyValue = "**" + copyValue;
|
|
3079
|
-
}
|
|
3080
|
-
if ((copyValue.split("`").length - 1) % 2 === 1) {
|
|
3081
|
-
copyValue = "`" + copyValue;
|
|
3082
|
-
}
|
|
3123
|
+
copyValue = balanceSpecialChars(copyValue);
|
|
3083
3124
|
const regexMatchImageText = copyValue.match(/<image>([\s\S]*?)<\/image>/);
|
|
3084
3125
|
if (regexMatchImageText) {
|
|
3085
3126
|
const imageText = regexMatchImageText[1];
|
|
3086
3127
|
valuePartList.push(
|
|
3087
|
-
/* @__PURE__ */ jsxs8(
|
|
3088
|
-
|
|
3089
|
-
/* @__PURE__ */ jsx12(
|
|
3090
|
-
"span",
|
|
3091
|
-
{
|
|
3092
|
-
className: "text-xl whitespace-pre-wrap ",
|
|
3093
|
-
children: imageText
|
|
3094
|
-
},
|
|
3095
|
-
`${index}-${currentIndex}`
|
|
3096
|
-
)
|
|
3097
|
-
] })
|
|
3098
|
-
);
|
|
3099
|
-
} else {
|
|
3100
|
-
valuePartList.push(
|
|
3101
|
-
/* @__PURE__ */ jsx12(
|
|
3102
|
-
"span",
|
|
3128
|
+
/* @__PURE__ */ jsxs8(
|
|
3129
|
+
"div",
|
|
3103
3130
|
{
|
|
3104
|
-
className: "
|
|
3105
|
-
children:
|
|
3106
|
-
(
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3110
|
-
children: inputPart.isEquation ? /* @__PURE__ */ jsx12("span", { className: "text-2xl", children: /* @__PURE__ */ jsx12(InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
3111
|
-
},
|
|
3112
|
-
index2
|
|
3113
|
-
)
|
|
3114
|
-
)
|
|
3131
|
+
className: "bg-catchup-gray-50 relative px-4 py-4 rounded-catchup-small mt-2",
|
|
3132
|
+
children: [
|
|
3133
|
+
/* @__PURE__ */ jsx12("div", { className: "absolute -top-3 bg-catchup-white border rounded-catchup-small px-2 left-2", children: /* @__PURE__ */ jsx12("p", { className: "font-bold", children: i18n_default.t("image_description") }) }),
|
|
3134
|
+
/* @__PURE__ */ jsx12("span", { className: "text-xl whitespace-pre-wrap", children: imageText })
|
|
3135
|
+
]
|
|
3115
3136
|
},
|
|
3116
|
-
|
|
3137
|
+
`img-desc-${index}-${currentIndex}`
|
|
3117
3138
|
)
|
|
3118
3139
|
);
|
|
3140
|
+
} else {
|
|
3141
|
+
const itemKey = `remaining-${index}-${currentIndex}`;
|
|
3142
|
+
valuePartList.push(renderTextContent(copyValue, itemKey));
|
|
3119
3143
|
}
|
|
3120
3144
|
}
|
|
3121
3145
|
return valuePartList;
|
|
@@ -3125,8 +3149,6 @@ var ShowBodyMediaByContentType = ({
|
|
|
3125
3149
|
Modal2,
|
|
3126
3150
|
{
|
|
3127
3151
|
isOpen: showFullScreen,
|
|
3128
|
-
onAfterOpen: () => {
|
|
3129
|
-
},
|
|
3130
3152
|
onRequestClose: () => {
|
|
3131
3153
|
setShowFullScreen(false);
|
|
3132
3154
|
setSelectedFullScreenItem("");
|
|
@@ -3151,13 +3173,13 @@ var ShowBodyMediaByContentType = ({
|
|
|
3151
3173
|
background: "rgba(0, 0, 0, 0.6)"
|
|
3152
3174
|
}
|
|
3153
3175
|
},
|
|
3154
|
-
contentLabel: "",
|
|
3176
|
+
contentLabel: "Image Fullscreen View",
|
|
3155
3177
|
children: /* @__PURE__ */ jsxs8("div", { className: "flex-1 flex flex-col", children: [
|
|
3156
3178
|
/* @__PURE__ */ jsx12("div", { className: "ml-auto px-5 py-3", children: /* @__PURE__ */ jsx12(
|
|
3157
3179
|
BaseImage_default,
|
|
3158
3180
|
{
|
|
3159
3181
|
src: "/icons/cross-red.webp",
|
|
3160
|
-
alt: "
|
|
3182
|
+
alt: "close fullscreen",
|
|
3161
3183
|
size: "medium",
|
|
3162
3184
|
onClick: () => {
|
|
3163
3185
|
setShowFullScreen(false);
|
|
@@ -3169,7 +3191,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3169
3191
|
BaseImage_default,
|
|
3170
3192
|
{
|
|
3171
3193
|
src: selectedFullScreenItem,
|
|
3172
|
-
alt: "
|
|
3194
|
+
alt: "fullscreen image",
|
|
3173
3195
|
size: "custom",
|
|
3174
3196
|
className: "w-full"
|
|
3175
3197
|
}
|
|
@@ -3179,62 +3201,66 @@ var ShowBodyMediaByContentType = ({
|
|
|
3179
3201
|
);
|
|
3180
3202
|
};
|
|
3181
3203
|
const RenderMainContent = () => {
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
"div",
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3204
|
+
switch (type) {
|
|
3205
|
+
case "TEXT":
|
|
3206
|
+
return /* @__PURE__ */ jsx12("div", { className: "mb-3 flex flex-row flex-wrap items-center mx-auto w-full", children: retrieveValueParts(value) });
|
|
3207
|
+
case "IMAGE":
|
|
3208
|
+
return /* @__PURE__ */ jsx12("div", { className: "mb-3 flex flex-col items-center relative", children: /* @__PURE__ */ jsxs8(
|
|
3209
|
+
"div",
|
|
3210
|
+
{
|
|
3211
|
+
className: `${convertToPercentage(
|
|
3212
|
+
size || ""
|
|
3213
|
+
)} rounded-catchup-xlarge relative`,
|
|
3214
|
+
children: [
|
|
3215
|
+
/* @__PURE__ */ jsx12(
|
|
3216
|
+
BaseImage_default,
|
|
3217
|
+
{
|
|
3218
|
+
src: value,
|
|
3219
|
+
alt: "body image",
|
|
3220
|
+
size: "custom",
|
|
3221
|
+
className: "w-full rounded-catchup-xlarge"
|
|
3222
|
+
}
|
|
3223
|
+
),
|
|
3224
|
+
/* @__PURE__ */ jsx12(
|
|
3225
|
+
"div",
|
|
3226
|
+
{
|
|
3227
|
+
className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1",
|
|
3228
|
+
onClick: () => handleOpenFullScreen(value),
|
|
3229
|
+
children: /* @__PURE__ */ jsx12(
|
|
3230
|
+
BaseImage_default,
|
|
3231
|
+
{
|
|
3232
|
+
src: "/icons/arrow-up.webp",
|
|
3233
|
+
alt: "expand",
|
|
3234
|
+
size: "custom",
|
|
3235
|
+
className: "w-full"
|
|
3236
|
+
}
|
|
3237
|
+
)
|
|
3238
|
+
}
|
|
3239
|
+
)
|
|
3240
|
+
]
|
|
3241
|
+
}
|
|
3242
|
+
) });
|
|
3243
|
+
case "VIDEO":
|
|
3244
|
+
return /* @__PURE__ */ jsx12("div", { className: "mb-3 flex flex-col items-center", children: /* @__PURE__ */ jsx12(
|
|
3245
|
+
"video",
|
|
3246
|
+
{
|
|
3247
|
+
src: value,
|
|
3248
|
+
className: `${convertToPercentage(
|
|
3249
|
+
size || ""
|
|
3250
|
+
)} rounded-catchup-xlarge`,
|
|
3251
|
+
controls: true
|
|
3252
|
+
}
|
|
3253
|
+
) });
|
|
3254
|
+
case "AUDIO":
|
|
3255
|
+
return /* @__PURE__ */ jsx12("div", { className: "mb-3 flex flex-col items-center", children: /* @__PURE__ */ jsx12("audio", { src: value, controls: true, className: "rounded-catchup-xlarge" }) });
|
|
3256
|
+
default:
|
|
3257
|
+
return null;
|
|
3232
3258
|
}
|
|
3233
3259
|
};
|
|
3234
3260
|
return /* @__PURE__ */ jsxs8("div", { className: "w-full", children: [
|
|
3235
3261
|
RenderShowFullScreenItem(),
|
|
3236
3262
|
RenderMainContent()
|
|
3237
|
-
] }, index);
|
|
3263
|
+
] }, `body-content-${index}`);
|
|
3238
3264
|
};
|
|
3239
3265
|
var ShowBodyMediaByContentType_default = ShowBodyMediaByContentType;
|
|
3240
3266
|
|
|
@@ -6083,7 +6109,7 @@ var ActivitySolutionContent = ({
|
|
|
6083
6109
|
return null;
|
|
6084
6110
|
}
|
|
6085
6111
|
const { value } = currentItem;
|
|
6086
|
-
return /* @__PURE__ */ jsx40("div", { className: "my-3", children: constructInputWithSpecialExpressionList(value).map(
|
|
6112
|
+
return /* @__PURE__ */ jsx40("div", { className: "my-3 text-xl", children: constructInputWithSpecialExpressionList(value).map(
|
|
6087
6113
|
(inputPart, partIndex) => /* @__PURE__ */ jsx40(
|
|
6088
6114
|
"span",
|
|
6089
6115
|
{
|