@blocklet/pages-kit-inner-components 0.4.132 → 0.4.134

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.
Files changed (38) hide show
  1. package/package.json +24 -24
  2. package/lib/.nojekyll +0 -0
  3. package/lib/cjs/add-component.js +0 -398
  4. package/lib/cjs/chunks/array-D-LDfLBW.js +0 -441
  5. package/lib/cjs/chunks/config-string-BMi-8GXv.js +0 -1
  6. package/lib/cjs/chunks/draft-data-C-aBMmuZ.js +0 -1
  7. package/lib/cjs/chunks/home-BWklFLCu.js +0 -38
  8. package/lib/cjs/chunks/publish-button-kozBI0aZ.js +0 -1
  9. package/lib/cjs/chunks/site-state-C8qhC6pw.js +0 -57
  10. package/lib/cjs/chunks/state-DPSTH2vo.js +0 -1
  11. package/lib/cjs/chunks-map.json +0 -1
  12. package/lib/cjs/components.js +0 -1
  13. package/lib/cjs/home.js +0 -1
  14. package/lib/cjs/locales.js +0 -1
  15. package/lib/cjs/project-html.js +0 -23
  16. package/lib/cjs/resources.js +0 -1
  17. package/lib/cjs/setting.js +0 -11
  18. package/lib/cjs/site-state.js +0 -1
  19. package/lib/cjs/theme.js +0 -239
  20. package/lib/cjs/uploader.js +0 -1
  21. package/lib/es/add-component.js +0 -3017
  22. package/lib/es/chunks/array-BfSgATE1.js +0 -1971
  23. package/lib/es/chunks/config-string-BObBTkZS.js +0 -88
  24. package/lib/es/chunks/draft-data-PScFOAJJ.js +0 -13
  25. package/lib/es/chunks/home-qQe9H8C9.js +0 -527
  26. package/lib/es/chunks/publish-button-DMQRXAVS.js +0 -455
  27. package/lib/es/chunks/site-state-qF6lXjrQ.js +0 -1833
  28. package/lib/es/chunks/state-DGyH1TW3.js +0 -456
  29. package/lib/es/chunks-map.json +0 -1
  30. package/lib/es/components.js +0 -22
  31. package/lib/es/home.js +0 -34
  32. package/lib/es/locales.js +0 -972
  33. package/lib/es/project-html.js +0 -220
  34. package/lib/es/resources.js +0 -168
  35. package/lib/es/setting.js +0 -1728
  36. package/lib/es/site-state.js +0 -47
  37. package/lib/es/theme.js +0 -769
  38. package/lib/es/uploader.js +0 -8
@@ -1,1971 +0,0 @@
1
- import { jsx as i, jsxs as w, Fragment as J } from "react/jsx-runtime";
2
- import "@mui/icons-material";
3
- import { Box as b, styled as Tt, Typography as C, Container as Et, Stack as Ot, useTheme as At, createTheme as Ft, ThemeProvider as Ut, Card as Vt, CircularProgress as Dt, Grid as st, CardMedia as Ht, CardContent as Yt } from "@mui/material";
4
- import Jt, { createContext as xt, useMemo as W, useCallback as M, useContext as bt, Fragment as Mt, isValidElement as yt, useState as K, useEffect as E, useRef as tt } from "react";
5
- import G from "lodash/keyBy";
6
- import { e as j, g as N, E as Kt, h as et, l as ot } from "./state-DGyH1TW3.js";
7
- import { AIForm as lt, AIFormResult as ct } from "@blocklet/ai-runtime/components";
8
- import { deepmerge as Gt } from "@mui/utils";
9
- import nt from "lodash/pick";
10
- import { ErrorBoundary as Xt } from "react-error-boundary";
11
- import qt from "@blocklet/pages-kit/builtin/markdown/markdown-renderer";
12
- import { useColorConvert as wt } from "@blocklet/pages-kit/contexts/color";
13
- import { cx as g, css as q } from "@emotion/css";
14
- import { materialDark as Qt } from "react-syntax-highlighter/dist/esm/styles/prism";
15
- import { useTheme as vt, styled as _ } from "@arcblock/ux/lib/Theme";
16
- import Zt from "@arcblock/react-hooks/lib/useBrowser";
17
- import dt from "@arcblock/ux/lib/Colors";
18
- import { ResponsiveImage as kt, CustomComponentRenderer as te } from "@blocklet/pages-kit/components";
19
- import { isGradient as ee, isColorString as oe } from "@blocklet/pages-kit/utils/style";
20
- import _t from "@mui/material/useMediaQuery";
21
- import S from "lodash/omit";
22
- import { Icon as $t } from "@iconify-icon/react";
23
- import ne from "@arcblock/ux/lib/Screenshot";
24
- import { Link as re, NavLink as ie, useNavigate as ae } from "react-router-dom";
25
- import se from "@arcblock/ux/lib/Button";
26
- import Q from "is-uri";
27
- import { join as H } from "pathe";
28
- import { withoutTrailingSlash as X, isRelative as le, parseURL as ce } from "ufo";
29
- import { useMessage as de } from "@blocklet/embed/message";
30
- import { useLatest as me } from "ahooks";
31
- import pe from "lodash/isEqual";
32
- import { EmbedIframe as ue } from "@blocklet/embed/react";
33
- import { TwitterTimelineEmbed as he } from "react-twitter-embed";
34
- import { useUpdate as fe, useMount as ge } from "react-use";
35
- const Nt = "{{CUSTOM_VALUE}}", xe = [
36
- {
37
- title: "None",
38
- value: "none",
39
- sx: { py: 0 }
40
- },
41
- {
42
- title: "Small",
43
- value: "small",
44
- sx: { py: { xs: 2.5, md: 4, lg: 4, xl: 6 } }
45
- },
46
- {
47
- title: "Normal",
48
- value: "normal",
49
- sx: { py: { xs: 5, md: 7.5, lg: 10, xl: 12.5 } }
50
- },
51
- {
52
- title: "Large",
53
- value: "large",
54
- sx: { py: { xs: 7.5, md: 10, lg: 12.5, xl: 15 } }
55
- }
56
- ], be = [
57
- {
58
- title: "None",
59
- value: "none",
60
- sx: { py: 0 }
61
- },
62
- {
63
- title: "Small",
64
- value: "small",
65
- sx: { py: { xs: 2.5, md: 4, lg: 4, xl: 6 } }
66
- },
67
- {
68
- title: "Normal",
69
- value: "normal",
70
- sx: { py: { xs: 5, md: 7, lg: 7, xl: 9 } }
71
- },
72
- {
73
- title: "Large",
74
- value: "large",
75
- sx: { py: { xs: 6, md: 9, lg: 9, xl: 11 } }
76
- }
77
- ], ye = [
78
- {
79
- title: "None",
80
- value: "none",
81
- sx: { px: 0 }
82
- },
83
- {
84
- title: "Small",
85
- value: "small",
86
- sx: { px: { xs: 2.5, md: 4, lg: 4, xl: 6 } }
87
- },
88
- {
89
- title: "Normal",
90
- value: "normal",
91
- sx: { px: { xs: 5, md: 7.5, lg: 10, xl: 12.5 } }
92
- },
93
- {
94
- title: "Large",
95
- value: "large",
96
- sx: { px: { xs: 7.5, md: 10, lg: 12.5, xl: 15 } }
97
- }
98
- ], Y = (t, e, r) => {
99
- const n = t.breakpoints.values[r];
100
- return `${e}${n ? ` (${n}px)` : ""}`;
101
- }, we = [
102
- {
103
- title: "100%",
104
- value: "full",
105
- sx: { maxWidth: "100%" }
106
- },
107
- {
108
- title: (t) => Y(t, "Small", "sm"),
109
- value: "sm",
110
- sx: {
111
- maxWidth: (t) => t.breakpoints.values.sm,
112
- width: "100%",
113
- mx: "auto"
114
- }
115
- },
116
- {
117
- title: (t) => Y(t, "Normal", "md"),
118
- value: "md",
119
- sx: { maxWidth: (t) => t.breakpoints.values.md, width: "100%", mx: "auto" }
120
- },
121
- {
122
- title: (t) => Y(t, "Large", "lg"),
123
- value: "lg",
124
- sx: { maxWidth: (t) => t.breakpoints.values.lg, width: "100%", mx: "auto" }
125
- },
126
- {
127
- title: (t) => Y(t, "Extra Large", "xl"),
128
- value: "xl",
129
- sx: { maxWidth: (t) => t.breakpoints.values.xl, width: "100%", mx: "auto" }
130
- },
131
- {
132
- title: "Custom",
133
- value: "custom",
134
- sx: {
135
- maxWidth: Nt,
136
- width: "100%",
137
- mx: "auto"
138
- }
139
- }
140
- ], ve = G(xe, "value"), ke = G(be, "value"), _e = G(ye, "value"), $e = G(we, "value"), Ne = /* @__PURE__ */ new Map([
141
- ["baseSectionPaddingY", ve],
142
- ["maxWidth", $e],
143
- ["paddingY", ke],
144
- ["paddingX", _e]
145
- ]);
146
- function St(t) {
147
- var l;
148
- const { type: e, value: r, format: n = "sx", defaultValue: o = null } = t, a = Ne.get(e);
149
- if (!a)
150
- return o;
151
- const d = r.startsWith("custom:"), s = d ? "custom" : r;
152
- if (a != null && a[s] && ((l = a == null ? void 0 : a[s]) != null && l[n])) {
153
- const c = a[s][n];
154
- if (d) {
155
- const m = r.replace("custom:", "");
156
- try {
157
- return JSON.parse(JSON.stringify(c || {}).replaceAll(Nt, m));
158
- } catch {
159
- }
160
- }
161
- return c;
162
- }
163
- return o;
164
- }
165
- const Ct = xt({
166
- page: null,
167
- getPageMeta: () => ({}),
168
- getPageMetaStyle: () => ({})
169
- });
170
- function Se() {
171
- return bt(Ct);
172
- }
173
- function cn({
174
- page: t,
175
- children: e,
176
- defaultLocale: r = "en",
177
- currentLocale: n
178
- }) {
179
- const o = W(() => t ? JSON.parse(JSON.stringify(t)) : null, [JSON.stringify(t)]), a = M(() => {
180
- var c;
181
- if (!o) return {};
182
- const l = n || r;
183
- return ((c = o.locales) == null ? void 0 : c[l]) ?? {};
184
- }, [o, r, n]), d = M(
185
- (l = "sx") => {
186
- const c = a();
187
- return !c || !c.style ? {} : Object.entries(c.style || {}).reduce((p, [h, u]) => {
188
- if (!u) return p;
189
- const f = `${h}Custom`;
190
- c.style[f];
191
- const y = St({
192
- type: h,
193
- value: u,
194
- format: l
195
- });
196
- return y ? { ...p, ...y } : p;
197
- }, {});
198
- },
199
- [a]
200
- ), s = W(
201
- () => ({
202
- page: o,
203
- getPageMeta: a,
204
- getPageMetaStyle: d
205
- }),
206
- [o, a, d]
207
- );
208
- return /* @__PURE__ */ i(Ct.Provider, { value: s, children: e });
209
- }
210
- function z({ actions: t, center: e, className: r, align: n }) {
211
- return t && (t != null && t.length) ? /* @__PURE__ */ i(
212
- b,
213
- {
214
- className: g(
215
- "flex gap-4 flex-wrap",
216
- "lg:flex-row lg:gap-8",
217
- (e || n === "center") && "justify-center",
218
- !e && n === "right" && "justify-end",
219
- !e && n === "left" && "justify-start",
220
- r
221
- ),
222
- sx: { alignItems: "center" },
223
- children: t
224
- }
225
- ) : null;
226
- }
227
- const Ce = "section", Pe = Tt(b)`
228
- overflow: hidden;
229
-
230
- .section__title {
231
- margin-top: 0;
232
- font-weight: 700;
233
- }
234
- .section__title_non_big {
235
- font-size: 32px;
236
- @media (max-width: 600px) {
237
- font-size: 24px;
238
- }
239
- }
240
- &.base-info .section__tag {
241
- margin-top: 0;
242
- margin-bottom: 2vw;
243
- background-color: ${({ theme: t }) => t.palette.primary.main};
244
- white-space: nowrap;
245
- max-width: 100%;
246
- display: inline-block;
247
- padding: 0 10px;
248
- justify-content: flex-start;
249
- overflow: hidden;
250
- text-overflow: ellipsis;
251
- font-size: 12px;
252
- color: #fff;
253
- border-radius: 4px;
254
- line-height: 20px;
255
- }
256
- .section__title {
257
- color: ${({ theme: t }) => t.palette.text.primary};
258
- a {
259
- color: ${({ theme: t }) => t.palette.primary.main};
260
- }
261
- p {
262
- margin-top: 0;
263
- margin-bottom: 0;
264
- }
265
- }
266
- .section__description {
267
- color: ${({ theme: t }) => t.palette.text.primary};
268
- margin-bottom: 4vw;
269
- margin-top: 0;
270
- a {
271
- color: ${({ theme: t }) => t.palette.primary.main};
272
- }
273
- p {
274
- margin-top: 0;
275
- margin-bottom: 0.5rem;
276
- }
277
- }
278
- @media (min-width: ${({ theme: t }) => t.breakpoints.values[Ce]}px) {
279
- .section__tag {
280
- margin-bottom: 32px;
281
- }
282
- .section__title {
283
- margin-bottom: 32px;
284
- }
285
- .section__description {
286
- margin-bottom: 40px;
287
- }
288
- }
289
- `;
290
- function O({
291
- title: t,
292
- description: e,
293
- descriptionMarkdown: r,
294
- actions: n,
295
- className: o = "",
296
- classes: a = {},
297
- prepend: d,
298
- append: s,
299
- level: l = 2,
300
- tag: c,
301
- badge: m,
302
- center: p,
303
- logo: h,
304
- titleAppearance: u,
305
- descriptionAppearance: f,
306
- ...y
307
- }) {
308
- const x = wt();
309
- if (!t && !e && !n && !m && !c && !d && !s && !h) return null;
310
- const k = Math.max(Math.min(5, l + 1), 1), v = {
311
- 1: "xl:!text-3xl lg:!text-2xl md:!text-xl",
312
- 2: "xl:!text-2xl lg:!text-xl md:!text-lg",
313
- 3: "xl:!text-2xl lg:!text-xl md:!text-lg",
314
- 4: "xl:!text-xl lg:!text-lg md:!text-md",
315
- 5: "xl:!text-lg md:!text-md sm:!text-sm",
316
- 6: "!text-sm"
317
- }, I = l === 0 ? "big" : `h${k}`, R = l === 0;
318
- return /* @__PURE__ */ w(Pe, { className: g("base-info", "lg:text-left", p && "!text-center", o), ...y, children: [
319
- d && /* @__PURE__ */ i("div", { children: d }),
320
- (c || m) && /* @__PURE__ */ i("div", { className: g("section__tag", (a == null ? void 0 : a.tag) || (a == null ? void 0 : a.badge)), children: c || m }),
321
- h && /* @__PURE__ */ i("img", { className: "w-[120px] m-auto mb-8", src: h, alt: "info", loading: "lazy" }),
322
- t && /* @__PURE__ */ i(
323
- C,
324
- {
325
- sx: {
326
- whiteSpace: "pre-wrap",
327
- mb: e ? "2vw" : 0,
328
- ...(u == null ? void 0 : u.color) && { color: `${x(u.color)} !important` }
329
- },
330
- className: g(
331
- "section__title",
332
- "text-gray-800",
333
- "dark:text-gray-50",
334
- a.title,
335
- "page-kit-section__title",
336
- R ? "" : "section__title_non_big"
337
- ),
338
- component: `h${Math.max(l, 1)}`,
339
- variant: I,
340
- children: t
341
- }
342
- ),
343
- e && (r ? /* @__PURE__ */ i(
344
- b,
345
- {
346
- sx: {
347
- ...(f == null ? void 0 : f.color) && { color: `${x(f.color)} !important` }
348
- },
349
- className: g(
350
- "section__description",
351
- "text-gray-800",
352
- "dark:text-gray-100",
353
- v[k],
354
- a.description,
355
- "page-kit-section__description"
356
- ),
357
- children: /* @__PURE__ */ i(qt, { codeOptions: { showActionButton: !1, theme: Qt }, children: e })
358
- }
359
- ) : /* @__PURE__ */ i(
360
- C,
361
- {
362
- sx: {
363
- whiteSpace: "pre-wrap",
364
- ...(f == null ? void 0 : f.color) && { color: `${x(f.color)} !important` }
365
- },
366
- className: g(
367
- "section__description",
368
- "text-gray-800",
369
- "dark:text-gray-100",
370
- v[k],
371
- a.description,
372
- "page-kit-section__description"
373
- ),
374
- component: "div",
375
- variant: "body1",
376
- gutterBottom: !0,
377
- children: e
378
- }
379
- )),
380
- /* @__PURE__ */ i(z, { actions: n, center: p, className: "mt-8" }),
381
- s && /* @__PURE__ */ i("div", { children: s })
382
- ] });
383
- }
384
- const A = [
385
- "actions",
386
- "append",
387
- "badge",
388
- "tag",
389
- "center",
390
- "description",
391
- "descriptionMarkdown",
392
- "level",
393
- "logo",
394
- "prepend",
395
- "title",
396
- "titleAppearance",
397
- "descriptionAppearance"
398
- ];
399
- function Pt(t) {
400
- if (t.type === Mt) {
401
- const r = (t.props.children || []).filter((n) => yt(n));
402
- return r.length === 1 ? Pt(r[0]) : r.length > 1;
403
- }
404
- return Array.isArray(t);
405
- }
406
- const P = "&>*";
407
- function rt({ children: t, col: e, gap: r, className: n, align: o, sx: a, type: d, ...s } = {
408
- children: null,
409
- className: "",
410
- col: 3,
411
- gap: void 0,
412
- sx: {},
413
- align: "center",
414
- type: "default"
415
- }) {
416
- const l = vt(), c = Number(Math.floor(100 / e * 100) / 100), m = {
417
- center: "justify-center items-center",
418
- left: "justify-start items-center",
419
- right: "justify-end items-center",
420
- top: "justify-center items-start",
421
- bottom: "justify-center items-end",
422
- "top-left": "justify-start items-start",
423
- "top-right": "justify-end items-start",
424
- "bottom-left": "justify-start items-end",
425
- "bottom-right": "justify-end items-end"
426
- }, p = m[o] || m.center;
427
- let u = r ?? ({
428
- 2: 6,
429
- 3: 4,
430
- 4: 4,
431
- 5: 3,
432
- 6: 3
433
- }[e] || 0);
434
- Pt(t) || (u = 0);
435
- const y = (e - 1) * u / e;
436
- let x = { ...a, gap: `${u}rem` };
437
- const k = { [P]: { width: "100%" } }, v = {}, I = {}, R = {};
438
- switch (k.gap = "1rem", v.gap = `${u / 2}rem`, e) {
439
- case 3:
440
- case 4:
441
- v[P] = {
442
- width: `calc(50% - ${u / 2}rem)`
443
- };
444
- break;
445
- case 5:
446
- case 6:
447
- k[P] = {
448
- width: `calc(50% - ${u / 2 / 2}rem)`
449
- }, v[P] = {
450
- width: `calc(50% - ${u / 2 / 2}rem)`
451
- }, I[P] = {
452
- width: `calc(33.33% - ${u * 2 / 3}rem)`
453
- };
454
- break;
455
- }
456
- return x[P] = { width: `calc(${c}% - ${y}rem)` }, x[`@media (max-width: ${l.breakpoints.values.xl}px)`] = R, x[`@media (max-width: ${l.breakpoints.values.lg}px)`] = I, x[`@media (max-width: ${l.breakpoints.values.md}px)`] = v, x[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k, d === "wall" && (x = { ...a, gap: `${u}rem` }, x[P] = { width: `calc(${c}% - ${y}rem)` }, k[P] = { width: `calc(45% - ${u / 2 / 2}rem)` }, x[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k), /* @__PURE__ */ i(b, { className: g("flex flex-wrap flex-row h-full", p, n), sx: x, ...s, children: t });
457
- }
458
- function Be() {
459
- const t = navigator.userAgent.toLowerCase();
460
- return t.includes("safari") && !t.includes("chrome");
461
- }
462
- function Ie(t = "") {
463
- if (t.startsWith("data:image/svg+xml,")) return !0;
464
- const e = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/, r = /^(\/|\.\/|\.\.\/)(?:[^/]+\/)*[^/]+$/;
465
- return e.test(t) || r.test(t);
466
- }
467
- function L(t) {
468
- return (t == null ? void 0 : t.endsWith(".mp4")) || (t == null ? void 0 : t.endsWith(".m4v")) || (t == null ? void 0 : t.endsWith(".webm"));
469
- }
470
- function We(t) {
471
- return t != null && t.endsWith(".mp4") || t != null && t.endsWith(".m4v") ? "video/mp4" : t != null && t.endsWith(".webm") ? "video/webm" : void 0;
472
- }
473
- function je(t) {
474
- let e = {};
475
- return typeof t == "string" ? ee(t) ? e.image = t : (e.image = N(t), oe(t) && (e.color = t, e.image = "")) : e = t, e;
476
- }
477
- function Re() {
478
- const [t, e] = K(Date.now());
479
- return E(() => {
480
- const r = () => {
481
- e(Date.now());
482
- };
483
- return document.addEventListener("visibilitychange", r), () => {
484
- document.removeEventListener("visibilitychange", r);
485
- };
486
- }, []), t;
487
- }
488
- function mt(t, e, r, n, o) {
489
- let a = null;
490
- const { color: d = "", image: s } = je(e);
491
- if (s && Ie(s)) {
492
- delete r.backgroundColor;
493
- const l = !(t.mobile.apple.device || Be()) && L(s), c = L(s) && n ? j(N(n), 1200, "quality") : "";
494
- l ? a = /* @__PURE__ */ i(
495
- b,
496
- {
497
- component: "video",
498
- className: "section-bg",
499
- width: "100%",
500
- autoPlay: !0,
501
- loop: !0,
502
- muted: !0,
503
- controls: !1,
504
- playsInline: !0,
505
- poster: c,
506
- src: L(s) ? s : j(s, 1200, "quality"),
507
- sx: {
508
- position: "absolute",
509
- zIndex: -9999,
510
- right: 0,
511
- left: 0,
512
- top: 0,
513
- width: "100%",
514
- height: "100%",
515
- objectFit: "cover"
516
- }
517
- },
518
- s
519
- ) : a = /* @__PURE__ */ i(
520
- kt,
521
- {
522
- src: L(s) && n ? c : s,
523
- sizesAttr: {
524
- sm: 600,
525
- md: 900,
526
- lg: 1200
527
- },
528
- className: "section-bg",
529
- alt: "",
530
- width: "100%",
531
- loading: "lazy",
532
- sx: {
533
- position: "absolute",
534
- zIndex: -9999,
535
- right: 0,
536
- left: 0,
537
- top: 0,
538
- width: "100%",
539
- height: "100%",
540
- objectFit: "cover"
541
- }
542
- },
543
- o || s
544
- );
545
- } else s ? r.backgroundImage = `${s} !important` : d && (r.backgroundColor = `${d} !important`);
546
- return a;
547
- }
548
- function ze({ autoWidth: t, children: e, ...r }) {
549
- return t ? /* @__PURE__ */ i(b, { display: "flex", ...r, children: e }) : /* @__PURE__ */ i(Et, { ...r, children: e });
550
- }
551
- function F({
552
- dark: t = !1,
553
- children: e,
554
- className: r,
555
- sx: n = {},
556
- boxed: o = { show: !1 },
557
- padding: a = "normal",
558
- boxProps: d,
559
- type: s,
560
- ...l
561
- }) {
562
- const c = { ...n }, m = _t((u) => u.breakpoints.down("md"));
563
- t && (c.color = dt.common.white, c.backgroundColor = `${dt.grey[900]} !important`), o.show && (c.display = "flex");
564
- const p = W(() => !Number(l.boxMaxWidth) || m ? {
565
- width: "100%"
566
- } : s === "wall" && l.boxMaxWidth ? {
567
- maxWidth: `${l.boxMaxWidth}px !important`,
568
- width: "100%"
569
- } : {
570
- width: "100%"
571
- }, [l.boxMaxWidth, m, s]), h = St({
572
- type: "baseSectionPaddingY",
573
- value: a || "normal",
574
- // section default is normal
575
- defaultValue: ""
576
- });
577
- return /* @__PURE__ */ i(
578
- Le,
579
- {
580
- component: "section",
581
- styles: { ...c, ...h },
582
- className: g("base-section", "px-2 md:px-5 lg:px-5 xl:px-10", r, {
583
- dark: t
584
- }),
585
- ...S(
586
- l,
587
- "hoverStyle",
588
- "boxMaxWidth",
589
- "embedUrl",
590
- "autoWidth",
591
- "paddingXY",
592
- "iframeHeight",
593
- "titleAppearance",
594
- "descriptionAppearance"
595
- ),
596
- children: /* @__PURE__ */ i(ze, { autoWidth: l == null ? void 0 : l.autoWidth, className: g("section-content h-full"), sx: p, children: o.show ? /* @__PURE__ */ i(Bt, { ...d, boxed: o, children: e }) : e })
597
- }
598
- );
599
- }
600
- function Bt({
601
- background: t = "",
602
- backgroundVideoPoster: e,
603
- children: r,
604
- sx: n = {},
605
- boxed: o = { show: !1 },
606
- className: a = "",
607
- styles: d = {},
608
- ...s
609
- }) {
610
- const l = { ...d, ...n }, c = wt();
611
- let m = null;
612
- const p = _t((f) => f.breakpoints.up("sm")), h = Zt(), u = Re();
613
- return t && (m = mt(
614
- h,
615
- typeof t == "string" ? c(t) : t,
616
- l,
617
- e,
618
- u
619
- )), o.show && (l.borderRadius = "10px", l.padding === void 0 && (l.padding = p ? "50px" : "20px"), o != null && o.border && (l.border = "1px solid #c0c0c0"), o != null && o.background && (m = mt(
620
- h,
621
- typeof (o == null ? void 0 : o.background) == "string" ? c(o == null ? void 0 : o.background) : o == null ? void 0 : o.background,
622
- l,
623
- o == null ? void 0 : o.backgroundVideoPoster,
624
- u
625
- ))), /* @__PURE__ */ w(
626
- b,
627
- {
628
- ...s,
629
- sx: {
630
- ...l,
631
- ...m ? { position: "relative", overflow: "hidden", zIndex: 0 } : {}
632
- },
633
- className: g(a, (o == null ? void 0 : o.boxShadow) && "shadow-xl"),
634
- children: [
635
- m,
636
- r
637
- ]
638
- }
639
- );
640
- }
641
- const Le = _(Bt)`
642
- &:nth-of-type(even) {
643
- background: #f8f8f8;
644
- }
645
-
646
- @media (max-width: 600px) {
647
- .section__title {
648
- font-size: 24px;
649
- }
650
-
651
- .base-info {
652
- > *:last-child {
653
- margin-bottom: 0;
654
- }
655
- }
656
- }
657
- `;
658
- function It({ icon: t, ...e }) {
659
- return /* @__PURE__ */ i($t, { icon: t, ...e, ref: null });
660
- }
661
- function $(t, e) {
662
- const r = nt(t, e), n = S(t, e);
663
- return [r, n];
664
- }
665
- const Wt = ["title", "description", "actions", "badge", "tag", "prepend", "append", "logo"];
666
- function Te({
667
- image: t,
668
- imageBorder: e,
669
- imageShadow: r,
670
- className: n,
671
- reverse: o = !1,
672
- fullSizeImage: a,
673
- ...d
674
- }) {
675
- const [s, l] = $(d, A), c = Object.keys(s).length > 0 && Object.values(nt(s, Wt)).filter(Boolean).length > 0 && /* @__PURE__ */ i(O, { ...s }), m = yt(t) ? t : /* @__PURE__ */ i(b, { component: "img", src: t, alt: "", className: "block" }), p = ["phone", "macbook"].includes(e), h = t && /* @__PURE__ */ i(
676
- b,
677
- {
678
- className: g(
679
- "section__image",
680
- "m-auto, leading-[1] text-center",
681
- r && "shadow-xl",
682
- s != null && s.center ? "flex justify-center items-center" : ""
683
- ),
684
- sx: {
685
- border: e === !0 ? "1px solid #c0c0c0" : void 0,
686
- borderRadius: 2,
687
- overflow: "hidden",
688
- // FIXME: Screenshot 组件无法设置最外层 div 的样式,只能通过父元素设置
689
- "> div": p ? { width: "100%", video: { borderRadius: "0 !important" } } : void 0
690
- },
691
- children: p ? (
692
- // @ts-ignore
693
- /* @__PURE__ */ i(ne, { type: e, sx: { width: "100%" }, children: m })
694
- ) : m
695
- }
696
- );
697
- return /* @__PURE__ */ i(
698
- F,
699
- {
700
- className: g(
701
- "section--block",
702
- n,
703
- a && !o && q`
704
- .section-bg {
705
- height: 80%;
706
- }
707
- `
708
- ),
709
- ...l,
710
- boxProps: a ? { sx: { padding: 0, overflow: "hidden" } } : void 0,
711
- children: /* @__PURE__ */ i(
712
- rt,
713
- {
714
- col: t ? 2 : 1,
715
- className: a ? q`
716
- display: flex;
717
- flex-direction: column;
718
-
719
- > .base-info,
720
- > .section__image {
721
- width: 100%;
722
-
723
- > img,
724
- > video {
725
- width: 100%;
726
- }
727
- }
728
- ` : void 0,
729
- children: o ? /* @__PURE__ */ w(J, { children: [
730
- h,
731
- c
732
- ] }) : /* @__PURE__ */ w(J, { children: [
733
- c,
734
- h
735
- ] })
736
- }
737
- )
738
- }
739
- );
740
- }
741
- const U = ["editing", "height", "locale", "dev", "sx"];
742
- function Ee(t) {
743
- const { className: e, ...r } = t;
744
- return /* @__PURE__ */ i(Oe, { ...r, className: g("BlockBase-root", e) });
745
- }
746
- const Oe = _(b)`
747
- position: relative;
748
- color: ${({ theme: t }) => t.palette.text.primary};
749
- `;
750
- function Ae({
751
- widget: t,
752
- reverse: e,
753
- projectId: r,
754
- assistantId: n,
755
- working: o,
756
- submitTitle: a,
757
- submitIcon: d,
758
- submitColor: s,
759
- placeholder: l,
760
- loadingIndicator: c,
761
- section: m,
762
- ...p
763
- }) {
764
- const [{ editing: h }, u] = $(p, U), [f, y] = $(u, A), x = r && n ? { projectId: r, gitRef: "main", assistantId: n, working: !0 } : void 0, k = {
765
- children: a,
766
- endIcon: d ? /* @__PURE__ */ i(It, { icon: d }) : void 0,
767
- sx: {
768
- background: s || void 0,
769
- ":hover": {
770
- background: s || void 0,
771
- opacity: 0.8
772
- }
773
- }
774
- }, v = [], I = l && /* @__PURE__ */ i(C, { variant: "caption", color: "text.disabled", children: l }), R = c && /* @__PURE__ */ i(C, { variant: "caption", color: "text.disabled", children: c });
775
- Object.keys(f).length > 0 && Object.values(nt(f, Wt)).filter(Boolean).length > 0 && v.push(/* @__PURE__ */ i(O, { ...f }, "base-info")), x && (t === "form" ? v.push(/* @__PURE__ */ i(lt, { identifier: x, SubmitProps: k }, "form")) : t === "result" ? v.push(
776
- /* @__PURE__ */ i(
777
- ct,
778
- {
779
- identifier: x,
780
- placeholder: I,
781
- loadingIndicator: R
782
- },
783
- "result"
784
- )
785
- ) : v.push(
786
- /* @__PURE__ */ w(Ot, { width: "100%", gap: 2, direction: "row", children: [
787
- /* @__PURE__ */ i(lt, { identifier: x, BoxProps: { flex: 1 }, SubmitProps: k }),
788
- /* @__PURE__ */ i(
789
- ct,
790
- {
791
- identifier: x,
792
- BoxProps: { flex: 1 },
793
- placeholder: I,
794
- loadingIndicator: R
795
- }
796
- )
797
- ] }, "form-result")
798
- )), e && v.reverse();
799
- const at = At(), Lt = W(
800
- () => Ft(Gt(at, { palette: { primary: s ? { main: s } : void 0 } })),
801
- [s, at]
802
- );
803
- return /* @__PURE__ */ i(Xt, { fallbackRender: Kt, children: /* @__PURE__ */ i(Ut, { theme: Lt, children: /* @__PURE__ */ i(F, { ...y, sx: h ? { pointerEvents: "none" } : {}, children: /* @__PURE__ */ i(rt, { col: v.length, children: v }) }) }) });
804
- }
805
- const jt = xt({
806
- pages: [],
807
- project: void 0
808
- }), { Provider: dn, Consumer: mn } = jt;
809
- function Rt() {
810
- return bt(jt);
811
- }
812
- function Fe({ icon: t, className: e = "", size: r = "1rem", ...n }) {
813
- return /* @__PURE__ */ i(Ue, { component: It, className: g("css-icon", e), size: r, ...n, icon: t });
814
- }
815
- const Ue = _(b)`
816
- &.css-icon {
817
- display: inline-block;
818
- width: ${({ size: t }) => t};
819
- height: ${({ size: t }) => t};
820
- }
821
- `;
822
- function Ve({ icon: t, className: e = "", size: r = "1rem", imageMeta: n, ...o }) {
823
- const a = j(N(t), 540), [d, s] = K(!1), l = vt();
824
- return d ? /* @__PURE__ */ i(Fe, { icon: "i-mdi:image", color: l.palette.grey[500], size: r, className: e, ...o }) : /* @__PURE__ */ i(De, { className: g("image-icon", e), size: r, ...o, children: /* @__PURE__ */ i(
825
- "img",
826
- {
827
- className: "image-icon__image",
828
- src: a,
829
- onError: () => s(!0),
830
- width: n == null ? void 0 : n.naturalWidth,
831
- height: n == null ? void 0 : n.naturalHeight,
832
- alt: (n == null ? void 0 : n.filename) || "card-icon",
833
- loading: "lazy"
834
- }
835
- ) });
836
- }
837
- const De = _(b)`
838
- display: inline-block;
839
- width: ${({ size: t }) => t};
840
- height: ${({ size: t }) => t};
841
- .image-icon__image {
842
- object-fit: contain;
843
- height: 100%;
844
- width: 100%;
845
- }
846
- `, it = (t) => typeof t == "string" && /^[\w-_]+:[\w-_]+$/.test(t);
847
- function Z({ icon: t, size: e = "1rem", imageMeta: r, ...n }) {
848
- const o = window.isNaN(e) ? e : `${e}px`;
849
- return it(t) ? /* @__PURE__ */ i($t, { icon: t }) : /* @__PURE__ */ i(He, { component: Ve, imageMeta: r, className: "base-icon", icon: t, size: o, ...n });
850
- }
851
- const He = _(b)`
852
- flex-shrink: 0;
853
- `;
854
- function T({ text: t, children: e, icon: r = "", endIcon: n, color: o = "primary", link: a = "", href: d = "", ...s }) {
855
- const l = r ? /* @__PURE__ */ i(Z, { icon: r }) : null, c = n ? /* @__PURE__ */ i(Z, { icon: n }) : null, m = a || d, p = { ...s };
856
- return m && (p.href = m, Q(m) && (p.target = p.target || "_blank")), /* @__PURE__ */ i(se, { startIcon: l, endIcon: c, color: o, ...p, children: t || e });
857
- }
858
- function zt({ editing: t, text: e, ...r }) {
859
- const { pages: n = [] } = Rt(), o = n.find((a) => a.id === (r.link || r.linkId));
860
- if (t)
861
- return /* @__PURE__ */ i(T, { ...S(r, ["link", "linkId"]), children: e });
862
- if (o) {
863
- const a = o.path || "/";
864
- return /* @__PURE__ */ i(re, { to: a, children: /* @__PURE__ */ i(T, { ...S(r, ["link", "linkId"]), children: e }) });
865
- }
866
- return /* @__PURE__ */ i(T, { ...S(r, "linkId"), children: e });
867
- }
868
- function B({ type: t = "", icon: e = "", size: r = "3rem", className: n = "", ...o }) {
869
- return /* @__PURE__ */ i(Z, { icon: e || t, size: r, className: g("content-icon", n), ...o });
870
- }
871
- B.propTypes = {};
872
- B.defaultProps = {
873
- type: "",
874
- icon: "",
875
- size: "3rem",
876
- color: "inherit",
877
- className: ""
878
- };
879
- function Ye({
880
- to: t,
881
- base: e,
882
- children: r,
883
- className: n,
884
- activeClassName: o = "active",
885
- target: a = "auto",
886
- autoExternalMark: d = !1,
887
- useRouterLink: s,
888
- ...l
889
- }) {
890
- const { pages: c = [], locale: m = "" } = {}, p = e ? H("/", e) : e || "";
891
- let h = a === "auto" ? "_self" : a, u = H(p, t);
892
- const f = d ? Q(u) : !1;
893
- if (e)
894
- return u = H(p, m, t), /* @__PURE__ */ i(
895
- "a",
896
- {
897
- className: `no-underline ${n}`,
898
- href: X(u),
899
- rel: "noreferrer noopener",
900
- target: h,
901
- ...l,
902
- children: r
903
- }
904
- );
905
- if (Q(t))
906
- a === "auto" && (h = "_blank"), u = t;
907
- else {
908
- le(u) && (u = H(window.location.pathname, u));
909
- const y = ce(`${window.location.origin}${u}`), x = c.some((k) => k.pathname === y.pathname);
910
- if (s || x)
911
- return /* @__PURE__ */ i(
912
- ie,
913
- {
914
- end: !0,
915
- to: X(u),
916
- className: ({ isActive: k }) => g(n, k ? o : ""),
917
- ...l,
918
- children: r
919
- }
920
- );
921
- }
922
- return /* @__PURE__ */ w(
923
- "a",
924
- {
925
- className: `no-underline ${n}`,
926
- href: X(u),
927
- rel: "noreferrer noopener",
928
- target: h,
929
- ...l,
930
- children: [
931
- r,
932
- f && /* @__PURE__ */ i(B, { icon: "i-mdi:arrow-top-right", size: "0.9em", className: "smart-link__mark", style: { marginLeft: 5 } })
933
- ]
934
- }
935
- );
936
- }
937
- function V({
938
- prepend: t,
939
- append: e,
940
- children: r,
941
- className: n = "",
942
- dark: o = !1,
943
- border: a = !0,
944
- ...d
945
- }) {
946
- let s = {};
947
- const { pages: l = [] } = Rt(), c = l.find((h) => h.id === d.link), m = !r || Jt.Children.toArray(r).every((h) => h === null);
948
- return d.link && (s = {
949
- component: Ye,
950
- to: (c == null ? void 0 : c.path) || d.link,
951
- useRouterLink: !0
952
- }), /* @__PURE__ */ w(
953
- Je,
954
- {
955
- className: g(
956
- "base-card card",
957
- { "border-gray-200": a },
958
- { "dark:border-gray-500": o && a },
959
- { dark: o, "border-transparent": !a },
960
- n
961
- ),
962
- ...s,
963
- ...S(d, ["listType", "dark", "iconColor", "link", "hoverStyle", "imageSize"]),
964
- children: [
965
- t,
966
- !m && /* @__PURE__ */ i("div", { className: "card__body", children: r }),
967
- e
968
- ]
969
- }
970
- );
971
- }
972
- const Je = _(b)`
973
- &.base-card {
974
- text-align: left;
975
- border-width: 1px;
976
- border-style: solid;
977
- border-radius: 12px;
978
- overflow: hidden;
979
- &,
980
- &:hover {
981
- text-decoration: none;
982
- }
983
- }
984
- .card__body {
985
- padding: 15px 15px;
986
- }
987
- `;
988
- function D({
989
- align: t = "left",
990
- title: e,
991
- titleProps: r = {},
992
- description: n,
993
- descriptionProps: o = {}
994
- }) {
995
- return /* @__PURE__ */ w(J, { children: [
996
- e && /* @__PURE__ */ i(
997
- C,
998
- {
999
- className: g("card__title text-gray-800", "dark:text-gray-50"),
1000
- component: "h5",
1001
- variant: "h5",
1002
- gutterBottom: !0,
1003
- align: t,
1004
- ...r,
1005
- children: e
1006
- }
1007
- ),
1008
- n && /* @__PURE__ */ i(
1009
- C,
1010
- {
1011
- className: g("card__description", "text-gray-500", "dark:text-gray-400"),
1012
- component: "div",
1013
- variant: "body1",
1014
- gutterBottom: !0,
1015
- align: t,
1016
- ...o,
1017
- children: n
1018
- }
1019
- )
1020
- ] });
1021
- }
1022
- function Me({
1023
- image: t,
1024
- title: e,
1025
- description: r,
1026
- imageProps: n = {},
1027
- imageMeta: o,
1028
- imageSize: a,
1029
- titleProps: d = {},
1030
- descriptionProps: s = {},
1031
- actions: l,
1032
- align: c,
1033
- ...m
1034
- }) {
1035
- const p = it(t), h = j(N(t), 540);
1036
- return /* @__PURE__ */ w(
1037
- Ke,
1038
- {
1039
- className: "card-article",
1040
- ...m,
1041
- prepend: /* @__PURE__ */ i("div", { className: "card__image__wrap", children: p && t ? /* @__PURE__ */ i(
1042
- b,
1043
- {
1044
- sx: {
1045
- position: "absolute",
1046
- left: 0,
1047
- top: 0,
1048
- right: 0,
1049
- bottom: 0,
1050
- display: "flex",
1051
- alignItems: "center",
1052
- justifyContent: "center"
1053
- },
1054
- children: /* @__PURE__ */ i(B, { icon: t, color: "primary.main" })
1055
- }
1056
- ) : h && /* @__PURE__ */ i(
1057
- "img",
1058
- {
1059
- className: "card__image",
1060
- src: h,
1061
- ...n,
1062
- alt: n.alt || (o == null ? void 0 : o.filename) || "card-image",
1063
- width: o == null ? void 0 : o.naturalWidth,
1064
- height: o == null ? void 0 : o.naturalHeight,
1065
- style: { width: "100%", height: "100%", objectFit: a || "cover", objectPosition: "center" },
1066
- loading: "lazy"
1067
- }
1068
- ) }),
1069
- children: [
1070
- e || r ? /* @__PURE__ */ i(
1071
- D,
1072
- {
1073
- align: c,
1074
- title: e,
1075
- titleProps: d,
1076
- description: r,
1077
- descriptionProps: s
1078
- }
1079
- ) : null,
1080
- l != null && l.length ? /* @__PURE__ */ i(z, { align: c, actions: l, className: "mt-4" }) : null
1081
- ]
1082
- }
1083
- );
1084
- }
1085
- const Ke = _(V)`
1086
- ${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
1087
- &:hover {
1088
- box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
1089
- }` : ""}
1090
-
1091
- .card__image__wrap {
1092
- padding-top: 61.8%;
1093
- width: 100%;
1094
- position: relative;
1095
- }
1096
- .card__image {
1097
- position: absolute;
1098
- top: 0;
1099
- left: 0;
1100
- bottom: 0;
1101
- right: 0;
1102
- width: 100%;
1103
- height: 100%;
1104
- object-position: top center;
1105
- }
1106
- `, pt = "section";
1107
- function ut({
1108
- title: t,
1109
- image: e,
1110
- imageMeta: r,
1111
- description: n,
1112
- actions: o,
1113
- align: a,
1114
- listType: d = "",
1115
- className: s = "",
1116
- ...l
1117
- }) {
1118
- return /* @__PURE__ */ w(Ge, { className: g("card", `list-type-${d}`, s), align: a, ...l, children: [
1119
- e && /* @__PURE__ */ i(
1120
- B,
1121
- {
1122
- icon: e,
1123
- color: "primary.main",
1124
- size: d === "icon-title" ? "1.2rem" : "3rem",
1125
- imageMeta: r
1126
- }
1127
- ),
1128
- t || n ? /* @__PURE__ */ i(D, { align: a, title: t, description: n }) : null,
1129
- o != null && o.length ? /* @__PURE__ */ i(z, { align: a, actions: o, className: "mt-4" }) : null
1130
- ] });
1131
- }
1132
- const Ge = _(V)`
1133
- padding: 5vw 4vw;
1134
- box-sizing: border-box;
1135
- /* min-height: 320px; */
1136
- color: inherit !important;
1137
- border-radius: 0.5rem;
1138
- /* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
1139
- @media (max-width: ${({ theme: t }) => t.breakpoints.values[pt]}px) {
1140
- padding: 1.5rem 2rem;
1141
- }
1142
- @media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
1143
- height: auto;
1144
- min-height: unset;
1145
- }
1146
-
1147
- ${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
1148
- &:hover {
1149
- box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
1150
- }` : ""}
1151
-
1152
- .card__title {
1153
- font-weight: 700;
1154
- margin-top: 24px;
1155
- margin-bottom: 12px;
1156
- color: ${({ theme: t }) => t.palette.text.primary};
1157
- a {
1158
- color: ${({ theme: t }) => t.palette.primary.main};
1159
- }
1160
- }
1161
- .card__description {
1162
- color: ${({ theme: t }) => t.palette.text.primary};
1163
- a {
1164
- color: ${({ theme: t }) => t.palette.primary.main};
1165
- }
1166
- }
1167
- .card__body {
1168
- color: ${({ theme: t }) => t.palette.text.primary};
1169
- padding: 0;
1170
- ${({ align: t }) => `text-align:${t || "left"};`}
1171
- }
1172
-
1173
- &.list-type-icon-title {
1174
- padding: 1.2rem;
1175
- .title-line {
1176
- display: flex;
1177
- }
1178
- .card__title {
1179
- margin: 0;
1180
- font-size: 1em;
1181
- }
1182
- .css-icon {
1183
- margin-right: 0.5rem;
1184
- }
1185
- }
1186
-
1187
- @media (min-width: ${({ theme: t }) => t.breakpoints.values[pt]}px) {
1188
- padding: 2rem 2rem;
1189
- text-align: left;
1190
- box-sizing: border-box;
1191
- }
1192
- `;
1193
- function Xe({
1194
- image: t,
1195
- title: e,
1196
- description: r,
1197
- imageProps: n = {},
1198
- imageMeta: o,
1199
- imageSize: a,
1200
- titleProps: d = {},
1201
- descriptionProps: s = {},
1202
- actions: l,
1203
- align: c,
1204
- ...m
1205
- }) {
1206
- const p = it(t), h = j(N(t), 540);
1207
- return /* @__PURE__ */ w(
1208
- qe,
1209
- {
1210
- className: "card-article",
1211
- ...m,
1212
- prepend: /* @__PURE__ */ i("div", { className: "card__image__wrap", children: p && t ? /* @__PURE__ */ i(
1213
- b,
1214
- {
1215
- sx: {
1216
- position: "absolute",
1217
- left: 0,
1218
- top: 0,
1219
- right: 0,
1220
- bottom: 0,
1221
- display: "flex",
1222
- alignItems: "center",
1223
- justifyContent: "center"
1224
- },
1225
- children: /* @__PURE__ */ i(B, { icon: t, color: "primary.main" })
1226
- }
1227
- ) : h && /* @__PURE__ */ i(
1228
- b,
1229
- {
1230
- component: "img",
1231
- className: "card__image",
1232
- src: h,
1233
- ...n,
1234
- alt: n.alt || (o == null ? void 0 : o.filename) || "card-image",
1235
- width: o == null ? void 0 : o.naturalWidth,
1236
- height: o == null ? void 0 : o.naturalHeight,
1237
- style: { width: "100%", height: "100%", objectFit: a || "contain", objectPosition: "center" },
1238
- loading: "lazy"
1239
- }
1240
- ) }),
1241
- children: [
1242
- e || r ? /* @__PURE__ */ i(
1243
- D,
1244
- {
1245
- align: c,
1246
- title: e,
1247
- titleProps: d,
1248
- description: r,
1249
- descriptionProps: s
1250
- }
1251
- ) : null,
1252
- l != null && l.length ? /* @__PURE__ */ i(z, { align: c, actions: l, className: "mt-4" }) : null
1253
- ]
1254
- }
1255
- );
1256
- }
1257
- const qe = _(V)`
1258
- ${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
1259
- &:hover {
1260
- box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
1261
- }` : ""}
1262
-
1263
- border-radius: 0 !important;
1264
-
1265
- .card__body {
1266
- ${({ align: t }) => `text-align:${t || "left"};`}
1267
- }
1268
-
1269
- .card__image__wrap {
1270
- width: 100%;
1271
- height: 100%;
1272
- position: relative;
1273
- display: flex;
1274
- justify-content: center;
1275
- align-items: center;
1276
- }
1277
-
1278
- .card__image {
1279
- max-height: 60px;
1280
- }
1281
- `, ht = "section";
1282
- function Qe({
1283
- title: t,
1284
- image: e,
1285
- imageMeta: r,
1286
- iconSize: n = 100,
1287
- description: o,
1288
- actions: a,
1289
- align: d,
1290
- className: s = "",
1291
- ...l
1292
- }) {
1293
- return /* @__PURE__ */ i(Ze, { className: g("card", s), ...l, children: /* @__PURE__ */ w(b, { className: "flex items-center", children: [
1294
- e && /* @__PURE__ */ i(B, { icon: e, color: "primary.main", size: n, imageMeta: r }),
1295
- /* @__PURE__ */ w(b, { className: "flex-1 ml-4", children: [
1296
- /* @__PURE__ */ i(D, { align: d, title: t, description: o }),
1297
- /* @__PURE__ */ i(z, { align: d, actions: a, className: "mt-4" })
1298
- ] })
1299
- ] }) });
1300
- }
1301
- const Ze = _(V)`
1302
- padding: 5vw 4vw;
1303
- text-align: left;
1304
- box-sizing: border-box;
1305
- /* min-height: 320px; */
1306
- color: inherit !important;
1307
- border-radius: 0.5rem;
1308
- /* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
1309
- @media (max-width: ${({ theme: t }) => t.breakpoints.values[ht]}px) {
1310
- padding: 1.5rem 2rem;
1311
- }
1312
- @media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
1313
- height: auto;
1314
- min-height: unset;
1315
- }
1316
-
1317
- ${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
1318
- &:hover {
1319
- box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
1320
- }` : ""}
1321
-
1322
- .card__title {
1323
- font-weight: 700;
1324
- margin-bottom: 12px;
1325
- a {
1326
- color: ${({ theme: t }) => t.palette.primary.main};
1327
- }
1328
- }
1329
- .card__description {
1330
- a {
1331
- color: ${({ theme: t }) => t.palette.primary.main};
1332
- }
1333
- }
1334
- .card__body {
1335
- padding: 0;
1336
- }
1337
-
1338
- &.list-type-icon-title {
1339
- padding: 1.2rem;
1340
- .title-line {
1341
- display: flex;
1342
- }
1343
- .card__title {
1344
- margin: 0;
1345
- font-size: 1em;
1346
- }
1347
- .css-icon {
1348
- margin-right: 0.5rem;
1349
- }
1350
- }
1351
-
1352
- @media (min-width: ${({ theme: t }) => t.breakpoints.values[ht]}px) {
1353
- padding: 2rem 2rem;
1354
- text-align: left;
1355
- box-sizing: border-box;
1356
- }
1357
- `;
1358
- function to({
1359
- title: t,
1360
- titleProps: e = {},
1361
- description: r,
1362
- descriptionProps: n = {},
1363
- image: o,
1364
- imageMeta: a,
1365
- className: d = "",
1366
- align: s,
1367
- hoverStyle: l,
1368
- ...c
1369
- }) {
1370
- return /* @__PURE__ */ w(eo, { className: g("card-simple", d, `hover-style__${l}`), align: s, ...c, children: [
1371
- o && /* @__PURE__ */ i(B, { icon: o, color: "primary.main", imageMeta: a }),
1372
- t || r ? /* @__PURE__ */ i(
1373
- D,
1374
- {
1375
- align: s,
1376
- title: t,
1377
- titleProps: e,
1378
- description: r,
1379
- descriptionProps: n
1380
- }
1381
- ) : null
1382
- ] });
1383
- }
1384
- const eo = _(V)`
1385
- ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`}
1386
-
1387
- &.hover-style__default {
1388
- &.card-simple {
1389
- &:hover {
1390
- border-top-right-radius: 36px;
1391
- }
1392
- }
1393
- .card__body {
1394
- &:hover {
1395
- &::before {
1396
- width: 42px;
1397
- height: 42px;
1398
- transform: translate(50%, -50%) rotate(45deg);
1399
- }
1400
- &::after {
1401
- transform: none;
1402
- }
1403
- }
1404
- }
1405
- }
1406
-
1407
- &.card-simple {
1408
- border-radius: 8px;
1409
- border-top-right-radius: 26px;
1410
-
1411
- .card__body {
1412
- ${({ align: t }) => `text-align:${t || "left"};`}
1413
- }
1414
-
1415
- ${(t) => t.link ? `
1416
- cursor: pointer;
1417
- ` : ""}
1418
- /* cursor: pointer; */
1419
- /* &:hover {
1420
- border-top-right-radius: 36px;
1421
- } */
1422
- transition: all 180ms ease 0s;
1423
- overflow: visible;
1424
- .card__title {
1425
- margin: 12px 0;
1426
- }
1427
- .card__body {
1428
- position: relative;
1429
- padding: 20px 16px 18px;
1430
- overflow: hidden;
1431
- transition: all 180ms ease 0s;
1432
- /* &:hover {
1433
- &::before {
1434
- width: 42px;
1435
- height: 42px;
1436
- transform: translate(50%, -50%) rotate(45deg);
1437
- }
1438
- &::after {
1439
- transform: none;
1440
- }
1441
- } */
1442
- &::before,
1443
- &::after {
1444
- content: ${({ border: t }) => t ? '""' : ""};
1445
- transition: inherit;
1446
- position: absolute;
1447
- top: 0px;
1448
- right: 0px;
1449
- }
1450
- &::before {
1451
- z-index: 3;
1452
- background: #fff;
1453
- width: 30px;
1454
- height: 30px;
1455
- transform: translate(50%, -50%) rotate(45deg);
1456
- box-shadow: 0 1px 0 0 #e9eaec;
1457
- }
1458
- &::after {
1459
- z-index: 2;
1460
- width: 28px;
1461
- height: 28px;
1462
- border-bottom-left-radius: 6px;
1463
- background: #fcfcfd;
1464
- box-shadow: -1px 1px 0 0 #e9eaec;
1465
- transform: translate(8px, -8px);
1466
- }
1467
- }
1468
- }
1469
- `;
1470
- function oo({ type: t = "default", ...e }) {
1471
- const n = {
1472
- article: Me,
1473
- simple: to,
1474
- news: Qe,
1475
- default: ut,
1476
- wall: Xe
1477
- }[t] || ut;
1478
- return /* @__PURE__ */ i(n, { ...t === "news" ? e : S(e, "iconSize") });
1479
- }
1480
- function no({
1481
- list: t = [],
1482
- align: e = "top",
1483
- cards: r,
1484
- listBorder: n = !0,
1485
- listType: o = "",
1486
- col: a = 3,
1487
- gap: d,
1488
- iconColor: s,
1489
- className: l = "",
1490
- type: c = "default",
1491
- dark: m = !1,
1492
- textAlign: p = "left",
1493
- hoverStyle: h,
1494
- ...u
1495
- }) {
1496
- return /* @__PURE__ */ i(
1497
- rt,
1498
- {
1499
- type: c,
1500
- className: g("card-list py-1", l, "items-stretch"),
1501
- col: a,
1502
- gap: d,
1503
- align: e,
1504
- ...u,
1505
- children: r || t.map((f) => /* @__PURE__ */ i(
1506
- oo,
1507
- {
1508
- borderColor: n,
1509
- iconColor: s,
1510
- type: c,
1511
- listType: o,
1512
- dark: m,
1513
- ...f,
1514
- align: p,
1515
- sx: {
1516
- bgcolor: c === "wall" ? void 0 : m ? "grey.900" : "common.white"
1517
- },
1518
- style: d === 0 && t.length > 1 ? {
1519
- borderRadius: 0,
1520
- marginRight: "-1px",
1521
- marginBottom: "-1px"
1522
- } : {}
1523
- },
1524
- f.id
1525
- ))
1526
- }
1527
- );
1528
- }
1529
- const ro = [
1530
- "align",
1531
- "cards",
1532
- "list",
1533
- "listBorder",
1534
- "listType",
1535
- "col",
1536
- "gap",
1537
- "iconColor",
1538
- "type",
1539
- "textAlign"
1540
- ], io = _(F)`
1541
- a .card {
1542
- color: #404040;
1543
- cursor: pointer;
1544
- }
1545
- a:not(.MuiButton-root) {
1546
- color: ${({ theme: t }) => t.palette.primary.main};
1547
- &:hover,
1548
- &:active {
1549
- color: ${({ theme: t }) => t.palette.primary.main};
1550
- }
1551
- }
1552
- a:hover .card {
1553
- color: #404040;
1554
- }
1555
- `;
1556
- function ao({ className: t, ...e }) {
1557
- const [r, n] = $(e, A), [o, a] = $(n, ro);
1558
- return /* @__PURE__ */ w(io, { className: g("section--card-list", t), type: e.type, ...a, children: [
1559
- Object.keys(r).length > 0 && /* @__PURE__ */ i(O, { center: !0, ...r, className: "mb-[2.5vw]" }),
1560
- /* @__PURE__ */ i(no, { ...o, dark: !!e.dark })
1561
- ] });
1562
- }
1563
- const so = _(ao)`
1564
- .card__description {
1565
- white-space: pre-wrap;
1566
- }
1567
- .section__description {
1568
- }
1569
- .card {
1570
- /* background: inherit !important; */
1571
- }
1572
- &.dark .card-simple .card__body::before {
1573
- background: #212121 !important;
1574
- }
1575
- .card-simple .card__body::after {
1576
- background: inherit !important;
1577
- }
1578
- `;
1579
- function lo({ section: t, ...e }) {
1580
- const [{ editing: r }, n] = $(e, U), o = W(() => {
1581
- var a;
1582
- return {
1583
- ...S(n, ["listBorder", "list", "iconSize", "imageSize"]),
1584
- list: (a = n.list) == null ? void 0 : a.map((d) => {
1585
- var s, l;
1586
- return {
1587
- ...S(d, "icon", "iconColor"),
1588
- image: ["news", "simple", "default"].includes(n.type) && d.icon ? d.icon : d.image,
1589
- actions: (l = (s = d.actions) == null ? void 0 : s.map) == null ? void 0 : l.call(s, (c) => /* @__PURE__ */ i(zt, { ...c, editing: r }, c.id)),
1590
- border: n.listBorder,
1591
- iconSize: n.iconSize,
1592
- imageSize: n.imageSize,
1593
- hoverStyle: n.hoverStyle
1594
- };
1595
- })
1596
- };
1597
- }, [n]);
1598
- return /* @__PURE__ */ i(so, { style: r ? { pointerEvents: "none" } : {}, ...o });
1599
- }
1600
- function co({
1601
- properties: t,
1602
- section: e,
1603
- locale: r,
1604
- dev: n
1605
- }) {
1606
- var o;
1607
- return (o = e == null ? void 0 : e.config) != null && o.componentId ? /* @__PURE__ */ i(
1608
- te,
1609
- {
1610
- instanceId: e.id,
1611
- componentId: e.config.componentId,
1612
- blockletId: e.config.blockletId,
1613
- blockletTitle: e.config.blockletTitle,
1614
- componentName: e.config.componentName,
1615
- locale: r,
1616
- properties: t,
1617
- dev: n
1618
- }
1619
- ) : /* @__PURE__ */ i(b, { textAlign: "center", py: 2, children: /* @__PURE__ */ i(C, { variant: "caption", color: "text.secondary", children: "Please select component to render" }) });
1620
- }
1621
- function mo({
1622
- src: t,
1623
- dataId: e,
1624
- isEdit: r = !1,
1625
- height: n = "100%",
1626
- onLoad: o = () => {
1627
- }
1628
- }) {
1629
- return /* @__PURE__ */ i(
1630
- ue,
1631
- {
1632
- isEdit: r,
1633
- embedId: e,
1634
- src: t,
1635
- height: n,
1636
- onLoad: () => {
1637
- o();
1638
- }
1639
- }
1640
- );
1641
- }
1642
- function po({ dataId: t, src: e, actions: r, center: n, onLoad: o, ...a }) {
1643
- const [d, s] = $(a, A);
1644
- return /* @__PURE__ */ w(F, { ...s, children: [
1645
- Object.keys(d).length > 0 && /* @__PURE__ */ i(O, { center: n, ...d }),
1646
- /* @__PURE__ */ i(
1647
- mo,
1648
- {
1649
- dataId: t,
1650
- src: e,
1651
- onLoad: o,
1652
- height: a.iframeHeight ? `${a.iframeHeight}px` : "100%"
1653
- }
1654
- ),
1655
- /* @__PURE__ */ i(z, { actions: r, center: n })
1656
- ] });
1657
- }
1658
- const pn = {
1659
- src: "",
1660
- embedUrl: "",
1661
- title: "",
1662
- description: "",
1663
- dark: !1,
1664
- background: "",
1665
- center: !0,
1666
- config: {},
1667
- id: ""
1668
- };
1669
- function uo({ section: t, id: e, src: r, ...n }) {
1670
- const o = `${e}-${n.locale}`, [{ editing: a }, d] = $(n, U), s = tt({}), l = JSON.parse(JSON.stringify(d)), { message: c } = de(o, "server"), m = me(JSON.parse(JSON.stringify(d.config) || "{}"));
1671
- return E(() => {
1672
- c && c.onInit(() => m.current);
1673
- }, [c]), E(() => {
1674
- const p = JSON.parse(JSON.stringify(d.config) || "{}");
1675
- pe(s.current, p) || (s.current = p, c == null || c.send("config-set", p));
1676
- }, [c, d.config]), r ? /* @__PURE__ */ i(po, { ...l, dataId: o, src: r, style: a ? { pointerEvents: "none" } : {} }) : /* @__PURE__ */ i(ho, { children: 'Please set the "src" attribute for this block' });
1677
- }
1678
- const ho = _("div")`
1679
- user-select: none;
1680
- color: #999;
1681
- padding: 8px;
1682
- height: 200px;
1683
- `, fo = [
1684
- /youtu\.be\/([^#&?]{11})/,
1685
- // youtu.be/<id>
1686
- /\?v=([^#&?]{11})/,
1687
- // ?v=<id>
1688
- /&v=([^#&?]{11})/,
1689
- // &v=<id>
1690
- /embed\/([^#&?]{11})/,
1691
- // embed/<id>
1692
- /\/v\/([^#&?]{11})/
1693
- // /v/<id>
1694
- ];
1695
- function go(t) {
1696
- var e;
1697
- if (/youtu\.?be/.test(t))
1698
- for (const r of fo) {
1699
- const n = (e = r.exec(t)) == null ? void 0 : e[1];
1700
- if (n)
1701
- return n;
1702
- }
1703
- }
1704
- function xo(t) {
1705
- const e = go(t);
1706
- if (e)
1707
- return `https://youtube.com/embed/${e}`;
1708
- }
1709
- function bo({ src: t }) {
1710
- return E(() => {
1711
- import("@lottiefiles/lottie-player");
1712
- }, []), /* @__PURE__ */ i("lottie-player", { autoplay: !0, loop: !0, mode: "normal", src: t });
1713
- }
1714
- function yo(t) {
1715
- return /* @__PURE__ */ i(b, { maxHeight: 400, overflow: "hidden auto", children: /* @__PURE__ */ i(he, { ...t }) });
1716
- }
1717
- function wo({ url: t }) {
1718
- const e = tt(null), r = 495, [n, o] = K(
1719
- e.current ? e.current.offsetWidth * 0.5625 : r
1720
- ), a = M(() => {
1721
- const d = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : r;
1722
- return o(Math.floor(s * d));
1723
- }, []);
1724
- return E(() => {
1725
- window.addEventListener("resize", a);
1726
- const d = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : r;
1727
- return o(Math.floor(s * d)), function() {
1728
- window.removeEventListener("resize", a);
1729
- };
1730
- }, [n, a]), /* @__PURE__ */ i(
1731
- b,
1732
- {
1733
- component: "iframe",
1734
- ref: e,
1735
- title: "youtube",
1736
- width: "100%",
1737
- height: `${n}px`,
1738
- src: t,
1739
- frameBorder: "0",
1740
- allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
1741
- allowFullScreen: !0,
1742
- sx: { display: "block" }
1743
- }
1744
- );
1745
- }
1746
- const un = {
1747
- image: "https://www.arcblock.io/static/ead0cabde7f2b7ff34db8f3e8ceca271/afc4b/builder.png",
1748
- badge: "Develop · Deploy · Run",
1749
- title: "The Future is Here: Blockchain and Decentralized Application Development",
1750
- description: "ArcBlock, your exclusive new decentralized development platform, makes developing decentralized applications, blockchain, and distributed ledger technology straightforward.",
1751
- reverse: !1,
1752
- dark: !1,
1753
- background: "",
1754
- actions: void 0,
1755
- hasImage: !0,
1756
- center: !1
1757
- }, vo = _(Te)`
1758
- .section__description {
1759
- }
1760
- `;
1761
- function ko({
1762
- hasImage: t,
1763
- fullSizeImage: e,
1764
- boxed: r,
1765
- videoPoster: n,
1766
- imageMeta: o,
1767
- imageOptimization: a,
1768
- imageSize: d,
1769
- section: s,
1770
- ...l
1771
- }) {
1772
- var u, f;
1773
- const [{ editing: c }, m] = $({ ...l, boxed: e ? void 0 : r }, U);
1774
- let p = _o(m.image, n, e, o, a, d);
1775
- t || (p = null);
1776
- let h = null;
1777
- return m.actions && (h = (f = (u = m.actions) == null ? void 0 : u.map) == null ? void 0 : f.call(u, (y, x) => /* @__PURE__ */ i(zt, { ...y, editing: c }, x))), /* @__PURE__ */ i(
1778
- vo,
1779
- {
1780
- ...m,
1781
- style: c ? { pointerEvents: "none" } : {},
1782
- image: p,
1783
- fullSizeImage: t && e,
1784
- actions: h
1785
- }
1786
- );
1787
- }
1788
- function _o(t, e, r, n, o, a) {
1789
- if (t) {
1790
- if (t.endsWith(".json"))
1791
- return /* @__PURE__ */ i(bo, { src: t });
1792
- if (t.indexOf("twitter.com") !== -1)
1793
- return /* @__PURE__ */ i(yo, { sourceType: "url", url: t });
1794
- const d = xo(t);
1795
- if (d)
1796
- return /* @__PURE__ */ i(wo, { url: d });
1797
- const { naturalWidth: s, naturalHeight: l, filename: c } = n || {};
1798
- if (L(t))
1799
- return /* @__PURE__ */ i(
1800
- "video",
1801
- {
1802
- width: s && `${s}px`,
1803
- height: l && `${l}px`,
1804
- controls: !0,
1805
- autoPlay: !0,
1806
- muted: !0,
1807
- style: {
1808
- display: "block",
1809
- objectFit: a || "contain",
1810
- borderRadius: "8px",
1811
- width: "100%",
1812
- height: "100%"
1813
- },
1814
- poster: j(N(e), r ? 1200 : 540, o),
1815
- children: /* @__PURE__ */ i("source", { src: N(t), type: We(t) })
1816
- },
1817
- t
1818
- );
1819
- const m = o === "quality" ? 1 : 0.6;
1820
- return /* @__PURE__ */ i(
1821
- kt,
1822
- {
1823
- src: N(t),
1824
- sizesAttr: {
1825
- sm: 600 * m,
1826
- md: 450 * m,
1827
- lg: 540 * m,
1828
- ...r && {
1829
- md: 900 * m,
1830
- lg: 1200 * m
1831
- }
1832
- },
1833
- width: s && `${s}px`,
1834
- height: l && `${l}px`,
1835
- alt: c ?? t,
1836
- style: { objectFit: a || "contain", display: "block", width: "100%", height: "100%" },
1837
- loading: "lazy"
1838
- }
1839
- );
1840
- }
1841
- return null;
1842
- }
1843
- const hn = ["production", "draft"];
1844
- function fn({ mode: t, version: e } = {}) {
1845
- const r = e && typeof e == "number" ? { mode: t, version: e } : { mode: t };
1846
- return et.get(`/api/${ot()}/pages`, { params: r }).then((n) => n.data);
1847
- }
1848
- function gn({ mode: t, routes: e }) {
1849
- return et.post(`/api/${ot()}/pages/publish`, { mode: t, routes: e }).then((r) => r.data);
1850
- }
1851
- function $o({
1852
- locale: t,
1853
- sort: e,
1854
- page: r,
1855
- limit: n,
1856
- mode: o
1857
- } = {}) {
1858
- return et.get(`/api/${ot()}/pages/toc`, { params: { locale: t, sort: e, page: r, limit: n, mode: o } }).then((a) => a.data);
1859
- }
1860
- const xn = {
1861
- style: "list",
1862
- sort: "-updatedAt"
1863
- }, ft = 20;
1864
- function No({ style: t, sort: e, section: r, ...n }) {
1865
- const [{ editing: o, locale: a }, d] = $(n, U), [s, l] = $(d, A), [c, m] = K(), p = tt(!1), h = fe(), u = ae(), f = M(async () => {
1866
- if (!p.current) {
1867
- p.current = !0, h();
1868
- try {
1869
- const y = c ? Math.floor(c.list.length / ft) + 1 : 1, { list: x, total: k } = await $o({ locale: a, sort: e, page: y, limit: ft });
1870
- m((v) => ({
1871
- list: ((v == null ? void 0 : v.list) ?? []).concat(x),
1872
- total: k
1873
- }));
1874
- } finally {
1875
- p.current = !1, h();
1876
- }
1877
- }
1878
- }, [c, a, e, h]);
1879
- return ge(() => {
1880
- f();
1881
- }), /* @__PURE__ */ w(F, { ...l, sx: o ? { pointerEvents: "none" } : {}, children: [
1882
- Object.keys(s).length > 0 && /* @__PURE__ */ i(O, { ...s }),
1883
- c ? /* @__PURE__ */ w(J, { children: [
1884
- /* @__PURE__ */ i(st, { container: !0, spacing: 2, justifyContent: "center", children: c == null ? void 0 : c.list.map((y) => /* @__PURE__ */ i(st, { item: !0, xs: 12, sm: t === "card" ? 6 : 12, md: t === "card" ? 3 : 12, children: /* @__PURE__ */ w(
1885
- So,
1886
- {
1887
- elevation: 0,
1888
- className: g(t === "card" && "style-card"),
1889
- onClick: o ? void 0 : () => u(y.slug),
1890
- children: [
1891
- !!y.image && /* @__PURE__ */ i(
1892
- Ht,
1893
- {
1894
- component: "img",
1895
- alt: "",
1896
- image: j(N(y.image), 540),
1897
- loading: "lazy"
1898
- }
1899
- ),
1900
- /* @__PURE__ */ w(Yt, { children: [
1901
- /* @__PURE__ */ i(C, { variant: "h6", component: "div", className: gt, children: y.title || y.id }),
1902
- /* @__PURE__ */ i(C, { variant: "body2", className: gt, children: y.description })
1903
- ] })
1904
- ]
1905
- }
1906
- ) }, y.id)) }),
1907
- /* @__PURE__ */ i(b, { textAlign: "center", mt: 2, children: c.total > c.list.length ? /* @__PURE__ */ i(T, { variant: "outlined", color: "secondary", onClick: f, loading: p.current, children: "More" }) : /* @__PURE__ */ i(T, { variant: "outlined", color: "secondary", disabled: !0, children: "No More" }) })
1908
- ] }) : /* @__PURE__ */ i(b, { p: 2, textAlign: "center", children: /* @__PURE__ */ i(Dt, { size: 24 }) })
1909
- ] });
1910
- }
1911
- const gt = q`
1912
- display: -webkit-box;
1913
- -webkit-box-orient: vertical;
1914
- -webkit-line-clamp: 2;
1915
- overflow: hidden;
1916
- text-overflow: ellipsis;
1917
- `, So = _(Vt)`
1918
- border: 1px solid #e0e0e0;
1919
- background-color: transparent;
1920
- cursor: pointer;
1921
- display: flex;
1922
- color: inherit;
1923
-
1924
- > .MuiCardMedia-root {
1925
- width: 30vw;
1926
- max-height: 50vw;
1927
- }
1928
-
1929
- &.style-card {
1930
- display: block;
1931
-
1932
- > .MuiCardMedia-root {
1933
- width: 100%;
1934
- max-height: 50vw;
1935
- }
1936
- }
1937
- `, Co = {
1938
- iframe: uo,
1939
- section: ko,
1940
- "section-card-list": lo,
1941
- toc: No,
1942
- "ai-runtime": Ae,
1943
- "custom-component": co
1944
- };
1945
- function bn({ id: t, type: e, mode: r, config: n, section: o, ...a }) {
1946
- const d = Co[e], { getPageMetaStyle: s } = Se(), l = W(() => {
1947
- const { height: p, ...h } = n;
1948
- return h;
1949
- }, [n]), c = W(() => {
1950
- const p = {};
1951
- return e !== "custom-component" && (p.height = n.height), p.sx = s("sx"), p;
1952
- }, [n.height, e, s]), m = d && /* @__PURE__ */ i(d, { mode: r, ...l, id: t, section: o });
1953
- return /* @__PURE__ */ i(Ee, { ...a, ...c, children: m });
1954
- }
1955
- function yn(t) {
1956
- return t != null;
1957
- }
1958
- export {
1959
- zt as A,
1960
- bn as B,
1961
- It as I,
1962
- dn as P,
1963
- hn as S,
1964
- xn as T,
1965
- cn as a,
1966
- un as b,
1967
- pn as c,
1968
- fn as g,
1969
- yn as n,
1970
- gn as p
1971
- };