react-easy-wall 1.1.4 → 1.1.6
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.
|
@@ -6,7 +6,7 @@ var Box = require('../../node_modules/@mui/material/esm/Box/Box.js');
|
|
|
6
6
|
var Typography = require('../../node_modules/@mui/material/esm/Typography/Typography.js');
|
|
7
7
|
var Button = require('../../node_modules/@mui/material/esm/Button/Button.js');
|
|
8
8
|
|
|
9
|
-
const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonProps = {}, titleProps = {}, secondaryButtonText = '', secondaryButtonProps = {}, withCaption = false, title = 'Este artículo es exclusivo para suscriptores', subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.', post, buttonText = '', }) => {
|
|
9
|
+
const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonProps = {}, titleProps = {}, secondaryButtonText = '', secondaryButtonProps = {}, withCaption = false, title = 'Este artículo es exclusivo para suscriptores', subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.', post, buttonText = 'Suscríbete', }) => {
|
|
10
10
|
const { sx: sxContainerProps, ...containerPropRest } = containerProps;
|
|
11
11
|
const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;
|
|
12
12
|
const { sx: sxTitleProps, ...titlePropRest } = titleProps;
|
|
@@ -26,26 +26,38 @@ const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonPr
|
|
|
26
26
|
}
|
|
27
27
|
return (window.location.href = `${paywall_constants.PAYWALL_AUTH_ENDPOINT}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);
|
|
28
28
|
};
|
|
29
|
-
return (jsxRuntime.
|
|
29
|
+
return (jsxRuntime.jsx(Box.default, { sx: {
|
|
30
30
|
height: withCaption ? 220 : 300,
|
|
31
31
|
width: '100%',
|
|
32
32
|
border: '1px solid #707070',
|
|
33
33
|
justifyContent: 'center',
|
|
34
34
|
alignItems: 'center',
|
|
35
35
|
flexDirection: 'column',
|
|
36
|
+
background: 'white',
|
|
37
|
+
paddingTop: 80,
|
|
38
|
+
paddingBottom: 80,
|
|
36
39
|
...sxContainerProps,
|
|
37
|
-
}, ...containerPropRest, children:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
}, ...containerPropRest, children: jsxRuntime.jsxs(Box.default, { sx: {
|
|
41
|
+
width: {
|
|
42
|
+
xs: 360,
|
|
43
|
+
md: 460,
|
|
44
|
+
},
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
flexDirection: 'column',
|
|
48
|
+
}, children: [jsxRuntime.jsx(Typography.default, { sx: { fontWeight: 500, ...sxTitleProps }, ...titlePropRest, children: title }), jsxRuntime.jsx(Typography.default, { sx: { ...sxSubtitleProps }, ...subtitlePropRest, children: subtitle }), jsxRuntime.jsx(Button.default, { disableElevation: true, disableRipple: true, disableTouchRipple: true, disableFocusRipple: true, sx: {
|
|
49
|
+
background: '#f75957',
|
|
50
|
+
'&:hover': {
|
|
51
|
+
backgroundColor: '#f75957',
|
|
52
|
+
},
|
|
53
|
+
...sxButtonProps,
|
|
54
|
+
}, onClick: () => handleButton(), ...buttonPropsRest, children: buttonText }), jsxRuntime.jsx(Button.default, { disableElevation: true, disableRipple: true, disableTouchRipple: true, disableFocusRipple: true, sx: {
|
|
55
|
+
textDecoration: 'underline',
|
|
56
|
+
background: 'transparent',
|
|
57
|
+
padding: '0.5rem 1rem',
|
|
58
|
+
fontWeight: 500,
|
|
59
|
+
...sxSecondaryButtonProps,
|
|
60
|
+
}, onClick: () => handleSecondaryButton(), ...secondaryButtonPropsRest, children: secondaryButtonText })] }) }));
|
|
49
61
|
};
|
|
50
62
|
|
|
51
63
|
exports.PaywallSubscription = PaywallSubscription;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport { PAYWALL_AUTH_ENDPOINT } from './paywall.constants';\n\nexport interface PaywallSubscriptionProps {\n post?: any;\n containerProps?: BoxProps;\n titleProps?: TypographyProps;\n subtitleProps?: TypographyProps;\n buttonProps?: ButtonProps;\n buttonText?: string;\n secondaryButtonProps?: ButtonProps;\n secondaryButtonText?: string;\n title?: string;\n subtitle?: string;\n withCaption?: boolean;\n}\n\nexport const PaywallSubscription: React.FC<PaywallSubscriptionProps> = ({\n containerProps = {},\n subtitleProps = {},\n buttonProps = {},\n titleProps = {},\n secondaryButtonText = '',\n secondaryButtonProps = {},\n withCaption = false,\n title = 'Este artículo es exclusivo para suscriptores',\n subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.',\n post,\n buttonText = '',\n}) => {\n const { sx: sxContainerProps, ...containerPropRest } = containerProps;\n const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;\n const { sx: sxTitleProps, ...titlePropRest } = titleProps;\n const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;\n const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;\n\n const handleButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n height: withCaption ? 220 : 300,\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n ...sxContainerProps,\n }}\n {...containerPropRest}>\n <Typography sx={{ ...sxTitleProps }} {...titlePropRest}>\n
|
|
1
|
+
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport { PAYWALL_AUTH_ENDPOINT } from './paywall.constants';\n\nexport interface PaywallSubscriptionProps {\n post?: any;\n containerProps?: BoxProps;\n titleProps?: TypographyProps;\n subtitleProps?: TypographyProps;\n buttonProps?: ButtonProps;\n buttonText?: string;\n secondaryButtonProps?: ButtonProps;\n secondaryButtonText?: string;\n title?: string;\n subtitle?: string;\n withCaption?: boolean;\n}\n\nexport const PaywallSubscription: React.FC<PaywallSubscriptionProps> = ({\n containerProps = {},\n subtitleProps = {},\n buttonProps = {},\n titleProps = {},\n secondaryButtonText = '',\n secondaryButtonProps = {},\n withCaption = false,\n title = 'Este artículo es exclusivo para suscriptores',\n subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.',\n post,\n buttonText = 'Suscríbete',\n}) => {\n const { sx: sxContainerProps, ...containerPropRest } = containerProps;\n const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;\n const { sx: sxTitleProps, ...titlePropRest } = titleProps;\n const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;\n const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;\n\n const handleButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n height: withCaption ? 220 : 300,\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n background: 'white',\n paddingTop: 80,\n paddingBottom: 80,\n ...sxContainerProps,\n }}\n {...containerPropRest}>\n <Box\n sx={{\n width: {\n xs: 360,\n md: 460,\n },\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n }}>\n <Typography sx={{ fontWeight: 500, ...sxTitleProps }} {...titlePropRest}>\n {title}\n </Typography>\n <Typography sx={{ ...sxSubtitleProps }} {...subtitlePropRest}>\n {subtitle}\n </Typography>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n background: '#f75957',\n '&:hover': {\n backgroundColor: '#f75957',\n },\n ...sxButtonProps,\n }}\n onClick={() => handleButton()}\n {...buttonPropsRest}>\n {buttonText}\n </Button>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n textDecoration: 'underline',\n background: 'transparent',\n padding: '0.5rem 1rem',\n fontWeight: 500,\n ...sxSecondaryButtonProps,\n }}\n onClick={() => handleSecondaryButton()}\n {...secondaryButtonPropsRest}>\n {secondaryButtonText}\n </Button>\n </Box>\n </Box>\n );\n};\n"],"names":["PAYWALL_AUTH_ENDPOINT","_jsx","Box","_jsxs","Typography","Button"],"mappings":";;;;;;;;MAkBa,mBAAmB,GAAuC,CAAC,EACtE,cAAc,GAAG,EAAE,EACnB,aAAa,GAAG,EAAE,EAClB,WAAW,GAAG,EAAE,EAChB,UAAU,GAAG,EAAE,EACf,mBAAmB,GAAG,EAAE,EACxB,oBAAoB,GAAG,EAAE,EACzB,WAAW,GAAG,KAAK,EACnB,KAAK,GAAG,8CAA8C,E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B,EAAA,IAAA,EAClB,kBAAkB,EAAA,IAAA,EAClB,EAAE,EAAE;AACF,wBAAA,cAAc,EAAE,WAAW;AAC3B,wBAAA,UAAU,EAAE,aAAa;AACzB,wBAAA,OAAO,EAAE,aAAa;AACtB,wBAAA,UAAU,EAAE,GAAG;AACf,wBAAA,GAAG,sBAAsB;AAC1B,qBAAA,EACD,OAAO,EAAE,MAAM,qBAAqB,EAAE,EAAA,GAClC,wBAAwB,YAC3B,mBAAmB,EAAA,CACb,CAAA,EAAA,CACL,EAAA,CACF;AAEV;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { PAYWALL_AUTH_ENDPOINT } from './paywall.constants.js';
|
|
3
3
|
import Box from '../../node_modules/@mui/material/esm/Box/Box.js';
|
|
4
4
|
import Typography from '../../node_modules/@mui/material/esm/Typography/Typography.js';
|
|
5
5
|
import Button from '../../node_modules/@mui/material/esm/Button/Button.js';
|
|
6
6
|
|
|
7
|
-
const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonProps = {}, titleProps = {}, secondaryButtonText = '', secondaryButtonProps = {}, withCaption = false, title = 'Este artículo es exclusivo para suscriptores', subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.', post, buttonText = '', }) => {
|
|
7
|
+
const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonProps = {}, titleProps = {}, secondaryButtonText = '', secondaryButtonProps = {}, withCaption = false, title = 'Este artículo es exclusivo para suscriptores', subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.', post, buttonText = 'Suscríbete', }) => {
|
|
8
8
|
const { sx: sxContainerProps, ...containerPropRest } = containerProps;
|
|
9
9
|
const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;
|
|
10
10
|
const { sx: sxTitleProps, ...titlePropRest } = titleProps;
|
|
@@ -24,26 +24,38 @@ const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonPr
|
|
|
24
24
|
}
|
|
25
25
|
return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);
|
|
26
26
|
};
|
|
27
|
-
return (
|
|
27
|
+
return (jsx(Box, { sx: {
|
|
28
28
|
height: withCaption ? 220 : 300,
|
|
29
29
|
width: '100%',
|
|
30
30
|
border: '1px solid #707070',
|
|
31
31
|
justifyContent: 'center',
|
|
32
32
|
alignItems: 'center',
|
|
33
33
|
flexDirection: 'column',
|
|
34
|
+
background: 'white',
|
|
35
|
+
paddingTop: 80,
|
|
36
|
+
paddingBottom: 80,
|
|
34
37
|
...sxContainerProps,
|
|
35
|
-
}, ...containerPropRest, children:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
}, ...containerPropRest, children: jsxs(Box, { sx: {
|
|
39
|
+
width: {
|
|
40
|
+
xs: 360,
|
|
41
|
+
md: 460,
|
|
42
|
+
},
|
|
43
|
+
justifyContent: 'center',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
flexDirection: 'column',
|
|
46
|
+
}, children: [jsx(Typography, { sx: { fontWeight: 500, ...sxTitleProps }, ...titlePropRest, children: title }), jsx(Typography, { sx: { ...sxSubtitleProps }, ...subtitlePropRest, children: subtitle }), jsx(Button, { disableElevation: true, disableRipple: true, disableTouchRipple: true, disableFocusRipple: true, sx: {
|
|
47
|
+
background: '#f75957',
|
|
48
|
+
'&:hover': {
|
|
49
|
+
backgroundColor: '#f75957',
|
|
50
|
+
},
|
|
51
|
+
...sxButtonProps,
|
|
52
|
+
}, onClick: () => handleButton(), ...buttonPropsRest, children: buttonText }), jsx(Button, { disableElevation: true, disableRipple: true, disableTouchRipple: true, disableFocusRipple: true, sx: {
|
|
53
|
+
textDecoration: 'underline',
|
|
54
|
+
background: 'transparent',
|
|
55
|
+
padding: '0.5rem 1rem',
|
|
56
|
+
fontWeight: 500,
|
|
57
|
+
...sxSecondaryButtonProps,
|
|
58
|
+
}, onClick: () => handleSecondaryButton(), ...secondaryButtonPropsRest, children: secondaryButtonText })] }) }));
|
|
47
59
|
};
|
|
48
60
|
|
|
49
61
|
export { PaywallSubscription };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport { PAYWALL_AUTH_ENDPOINT } from './paywall.constants';\n\nexport interface PaywallSubscriptionProps {\n post?: any;\n containerProps?: BoxProps;\n titleProps?: TypographyProps;\n subtitleProps?: TypographyProps;\n buttonProps?: ButtonProps;\n buttonText?: string;\n secondaryButtonProps?: ButtonProps;\n secondaryButtonText?: string;\n title?: string;\n subtitle?: string;\n withCaption?: boolean;\n}\n\nexport const PaywallSubscription: React.FC<PaywallSubscriptionProps> = ({\n containerProps = {},\n subtitleProps = {},\n buttonProps = {},\n titleProps = {},\n secondaryButtonText = '',\n secondaryButtonProps = {},\n withCaption = false,\n title = 'Este artículo es exclusivo para suscriptores',\n subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.',\n post,\n buttonText = '',\n}) => {\n const { sx: sxContainerProps, ...containerPropRest } = containerProps;\n const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;\n const { sx: sxTitleProps, ...titlePropRest } = titleProps;\n const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;\n const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;\n\n const handleButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n height: withCaption ? 220 : 300,\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n ...sxContainerProps,\n }}\n {...containerPropRest}>\n <Typography sx={{ ...sxTitleProps }} {...titlePropRest}>\n
|
|
1
|
+
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport { PAYWALL_AUTH_ENDPOINT } from './paywall.constants';\n\nexport interface PaywallSubscriptionProps {\n post?: any;\n containerProps?: BoxProps;\n titleProps?: TypographyProps;\n subtitleProps?: TypographyProps;\n buttonProps?: ButtonProps;\n buttonText?: string;\n secondaryButtonProps?: ButtonProps;\n secondaryButtonText?: string;\n title?: string;\n subtitle?: string;\n withCaption?: boolean;\n}\n\nexport const PaywallSubscription: React.FC<PaywallSubscriptionProps> = ({\n containerProps = {},\n subtitleProps = {},\n buttonProps = {},\n titleProps = {},\n secondaryButtonText = '',\n secondaryButtonProps = {},\n withCaption = false,\n title = 'Este artículo es exclusivo para suscriptores',\n subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.',\n post,\n buttonText = 'Suscríbete',\n}) => {\n const { sx: sxContainerProps, ...containerPropRest } = containerProps;\n const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;\n const { sx: sxTitleProps, ...titlePropRest } = titleProps;\n const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;\n const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;\n\n const handleButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n height: withCaption ? 220 : 300,\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n background: 'white',\n paddingTop: 80,\n paddingBottom: 80,\n ...sxContainerProps,\n }}\n {...containerPropRest}>\n <Box\n sx={{\n width: {\n xs: 360,\n md: 460,\n },\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n }}>\n <Typography sx={{ fontWeight: 500, ...sxTitleProps }} {...titlePropRest}>\n {title}\n </Typography>\n <Typography sx={{ ...sxSubtitleProps }} {...subtitlePropRest}>\n {subtitle}\n </Typography>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n background: '#f75957',\n '&:hover': {\n backgroundColor: '#f75957',\n },\n ...sxButtonProps,\n }}\n onClick={() => handleButton()}\n {...buttonPropsRest}>\n {buttonText}\n </Button>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n textDecoration: 'underline',\n background: 'transparent',\n padding: '0.5rem 1rem',\n fontWeight: 500,\n ...sxSecondaryButtonProps,\n }}\n onClick={() => handleSecondaryButton()}\n {...secondaryButtonPropsRest}>\n {secondaryButtonText}\n </Button>\n </Box>\n </Box>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;MAkBa,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