@prosopo/procaptcha-react 0.2.32 → 0.2.33

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.
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const material = require("@mui/material");
5
- const react = require("react");
3
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
4
+ const React = require("react");
6
5
  const common = require("@prosopo/common");
7
6
  const extensionDapp = require("@polkadot/extension-dapp");
8
7
  const ExtensionAccountSelect = ({
@@ -11,8 +10,8 @@ const ExtensionAccountSelect = ({
11
10
  onChange
12
11
  }) => {
13
12
  const { t } = common.useTranslation();
14
- const [accounts, setAccounts] = react.useState([]);
15
- react.useEffect(() => {
13
+ const [accounts, setAccounts] = React.useState([]);
14
+ React.useEffect(() => {
16
15
  const prom = extensionDapp.web3Enable(dappName).then(() => {
17
16
  return extensionDapp.web3AccountsSubscribe(setAccounts);
18
17
  });
@@ -21,27 +20,28 @@ const ExtensionAccountSelect = ({
21
20
  };
22
21
  }, []);
23
22
  const account = accounts.find((a) => a.address === value) || null;
24
- return /* @__PURE__ */ jsxRuntime.jsx(
25
- material.Autocomplete,
26
- {
27
- disablePortal: true,
28
- id: "select-account",
29
- options: accounts,
30
- value: account,
31
- isOptionEqualToValue: (option, value2) => option.address === value2.address,
32
- onChange: (event, value2) => {
33
- if (value2) {
34
- console.log("Selected account:", value2);
35
- onChange(value2.address);
36
- } else {
37
- console.log("Deselected account");
38
- onChange("");
39
- }
40
- },
41
- sx: { width: 550 },
42
- getOptionLabel: (option) => `${option.meta.name}: ${option.address}`,
43
- renderInput: (props) => /* @__PURE__ */ jsxRuntime.jsx(material.TextField, { ...props, label: t("WIDGET.SELECT_ACCOUNT") })
44
- }
23
+ return (
24
+ // react select box
25
+ /* @__PURE__ */ jsxRuntime.jsx(
26
+ "select",
27
+ {
28
+ id: "select-account",
29
+ onChange: (e) => {
30
+ const value2 = e.target.value;
31
+ const account2 = accounts.find((a) => a.address === value2) || null;
32
+ if (account2) {
33
+ console.log("Selected account:", value2);
34
+ onChange(account2.address);
35
+ } else {
36
+ console.log("Deselected account");
37
+ onChange("");
38
+ }
39
+ },
40
+ value: accounts.length > 0 && account ? account.address : void 0,
41
+ style: { width: "550px" },
42
+ children: accounts.map(({ address, meta: { name } }) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: address, children: name }))
43
+ }
44
+ )
45
45
  );
46
46
  };
47
47
  exports.ExtensionAccountSelect = ExtensionAccountSelect;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
4
+ const theme = require("./theme.cjs");
5
+ const React = require("react");
6
+ const styled = require("@emotion/styled");
7
+ const LoadingSpinner = ({ themeColor }) => {
8
+ const theme$1 = React.useMemo(() => themeColor === "light" ? theme.lightTheme : theme.darkTheme, [themeColor]);
9
+ const StyledDiv = styled.div`
10
+ width: 2em;
11
+ height: 2em;
12
+ border: 4px solid ${theme$1.palette.background.contrastText};
13
+ border-bottom-color: transparent;
14
+ border-radius: 50%;
15
+ display: inherit;
16
+ box-sizing: border-box;
17
+ animation: rotation 1s linear infinite;
18
+ @keyframes rotation {
19
+ 0% {
20
+ transform: rotate(0deg);
21
+ }
22
+ 100% {
23
+ transform: rotate(360deg);
24
+ }
25
+ }
26
+ `;
27
+ return /* @__PURE__ */ jsxRuntime.jsx(StyledDiv, {});
28
+ };
29
+ exports.LoadingSpinner = LoadingSpinner;
30
+ exports.default = LoadingSpinner;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
3
+ const React = require("react");
4
+ const ModalComponent = React.memo((props, nextProps) => {
5
+ const { show, children } = props;
6
+ console.log("rendering modal with show: ", show);
7
+ const display = show ? "flex" : "none";
8
+ const ModalOuterDivCss = {
9
+ overflow: "auto",
10
+ width: "100%",
11
+ maxHeight: "100%",
12
+ position: "fixed",
13
+ top: "0",
14
+ left: "0",
15
+ height: "100%",
16
+ background: "rgba(0, 0, 0, 0.6)",
17
+ zIndex: "2147483646",
18
+ transition: "all 0.5s",
19
+ display
20
+ };
21
+ const ModalInnerDivCSS = {
22
+ maxWidth: "500px",
23
+ margin: "auto",
24
+ position: "fixed",
25
+ background: "white",
26
+ height: "auto",
27
+ top: "50%",
28
+ left: "50%",
29
+ transform: "translate(-50%, -50%)",
30
+ zIndex: "2147483647",
31
+ transition: "all 0.5s"
32
+ };
33
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: ModalOuterDivCss, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: ModalInnerDivCSS, children }) });
34
+ });
35
+ module.exports = ModalComponent;
@@ -1,255 +1,8 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
2
  const jsxRuntime = require("@emotion/react/jsx-runtime");
4
- const procaptcha = require("@prosopo/procaptcha");
5
- const material = require("@mui/material");
6
- const react = require("@emotion/react");
7
- const theme = require("./theme.cjs");
8
- const react$1 = require("react");
9
- const CaptchaComponent = require("./CaptchaComponent.cjs");
10
- const logoStyle = react.css`
11
- align-items: center;
12
- justify-content: flex-end;
13
- display: flex;
14
- padding: 8px;
15
-
16
- @media (max-width: 245px) {
17
- &:nth-of-type(1),
18
- &:nth-of-type(2) {
19
- display: none;
20
- } /* Both logos hidden */
21
- }
22
-
23
- @media (min-width: 245px) and (max-width: 400px) {
24
- &:nth-of-type(1) {
25
- display: flex;
26
- } /* logoWithText */
27
- &:nth-of-type(2) {
28
- display: none;
29
- } /* logoWithoutText */
30
- }
31
-
32
- @media (min-width: 401px) {
33
- &:nth-of-type(1) {
34
- display: none;
35
- } /* logoWithText */
36
- &:nth-of-type(2) {
37
- display: flex;
38
- } /* logoWithoutText */
39
- }
40
- `;
41
- const useRefAsState = (defaultValue) => {
42
- const ref = react$1.useRef(defaultValue);
43
- const setter = (value2) => {
44
- ref.current = value2;
45
- };
46
- const value = ref.current;
47
- return [value, setter];
48
- };
49
- const useProcaptcha = () => {
50
- const [isHuman, setIsHuman] = react$1.useState(false);
51
- const [index, setIndex] = react$1.useState(0);
52
- const [solutions, setSolutions] = react$1.useState([]);
53
- const [captchaApi, setCaptchaApi] = useRefAsState(void 0);
54
- const [showModal, setShowModal] = react$1.useState(false);
55
- const [challenge, setChallenge] = react$1.useState(void 0);
56
- const [loading, setLoading] = react$1.useState(false);
57
- const [account, setAccount] = react$1.useState(void 0);
58
- const [dappAccount, setDappAccount] = react$1.useState(void 0);
59
- const [submission, setSubmission] = useRefAsState(void 0);
60
- const [timeout, setTimeout] = useRefAsState(void 0);
61
- const [blockNumber, setBlockNumber] = useRefAsState(void 0);
62
- const [successfullChallengeTimeout, setSuccessfullChallengeTimeout] = useRefAsState(
63
- void 0
64
- );
65
- return [
66
- // the state
67
- {
68
- isHuman,
69
- index,
70
- solutions,
71
- captchaApi,
72
- showModal,
73
- challenge,
74
- loading,
75
- account,
76
- dappAccount,
77
- submission,
78
- timeout,
79
- blockNumber,
80
- successfullChallengeTimeout
81
- },
82
- // and method to update the state
83
- (nextState) => {
84
- if (nextState.account !== void 0)
85
- setAccount(nextState.account);
86
- if (nextState.isHuman !== void 0)
87
- setIsHuman(nextState.isHuman);
88
- if (nextState.index !== void 0)
89
- setIndex(nextState.index);
90
- if (nextState.solutions !== void 0)
91
- setSolutions(nextState.solutions.slice());
92
- if (nextState.captchaApi !== void 0)
93
- setCaptchaApi(nextState.captchaApi);
94
- if (nextState.showModal !== void 0)
95
- setShowModal(nextState.showModal);
96
- if (nextState.challenge !== void 0)
97
- setChallenge(nextState.challenge);
98
- if (nextState.loading !== void 0)
99
- setLoading(nextState.loading);
100
- if (nextState.showModal !== void 0)
101
- setShowModal(nextState.showModal);
102
- if (nextState.dappAccount !== void 0)
103
- setDappAccount(nextState.dappAccount);
104
- if (nextState.submission !== void 0)
105
- setSubmission(nextState.submission);
106
- if (nextState.timeout !== void 0)
107
- setTimeout(nextState.timeout);
108
- if (nextState.successfullChallengeTimeout !== void 0)
109
- setSuccessfullChallengeTimeout(nextState.timeout);
110
- if (nextState.blockNumber !== void 0)
111
- setBlockNumber(nextState.blockNumber);
112
- }
113
- ];
114
- };
115
- const Procaptcha = (props) => {
116
- console.log("config", props.config);
117
- const config = props.config;
118
- const callbacks = props.callbacks || {};
119
- const [state, updateState] = useProcaptcha();
120
- console.log("state", state);
121
- const manager = procaptcha.Manager(config, state, updateState, callbacks);
122
- const configSx = { maxWidth: "400px", minWidth: "200px" };
123
- const theme$1 = react$1.useMemo(() => props.config.theme === "light" ? theme.lightTheme : theme.darkTheme, [props.config.theme]);
124
- return /* @__PURE__ */ jsxRuntime.jsx(material.ThemeProvider, { theme: theme$1, children: /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { maxWidth: "100%", maxHeight: "100%", overflowX: "auto" }, children: [
125
- /* @__PURE__ */ jsxRuntime.jsx(material.Backdrop, { open: state.showModal, sx: { zIndex: 2147483647 }, children: state.challenge ? /* @__PURE__ */ jsxRuntime.jsx(
126
- CaptchaComponent,
127
- {
128
- challenge: state.challenge,
129
- index: state.index,
130
- solutions: state.solutions,
131
- onSubmit: manager.submit,
132
- onCancel: manager.cancel,
133
- onClick: manager.select,
134
- onNext: manager.nextRound,
135
- themeColor: config.theme ?? "light"
136
- }
137
- ) : /* @__PURE__ */ jsxRuntime.jsx(material.Alert, { children: "No challenge set." }) }),
138
- /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { p: 0, sx: [...Array.isArray(configSx) ? configSx : [configSx]], "data-cy": "button-human", children: [
139
- " ",
140
- /* @__PURE__ */ jsxRuntime.jsxs(
141
- material.Box,
142
- {
143
- p: 1,
144
- border: 1,
145
- bgcolor: theme$1.palette.background.default,
146
- borderColor: theme$1.palette.grey[300],
147
- borderRadius: 2,
148
- sx: {
149
- display: "flex",
150
- justifyContent: "space-between",
151
- alignItems: "center",
152
- flexWrap: "wrap"
153
- },
154
- children: [
155
- /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
156
- material.Box,
157
- {
158
- sx: {
159
- display: "flex",
160
- justifyContent: "flex-start",
161
- alignItems: "center",
162
- flexWrap: "wrap"
163
- },
164
- children: [
165
- /* @__PURE__ */ jsxRuntime.jsxs(
166
- material.Box,
167
- {
168
- sx: {
169
- height: "50px",
170
- width: "50px",
171
- display: "flex",
172
- alignItems: "center",
173
- justifyContent: "center",
174
- flexDirection: "column"
175
- },
176
- children: [
177
- /* @__PURE__ */ jsxRuntime.jsx(
178
- material.Box,
179
- {
180
- sx: {
181
- display: !state.loading ? "block" : "none"
182
- },
183
- children: /* @__PURE__ */ jsxRuntime.jsx(
184
- material.Checkbox,
185
- {
186
- onChange: manager.start,
187
- checked: state.isHuman,
188
- inputProps: { "aria-label": "controlled" },
189
- sx: {
190
- "& .MuiSvgIcon-root": { fontSize: 32, position: "relative" },
191
- "& .PrivateSwitchBase-input": {
192
- width: "1.4em",
193
- height: "1.4em",
194
- top: "auto",
195
- left: "auto",
196
- opacity: "1",
197
- "&::before": {
198
- content: '""',
199
- position: "absolute",
200
- height: "100%",
201
- width: "100%"
202
- }
203
- }
204
- }
205
- }
206
- )
207
- }
208
- ),
209
- /* @__PURE__ */ jsxRuntime.jsx(
210
- material.Box,
211
- {
212
- sx: {
213
- display: state.loading ? "block" : "none"
214
- },
215
- children: /* @__PURE__ */ jsxRuntime.jsx(material.Box, { pt: "5px", children: /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: "24px", disableShrink: true }) })
216
- }
217
- )
218
- ]
219
- }
220
- ),
221
- /* @__PURE__ */ jsxRuntime.jsx(material.Box, { p: 1, children: /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { color: theme$1.palette.primary.contrastText, children: "I am a human" }) })
222
- ]
223
- }
224
- ) }),
225
- /* @__PURE__ */ jsxRuntime.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntime.jsx(material.Link, { href: "https://prosopo.io", target: "_blank", children: /* @__PURE__ */ jsxRuntime.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
226
- /* @__PURE__ */ jsxRuntime.jsx(
227
- "div",
228
- {
229
- css: logoStyle,
230
- dangerouslySetInnerHTML: {
231
- __html: props.config.theme === "light" ? logoWithoutTextBlack : logoWithoutTextWhite
232
- }
233
- }
234
- ),
235
- /* @__PURE__ */ jsxRuntime.jsx(
236
- "div",
237
- {
238
- css: logoStyle,
239
- dangerouslySetInnerHTML: {
240
- __html: props.config.theme === "light" ? logoWithTextBlack : logoWithTextWhite
241
- }
242
- }
243
- )
244
- ] }) }) }) })
245
- ]
246
- }
247
- )
248
- ] })
249
- ] }) });
250
- };
251
- const logoWithTextBlack = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2062.63 468.67" height="35px" width="140px"><defs><style>.cls-1{fill:#1d1d1b;}</style></defs><title>Prosopo Logo Black</title><path class="cls-1" d="M335.55,1825.19A147.75,147.75,0,0,1,483.3,1972.94h50.5c0-109.49-88.76-198.25-198.25-198.25v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M269.36,1891.39A147.74,147.74,0,0,1,417.1,2039.13h50.5c0-109.49-88.75-198.24-198.24-198.24v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M414,2157.17a147.75,147.75,0,0,1-147.74-147.74h-50.5c0,109.49,88.75,198.24,198.24,198.24v-50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M480.17,2091a147.74,147.74,0,0,1-147.74-147.75H281.92c0,109.49,88.76,198.25,198.25,198.25V2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M862.8,2017.5q-27.39,22.86-78.25,22.86h-65v112.19H654.82v-312h134q46.32,0,73.86,24.13t27.55,74.72Q890.2,1994.64,862.8,2017.5ZM813,1905.1q-12.37-10.36-34.7-10.38H719.59v91.87h58.75q22.32,0,34.7-11.22t12.39-35.56Q825.43,1915.48,813,1905.1Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1045.69,1916.42c.78.08,2.51.19,5.19.32v61.81c-3.81-.42-7.2-.71-10.16-.85s-5.36-.21-7.2-.21q-36.4,0-48.89,23.71-7,13.33-7,41.06v110.29H916.89V1921.82h57.58V1962q14-23.07,24.34-31.54,16.94-14.18,44-14.18C1044,1916.32,1044.92,1916.35,1045.69,1916.42Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1265.64,2124.32q-29.21,36.06-88.69,36.06t-88.69-36.06Q1059,2088.26,1059,2037.5q0-49.9,29.22-86.5t88.69-36.59q59.47,0,88.69,36.59t29.21,86.5Q1294.85,2088.26,1265.64,2124.32ZM1217.38,2091q14.17-18.81,14.18-53.48t-14.18-53.37q-14.19-18.7-40.64-18.71T1136,1984.13q-14.29,18.72-14.29,53.37T1136,2091q14.28,18.81,40.75,18.81T1217.38,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1371.81,2078.88q1.92,16.1,8.29,22.87,11.28,12.06,41.7,12.06,17.85,0,28.39-5.29t10.53-15.88a17.12,17.12,0,0,0-8.48-15.45q-8.49-5.28-63.12-18.2-39.33-9.73-55.41-24.35-16.08-14.39-16.09-41.49,0-32,25.14-54.93t70.75-23q43.26,0,70.53,17.25t31.29,59.59H1455q-1.27-11.64-6.58-18.42-10-12.27-34-12.28-19.74,0-28.13,6.14t-8.38,14.4c0,6.91,3,11.93,8.92,15q8.89,4.89,63,16.73,36,8.46,54.05,25.61,17.77,17.35,17.78,43.39,0,34.3-25.56,56t-79,21.7q-54.51,0-80.49-23t-26-58.53Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1745.54,2124.32q-29.22,36.06-88.7,36.06t-88.69-36.06q-29.2-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.7,36.59t29.21,86.5Q1774.75,2088.26,1745.54,2124.32ZM1697.27,2091q14.19-18.81,14.19-53.48t-14.19-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.28,53.37t14.28,53.48q14.3,18.81,40.75,18.81T1697.27,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1992.75,1946.59q28.24,29.84,28.23,87.63,0,61-27.58,92.93t-71.06,32q-27.69,0-46-13.76-10-7.62-19.6-22.23v120.24H1797V1921.82h57.79v34.08q9.79-15,20.88-23.71,20.23-15.43,48.15-15.45Q1964.53,1916.74,1992.75,1946.59Zm-46.3,43.39q-12.3-20.52-39.88-20.53-33.15,0-45.54,31.11-6.43,16.51-6.42,41.92,0,40.21,21.58,56.51,12.82,9.53,30.37,9.53,25.45,0,38.83-19.48t13.36-51.86Q1958.75,2010.51,1946.45,1990Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M2249.14,2124.32q-29.2,36.06-88.69,36.06t-88.69-36.06q-29.22-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.69,36.59t29.22,86.5Q2278.36,2088.26,2249.14,2124.32ZM2200.88,2091q14.19-18.81,14.18-53.48t-14.18-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.29,53.37t14.29,53.48q14.3,18.81,40.75,18.81T2200.88,2091Z" transform="translate(-215.73 -1774.69)"/></svg>';
252
- const logoWithTextWhite = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2062.63 468.67" height="35px" width="140px"><defs><style>.cls-1{fill:#fff;}</style></defs><title>Prosopo Logo Black</title><path class="cls-1" d="M335.55,1825.19A147.75,147.75,0,0,1,483.3,1972.94h50.5c0-109.49-88.76-198.25-198.25-198.25v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M269.36,1891.39A147.74,147.74,0,0,1,417.1,2039.13h50.5c0-109.49-88.75-198.24-198.24-198.24v50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M414,2157.17a147.75,147.75,0,0,1-147.74-147.74h-50.5c0,109.49,88.75,198.24,198.24,198.24v-50.5Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M480.17,2091a147.74,147.74,0,0,1-147.74-147.75H281.92c0,109.49,88.76,198.25,198.25,198.25V2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M862.8,2017.5q-27.39,22.86-78.25,22.86h-65v112.19H654.82v-312h134q46.32,0,73.86,24.13t27.55,74.72Q890.2,1994.64,862.8,2017.5ZM813,1905.1q-12.37-10.36-34.7-10.38H719.59v91.87h58.75q22.32,0,34.7-11.22t12.39-35.56Q825.43,1915.48,813,1905.1Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1045.69,1916.42c.78.08,2.51.19,5.19.32v61.81c-3.81-.42-7.2-.71-10.16-.85s-5.36-.21-7.2-.21q-36.4,0-48.89,23.71-7,13.33-7,41.06v110.29H916.89V1921.82h57.58V1962q14-23.07,24.34-31.54,16.94-14.18,44-14.18C1044,1916.32,1044.92,1916.35,1045.69,1916.42Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1265.64,2124.32q-29.21,36.06-88.69,36.06t-88.69-36.06Q1059,2088.26,1059,2037.5q0-49.9,29.22-86.5t88.69-36.59q59.47,0,88.69,36.59t29.21,86.5Q1294.85,2088.26,1265.64,2124.32ZM1217.38,2091q14.17-18.81,14.18-53.48t-14.18-53.37q-14.19-18.7-40.64-18.71T1136,1984.13q-14.29,18.72-14.29,53.37T1136,2091q14.28,18.81,40.75,18.81T1217.38,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1371.81,2078.88q1.92,16.1,8.29,22.87,11.28,12.06,41.7,12.06,17.85,0,28.39-5.29t10.53-15.88a17.12,17.12,0,0,0-8.48-15.45q-8.49-5.28-63.12-18.2-39.33-9.73-55.41-24.35-16.08-14.39-16.09-41.49,0-32,25.14-54.93t70.75-23q43.26,0,70.53,17.25t31.29,59.59H1455q-1.27-11.64-6.58-18.42-10-12.27-34-12.28-19.74,0-28.13,6.14t-8.38,14.4c0,6.91,3,11.93,8.92,15q8.89,4.89,63,16.73,36,8.46,54.05,25.61,17.77,17.35,17.78,43.39,0,34.3-25.56,56t-79,21.7q-54.51,0-80.49-23t-26-58.53Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1745.54,2124.32q-29.22,36.06-88.7,36.06t-88.69-36.06q-29.2-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.7,36.59t29.21,86.5Q1774.75,2088.26,1745.54,2124.32ZM1697.27,2091q14.19-18.81,14.19-53.48t-14.19-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.28,53.37t14.28,53.48q14.3,18.81,40.75,18.81T1697.27,2091Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M1992.75,1946.59q28.24,29.84,28.23,87.63,0,61-27.58,92.93t-71.06,32q-27.69,0-46-13.76-10-7.62-19.6-22.23v120.24H1797V1921.82h57.79v34.08q9.79-15,20.88-23.71,20.23-15.43,48.15-15.45Q1964.53,1916.74,1992.75,1946.59Zm-46.3,43.39q-12.3-20.52-39.88-20.53-33.15,0-45.54,31.11-6.43,16.51-6.42,41.92,0,40.21,21.58,56.51,12.82,9.53,30.37,9.53,25.45,0,38.83-19.48t13.36-51.86Q1958.75,2010.51,1946.45,1990Z" transform="translate(-215.73 -1774.69)"/><path class="cls-1" d="M2249.14,2124.32q-29.2,36.06-88.69,36.06t-88.69-36.06q-29.22-36.06-29.21-86.82,0-49.9,29.21-86.5t88.69-36.59q59.49,0,88.69,36.59t29.22,86.5Q2278.36,2088.26,2249.14,2124.32ZM2200.88,2091q14.19-18.81,14.18-53.48t-14.18-53.37q-14.18-18.7-40.64-18.71t-40.75,18.71q-14.28,18.72-14.29,53.37t14.29,53.48q14.3,18.81,40.75,18.81T2200.88,2091Z" transform="translate(-215.73 -1774.69)"/></svg>';
253
- const logoWithoutTextWhite = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 260 348" height="35px"><path id="Vector" d="M95.7053 40.2707C127.005 40.2707 157.022 52.6841 179.154 74.78C201.286 96.8759 213.719 126.844 213.719 158.093H254.056C254.056 70.7808 183.16 -4.57764e-05 95.7053 -4.57764e-05V40.2707Z" fill="#fff"/><path id="Vector_2" d="M42.8365 93.0614C58.3333 93.0614 73.6784 96.1087 87.9955 102.029C102.313 107.95 115.322 116.628 126.279 127.568C137.237 138.508 145.93 151.496 151.86 165.79C157.79 180.084 160.843 195.404 160.843 210.875H201.179C201.179 123.564 130.291 52.7906 42.8365 52.7906V93.0614Z" fill="#fff"/><path id="Vector_3" d="M158.367 305.005C127.07 305.003 97.056 292.59 74.926 270.496C52.796 248.402 40.3626 218.437 40.3604 187.191H0.0239563C0.0239563 274.503 70.9123 345.276 158.367 345.276V305.005Z" fill="#fff"/><path id="Vector_4" d="M211.219 252.239C195.722 252.239 180.376 249.191 166.059 243.27C151.741 237.349 138.732 228.67 127.774 217.729C116.816 206.788 108.123 193.799 102.194 179.505C96.2637 165.21 93.2121 149.889 93.2132 134.417H52.8687C52.8687 221.729 123.765 292.509 211.219 292.509V252.239Z" fill="#fff"/></g><defs><clipPath id="clip0_1_2"><rect width="254" height="345" fill="white"/></clipPath></defs></svg>';
254
- const logoWithoutTextBlack = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 260 348" height="35px"><path id="Vector" d="M95.7053 40.2707C127.005 40.2707 157.022 52.6841 179.154 74.78C201.286 96.8759 213.719 126.844 213.719 158.093H254.056C254.056 70.7808 183.16 -4.57764e-05 95.7053 -4.57764e-05V40.2707Z" fill="#000000"/><path id="Vector_2" d="M42.8365 93.0614C58.3333 93.0614 73.6784 96.1087 87.9955 102.029C102.313 107.95 115.322 116.628 126.279 127.568C137.237 138.508 145.93 151.496 151.86 165.79C157.79 180.084 160.843 195.404 160.843 210.875H201.179C201.179 123.564 130.291 52.7906 42.8365 52.7906V93.0614Z" fill="#000000"/><path id="Vector_3" d="M158.367 305.005C127.07 305.003 97.056 292.59 74.926 270.496C52.796 248.402 40.3626 218.437 40.3604 187.191H0.0239563C0.0239563 274.503 70.9123 345.276 158.367 345.276V305.005Z" fill="#000000"/><path id="Vector_4" d="M211.219 252.239C195.722 252.239 180.376 249.191 166.059 243.27C151.741 237.349 138.732 228.67 127.774 217.729C116.816 206.788 108.123 193.799 102.194 179.505C96.2637 165.21 93.2121 149.889 93.2132 134.417H52.8687C52.8687 221.729 123.765 292.509 211.219 292.509V252.239Z" fill="#000000"/></g><defs><clipPath id="clip0_1_2"><rect width="254" height="345" fill="white"/></clipPath></defs></svg>';
255
- exports.Procaptcha = Procaptcha;
3
+ const CaptchaPlaceholder = require("./CaptchaPlaceholder.cjs");
4
+ const React = require("react");
5
+ const _interopNamespaceDefaultOnly = (e) => Object.freeze(Object.defineProperty({ __proto__: null, default: e }, Symbol.toStringTag, { value: "Module" }));
6
+ const ProcaptchaWidget = React.lazy(async () => Promise.resolve().then(() => /* @__PURE__ */ _interopNamespaceDefaultOnly(require("./ProcaptchaWidget.cjs"))));
7
+ const Procaptcha = (props) => /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(CaptchaPlaceholder.ProcaptchaPlaceholder, { darkMode: props.config.theme }), children: /* @__PURE__ */ jsxRuntime.jsx(ProcaptchaWidget, { config: props.config, callbacks: props.callbacks }) });
8
+ module.exports = Procaptcha;