@blocklet/list 0.16.59 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +32 -0
- package/lib/index.es.js +1039 -736
- package/package.json +21 -21
package/lib/index.es.js
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { styled as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import dt from "@iconify-icons/tabler/compass";
|
|
1
|
+
import { jsx as t, jsxs as p, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import { styled as K, useTheme as ye } from "@arcblock/ux/lib/Theme";
|
|
3
|
+
import { useTheme as Le, Box as ee, Card as rt, Skeleton as O, createTheme as ot, ThemeProvider as nt } from "@mui/material";
|
|
4
|
+
import { pick as it, omitBy as ae, orderBy as lt, isEmpty as at, merge as st } from "lodash-es";
|
|
5
|
+
import { ErrorFallback as we } from "@arcblock/ux/lib/ErrorBoundary";
|
|
6
|
+
import g from "@mui/material/Box";
|
|
7
|
+
import A from "@mui/material/Stack";
|
|
8
|
+
import { createContext as Me, useState as T, useMemo as H, useContext as ze, useCallback as fe, useEffect as U, useRef as te, memo as ct } from "react";
|
|
9
|
+
import { ErrorBoundary as dt } from "react-error-boundary";
|
|
10
|
+
import ut from "@iconify-icons/tabler/compass";
|
|
12
11
|
import { Icon as M } from "@iconify/react";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
import _e from "@mui/icons-material/Close";
|
|
13
|
+
import k from "@mui/material/Typography";
|
|
15
14
|
import { createAxios as Fe } from "@blocklet/js-sdk";
|
|
16
|
-
import { useRequest as
|
|
15
|
+
import { useRequest as oe, useDebounceFn as Ne, useInfiniteScroll as ht, useReactive as pt } from "ahooks";
|
|
17
16
|
import "color";
|
|
18
|
-
import { parseURL as
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import xt from "@mui/material/Drawer";
|
|
17
|
+
import { parseURL as mt, parseQuery as ft, parseFilename as gt, stringifyParsedURL as xt, withQuery as be, joinURL as Se } from "ufo";
|
|
18
|
+
import Ie from "flat";
|
|
19
|
+
import ne from "@mui/material/Button";
|
|
20
|
+
import j from "@mui/material/useMediaQuery";
|
|
21
|
+
import yt from "@mui/material/Drawer";
|
|
24
22
|
import De from "@mui/material/Checkbox";
|
|
25
23
|
import We from "@mui/material/FormControlLabel";
|
|
26
24
|
import wt from "@mui/icons-material/Check";
|
|
@@ -32,48 +30,46 @@ import je from "@mui/material/MenuList";
|
|
|
32
30
|
import Ct from "@mui/material/Paper";
|
|
33
31
|
import St from "@mui/material/Popper";
|
|
34
32
|
import It from "@mui/material/SvgIcon";
|
|
35
|
-
import
|
|
33
|
+
import ie from "@mui/material/CircularProgress";
|
|
36
34
|
import He from "@arcblock/ux/lib/Avatar";
|
|
37
35
|
import Bt from "@iconify-icons/tabler/cloud-download";
|
|
38
36
|
import Rt from "@mui/icons-material/ChevronLeft";
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
37
|
+
import Pt from "@mui/icons-material/ChevronRight";
|
|
38
|
+
import L from "@mui/material/Skeleton";
|
|
39
|
+
import Tt from "react-image-gallery";
|
|
42
40
|
import "react-image-gallery/styles/css/image-gallery.css";
|
|
43
|
-
import
|
|
41
|
+
import Be from "@mui/material/Grid";
|
|
44
42
|
import At from "react-infinite-scroll-hook";
|
|
45
43
|
import Et from "@iconify-icons/tabler/square";
|
|
46
44
|
import Ot from "@iconify-icons/tabler/square-check-filled";
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import _t from "@iconify-icons/tabler/x";
|
|
45
|
+
import Re from "@mui/material/Chip";
|
|
46
|
+
import se from "@iconify-icons/tabler/search";
|
|
47
|
+
import Lt from "@iconify-icons/tabler/x";
|
|
51
48
|
import Mt from "@mui/material/Autocomplete";
|
|
52
49
|
import zt from "@mui/material/Dialog";
|
|
53
50
|
import Ue from "@mui/material/OutlinedInput";
|
|
54
|
-
import
|
|
55
|
-
import { useHotkeys as
|
|
56
|
-
import
|
|
51
|
+
import _t from "@mui/material/TextField";
|
|
52
|
+
import { useHotkeys as Ft } from "react-hotkeys-hook";
|
|
53
|
+
import Nt from "@mui/icons-material/Search";
|
|
57
54
|
import Pe from "@mui/material/InputAdornment";
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
|
|
64
|
-
const Ve = _e({
|
|
55
|
+
import Dt from "@arcblock/ux/lib/Empty";
|
|
56
|
+
import Wt from "json-stable-stringify";
|
|
57
|
+
import $t from "@mui/icons-material/Menu";
|
|
58
|
+
import jt from "@arcblock/react-hooks/lib/useBrowser";
|
|
59
|
+
import Ht from "@arcblock/ux/lib/Img";
|
|
60
|
+
const Ve = Me({
|
|
65
61
|
open: !1,
|
|
66
62
|
toggleOpen: (e) => {
|
|
67
63
|
}
|
|
68
64
|
});
|
|
69
|
-
function
|
|
70
|
-
const [r, o] =
|
|
65
|
+
function Ut({ children: e }) {
|
|
66
|
+
const [r, o] = T(!1), n = (a) => {
|
|
71
67
|
o(a ?? !a);
|
|
72
|
-
}, i =
|
|
68
|
+
}, i = H(() => ({ open: r, toggleOpen: n }), [r]);
|
|
73
69
|
return /* @__PURE__ */ t(Ve.Provider, { value: i, children: e });
|
|
74
70
|
}
|
|
75
|
-
function
|
|
76
|
-
return
|
|
71
|
+
function ke() {
|
|
72
|
+
return ze(Ve);
|
|
77
73
|
}
|
|
78
74
|
const P = {
|
|
79
75
|
nameAsc: "title",
|
|
@@ -89,19 +85,19 @@ const P = {
|
|
|
89
85
|
explorePath: "/api/blocklets/explore",
|
|
90
86
|
exploreDidsPath: "/api/blocklets/dids",
|
|
91
87
|
cacheSize: 100
|
|
92
|
-
},
|
|
88
|
+
}, Vt = (e) => oe(
|
|
93
89
|
async () => {
|
|
94
90
|
const { data: r } = await e.get(P.categoriesPath);
|
|
95
91
|
return Array.isArray(r) ? r : [];
|
|
96
92
|
},
|
|
97
93
|
{ manual: !0 }
|
|
98
94
|
);
|
|
99
|
-
function
|
|
95
|
+
function Gt(e, r) {
|
|
100
96
|
const o = e.menu ? {
|
|
101
97
|
sortBy: "popularity",
|
|
102
98
|
sortDirection: "desc",
|
|
103
99
|
showResources: "true",
|
|
104
|
-
...
|
|
100
|
+
...it(e, ["sortBy", "sortDirection", "showResources"])
|
|
105
101
|
} : {
|
|
106
102
|
sortBy: "popularity",
|
|
107
103
|
sortDirection: "desc",
|
|
@@ -118,13 +114,13 @@ function Kt(e, r) {
|
|
|
118
114
|
!o.category && !a && (o.category = "All");
|
|
119
115
|
const s = (l) => {
|
|
120
116
|
const m = { ...o, ...l };
|
|
121
|
-
n(
|
|
117
|
+
n(ae(m, (h) => h === "" || h === void 0));
|
|
122
118
|
};
|
|
123
119
|
return {
|
|
124
120
|
filters: e,
|
|
125
121
|
cleanFilter: (l) => {
|
|
126
|
-
const m = l ?
|
|
127
|
-
n(
|
|
122
|
+
const m = l ? ae(o, (h, f) => l.includes(f)) : {};
|
|
123
|
+
n(ae(m, (h) => h === "" || h === void 0));
|
|
128
124
|
},
|
|
129
125
|
handleActiveMenu: (l) => {
|
|
130
126
|
l !== e.menu && n({ menu: l });
|
|
@@ -155,7 +151,7 @@ function Kt(e, r) {
|
|
|
155
151
|
}
|
|
156
152
|
};
|
|
157
153
|
}
|
|
158
|
-
const
|
|
154
|
+
const qt = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
159
155
|
{
|
|
160
156
|
name: e("sort.popularity"),
|
|
161
157
|
value: "popularity"
|
|
@@ -169,28 +165,24 @@ const Xt = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
|
169
165
|
// value: 'rating',
|
|
170
166
|
// },
|
|
171
167
|
], qe = (e, r, o) => {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
return i.imageFilter ? gt({ ...n, search: "" }) : e;
|
|
168
|
+
const n = mt(e), i = ft(n.search);
|
|
169
|
+
if (gt(e, { strict: !0 })?.endsWith(".gif"))
|
|
170
|
+
return i.imageFilter ? xt({ ...n, search: "" }) : e;
|
|
176
171
|
if (i.imageFilter)
|
|
177
172
|
return e;
|
|
178
|
-
const s = o ||
|
|
179
|
-
return
|
|
173
|
+
const s = o || window.blocklet?.version, { w: l, h: m } = typeof r == "object" ? { w: r.w, h: r.h } : { w: r, h: r };
|
|
174
|
+
return be(e, {
|
|
180
175
|
...l || m ? { imageFilter: "resize", w: l, h: m } : {},
|
|
181
176
|
v: s
|
|
182
177
|
});
|
|
183
|
-
},
|
|
178
|
+
}, Kt = (e) => [
|
|
184
179
|
{ name: e("blocklet.free"), value: "free" },
|
|
185
180
|
{ name: e("blocklet.payment"), value: "payment" }
|
|
186
|
-
],
|
|
187
|
-
|
|
188
|
-
return Array.isArray(e) ? e.map((n) => n.message).join(`
|
|
189
|
-
`) : (o = (r = e.response) == null ? void 0 : r.data) != null && o.error ? e.response.data.error.message || e.response.data.error : e.message || e;
|
|
190
|
-
}, Jt = (e, r) => (
|
|
181
|
+
], Xt = (e = [], r = "en") => e.map((o) => ({ name: o.locales[r] || o.locales.en, value: o._id })), Qt = (e) => Array.isArray(e) ? e.map((r) => r.message).join(`
|
|
182
|
+
`) : e.response?.data?.error ? e.response.data.error.message || e.response.data.error : e.message || e, Yt = (e, r) => (
|
|
191
183
|
// eslint-disable-next-line no-prototype-builtins
|
|
192
|
-
e
|
|
193
|
-
),
|
|
184
|
+
e?.replace(/{(\w*)}/g, (o, n) => r.hasOwnProperty(n) ? r[n] : "")
|
|
185
|
+
), Zt = () => window.innerWidth <= 600, Jt = {
|
|
194
186
|
common: {
|
|
195
187
|
title: "Blocklet Store",
|
|
196
188
|
searchStore: "Search Blocklet",
|
|
@@ -242,7 +234,7 @@ const Xt = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
|
242
234
|
autocomplete: {
|
|
243
235
|
expandResult: 'View all search results for "{name}"'
|
|
244
236
|
}
|
|
245
|
-
},
|
|
237
|
+
}, er = {
|
|
246
238
|
common: {
|
|
247
239
|
title: "Blocklet 商店",
|
|
248
240
|
searchStore: "搜索 Blocklet",
|
|
@@ -294,15 +286,15 @@ const Xt = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
|
294
286
|
autocomplete: {
|
|
295
287
|
expandResult: "查看 “{name}” 的所有搜索结果"
|
|
296
288
|
}
|
|
297
|
-
},
|
|
298
|
-
en:
|
|
299
|
-
zh:
|
|
289
|
+
}, ce = {
|
|
290
|
+
en: Ie(Jt),
|
|
291
|
+
zh: Ie(er)
|
|
300
292
|
}, Ke = (e, r) => {
|
|
301
293
|
const o = {};
|
|
302
294
|
return e && (o["x-blocklet-server-version"] = e), r && (o["x-blocklet-store-version"] = r), o;
|
|
303
|
-
},
|
|
304
|
-
const n =
|
|
305
|
-
return
|
|
295
|
+
}, tr = (e) => (r, o) => {
|
|
296
|
+
const n = ce[e] ? ce[e][r] : ce.en[r];
|
|
297
|
+
return Yt(n, o) || r;
|
|
306
298
|
}, Xe = {
|
|
307
299
|
errors: {
|
|
308
300
|
fetchCategoriesError: null
|
|
@@ -358,8 +350,8 @@ const Xt = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
|
358
350
|
handlePage: () => {
|
|
359
351
|
}
|
|
360
352
|
}
|
|
361
|
-
}, Qe =
|
|
362
|
-
function
|
|
353
|
+
}, Qe = Me(Xe), { Provider: rr, Consumer: Lo } = Qe;
|
|
354
|
+
function or(e) {
|
|
363
355
|
const {
|
|
364
356
|
locale: r = "zh",
|
|
365
357
|
filters: o = {},
|
|
@@ -369,37 +361,37 @@ function ir(e) {
|
|
|
369
361
|
minItemWidth: a = 350,
|
|
370
362
|
queryFilter: s = !0,
|
|
371
363
|
layout: l = {},
|
|
372
|
-
wrapChildren: m = (
|
|
373
|
-
extraFilter:
|
|
364
|
+
wrapChildren: m = (R) => R,
|
|
365
|
+
extraFilter: h = (R) => R,
|
|
374
366
|
baseSearch: f = !1,
|
|
375
367
|
fetchCategoryDelay: d = 0,
|
|
376
|
-
showResourcesSwitch:
|
|
368
|
+
showResourcesSwitch: w = !1,
|
|
377
369
|
showCategory: y = !0,
|
|
378
|
-
tagFilters:
|
|
379
|
-
children:
|
|
380
|
-
storeVersion:
|
|
381
|
-
onSearchSelect:
|
|
370
|
+
tagFilters: S = [],
|
|
371
|
+
children: u,
|
|
372
|
+
storeVersion: x,
|
|
373
|
+
onSearchSelect: b = () => {
|
|
382
374
|
},
|
|
383
|
-
endpoint:
|
|
384
|
-
blockletRender:
|
|
385
|
-
compact:
|
|
386
|
-
} = e,
|
|
387
|
-
data:
|
|
388
|
-
error:
|
|
389
|
-
loading:
|
|
390
|
-
run:
|
|
391
|
-
} =
|
|
392
|
-
const
|
|
393
|
-
return z > -1 ? [{ ...
|
|
394
|
-
}, [
|
|
395
|
-
search:
|
|
396
|
-
compact:
|
|
397
|
-
errors: { fetchCategoriesError:
|
|
375
|
+
endpoint: v,
|
|
376
|
+
blockletRender: C,
|
|
377
|
+
compact: E = !1
|
|
378
|
+
} = e, V = Ke(n, x), X = H(() => Fe({ baseURL: v, headers: V }), [v]), D = Gt(o, { onFilterChange: i, emptyCategory: !l.showExplore, onSearchSelect: b }), [F, G] = T(""), {
|
|
379
|
+
data: W = [],
|
|
380
|
+
error: le,
|
|
381
|
+
loading: Q,
|
|
382
|
+
run: Y
|
|
383
|
+
} = Vt(X), $ = H(() => {
|
|
384
|
+
const R = lt(W, [(N) => N.name], ["asc"]), z = R.findIndex((N) => N.name === "All" || N.locales.en === "All");
|
|
385
|
+
return z > -1 ? [{ ...R[z], _id: "All" }, ...R.slice(0, z), ...R.slice(z + 1)] : R;
|
|
386
|
+
}, [W]), q = fe(tr(r), [r]), c = H(() => Xt($, r), [$, r]), B = Kt(q), tt = {
|
|
387
|
+
search: D,
|
|
388
|
+
compact: E,
|
|
389
|
+
errors: { fetchCategoriesError: le },
|
|
398
390
|
loadings: {
|
|
399
|
-
fetchCategoriesLoading:
|
|
391
|
+
fetchCategoriesLoading: Q
|
|
400
392
|
},
|
|
401
|
-
extraFilter:
|
|
402
|
-
endpoint:
|
|
393
|
+
extraFilter: h,
|
|
394
|
+
endpoint: v,
|
|
403
395
|
queryFilter: s,
|
|
404
396
|
layout: {
|
|
405
397
|
showExplore: l.showExplore ?? !1,
|
|
@@ -409,37 +401,37 @@ function ir(e) {
|
|
|
409
401
|
},
|
|
410
402
|
minItemWidth: a,
|
|
411
403
|
wrapChildren: m,
|
|
412
|
-
t:
|
|
413
|
-
storeVersion:
|
|
404
|
+
t: q,
|
|
405
|
+
storeVersion: x,
|
|
414
406
|
serverVersion: n,
|
|
415
|
-
selectedCategory:
|
|
416
|
-
categoryList:
|
|
417
|
-
blockletRender:
|
|
407
|
+
selectedCategory: D.filters.category || (l.showExplore ? "" : "All"),
|
|
408
|
+
categoryList: $,
|
|
409
|
+
blockletRender: C,
|
|
418
410
|
locale: r,
|
|
419
|
-
categoryOptions:
|
|
420
|
-
priceOptions:
|
|
421
|
-
storeApi:
|
|
411
|
+
categoryOptions: c,
|
|
412
|
+
priceOptions: B,
|
|
413
|
+
storeApi: X,
|
|
422
414
|
baseSearch: f,
|
|
423
|
-
showResourcesSwitch:
|
|
415
|
+
showResourcesSwitch: w,
|
|
424
416
|
showCategory: y,
|
|
425
|
-
tagFilters:
|
|
417
|
+
tagFilters: S,
|
|
426
418
|
onFilterChange: i,
|
|
427
|
-
getCategoryLocale: (
|
|
428
|
-
if (!
|
|
429
|
-
const z =
|
|
419
|
+
getCategoryLocale: (R) => {
|
|
420
|
+
if (!R) return null;
|
|
421
|
+
const z = W.find((N) => N._id === R || N.locales.en === "All");
|
|
430
422
|
return z ? z.locales[r] || z.locales.en : null;
|
|
431
423
|
},
|
|
432
424
|
get developerName() {
|
|
433
|
-
return
|
|
425
|
+
return F;
|
|
434
426
|
},
|
|
435
|
-
updateDeveloperName:
|
|
427
|
+
updateDeveloperName: G
|
|
436
428
|
};
|
|
437
|
-
return
|
|
438
|
-
setTimeout(
|
|
439
|
-
}, [
|
|
429
|
+
return U(() => {
|
|
430
|
+
setTimeout(Y, d || 0);
|
|
431
|
+
}, [v, Y, d]), /* @__PURE__ */ t(rr, { value: tt, children: u });
|
|
440
432
|
}
|
|
441
|
-
function
|
|
442
|
-
const e =
|
|
433
|
+
function I() {
|
|
434
|
+
const e = ze(Qe);
|
|
443
435
|
return e || Xe;
|
|
444
436
|
}
|
|
445
437
|
function Ye({
|
|
@@ -449,7 +441,7 @@ function Ye({
|
|
|
449
441
|
...n
|
|
450
442
|
}) {
|
|
451
443
|
return /* @__PURE__ */ t(
|
|
452
|
-
|
|
444
|
+
ne,
|
|
453
445
|
{
|
|
454
446
|
...n,
|
|
455
447
|
onClick: r,
|
|
@@ -472,97 +464,97 @@ function Ye({
|
|
|
472
464
|
}
|
|
473
465
|
);
|
|
474
466
|
}
|
|
475
|
-
function
|
|
467
|
+
function Z(e, r) {
|
|
476
468
|
return e === void 0 ? r : e;
|
|
477
469
|
}
|
|
478
|
-
function
|
|
479
|
-
xs: e,
|
|
480
|
-
sm: r,
|
|
481
|
-
md: o,
|
|
482
|
-
lg: n,
|
|
483
|
-
xl: i,
|
|
484
|
-
exact: a
|
|
470
|
+
function ve({
|
|
471
|
+
xs: e = void 0,
|
|
472
|
+
sm: r = void 0,
|
|
473
|
+
md: o = void 0,
|
|
474
|
+
lg: n = void 0,
|
|
475
|
+
xl: i = void 0,
|
|
476
|
+
exact: a = !1
|
|
485
477
|
}) {
|
|
486
|
-
const s =
|
|
478
|
+
const s = Le(), l = j(s.breakpoints.down("sm")), m = j(s.breakpoints.between("sm", "md")), h = j(s.breakpoints.between("md", "lg")), f = j(s.breakpoints.between("lg", "xl"));
|
|
487
479
|
if (a)
|
|
488
|
-
return l ? e || null : m ? r || null :
|
|
480
|
+
return l ? e || null : m ? r || null : h ? o || null : f ? n || null : i || null;
|
|
489
481
|
let d = e;
|
|
490
|
-
return l || (d =
|
|
482
|
+
return l || (d = Z(r, d), m) || (d = Z(o, d), h) || (d = Z(n, d), f) ? d : Z(i, d);
|
|
491
483
|
}
|
|
492
|
-
function
|
|
493
|
-
const { open: r, toggleOpen: o } =
|
|
484
|
+
function nr({ children: e }) {
|
|
485
|
+
const { open: r, toggleOpen: o } = ke();
|
|
494
486
|
return /* @__PURE__ */ t(
|
|
495
|
-
|
|
487
|
+
ve,
|
|
496
488
|
{
|
|
497
|
-
xs: /* @__PURE__ */ t(
|
|
498
|
-
md: /* @__PURE__ */ t(
|
|
489
|
+
xs: /* @__PURE__ */ t(yt, { open: r, onClose: () => o(!1), children: e }),
|
|
490
|
+
md: /* @__PURE__ */ t(g, { children: e })
|
|
499
491
|
}
|
|
500
492
|
);
|
|
501
493
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
)
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
const a =
|
|
516
|
-
|
|
494
|
+
function ir({ loading: e = !1, disabled: r, ...o }) {
|
|
495
|
+
return /* @__PURE__ */ t(
|
|
496
|
+
ne,
|
|
497
|
+
{
|
|
498
|
+
disableElevation: !0,
|
|
499
|
+
disabled: r || e === !0,
|
|
500
|
+
...o,
|
|
501
|
+
sx: [{ borderRadius: "4px" }, ...Array.isArray(o.sx) ? o.sx : [o.sx]],
|
|
502
|
+
startIcon: e && /* @__PURE__ */ t(ie, { size: "1em" })
|
|
503
|
+
}
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
function ge({ value: e, options: r, onChange: o, placeholder: n = "", ...i }) {
|
|
507
|
+
const a = te(null), s = ye(), [l, m] = T(!1), [h, f] = T(e !== null ? e : ""), d = j(s.breakpoints.down("sm"));
|
|
508
|
+
U(() => {
|
|
517
509
|
f(e !== null ? e : "");
|
|
518
510
|
}, [e]);
|
|
519
|
-
const
|
|
511
|
+
const w = fe(() => {
|
|
520
512
|
m(!1);
|
|
521
|
-
}, []), y =
|
|
513
|
+
}, []), y = fe(() => {
|
|
522
514
|
m(!0);
|
|
523
515
|
}, []);
|
|
524
|
-
function
|
|
525
|
-
f(
|
|
516
|
+
function S(x) {
|
|
517
|
+
f(x.value), o(x.value), d && w();
|
|
526
518
|
}
|
|
527
|
-
function x
|
|
528
|
-
return
|
|
519
|
+
function u(x) {
|
|
520
|
+
return x === h;
|
|
529
521
|
}
|
|
530
|
-
return /* @__PURE__ */
|
|
531
|
-
/* @__PURE__ */
|
|
532
|
-
|
|
522
|
+
return /* @__PURE__ */ p(_, { children: [
|
|
523
|
+
/* @__PURE__ */ p(
|
|
524
|
+
lr,
|
|
533
525
|
{
|
|
534
526
|
ref: a,
|
|
535
527
|
onClick: y,
|
|
536
528
|
variant: "outlined",
|
|
537
529
|
size: "medium",
|
|
538
|
-
className: ["my-select__selector",
|
|
530
|
+
className: ["my-select__selector", at(h) ? "" : "my-select__selector--active"].join(" "),
|
|
539
531
|
sx: { minWidth: { xs: "100px", md: "auto" }, color: "text.primary", borderRadius: "8px" },
|
|
540
532
|
...i,
|
|
541
533
|
children: [
|
|
542
|
-
|
|
534
|
+
r.find((x) => x.value === h)?.name || n,
|
|
543
535
|
/* @__PURE__ */ t(It, { className: "my-select__arrowdown", component: bt, sx: { width: 18, height: 18 } })
|
|
544
536
|
]
|
|
545
537
|
}
|
|
546
538
|
),
|
|
547
|
-
/* @__PURE__ */ t(St, { open: l, anchorEl: a.current, transition: !0, sx: { zIndex: "9999" }, children: ({ TransitionProps:
|
|
539
|
+
/* @__PURE__ */ t(St, { open: l, anchorEl: a.current, transition: !0, sx: { zIndex: "9999" }, children: ({ TransitionProps: x, placement: b }) => /* @__PURE__ */ t(
|
|
548
540
|
vt,
|
|
549
541
|
{
|
|
550
|
-
...
|
|
551
|
-
style: { transformOrigin:
|
|
552
|
-
children: /* @__PURE__ */ t(Ct, { children: /* @__PURE__ */ t(kt, { onClickAway:
|
|
542
|
+
...x,
|
|
543
|
+
style: { transformOrigin: b === "bottom" ? "center top" : "center bottom" },
|
|
544
|
+
children: /* @__PURE__ */ t(Ct, { children: /* @__PURE__ */ t(kt, { onClickAway: w, children: /* @__PURE__ */ t(ar, { autoFocusItem: l, onMouseEnter: y, onMouseLeave: w, children: r.map((v) => /* @__PURE__ */ p($e, { onClick: () => S(v), sx: { fontSize: 14 }, children: [
|
|
553
545
|
/* @__PURE__ */ t(
|
|
554
546
|
wt,
|
|
555
547
|
{
|
|
556
|
-
sx: { mr: 1, fontSize: 16, visibility:
|
|
548
|
+
sx: { mr: 1, fontSize: 16, visibility: u(v.value) ? "visible" : "hidden" }
|
|
557
549
|
}
|
|
558
550
|
),
|
|
559
|
-
|
|
560
|
-
] },
|
|
551
|
+
v.name
|
|
552
|
+
] }, v.value)) }) }) })
|
|
561
553
|
}
|
|
562
554
|
) })
|
|
563
555
|
] });
|
|
564
556
|
}
|
|
565
|
-
const
|
|
557
|
+
const lr = K(ir)`
|
|
566
558
|
border: 1px solid ${(e) => e.theme.palette.divider};
|
|
567
559
|
padding: 6px 8px 6px 12px;
|
|
568
560
|
font-weight: ${(e) => e.theme.typography.fontWeightRegular};
|
|
@@ -573,10 +565,6 @@ const sr = Q(ar)`
|
|
|
573
565
|
& + & {
|
|
574
566
|
margin-left: 10px;
|
|
575
567
|
}
|
|
576
|
-
&.my-select__selector--active {
|
|
577
|
-
&,
|
|
578
|
-
.my-select__arrowdown,
|
|
579
|
-
}
|
|
580
568
|
.my-select__arrowdown {
|
|
581
569
|
color: ${(e) => e.theme.palette.grey[400]};
|
|
582
570
|
font-size: 14px;
|
|
@@ -590,7 +578,7 @@ const sr = Q(ar)`
|
|
|
590
578
|
margin-right: 3px;
|
|
591
579
|
}
|
|
592
580
|
}
|
|
593
|
-
`,
|
|
581
|
+
`, ar = K(je)`
|
|
594
582
|
.my-select__option__icon {
|
|
595
583
|
color: transparent;
|
|
596
584
|
font-size: 14px;
|
|
@@ -608,15 +596,17 @@ const sr = Q(ar)`
|
|
|
608
596
|
}
|
|
609
597
|
`;
|
|
610
598
|
function Ze() {
|
|
611
|
-
const { search: e, t: r } =
|
|
612
|
-
return /* @__PURE__ */
|
|
613
|
-
|
|
599
|
+
const { search: e, t: r } = I(), { filters: o, handleSort: n, handlePrice: i } = e, a = Ge(r);
|
|
600
|
+
return /* @__PURE__ */ p(
|
|
601
|
+
A,
|
|
614
602
|
{
|
|
615
603
|
direction: { xs: "row", md: "column" },
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
604
|
+
sx: {
|
|
605
|
+
alignItems: { xs: "center", md: "flex-start" },
|
|
606
|
+
gap: { xs: 1, md: 2 },
|
|
607
|
+
width: { xs: "100%", md: "auto" },
|
|
608
|
+
justifyContent: "space-between"
|
|
609
|
+
},
|
|
620
610
|
children: [
|
|
621
611
|
/* @__PURE__ */ t(
|
|
622
612
|
We,
|
|
@@ -634,7 +624,7 @@ function Ze() {
|
|
|
634
624
|
}
|
|
635
625
|
),
|
|
636
626
|
/* @__PURE__ */ t(
|
|
637
|
-
|
|
627
|
+
ge,
|
|
638
628
|
{
|
|
639
629
|
value: o.sortBy || a[0].value,
|
|
640
630
|
options: a,
|
|
@@ -646,18 +636,18 @@ function Ze() {
|
|
|
646
636
|
}
|
|
647
637
|
);
|
|
648
638
|
}
|
|
649
|
-
function
|
|
650
|
-
const { selectedCategory: r, search: o, t: n, categoryOptions: i, loadings: a, layout: s, baseSearch: l, compact: m } =
|
|
651
|
-
|
|
639
|
+
function sr({ menus: e = [] }) {
|
|
640
|
+
const { selectedCategory: r, search: o, t: n, categoryOptions: i, loadings: a, layout: s, baseSearch: l, compact: m } = I(), { filters: h, handleActiveMenu: f, handleCategory: d, cleanFilter: w } = o, { toggleOpen: y } = ke();
|
|
641
|
+
U(() => {
|
|
652
642
|
y(!1);
|
|
653
|
-
}, [Object.values(
|
|
654
|
-
const
|
|
655
|
-
return s.showCategory && !m ? /* @__PURE__ */
|
|
643
|
+
}, [Object.values(h).join("")]);
|
|
644
|
+
const S = qt(l, s.showSearch, h.keyword);
|
|
645
|
+
return s.showCategory && !m ? /* @__PURE__ */ p(nr, { children: [
|
|
656
646
|
/* @__PURE__ */ t(
|
|
657
|
-
|
|
647
|
+
ve,
|
|
658
648
|
{
|
|
659
|
-
xs: /* @__PURE__ */
|
|
660
|
-
|
|
649
|
+
xs: /* @__PURE__ */ p(
|
|
650
|
+
A,
|
|
661
651
|
{
|
|
662
652
|
direction: "row",
|
|
663
653
|
justifyContent: "space-between",
|
|
@@ -668,8 +658,8 @@ function dr({ menus: e }) {
|
|
|
668
658
|
borderBottom: 1,
|
|
669
659
|
borderColor: "divider",
|
|
670
660
|
children: [
|
|
671
|
-
/* @__PURE__ */ t(Ye, { onClick: () => y(!1), children: /* @__PURE__ */ t(
|
|
672
|
-
/* @__PURE__ */ t(
|
|
661
|
+
/* @__PURE__ */ t(Ye, { onClick: () => y(!1), children: /* @__PURE__ */ t(_e, {}) }),
|
|
662
|
+
/* @__PURE__ */ t(k, { flex: 1, variant: "body1", fontWeight: "fontWeightMedium", children: n("common.category") })
|
|
673
663
|
]
|
|
674
664
|
}
|
|
675
665
|
),
|
|
@@ -677,72 +667,71 @@ function dr({ menus: e }) {
|
|
|
677
667
|
}
|
|
678
668
|
),
|
|
679
669
|
/* @__PURE__ */ t(
|
|
680
|
-
|
|
670
|
+
A,
|
|
681
671
|
{
|
|
682
672
|
visibility: a.fetchCategoriesLoading ? "hidden" : "visible",
|
|
683
673
|
width: { xs: 268, md: 200 },
|
|
684
674
|
boxSizing: "content-box",
|
|
685
675
|
p: { xs: 2, md: 0 },
|
|
686
676
|
pr: { md: 6 },
|
|
687
|
-
children:
|
|
688
|
-
s.showExplore && /* @__PURE__ */
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
-
/* @__PURE__ */ t(M, { icon:
|
|
677
|
+
children: S ? /* @__PURE__ */ p(_, { children: [
|
|
678
|
+
s.showExplore && /* @__PURE__ */ p(g, { mb: 3, pb: 3, borderBottom: 1, borderColor: "divider", children: [
|
|
679
|
+
/* @__PURE__ */ p(g, { display: "flex", alignItems: "center", gap: 1, children: [
|
|
680
|
+
/* @__PURE__ */ t(M, { icon: ut, width: 20, height: 20 }),
|
|
691
681
|
/* @__PURE__ */ t(
|
|
692
|
-
|
|
682
|
+
k,
|
|
693
683
|
{
|
|
694
684
|
variant: "body1",
|
|
695
|
-
color: !r && !
|
|
696
|
-
fontWeight: !r && !
|
|
685
|
+
color: !r && !h.menu ? "text.primary" : "grey.400",
|
|
686
|
+
fontWeight: !r && !h.menu ? "fontWeightMedium" : void 0,
|
|
697
687
|
sx: { cursor: "pointer" },
|
|
698
688
|
onClick: () => {
|
|
699
|
-
y(!1),
|
|
689
|
+
y(!1), w();
|
|
700
690
|
},
|
|
701
691
|
children: n("explore.title")
|
|
702
692
|
}
|
|
703
693
|
)
|
|
704
694
|
] }),
|
|
705
|
-
e
|
|
706
|
-
typeof
|
|
695
|
+
e.map((u) => /* @__PURE__ */ p(g, { display: "flex", alignItems: "center", mt: 2, gap: 1, children: [
|
|
696
|
+
typeof u.icon == "string" ? /* @__PURE__ */ t(M, { icon: u.icon, width: 20, height: 20 }) : u.icon,
|
|
707
697
|
/* @__PURE__ */ t(
|
|
708
|
-
|
|
698
|
+
k,
|
|
709
699
|
{
|
|
710
700
|
variant: "body1",
|
|
711
|
-
color:
|
|
712
|
-
fontWeight:
|
|
701
|
+
color: h.menu === u.key ? "text.primary" : "grey.400",
|
|
702
|
+
fontWeight: h.menu === u.key ? "fontWeightMedium" : void 0,
|
|
713
703
|
sx: { cursor: "pointer" },
|
|
714
704
|
onClick: () => {
|
|
715
|
-
|
|
716
|
-
y(!1), f(x.key), (B = x.onClick) == null || B.call(x);
|
|
705
|
+
y(!1), f(u.key), u.onClick?.();
|
|
717
706
|
},
|
|
718
|
-
children:
|
|
707
|
+
children: u.title
|
|
719
708
|
}
|
|
720
709
|
)
|
|
721
|
-
] },
|
|
710
|
+
] }, u.key))
|
|
722
711
|
] }),
|
|
723
|
-
!!i.length && /* @__PURE__ */ t(
|
|
724
|
-
|
|
712
|
+
!!i.length && /* @__PURE__ */ t(A, { gap: 2, children: i.map((u) => /* @__PURE__ */ t(
|
|
713
|
+
k,
|
|
725
714
|
{
|
|
726
715
|
variant: "body1",
|
|
727
|
-
title:
|
|
716
|
+
title: u.name,
|
|
728
717
|
sx: { cursor: "pointer" },
|
|
729
718
|
"data-cy": "filter",
|
|
730
|
-
color: r ===
|
|
719
|
+
color: r === u.value ? "text.primary" : "grey.400",
|
|
731
720
|
textTransform: "capitalize",
|
|
732
721
|
onClick: () => {
|
|
733
|
-
r ===
|
|
722
|
+
r === u.value ? w() : d(u.value), y(!1);
|
|
734
723
|
},
|
|
735
|
-
children:
|
|
724
|
+
children: u.name
|
|
736
725
|
},
|
|
737
|
-
|
|
726
|
+
u.value
|
|
738
727
|
)) })
|
|
739
728
|
] }) : /* @__PURE__ */ t(Ze, {})
|
|
740
729
|
}
|
|
741
730
|
)
|
|
742
731
|
] }) : null;
|
|
743
732
|
}
|
|
744
|
-
function
|
|
745
|
-
const { endpoint: e, serverVersion: r, storeVersion: o } =
|
|
733
|
+
function Ce() {
|
|
734
|
+
const { endpoint: e, serverVersion: r, storeVersion: o } = I(), n = Ke(r, o), i = H(() => Fe({
|
|
746
735
|
baseURL: e,
|
|
747
736
|
headers: n
|
|
748
737
|
}), [e]);
|
|
@@ -757,44 +746,74 @@ function Se() {
|
|
|
757
746
|
}
|
|
758
747
|
};
|
|
759
748
|
}
|
|
760
|
-
const Je =
|
|
761
|
-
return /* @__PURE__ */ t(
|
|
749
|
+
const Je = ct(function(r) {
|
|
750
|
+
return /* @__PURE__ */ t(
|
|
751
|
+
g,
|
|
752
|
+
{
|
|
753
|
+
...r,
|
|
754
|
+
sx: [
|
|
755
|
+
{
|
|
756
|
+
height: 60,
|
|
757
|
+
display: "flex",
|
|
758
|
+
alignItems: "center",
|
|
759
|
+
justifyContent: "center"
|
|
760
|
+
},
|
|
761
|
+
...Array.isArray(r.sx) ? r.sx : [r.sx]
|
|
762
|
+
],
|
|
763
|
+
children: /* @__PURE__ */ t(ie, {})
|
|
764
|
+
}
|
|
765
|
+
);
|
|
762
766
|
});
|
|
763
|
-
function
|
|
764
|
-
icon: e,
|
|
765
|
-
children: r,
|
|
767
|
+
function Te({
|
|
768
|
+
icon: e = null,
|
|
769
|
+
children: r = null,
|
|
766
770
|
maxWidth: o = 100,
|
|
767
|
-
title: n
|
|
771
|
+
title: n = ""
|
|
768
772
|
}) {
|
|
769
|
-
return (r === 0 || r) && /* @__PURE__ */
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
{
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
773
|
+
return (r === 0 || r) && /* @__PURE__ */ p(
|
|
774
|
+
A,
|
|
775
|
+
{
|
|
776
|
+
direction: "row",
|
|
777
|
+
sx: {
|
|
778
|
+
alignItems: "center",
|
|
779
|
+
gap: 1,
|
|
780
|
+
maxWidth: o,
|
|
781
|
+
overflow: "hidden"
|
|
782
|
+
},
|
|
783
|
+
children: [
|
|
784
|
+
e,
|
|
785
|
+
/* @__PURE__ */ t(
|
|
786
|
+
k,
|
|
787
|
+
{
|
|
788
|
+
variant: "body2",
|
|
789
|
+
title: n || (typeof r == "string" ? r : void 0),
|
|
790
|
+
sx: {
|
|
791
|
+
flex: 1,
|
|
792
|
+
overflow: "hidden",
|
|
793
|
+
textOverflow: "ellipsis",
|
|
794
|
+
whiteSpace: "nowrap"
|
|
795
|
+
},
|
|
796
|
+
children: r
|
|
797
|
+
}
|
|
798
|
+
)
|
|
799
|
+
]
|
|
800
|
+
}
|
|
801
|
+
);
|
|
782
802
|
}
|
|
783
|
-
const
|
|
784
|
-
function
|
|
785
|
-
|
|
786
|
-
const { t: e, search: r } = R(), { get: o } = Se(), n = we(), i = V(n.breakpoints.down("md")), a = ((B = (x = window.blocklet) == null ? void 0 : x.preferences) == null ? void 0 : B.homeBanner) || [], {
|
|
803
|
+
const cr = 16 / 9, de = 292, xe = 189, re = 336;
|
|
804
|
+
function dr() {
|
|
805
|
+
const { t: e, search: r } = I(), { get: o } = Ce(), n = ye(), i = j(n.breakpoints.down("md")), a = window.blocklet?.preferences?.homeBanner || [], {
|
|
787
806
|
data: s = [],
|
|
788
807
|
error: l,
|
|
789
808
|
loading: m
|
|
790
|
-
} =
|
|
791
|
-
const
|
|
792
|
-
|
|
809
|
+
} = oe(async () => {
|
|
810
|
+
const u = await o(
|
|
811
|
+
be(P.blockletsPath, { didList: a.map((x) => x.did).join(",") })
|
|
793
812
|
);
|
|
794
|
-
return
|
|
813
|
+
return u?.dataList ? a.map((x) => u.dataList.find((b) => b.did === x.did)) : [];
|
|
795
814
|
});
|
|
796
815
|
l && console.error("Get Banner Blocklets error:", l);
|
|
797
|
-
const
|
|
816
|
+
const h = {
|
|
798
817
|
position: "absolute",
|
|
799
818
|
top: "50%",
|
|
800
819
|
transform: "translateY(-50%)",
|
|
@@ -802,32 +821,76 @@ function ur() {
|
|
|
802
821
|
cursor: "pointer",
|
|
803
822
|
color: "text.hint"
|
|
804
823
|
};
|
|
805
|
-
return !l && a.length > 0 ? /* @__PURE__ */
|
|
806
|
-
/* @__PURE__ */ t(v, { component: "h2", variant: "h2", mt: { xs: 2, md: 0 }, mb: 3, children: e("explore.title") }),
|
|
824
|
+
return !l && a.length > 0 ? /* @__PURE__ */ p(_, { children: [
|
|
807
825
|
/* @__PURE__ */ t(
|
|
808
|
-
|
|
826
|
+
k,
|
|
809
827
|
{
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
828
|
+
component: "h2",
|
|
829
|
+
variant: "h2",
|
|
830
|
+
sx: {
|
|
831
|
+
mt: { xs: 2, md: 0 },
|
|
832
|
+
mb: 3
|
|
833
|
+
},
|
|
834
|
+
children: e("explore.title")
|
|
835
|
+
}
|
|
836
|
+
),
|
|
837
|
+
/* @__PURE__ */ t(
|
|
838
|
+
g,
|
|
839
|
+
{
|
|
840
|
+
sx: {
|
|
841
|
+
height: { xs: "auto", md: de },
|
|
842
|
+
minHeight: de,
|
|
843
|
+
position: "relative",
|
|
844
|
+
border: 1,
|
|
845
|
+
borderColor: "divider",
|
|
846
|
+
borderRadius: 3,
|
|
847
|
+
overflow: "hidden"
|
|
848
|
+
},
|
|
849
|
+
children: m ? /* @__PURE__ */ p(
|
|
850
|
+
g,
|
|
851
|
+
{
|
|
852
|
+
sx: {
|
|
853
|
+
p: 5,
|
|
854
|
+
display: { md: "flex" },
|
|
855
|
+
gap: 5,
|
|
856
|
+
alignItems: "center",
|
|
857
|
+
justifyContent: "center"
|
|
858
|
+
},
|
|
859
|
+
children: [
|
|
860
|
+
/* @__PURE__ */ t(L, { variant: "rounded", height: xe, width: re }),
|
|
861
|
+
/* @__PURE__ */ p(
|
|
862
|
+
g,
|
|
863
|
+
{
|
|
864
|
+
sx: {
|
|
865
|
+
flex: 1,
|
|
866
|
+
height: "100%"
|
|
867
|
+
},
|
|
868
|
+
children: [
|
|
869
|
+
/* @__PURE__ */ t(L, { variant: "text", height: 50, width: 100 }),
|
|
870
|
+
/* @__PURE__ */ t(L, { variant: "text", height: 40, width: "100%" }),
|
|
871
|
+
/* @__PURE__ */ t(L, { variant: "text", height: 40, width: 300 }),
|
|
872
|
+
/* @__PURE__ */ p(
|
|
873
|
+
g,
|
|
874
|
+
{
|
|
875
|
+
sx: {
|
|
876
|
+
display: "flex",
|
|
877
|
+
gap: 1,
|
|
878
|
+
my: 2
|
|
879
|
+
},
|
|
880
|
+
children: [
|
|
881
|
+
/* @__PURE__ */ t(L, { variant: "circular", height: 20, width: 20 }),
|
|
882
|
+
/* @__PURE__ */ t(L, { variant: "text", height: 20, width: 50 })
|
|
883
|
+
]
|
|
884
|
+
}
|
|
885
|
+
),
|
|
886
|
+
/* @__PURE__ */ t(L, { variant: "rounded", height: 30, width: 100 })
|
|
887
|
+
]
|
|
888
|
+
}
|
|
889
|
+
)
|
|
890
|
+
]
|
|
891
|
+
}
|
|
892
|
+
) : /* @__PURE__ */ t(
|
|
893
|
+
Tt,
|
|
831
894
|
{
|
|
832
895
|
showNav: !0,
|
|
833
896
|
autoPlay: !0,
|
|
@@ -838,18 +901,24 @@ function ur() {
|
|
|
838
901
|
showBullets: !1,
|
|
839
902
|
showThumbnails: !1,
|
|
840
903
|
showFullscreenButton: !1,
|
|
841
|
-
renderLeftNav: (
|
|
842
|
-
renderRightNav: (
|
|
843
|
-
items: a.map((
|
|
844
|
-
original:
|
|
904
|
+
renderLeftNav: (u) => /* @__PURE__ */ t(g, { onClick: u, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(Rt, { sx: { ...h, left: 5 } }) }),
|
|
905
|
+
renderRightNav: (u) => /* @__PURE__ */ t(g, { onClick: u, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(Pt, { sx: { ...h, right: 5 } }) }),
|
|
906
|
+
items: a.map((u, x) => ({
|
|
907
|
+
original: u.did,
|
|
845
908
|
renderItem: () => {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
O,
|
|
909
|
+
const b = s[x] || {}, v = u.cover || hr(u.did, b.screenshots?.[0]), C = qe(v, n.breakpoints.values.md * 2);
|
|
910
|
+
return /* @__PURE__ */ p(
|
|
911
|
+
A,
|
|
850
912
|
{
|
|
851
|
-
|
|
913
|
+
direction: { xs: "column", md: "row" },
|
|
914
|
+
onClick: () => r.handleSearchSelect(b),
|
|
852
915
|
sx: {
|
|
916
|
+
height: { xs: "auto", md: de },
|
|
917
|
+
display: "flex",
|
|
918
|
+
justifyContent: "center",
|
|
919
|
+
alignItems: { xs: "flex-start", md: "center" },
|
|
920
|
+
p: { xs: 2, md: 5 },
|
|
921
|
+
gap: { xs: 2, md: 5 },
|
|
853
922
|
cursor: "pointer",
|
|
854
923
|
"&::before": {
|
|
855
924
|
content: '""',
|
|
@@ -858,30 +927,41 @@ function ur() {
|
|
|
858
927
|
left: 0,
|
|
859
928
|
right: 0,
|
|
860
929
|
bottom: 0,
|
|
861
|
-
backgroundImage: `url("${
|
|
930
|
+
backgroundImage: `url("${C}")`,
|
|
862
931
|
backgroundSize: "cover",
|
|
863
932
|
filter: "blur(50px)",
|
|
864
933
|
opacity: 0.15,
|
|
865
934
|
zIndex: 0
|
|
866
935
|
}
|
|
867
936
|
},
|
|
868
|
-
display: "flex",
|
|
869
|
-
direction: { xs: "column", md: "row" },
|
|
870
|
-
justifyContent: "center",
|
|
871
|
-
alignItems: { xs: "flex-start", md: "center" },
|
|
872
|
-
p: { xs: 2, md: 5 },
|
|
873
|
-
onClick: () => r.handleSearchSelect(b),
|
|
874
|
-
gap: { xs: 2, md: 5 },
|
|
875
937
|
children: [
|
|
876
|
-
f(
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
938
|
+
f(C),
|
|
939
|
+
/* @__PURE__ */ p(
|
|
940
|
+
A,
|
|
941
|
+
{
|
|
942
|
+
sx: {
|
|
943
|
+
flex: 1,
|
|
944
|
+
height: "100%",
|
|
945
|
+
gap: 3
|
|
946
|
+
},
|
|
947
|
+
children: [
|
|
948
|
+
/* @__PURE__ */ p(
|
|
949
|
+
g,
|
|
950
|
+
{
|
|
951
|
+
sx: {
|
|
952
|
+
flex: 1
|
|
953
|
+
},
|
|
954
|
+
children: [
|
|
955
|
+
d(u.name || b.title || u.name),
|
|
956
|
+
w(u.desc || b.description)
|
|
957
|
+
]
|
|
958
|
+
}
|
|
959
|
+
),
|
|
960
|
+
b.did && y(b, u.baseNum),
|
|
961
|
+
S(b)
|
|
962
|
+
]
|
|
963
|
+
}
|
|
964
|
+
)
|
|
885
965
|
]
|
|
886
966
|
}
|
|
887
967
|
);
|
|
@@ -892,50 +972,80 @@ function ur() {
|
|
|
892
972
|
}
|
|
893
973
|
)
|
|
894
974
|
] }) : null;
|
|
895
|
-
function f(
|
|
896
|
-
return /* @__PURE__ */ t(
|
|
975
|
+
function f(u) {
|
|
976
|
+
return /* @__PURE__ */ t(
|
|
977
|
+
g,
|
|
978
|
+
{
|
|
979
|
+
sx: {
|
|
980
|
+
borderRadius: 2,
|
|
981
|
+
overflow: "hidden",
|
|
982
|
+
position: "relative",
|
|
983
|
+
width: { xs: "100%", md: re }
|
|
984
|
+
},
|
|
985
|
+
children: /* @__PURE__ */ t(pr, { url: u })
|
|
986
|
+
}
|
|
987
|
+
);
|
|
897
988
|
}
|
|
898
|
-
function d(
|
|
899
|
-
return /* @__PURE__ */ t(
|
|
989
|
+
function d(u) {
|
|
990
|
+
return /* @__PURE__ */ t(
|
|
991
|
+
k,
|
|
992
|
+
{
|
|
993
|
+
variant: "h2",
|
|
994
|
+
sx: {
|
|
995
|
+
width: "100%"
|
|
996
|
+
},
|
|
997
|
+
children: u
|
|
998
|
+
}
|
|
999
|
+
);
|
|
900
1000
|
}
|
|
901
|
-
function
|
|
1001
|
+
function w(u) {
|
|
902
1002
|
return /* @__PURE__ */ t(
|
|
903
|
-
|
|
1003
|
+
k,
|
|
904
1004
|
{
|
|
905
1005
|
variant: "body2",
|
|
906
|
-
color: "text.secondary",
|
|
907
|
-
textAlign: "left",
|
|
908
|
-
width: "100%",
|
|
909
|
-
minHeight: 70,
|
|
910
|
-
maxHeight: 70,
|
|
911
|
-
pt: 1,
|
|
912
1006
|
sx: {
|
|
1007
|
+
color: "text.secondary",
|
|
1008
|
+
textAlign: "left",
|
|
1009
|
+
width: "100%",
|
|
1010
|
+
minHeight: 70,
|
|
1011
|
+
maxHeight: 71,
|
|
1012
|
+
pt: 1,
|
|
913
1013
|
display: "-webkit-box",
|
|
914
1014
|
lineClamp: 3,
|
|
915
1015
|
WebkitLineClamp: 3,
|
|
916
|
-
maxHeight: 71,
|
|
917
1016
|
textWrap: "wrap",
|
|
918
1017
|
overflow: "hidden",
|
|
919
1018
|
WebkitBoxOrient: "vertical"
|
|
920
1019
|
},
|
|
921
|
-
children:
|
|
1020
|
+
children: u
|
|
922
1021
|
}
|
|
923
1022
|
);
|
|
924
1023
|
}
|
|
925
|
-
function y(
|
|
926
|
-
const { did: b, owner:
|
|
927
|
-
return /* @__PURE__ */
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
1024
|
+
function y(u, x = 0) {
|
|
1025
|
+
const { did: b, owner: v, stats: C } = u;
|
|
1026
|
+
return /* @__PURE__ */ p(
|
|
1027
|
+
g,
|
|
1028
|
+
{
|
|
1029
|
+
sx: {
|
|
1030
|
+
display: "flex",
|
|
1031
|
+
alignItems: "center",
|
|
1032
|
+
gap: 2,
|
|
1033
|
+
color: "text.secondary"
|
|
1034
|
+
},
|
|
1035
|
+
children: [
|
|
1036
|
+
/* @__PURE__ */ t(Te, { icon: /* @__PURE__ */ t(He, { src: v.avatar, did: b, size: 20, variant: "circle" }), children: v.fullName }),
|
|
1037
|
+
/* @__PURE__ */ t(Te, { icon: /* @__PURE__ */ t(M, { icon: Bt }), title: `${C.downloads + x}`, children: ur(C.downloads + x) })
|
|
1038
|
+
]
|
|
1039
|
+
}
|
|
1040
|
+
);
|
|
931
1041
|
}
|
|
932
|
-
function
|
|
1042
|
+
function S(u) {
|
|
933
1043
|
return /* @__PURE__ */ t(
|
|
934
|
-
|
|
1044
|
+
ne,
|
|
935
1045
|
{
|
|
936
1046
|
variant: "outlined",
|
|
937
1047
|
size: "small",
|
|
938
|
-
onClick: () => r.handleSearchSelect(
|
|
1048
|
+
onClick: () => r.handleSearchSelect(u),
|
|
939
1049
|
sx: {
|
|
940
1050
|
width: "fit-content",
|
|
941
1051
|
textTransform: "none",
|
|
@@ -948,66 +1058,108 @@ function ur() {
|
|
|
948
1058
|
);
|
|
949
1059
|
}
|
|
950
1060
|
}
|
|
951
|
-
const
|
|
952
|
-
function
|
|
953
|
-
const [r, o] =
|
|
954
|
-
return /* @__PURE__ */
|
|
1061
|
+
const ur = (e) => Number.isNaN(e) ? 0 : e < 1e3 ? e : e < 1e6 ? `${(e / 1e3).toFixed(1)}k` : e < 1e9 ? `${(e / 1e6).toFixed(1)}m` : `${(e / 1e9).toFixed(1)}b`, hr = (e, r) => e && r ? `/assets/${e}/screenshots/${r}` : "";
|
|
1062
|
+
function pr({ url: e }) {
|
|
1063
|
+
const [r, o] = T(!0);
|
|
1064
|
+
return /* @__PURE__ */ p(_, { children: [
|
|
955
1065
|
r && /* @__PURE__ */ t(
|
|
956
|
-
|
|
1066
|
+
L,
|
|
957
1067
|
{
|
|
958
1068
|
variant: "rectangular",
|
|
959
1069
|
sx: {
|
|
960
|
-
width: { xs: "100%", md:
|
|
1070
|
+
width: { xs: "100%", md: re },
|
|
961
1071
|
height: { xs: "auto", md: xe }
|
|
962
1072
|
}
|
|
963
1073
|
}
|
|
964
1074
|
),
|
|
965
1075
|
/* @__PURE__ */ t(
|
|
966
|
-
|
|
1076
|
+
g,
|
|
967
1077
|
{
|
|
968
|
-
display: r ? "none" : "block",
|
|
969
1078
|
component: "img",
|
|
970
1079
|
src: e,
|
|
971
1080
|
alt: "",
|
|
972
|
-
width: { xs: "100%", md: oe },
|
|
973
|
-
height: { xs: "auto", md: xe },
|
|
974
|
-
borderRadius: 2,
|
|
975
|
-
border: 1,
|
|
976
|
-
borderColor: "divider",
|
|
977
|
-
sx: { objectFit: "container", cursor: "pointer", aspectRatio: hr },
|
|
978
1081
|
onLoad: () => o(!1),
|
|
979
|
-
onError: () => o(!1)
|
|
1082
|
+
onError: () => o(!1),
|
|
1083
|
+
sx: {
|
|
1084
|
+
display: r ? "none" : "block",
|
|
1085
|
+
width: { xs: "100%", md: re },
|
|
1086
|
+
height: { xs: "auto", md: xe },
|
|
1087
|
+
borderRadius: 2,
|
|
1088
|
+
border: 1,
|
|
1089
|
+
borderColor: "divider",
|
|
1090
|
+
objectFit: "container",
|
|
1091
|
+
cursor: "pointer",
|
|
1092
|
+
aspectRatio: cr
|
|
1093
|
+
}
|
|
980
1094
|
}
|
|
981
1095
|
)
|
|
982
1096
|
] });
|
|
983
1097
|
}
|
|
984
|
-
function
|
|
985
|
-
const { blockletRender: o, serverVersion: n } =
|
|
986
|
-
return /* @__PURE__ */
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
1098
|
+
function mr({ title: e, blocklets: r }) {
|
|
1099
|
+
const { blockletRender: o, serverVersion: n } = I();
|
|
1100
|
+
return /* @__PURE__ */ p(
|
|
1101
|
+
g,
|
|
1102
|
+
{
|
|
1103
|
+
sx: {
|
|
1104
|
+
mt: 3
|
|
1105
|
+
},
|
|
1106
|
+
children: [
|
|
1107
|
+
/* @__PURE__ */ t(k, { component: "h3", variant: "h3", sx: { mb: 2 }, children: e }),
|
|
1108
|
+
/* @__PURE__ */ t(
|
|
1109
|
+
Be,
|
|
1110
|
+
{
|
|
1111
|
+
container: !0,
|
|
1112
|
+
spacing: 2,
|
|
1113
|
+
sx: {
|
|
1114
|
+
boxSizing: "border-box",
|
|
1115
|
+
maxWidth: "calc(100vw - 16px)"
|
|
1116
|
+
},
|
|
1117
|
+
children: r.map((i) => /* @__PURE__ */ t(
|
|
1118
|
+
Be,
|
|
1119
|
+
{
|
|
1120
|
+
"data-blocklet-did": i.did,
|
|
1121
|
+
sx: {
|
|
1122
|
+
p: "2px"
|
|
1123
|
+
},
|
|
1124
|
+
size: {
|
|
1125
|
+
xs: 12,
|
|
1126
|
+
md: 6
|
|
1127
|
+
},
|
|
1128
|
+
children: /* @__PURE__ */ t(
|
|
1129
|
+
g,
|
|
1130
|
+
{
|
|
1131
|
+
sx: {
|
|
1132
|
+
padding: "1px"
|
|
1133
|
+
},
|
|
1134
|
+
children: o({ blocklet: i, blocklets: r, serverVersion: n })
|
|
1135
|
+
}
|
|
1136
|
+
)
|
|
1137
|
+
},
|
|
1138
|
+
i.did
|
|
1139
|
+
))
|
|
1140
|
+
}
|
|
1141
|
+
)
|
|
1142
|
+
]
|
|
1143
|
+
}
|
|
1144
|
+
);
|
|
990
1145
|
}
|
|
991
|
-
function
|
|
992
|
-
const { get: e } =
|
|
1146
|
+
function fr() {
|
|
1147
|
+
const { get: e } = Ce(), { t: r } = I(), {
|
|
993
1148
|
data: o = [],
|
|
994
1149
|
error: n,
|
|
995
1150
|
loading: i
|
|
996
|
-
} =
|
|
1151
|
+
} = oe(async () => {
|
|
997
1152
|
const a = await e(P.explorePath);
|
|
998
1153
|
return Array.isArray(a) ? a : [];
|
|
999
1154
|
});
|
|
1000
|
-
return n ? /* @__PURE__ */ t(
|
|
1001
|
-
/* @__PURE__ */ t(
|
|
1155
|
+
return n ? /* @__PURE__ */ t(we, { error: new Error(`Failed to fetch blocklets from ${P.explorePath}`) }) : i ? /* @__PURE__ */ t(Je, { mt: 15 }) : /* @__PURE__ */ p(_, { children: [
|
|
1156
|
+
/* @__PURE__ */ t(dr, {}),
|
|
1002
1157
|
o.map(
|
|
1003
|
-
(a) => {
|
|
1004
|
-
var s;
|
|
1005
|
-
return ((s = a.blocklets) == null ? void 0 : s.length) > 0 ? /* @__PURE__ */ t(gr, { title: r(`explore.${a.type}`), blocklets: a.blocklets }, a.type) : null;
|
|
1006
|
-
}
|
|
1158
|
+
(a) => a.blocklets?.length > 0 ? /* @__PURE__ */ t(mr, { title: r(`explore.${a.type}`), blocklets: a.blocklets }, a.type) : null
|
|
1007
1159
|
)
|
|
1008
1160
|
] });
|
|
1009
1161
|
}
|
|
1010
|
-
const ue = "__FREE_TEXT__",
|
|
1162
|
+
const ue = "__FREE_TEXT__", Ae = "__NO_RESULT__", he = 40;
|
|
1011
1163
|
function et({
|
|
1012
1164
|
endpoint: e,
|
|
1013
1165
|
t: r,
|
|
@@ -1017,97 +1169,106 @@ function et({
|
|
|
1017
1169
|
handleSearchSelect: a,
|
|
1018
1170
|
...s
|
|
1019
1171
|
}) {
|
|
1020
|
-
const l =
|
|
1021
|
-
|
|
1022
|
-
const
|
|
1023
|
-
return
|
|
1024
|
-
}, { data:
|
|
1025
|
-
(
|
|
1172
|
+
const l = te(null), m = te(!1), [h, f] = T(!1), [d, w] = T(""), [y, S] = T(!1), u = Ce(), [x, b] = T(!1), v = s?.placeholder || r("common.searchStore"), C = async (c) => {
|
|
1173
|
+
b(!0);
|
|
1174
|
+
const B = await u.get(Se(e, be(P.blockletsPath, c)));
|
|
1175
|
+
return b(!1), B.dataList || [];
|
|
1176
|
+
}, { data: E, run: V } = oe(
|
|
1177
|
+
(c) => c ? C({
|
|
1026
1178
|
sortBy: P.nameDesc,
|
|
1027
1179
|
page: 1,
|
|
1028
1180
|
pageSize: 10,
|
|
1029
|
-
keyword:
|
|
1181
|
+
keyword: c,
|
|
1030
1182
|
showResources: "true"
|
|
1031
1183
|
}) : Promise.resolve([]),
|
|
1032
1184
|
{
|
|
1033
1185
|
manual: !0
|
|
1034
1186
|
}
|
|
1035
1187
|
);
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
}, [n.keyword,
|
|
1188
|
+
U(() => {
|
|
1189
|
+
b(!0), V(n.keyword), w(n.keyword || "");
|
|
1190
|
+
}, [n.keyword, V]), Ft(
|
|
1039
1191
|
"ctrl + k, command + k",
|
|
1040
|
-
(
|
|
1041
|
-
var S, W;
|
|
1042
|
-
return h.stopPropagation(), h.preventDefault(), (W = (S = l.current) == null ? void 0 : S.querySelector("input")) == null || W.focus(), !1;
|
|
1043
|
-
},
|
|
1192
|
+
(c) => (c.stopPropagation(), c.preventDefault(), l.current?.querySelector("input")?.focus(), !1),
|
|
1044
1193
|
{ enableOnTags: ["INPUT"] }
|
|
1045
1194
|
);
|
|
1046
|
-
const
|
|
1047
|
-
let
|
|
1048
|
-
return d && (
|
|
1049
|
-
/* @__PURE__ */
|
|
1050
|
-
/* @__PURE__ */
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
{
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1195
|
+
const X = Ne((c) => V(c), { wait: 300 }), D = { name: ue, title: d, did: "" };
|
|
1196
|
+
let F = [];
|
|
1197
|
+
return d && (x ? F = [D] : E?.length ? F = [D, ...E] : F = [{ name: Ae, title: r("blocklet.noResults"), did: "" }]), /* @__PURE__ */ p(_, { children: [
|
|
1198
|
+
/* @__PURE__ */ p(zt, { fullScreen: !0, open: y, sx: { display: { md: "none" } }, children: [
|
|
1199
|
+
/* @__PURE__ */ p(
|
|
1200
|
+
g,
|
|
1201
|
+
{
|
|
1202
|
+
sx: {
|
|
1203
|
+
p: 2,
|
|
1204
|
+
pb: 0,
|
|
1205
|
+
display: "flex",
|
|
1206
|
+
alignItems: "center",
|
|
1207
|
+
gap: 2
|
|
1208
|
+
},
|
|
1209
|
+
children: [
|
|
1210
|
+
/* @__PURE__ */ t(
|
|
1211
|
+
Ue,
|
|
1212
|
+
{
|
|
1213
|
+
fullWidth: !0,
|
|
1214
|
+
sx: {
|
|
1215
|
+
bgcolor: "grey.50",
|
|
1216
|
+
px: 1,
|
|
1217
|
+
py: 0.5,
|
|
1218
|
+
".MuiInputBase-input": { p: 1 },
|
|
1219
|
+
".MuiOutlinedInput-notchedOutline": {
|
|
1220
|
+
borderRadius: "8px",
|
|
1221
|
+
borderColor: "transparent"
|
|
1222
|
+
},
|
|
1223
|
+
"&&:hover .MuiOutlinedInput-notchedOutline, &&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
1224
|
+
borderColor: "divider",
|
|
1225
|
+
borderWidth: "1px"
|
|
1226
|
+
}
|
|
1227
|
+
},
|
|
1228
|
+
autoFocus: !0,
|
|
1229
|
+
placeholder: v,
|
|
1230
|
+
className: "bl-autocomplete-input",
|
|
1231
|
+
value: d,
|
|
1232
|
+
onChange: (c) => G(c.target.value),
|
|
1233
|
+
startAdornment: $(y),
|
|
1234
|
+
endAdornment: q()
|
|
1067
1235
|
}
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
I(!1), g(n.keyword || "");
|
|
1084
|
-
},
|
|
1085
|
-
children: r("common.cancel")
|
|
1086
|
-
}
|
|
1087
|
-
)
|
|
1088
|
-
] }),
|
|
1089
|
-
/* @__PURE__ */ t(je, { sx: { p: 0.5 }, children: D.map((h) => Y(h)) })
|
|
1236
|
+
),
|
|
1237
|
+
/* @__PURE__ */ t(
|
|
1238
|
+
ne,
|
|
1239
|
+
{
|
|
1240
|
+
variant: "outlined",
|
|
1241
|
+
onClick: () => {
|
|
1242
|
+
S(!1), w(n.keyword || "");
|
|
1243
|
+
},
|
|
1244
|
+
children: r("common.cancel")
|
|
1245
|
+
}
|
|
1246
|
+
)
|
|
1247
|
+
]
|
|
1248
|
+
}
|
|
1249
|
+
),
|
|
1250
|
+
/* @__PURE__ */ t(je, { sx: { p: 0.5 }, children: F.map((c) => Q(c)) })
|
|
1090
1251
|
] }),
|
|
1091
|
-
/* @__PURE__ */ t(
|
|
1252
|
+
/* @__PURE__ */ t(g, { sx: { display: { sx: "block", md: "none" }, paddingTop: 1, opacity: 0.5 }, children: /* @__PURE__ */ t(M, { icon: se, style: { fontSize: 22, color: "inherit" }, onClick: () => S(!0) }) }),
|
|
1092
1253
|
/* @__PURE__ */ t(
|
|
1093
1254
|
Mt,
|
|
1094
1255
|
{
|
|
1095
1256
|
ref: l,
|
|
1096
|
-
open: !!d &&
|
|
1257
|
+
open: !!d && h,
|
|
1097
1258
|
size: "small",
|
|
1098
1259
|
onOpen: () => f(!0),
|
|
1099
|
-
onClose: (
|
|
1100
|
-
f(!1),
|
|
1260
|
+
onClose: (c, B) => {
|
|
1261
|
+
f(!1), B === "selectOption" && !m.current && i(d);
|
|
1101
1262
|
},
|
|
1102
|
-
onKeyDown: (
|
|
1103
|
-
|
|
1263
|
+
onKeyDown: (c) => {
|
|
1264
|
+
c.key === "Enter" && !d && W();
|
|
1104
1265
|
},
|
|
1105
1266
|
disableClearable: !0,
|
|
1106
1267
|
inputValue: d,
|
|
1107
|
-
onInputChange: (
|
|
1108
|
-
isOptionEqualToValue: (
|
|
1109
|
-
getOptionLabel: (
|
|
1110
|
-
getOptionKey: (
|
|
1268
|
+
onInputChange: (c, B) => G(B),
|
|
1269
|
+
isOptionEqualToValue: (c, B) => c.name === B.name,
|
|
1270
|
+
getOptionLabel: (c) => c.title,
|
|
1271
|
+
getOptionKey: (c) => c.name,
|
|
1111
1272
|
noOptionsText: r("blocklet.noResults"),
|
|
1112
1273
|
autoHighlight: !0,
|
|
1113
1274
|
forcePopupIcon: !1,
|
|
@@ -1121,26 +1282,26 @@ function et({
|
|
|
1121
1282
|
}
|
|
1122
1283
|
}
|
|
1123
1284
|
},
|
|
1124
|
-
renderInput: (
|
|
1125
|
-
|
|
1285
|
+
renderInput: (c) => /* @__PURE__ */ t(
|
|
1286
|
+
_t,
|
|
1126
1287
|
{
|
|
1127
|
-
...
|
|
1288
|
+
...c,
|
|
1128
1289
|
InputProps: {
|
|
1129
|
-
...
|
|
1290
|
+
...c.InputProps,
|
|
1130
1291
|
autoFocus: !0,
|
|
1131
|
-
placeholder:
|
|
1292
|
+
placeholder: v,
|
|
1132
1293
|
className: "bl-autocomplete-input",
|
|
1133
1294
|
value: d,
|
|
1134
|
-
startAdornment:
|
|
1135
|
-
endAdornment:
|
|
1295
|
+
startAdornment: $(h),
|
|
1296
|
+
endAdornment: q()
|
|
1136
1297
|
}
|
|
1137
1298
|
}
|
|
1138
1299
|
),
|
|
1139
|
-
filterOptions: (
|
|
1300
|
+
filterOptions: (c) => c,
|
|
1140
1301
|
...s,
|
|
1141
|
-
options:
|
|
1142
|
-
renderOption: (
|
|
1143
|
-
value:
|
|
1302
|
+
options: F,
|
|
1303
|
+
renderOption: (c, B) => Q(B),
|
|
1304
|
+
value: D,
|
|
1144
1305
|
sx: [
|
|
1145
1306
|
{
|
|
1146
1307
|
bgcolor: "grey.50",
|
|
@@ -1160,95 +1321,116 @@ function et({
|
|
|
1160
1321
|
}
|
|
1161
1322
|
)
|
|
1162
1323
|
] });
|
|
1163
|
-
function
|
|
1164
|
-
|
|
1324
|
+
function G(c) {
|
|
1325
|
+
b(!0), w(c), m.current = !1, X.run(c);
|
|
1165
1326
|
}
|
|
1166
|
-
function
|
|
1167
|
-
|
|
1327
|
+
function W() {
|
|
1328
|
+
S(!1), w(""), G(""), i("");
|
|
1168
1329
|
}
|
|
1169
|
-
function
|
|
1170
|
-
|
|
1330
|
+
function le(c) {
|
|
1331
|
+
c?.did ? (S(!1), m.current = !0, w(""), a(c)) : c.name === ue && (S(!1), i(d));
|
|
1171
1332
|
}
|
|
1172
|
-
function
|
|
1173
|
-
|
|
1174
|
-
return /* @__PURE__ */ u(
|
|
1333
|
+
function Q(c) {
|
|
1334
|
+
return /* @__PURE__ */ p(
|
|
1175
1335
|
$e,
|
|
1176
1336
|
{
|
|
1177
1337
|
sx: { display: "flex", alignItems: "center", gap: 1, p: 1.5, borderRadius: "8px" },
|
|
1178
|
-
onClick: () =>
|
|
1338
|
+
onClick: () => le(c),
|
|
1179
1339
|
children: [
|
|
1180
|
-
|
|
1181
|
-
/* @__PURE__ */
|
|
1182
|
-
/* @__PURE__ */ t(
|
|
1183
|
-
|
|
1340
|
+
Y(c),
|
|
1341
|
+
/* @__PURE__ */ p(k, { variant: "body1", children: [
|
|
1342
|
+
/* @__PURE__ */ t(
|
|
1343
|
+
k,
|
|
1344
|
+
{
|
|
1345
|
+
sx: {
|
|
1346
|
+
fontWeight: "fontWeightMedium",
|
|
1347
|
+
display: "flex",
|
|
1348
|
+
alignItems: "center",
|
|
1349
|
+
gap: 1
|
|
1350
|
+
},
|
|
1351
|
+
children: c.title
|
|
1352
|
+
}
|
|
1353
|
+
),
|
|
1354
|
+
/* @__PURE__ */ t(
|
|
1355
|
+
k,
|
|
1356
|
+
{
|
|
1357
|
+
sx: {
|
|
1358
|
+
fontSize: "13px",
|
|
1359
|
+
color: "text.hint"
|
|
1360
|
+
},
|
|
1361
|
+
children: c.category?.locales?.[o || "en"] || ""
|
|
1362
|
+
}
|
|
1363
|
+
)
|
|
1184
1364
|
] })
|
|
1185
1365
|
]
|
|
1186
1366
|
},
|
|
1187
|
-
|
|
1367
|
+
c.did
|
|
1188
1368
|
);
|
|
1189
1369
|
}
|
|
1190
|
-
function
|
|
1191
|
-
if ([ue,
|
|
1370
|
+
function Y(c) {
|
|
1371
|
+
if ([ue, Ae].includes(c.name))
|
|
1192
1372
|
return /* @__PURE__ */ t(
|
|
1193
|
-
|
|
1373
|
+
g,
|
|
1194
1374
|
{
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1375
|
+
sx: {
|
|
1376
|
+
width: he,
|
|
1377
|
+
p: "6px",
|
|
1378
|
+
display: "flex",
|
|
1379
|
+
justifyContent: "center",
|
|
1380
|
+
alignItems: "center",
|
|
1381
|
+
color: "text.hint",
|
|
1382
|
+
bgcolor: "grey.100",
|
|
1383
|
+
borderRadius: "8px"
|
|
1384
|
+
},
|
|
1385
|
+
children: /* @__PURE__ */ t(M, { icon: se, style: { fontSize: 28 } })
|
|
1204
1386
|
}
|
|
1205
1387
|
);
|
|
1206
|
-
let
|
|
1207
|
-
return
|
|
1388
|
+
let B = "";
|
|
1389
|
+
return c.logo && (B = Se(e, "assets", c.did, qe(c.logo, he, c.version))), /* @__PURE__ */ t(He, { src: B, size: he, style: { borderRadius: "8px", overflow: "hidden" } });
|
|
1208
1390
|
}
|
|
1209
|
-
function
|
|
1210
|
-
return /* @__PURE__ */ t(
|
|
1391
|
+
function $(c = !0) {
|
|
1392
|
+
return /* @__PURE__ */ t(g, { sx: { display: "flex", pl: 0.5, alignItems: "center", color: "text.hint" }, children: c && d && x ? /* @__PURE__ */ t(ie, { color: "inherit", size: 16 }) : /* @__PURE__ */ t(M, { icon: se, style: { fontSize: 16, cursor: "default" } }) });
|
|
1211
1393
|
}
|
|
1212
|
-
function
|
|
1213
|
-
return d ? /* @__PURE__ */ t(
|
|
1394
|
+
function q() {
|
|
1395
|
+
return d ? /* @__PURE__ */ t(g, { sx: { display: "flex", alignItems: "center", color: "text.hint" }, children: /* @__PURE__ */ t(
|
|
1214
1396
|
M,
|
|
1215
1397
|
{
|
|
1216
|
-
icon:
|
|
1398
|
+
icon: Lt,
|
|
1217
1399
|
style: { fontSize: 20, cursor: "pointer", color: "inherit" },
|
|
1218
|
-
onClick: () =>
|
|
1400
|
+
onClick: () => W()
|
|
1219
1401
|
}
|
|
1220
1402
|
) }) : null;
|
|
1221
1403
|
}
|
|
1222
1404
|
}
|
|
1223
|
-
function
|
|
1224
|
-
const { search: o, t: n } =
|
|
1225
|
-
const { value: y } =
|
|
1405
|
+
function gr({ placeholder: e, ...r }) {
|
|
1406
|
+
const { search: o, t: n } = I(), { filters: i, handleKeyword: a } = o, [s, l] = T(i.keyword || ""), m = Ne(a, { wait: 300 }), h = (w) => {
|
|
1407
|
+
const { value: y } = w.target;
|
|
1226
1408
|
l(y), m.run(y);
|
|
1227
1409
|
}, f = () => {
|
|
1228
1410
|
l(""), a("");
|
|
1229
1411
|
};
|
|
1230
|
-
|
|
1412
|
+
U(() => {
|
|
1231
1413
|
l(i.keyword || "");
|
|
1232
1414
|
}, [i.keyword]);
|
|
1233
1415
|
const d = e || n("common.searchPlaceholder");
|
|
1234
1416
|
return /* @__PURE__ */ t(
|
|
1235
|
-
|
|
1417
|
+
xr,
|
|
1236
1418
|
{
|
|
1237
1419
|
inputProps: {
|
|
1238
1420
|
"data-cy": "search-blocklet"
|
|
1239
1421
|
},
|
|
1240
|
-
startAdornment: /* @__PURE__ */ t(Pe, { position: "start", children: /* @__PURE__ */ t(
|
|
1241
|
-
onChange:
|
|
1422
|
+
startAdornment: /* @__PURE__ */ t(Pe, { position: "start", children: /* @__PURE__ */ t(yr, { sx: { fontSize: 18, ml: -0.5 } }) }),
|
|
1423
|
+
onChange: h,
|
|
1242
1424
|
placeholder: d,
|
|
1243
1425
|
value: s,
|
|
1244
1426
|
title: d,
|
|
1245
1427
|
"data-cy": "search",
|
|
1246
|
-
endAdornment: s && /* @__PURE__ */ t(Pe, { position: "end", children: /* @__PURE__ */ t(
|
|
1428
|
+
endAdornment: s && /* @__PURE__ */ t(Pe, { position: "end", children: /* @__PURE__ */ t(wr, { "data-cy": "search-delete", onClick: f }) }),
|
|
1247
1429
|
...r
|
|
1248
1430
|
}
|
|
1249
1431
|
);
|
|
1250
1432
|
}
|
|
1251
|
-
const
|
|
1433
|
+
const xr = K(Ue)`
|
|
1252
1434
|
background-color: ${(e) => e.theme.palette.grey[50]};
|
|
1253
1435
|
font-size: 14px;
|
|
1254
1436
|
border-radius: 6px;
|
|
@@ -1265,15 +1447,14 @@ const wr = Q(Ue)`
|
|
|
1265
1447
|
color: transparent;
|
|
1266
1448
|
}
|
|
1267
1449
|
}
|
|
1268
|
-
`,
|
|
1450
|
+
`, yr = K(Nt)`
|
|
1269
1451
|
color: ${(e) => e.theme.palette.grey[500]};
|
|
1270
|
-
`,
|
|
1452
|
+
`, wr = K(_e)`
|
|
1271
1453
|
color: ${(e) => e.theme.palette.grey[500]};
|
|
1272
1454
|
font-size: 16px;
|
|
1273
1455
|
cursor: pointer;
|
|
1274
1456
|
`;
|
|
1275
|
-
function
|
|
1276
|
-
var b;
|
|
1457
|
+
function br() {
|
|
1277
1458
|
const {
|
|
1278
1459
|
search: e,
|
|
1279
1460
|
t: r,
|
|
@@ -1284,103 +1465,125 @@ function vr() {
|
|
|
1284
1465
|
showResourcesSwitch: s,
|
|
1285
1466
|
layout: l,
|
|
1286
1467
|
baseSearch: m,
|
|
1287
|
-
categoryOptions:
|
|
1468
|
+
categoryOptions: h,
|
|
1288
1469
|
compact: f
|
|
1289
|
-
} =
|
|
1290
|
-
return /* @__PURE__ */
|
|
1291
|
-
|
|
1470
|
+
} = I(), { filters: d, handleSort: w, handlePrice: y, handleDeveloper: S, handleSwitchShowResources: u, cleanFilter: x, handleCategory: b } = e, v = Ge(r);
|
|
1471
|
+
return /* @__PURE__ */ p(
|
|
1472
|
+
A,
|
|
1292
1473
|
{
|
|
1293
|
-
position: "sticky",
|
|
1294
|
-
top: 0,
|
|
1295
|
-
zIndex: 1e3,
|
|
1296
1474
|
className: "filter-bar",
|
|
1297
1475
|
direction: { xs: "column", md: "row" },
|
|
1298
|
-
alignItems: { xs: "flex-start", md: "center" },
|
|
1299
|
-
justifyContent: "space-between",
|
|
1300
|
-
gap: 2,
|
|
1301
1476
|
spacing: { xs: 1, md: 0 },
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1477
|
+
sx: {
|
|
1478
|
+
position: "sticky",
|
|
1479
|
+
top: 0,
|
|
1480
|
+
zIndex: 1e3,
|
|
1481
|
+
alignItems: { xs: "flex-start", md: "center" },
|
|
1482
|
+
justifyContent: "space-between",
|
|
1483
|
+
gap: 2,
|
|
1484
|
+
pt: { xs: 2, md: 0 },
|
|
1485
|
+
px: 0,
|
|
1486
|
+
pb: f ? 2 : 3,
|
|
1487
|
+
backgroundColor: "background.default"
|
|
1488
|
+
},
|
|
1306
1489
|
children: [
|
|
1307
|
-
!f && /* @__PURE__ */ t(
|
|
1308
|
-
|
|
1309
|
-
|
|
1490
|
+
!f && /* @__PURE__ */ t(
|
|
1491
|
+
k,
|
|
1492
|
+
{
|
|
1493
|
+
variant: "h2",
|
|
1494
|
+
sx: {
|
|
1495
|
+
textTransform: "capitalize"
|
|
1496
|
+
},
|
|
1497
|
+
children: i(d.category)
|
|
1498
|
+
}
|
|
1499
|
+
),
|
|
1500
|
+
/* @__PURE__ */ p(
|
|
1501
|
+
A,
|
|
1310
1502
|
{
|
|
1311
|
-
flex: 1,
|
|
1312
1503
|
direction: "row",
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1504
|
+
sx: {
|
|
1505
|
+
flex: 1,
|
|
1506
|
+
alignItems: "center",
|
|
1507
|
+
flexWrap: { xs: "wrap", md: "nowrap" },
|
|
1508
|
+
width: "100%",
|
|
1509
|
+
justifyContent: { xs: "flex-start", md: "flex-end" },
|
|
1510
|
+
gap: 2
|
|
1511
|
+
},
|
|
1318
1512
|
children: [
|
|
1319
|
-
l.showSearch ? /* @__PURE__ */ t(
|
|
1320
|
-
|
|
1513
|
+
l.showSearch ? /* @__PURE__ */ t(
|
|
1514
|
+
g,
|
|
1321
1515
|
{
|
|
1322
|
-
locale: n,
|
|
1323
|
-
endpoint: o,
|
|
1324
1516
|
sx: {
|
|
1325
|
-
display: { md: "block", xs: "none" },
|
|
1326
1517
|
flex: 1,
|
|
1327
|
-
|
|
1328
|
-
width: "350px"
|
|
1518
|
+
flexBasis: { xs: "100%", md: "auto" }
|
|
1329
1519
|
},
|
|
1330
|
-
t:
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1520
|
+
children: m ? /* @__PURE__ */ t(gr, {}) : /* @__PURE__ */ t(
|
|
1521
|
+
et,
|
|
1522
|
+
{
|
|
1523
|
+
locale: n,
|
|
1524
|
+
endpoint: o,
|
|
1525
|
+
sx: {
|
|
1526
|
+
display: { md: "block", xs: "none" },
|
|
1527
|
+
flex: 1,
|
|
1528
|
+
mr: 1,
|
|
1529
|
+
width: "350px"
|
|
1530
|
+
},
|
|
1531
|
+
t: r,
|
|
1532
|
+
filters: e.filters,
|
|
1533
|
+
handleKeyword: e.handleKeyword,
|
|
1534
|
+
handleSearchSelect: e.handleSearchSelect
|
|
1535
|
+
}
|
|
1536
|
+
)
|
|
1334
1537
|
}
|
|
1335
|
-
)
|
|
1538
|
+
) : null,
|
|
1336
1539
|
d.owner && a && /* @__PURE__ */ t(
|
|
1337
|
-
|
|
1540
|
+
Re,
|
|
1338
1541
|
{
|
|
1339
1542
|
label: r("blocklet.authorTag", { name: a }),
|
|
1340
1543
|
size: "small",
|
|
1341
|
-
onDelete: () =>
|
|
1544
|
+
onDelete: () => S("")
|
|
1342
1545
|
}
|
|
1343
1546
|
),
|
|
1344
1547
|
d.resourceDid && d.resourceBlocklet && /* @__PURE__ */ t(
|
|
1345
|
-
|
|
1548
|
+
Re,
|
|
1346
1549
|
{
|
|
1347
1550
|
label: r("blocklet.resourceTag", { name: d.resourceBlocklet }),
|
|
1348
1551
|
size: "small",
|
|
1349
|
-
onDelete: () =>
|
|
1552
|
+
onDelete: () => x(["resourceDid", "resourceBlocklet", "showResources"])
|
|
1350
1553
|
}
|
|
1351
1554
|
),
|
|
1352
1555
|
s ? /* @__PURE__ */ t(
|
|
1353
|
-
|
|
1556
|
+
Ee,
|
|
1354
1557
|
{
|
|
1355
1558
|
checked: d.showResources !== "false",
|
|
1356
|
-
onChange: (
|
|
1559
|
+
onChange: (C) => u(C ? "true" : "false"),
|
|
1357
1560
|
label: r("common.showResources")
|
|
1358
1561
|
}
|
|
1359
1562
|
) : null,
|
|
1360
1563
|
/* @__PURE__ */ t(
|
|
1361
|
-
|
|
1564
|
+
Ee,
|
|
1362
1565
|
{
|
|
1363
1566
|
checked: d.price === "free",
|
|
1364
|
-
onChange: (
|
|
1567
|
+
onChange: (C) => y(C ? "free" : ""),
|
|
1365
1568
|
label: r("blocklet.free")
|
|
1366
1569
|
}
|
|
1367
1570
|
),
|
|
1368
|
-
f && /* @__PURE__ */ t(
|
|
1369
|
-
|
|
1571
|
+
f && /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(
|
|
1572
|
+
ge,
|
|
1370
1573
|
{
|
|
1371
|
-
value: d.category ||
|
|
1372
|
-
options:
|
|
1574
|
+
value: d.category || h[0]?.value,
|
|
1575
|
+
options: h,
|
|
1373
1576
|
placeholder: r("common.category"),
|
|
1374
|
-
onChange: (
|
|
1577
|
+
onChange: (C) => b(C)
|
|
1375
1578
|
}
|
|
1376
1579
|
) }),
|
|
1377
1580
|
/* @__PURE__ */ t(
|
|
1378
|
-
|
|
1581
|
+
ge,
|
|
1379
1582
|
{
|
|
1380
|
-
value: d.sortBy ||
|
|
1381
|
-
options:
|
|
1583
|
+
value: d.sortBy || v[0].value,
|
|
1584
|
+
options: v,
|
|
1382
1585
|
placeholder: r("sort.sort"),
|
|
1383
|
-
onChange: (
|
|
1586
|
+
onChange: (C) => w(C)
|
|
1384
1587
|
}
|
|
1385
1588
|
)
|
|
1386
1589
|
]
|
|
@@ -1390,12 +1593,12 @@ function vr() {
|
|
|
1390
1593
|
}
|
|
1391
1594
|
);
|
|
1392
1595
|
}
|
|
1393
|
-
function
|
|
1596
|
+
function Ee({
|
|
1394
1597
|
checked: e,
|
|
1395
1598
|
onChange: r,
|
|
1396
1599
|
label: o
|
|
1397
1600
|
}) {
|
|
1398
|
-
const n =
|
|
1601
|
+
const n = Le();
|
|
1399
1602
|
return /* @__PURE__ */ t(
|
|
1400
1603
|
We,
|
|
1401
1604
|
{
|
|
@@ -1416,90 +1619,123 @@ function Oe({
|
|
|
1416
1619
|
}
|
|
1417
1620
|
);
|
|
1418
1621
|
}
|
|
1419
|
-
function
|
|
1420
|
-
return /* @__PURE__ */
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1622
|
+
function J({ children: e }) {
|
|
1623
|
+
return /* @__PURE__ */ p(
|
|
1624
|
+
g,
|
|
1625
|
+
{
|
|
1626
|
+
sx: {
|
|
1627
|
+
display: "flex",
|
|
1628
|
+
mt: 2,
|
|
1629
|
+
flexDirection: "column",
|
|
1630
|
+
alignItems: "center",
|
|
1631
|
+
justifyContent: "center",
|
|
1632
|
+
color: "text.hint"
|
|
1633
|
+
},
|
|
1634
|
+
children: [
|
|
1635
|
+
/* @__PURE__ */ t(Dt, {}),
|
|
1636
|
+
e
|
|
1637
|
+
]
|
|
1638
|
+
}
|
|
1639
|
+
);
|
|
1424
1640
|
}
|
|
1425
|
-
function
|
|
1426
|
-
const { t: e } =
|
|
1427
|
-
return /* @__PURE__ */ t(
|
|
1641
|
+
function Oe() {
|
|
1642
|
+
const { t: e } = I();
|
|
1643
|
+
return /* @__PURE__ */ t(k, { style: { textAlign: "center" }, variant: "subtitle2", children: e("blocklet.noResults") });
|
|
1428
1644
|
}
|
|
1429
|
-
function
|
|
1430
|
-
const { t: o, locale: n } =
|
|
1431
|
-
return /* @__PURE__ */
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1645
|
+
function pe({ filterTip: e = !1, keywordTip: r = !1 }) {
|
|
1646
|
+
const { t: o, locale: n } = I(), i = () => n === "zh" ? "、" : " , ";
|
|
1647
|
+
return /* @__PURE__ */ p(
|
|
1648
|
+
g,
|
|
1649
|
+
{
|
|
1650
|
+
sx: {
|
|
1651
|
+
mt: 1,
|
|
1652
|
+
display: "flex"
|
|
1653
|
+
},
|
|
1654
|
+
children: [
|
|
1655
|
+
/* @__PURE__ */ t(k, { style: { marginRight: "16px" }, children: o("blocklet.emptyTip") }),
|
|
1656
|
+
e && /* @__PURE__ */ t(k, { children: o("blocklet.filterTip") }),
|
|
1657
|
+
e && r && i(),
|
|
1658
|
+
r && /* @__PURE__ */ t(k, { children: o("blocklet.keywordTip") })
|
|
1659
|
+
]
|
|
1660
|
+
}
|
|
1661
|
+
);
|
|
1437
1662
|
}
|
|
1438
|
-
function
|
|
1663
|
+
function me({
|
|
1439
1664
|
primaryStart: e,
|
|
1440
1665
|
primaryEnd: r,
|
|
1441
1666
|
filter: o
|
|
1442
1667
|
}) {
|
|
1443
|
-
return /* @__PURE__ */
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
{
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1668
|
+
return /* @__PURE__ */ p(
|
|
1669
|
+
k,
|
|
1670
|
+
{
|
|
1671
|
+
variant: "subtitle2",
|
|
1672
|
+
sx: {
|
|
1673
|
+
display: "flex",
|
|
1674
|
+
gap: 0.5,
|
|
1675
|
+
mx: 0.5
|
|
1676
|
+
},
|
|
1677
|
+
children: [
|
|
1678
|
+
/* @__PURE__ */ t(k, { children: e }),
|
|
1679
|
+
/* @__PURE__ */ t(
|
|
1680
|
+
k,
|
|
1681
|
+
{
|
|
1682
|
+
title: o,
|
|
1683
|
+
color: "primary",
|
|
1684
|
+
sx: { maxWidth: "30vw", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
1685
|
+
children: o
|
|
1686
|
+
}
|
|
1687
|
+
),
|
|
1688
|
+
/* @__PURE__ */ p(k, { children: [
|
|
1689
|
+
r,
|
|
1690
|
+
" "
|
|
1691
|
+
] })
|
|
1692
|
+
]
|
|
1693
|
+
}
|
|
1694
|
+
);
|
|
1459
1695
|
}
|
|
1460
|
-
function
|
|
1461
|
-
const { t: e, search: r, getCategoryLocale: o, selectedCategory: n } =
|
|
1696
|
+
function kr() {
|
|
1697
|
+
const { t: e, search: r, getCategoryLocale: o, selectedCategory: n } = I(), { filters: i } = r, a = !!n || !!i.price;
|
|
1462
1698
|
if (i.keyword && a)
|
|
1463
|
-
return /* @__PURE__ */
|
|
1699
|
+
return /* @__PURE__ */ p(J, { children: [
|
|
1464
1700
|
/* @__PURE__ */ t(
|
|
1465
|
-
|
|
1701
|
+
me,
|
|
1466
1702
|
{
|
|
1467
1703
|
primaryStart: e("blocklet.noBlockletPart1"),
|
|
1468
1704
|
primaryEnd: e("blocklet.noBlockletPart2"),
|
|
1469
1705
|
filter: i.keyword
|
|
1470
1706
|
}
|
|
1471
1707
|
),
|
|
1472
|
-
/* @__PURE__ */ t(
|
|
1708
|
+
/* @__PURE__ */ t(pe, { keywordTip: !0, filterTip: !0 })
|
|
1473
1709
|
] });
|
|
1474
1710
|
if (i.keyword)
|
|
1475
|
-
return /* @__PURE__ */
|
|
1711
|
+
return /* @__PURE__ */ p(J, { children: [
|
|
1476
1712
|
/* @__PURE__ */ t(
|
|
1477
|
-
|
|
1713
|
+
me,
|
|
1478
1714
|
{
|
|
1479
1715
|
primaryStart: e("blocklet.noBlockletPart1"),
|
|
1480
1716
|
primaryEnd: e("blocklet.noBlockletPart2"),
|
|
1481
1717
|
filter: i.keyword
|
|
1482
1718
|
}
|
|
1483
1719
|
),
|
|
1484
|
-
/* @__PURE__ */ t(
|
|
1720
|
+
/* @__PURE__ */ t(pe, { keywordTip: !0 })
|
|
1485
1721
|
] });
|
|
1486
1722
|
if (a) {
|
|
1487
1723
|
const s = o(n);
|
|
1488
|
-
return /* @__PURE__ */
|
|
1724
|
+
return /* @__PURE__ */ p(J, { children: [
|
|
1489
1725
|
s ? /* @__PURE__ */ t(
|
|
1490
|
-
|
|
1726
|
+
me,
|
|
1491
1727
|
{
|
|
1492
1728
|
primaryStart: e("blocklet.noCategoryResults1"),
|
|
1493
1729
|
primaryEnd: e("blocklet.noCategoryResults2"),
|
|
1494
1730
|
filter: s
|
|
1495
1731
|
}
|
|
1496
|
-
) : /* @__PURE__ */ t(
|
|
1497
|
-
/* @__PURE__ */ t(
|
|
1732
|
+
) : /* @__PURE__ */ t(Oe, {}),
|
|
1733
|
+
/* @__PURE__ */ t(pe, { filterTip: !0 })
|
|
1498
1734
|
] });
|
|
1499
1735
|
}
|
|
1500
|
-
return /* @__PURE__ */ t(
|
|
1736
|
+
return /* @__PURE__ */ t(J, { children: /* @__PURE__ */ t(Oe, {}) });
|
|
1501
1737
|
}
|
|
1502
|
-
const
|
|
1738
|
+
const vr = (e, r, o, n) => ht(
|
|
1503
1739
|
async (i) => {
|
|
1504
1740
|
i || (o.currentPage = o.defaultCurrentPage);
|
|
1505
1741
|
const { currentPage: a, pageSize: s } = o, l = {
|
|
@@ -1511,39 +1747,35 @@ const Sr = (e, r, o, n) => ht(
|
|
|
1511
1747
|
};
|
|
1512
1748
|
n(null);
|
|
1513
1749
|
const { data: m = {} } = await e.get(P.blockletsPath, { params: l });
|
|
1514
|
-
return o.currentPage++, { page: a, pageSize: s, list:
|
|
1750
|
+
return o.currentPage++, { page: a, pageSize: s, list: m?.dataList || [], total: m?.total || 0 };
|
|
1515
1751
|
},
|
|
1516
1752
|
{
|
|
1517
1753
|
isNoMore: (i) => i ? i.page * i.pageSize >= i.total : !1,
|
|
1518
|
-
reloadDeps: [e,
|
|
1754
|
+
reloadDeps: [e, Wt(r)],
|
|
1519
1755
|
onError: n
|
|
1520
1756
|
}
|
|
1521
1757
|
);
|
|
1522
|
-
function
|
|
1523
|
-
|
|
1524
|
-
const { storeApi: e, search: r, extraFilter: o, errors: n, updateDeveloperName: i } = R(), { filters: a } = r, s = ut({
|
|
1758
|
+
function Cr() {
|
|
1759
|
+
const { storeApi: e, search: r, extraFilter: o, errors: n, updateDeveloperName: i } = I(), { filters: a } = r, s = pt({
|
|
1525
1760
|
currentPage: P.currentPage,
|
|
1526
|
-
pageSize:
|
|
1761
|
+
pageSize: Zt() ? P.mobilePageSize : P.pageSize,
|
|
1527
1762
|
defaultCurrentPage: P.defaultCurrentPage
|
|
1528
|
-
}), [l, m] =
|
|
1529
|
-
() =>
|
|
1530
|
-
|
|
1531
|
-
return o ? o(((g = c.data) == null ? void 0 : g.list) || []) : ((y = c.data) == null ? void 0 : y.list) || [];
|
|
1532
|
-
},
|
|
1533
|
-
[c.data, o]
|
|
1763
|
+
}), [l, m] = T(null), h = vr(e, a, s, m), f = H(
|
|
1764
|
+
() => o ? o(h.data?.list || []) : h.data?.list || [],
|
|
1765
|
+
[h.data, o]
|
|
1534
1766
|
);
|
|
1535
|
-
return
|
|
1536
|
-
const
|
|
1537
|
-
i(
|
|
1767
|
+
return U(() => {
|
|
1768
|
+
const d = f.find((w) => w.owner.did === a.owner);
|
|
1769
|
+
i(d?.owner.fullName || d?.author.name || "");
|
|
1538
1770
|
}, [a.owner, f, i]), {
|
|
1539
1771
|
blocklets: f,
|
|
1540
1772
|
fetchBlockletsError: l,
|
|
1541
|
-
loadMore:
|
|
1542
|
-
hasNextPage: !
|
|
1543
|
-
total:
|
|
1773
|
+
loadMore: h.loadMore,
|
|
1774
|
+
hasNextPage: !h.noMore,
|
|
1775
|
+
total: h.data?.total || 0,
|
|
1544
1776
|
loadings: {
|
|
1545
|
-
fetchBlockletsLoading:
|
|
1546
|
-
loadingMore:
|
|
1777
|
+
fetchBlockletsLoading: h.loading,
|
|
1778
|
+
loadingMore: h.loadingMore
|
|
1547
1779
|
},
|
|
1548
1780
|
errors: {
|
|
1549
1781
|
...n,
|
|
@@ -1551,156 +1783,194 @@ function Ir() {
|
|
|
1551
1783
|
}
|
|
1552
1784
|
};
|
|
1553
1785
|
}
|
|
1554
|
-
function
|
|
1555
|
-
const { t: e, search: r, endpoint: o, blockletRender: n, serverVersion: i, minItemWidth: a, layout: s, baseSearch: l, compact: m } =
|
|
1786
|
+
function Sr() {
|
|
1787
|
+
const { t: e, search: r, endpoint: o, blockletRender: n, serverVersion: i, minItemWidth: a, layout: s, baseSearch: l, compact: m } = I(), { filters: h } = r, { blocklets: f, errors: d, loadMore: w, loadings: y, hasNextPage: S, total: u } = Cr(), [x] = At({
|
|
1556
1788
|
loading: y.fetchBlockletsLoading || y.loadingMore,
|
|
1557
|
-
hasNextPage:
|
|
1558
|
-
onLoadMore:
|
|
1789
|
+
hasNextPage: S,
|
|
1790
|
+
onLoadMore: w
|
|
1559
1791
|
});
|
|
1560
1792
|
if (d.fetchBlockletsError) {
|
|
1561
|
-
const
|
|
1562
|
-
return /* @__PURE__ */ t(
|
|
1793
|
+
const E = new Error(`Failed to fetch blocklets from ${o}: ${Qt(d.fetchBlockletsError)}`);
|
|
1794
|
+
return /* @__PURE__ */ t(we, { error: E });
|
|
1563
1795
|
}
|
|
1564
|
-
const
|
|
1565
|
-
return /* @__PURE__ */
|
|
1566
|
-
|
|
1567
|
-
/* @__PURE__ */ t(
|
|
1568
|
-
|
|
1796
|
+
const b = l && s.showSearch || !h.keyword;
|
|
1797
|
+
return /* @__PURE__ */ p(_, { children: [
|
|
1798
|
+
b ? /* @__PURE__ */ t(br, {}) : /* @__PURE__ */ p(_, { children: [
|
|
1799
|
+
/* @__PURE__ */ t(ve, { xs: /* @__PURE__ */ t(Ze, {}), md: null }),
|
|
1800
|
+
C()
|
|
1569
1801
|
] }),
|
|
1570
|
-
|
|
1571
|
-
!y.fetchBlockletsLoading &&
|
|
1572
|
-
|
|
1802
|
+
v(),
|
|
1803
|
+
!y.fetchBlockletsLoading && S && /* @__PURE__ */ t(
|
|
1804
|
+
g,
|
|
1573
1805
|
{
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1806
|
+
ref: x,
|
|
1807
|
+
sx: {
|
|
1808
|
+
height: 70,
|
|
1809
|
+
minHeight: 70,
|
|
1810
|
+
display: "flex",
|
|
1811
|
+
justifyContent: "center",
|
|
1812
|
+
py: 2,
|
|
1813
|
+
overflow: "hidden"
|
|
1814
|
+
},
|
|
1815
|
+
children: y.loadingMore ? /* @__PURE__ */ t(ie, {}) : null
|
|
1582
1816
|
}
|
|
1583
1817
|
)
|
|
1584
1818
|
] });
|
|
1585
|
-
function
|
|
1819
|
+
function v() {
|
|
1586
1820
|
return y.fetchBlockletsLoading ? /* @__PURE__ */ t(Je, { mt: 15 }) : f.length ? /* @__PURE__ */ t(
|
|
1587
|
-
|
|
1821
|
+
g,
|
|
1588
1822
|
{
|
|
1589
1823
|
className: "blocklet-list",
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1824
|
+
sx: {
|
|
1825
|
+
display: "grid",
|
|
1826
|
+
gridTemplateColumns: {
|
|
1827
|
+
xs: "1fr",
|
|
1828
|
+
sm: `repeat(auto-fill, minmax(${a}px, 1fr))`
|
|
1829
|
+
},
|
|
1830
|
+
p: "2px",
|
|
1831
|
+
rowGap: 2,
|
|
1832
|
+
columnGap: m ? 0 : 2
|
|
1594
1833
|
},
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
columnGap: m ? 0 : 2,
|
|
1598
|
-
children: f.map((k) => /* @__PURE__ */ t(
|
|
1599
|
-
w,
|
|
1834
|
+
children: f.map((E) => /* @__PURE__ */ t(
|
|
1835
|
+
g,
|
|
1600
1836
|
{
|
|
1601
|
-
"data-blocklet-did":
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1837
|
+
"data-blocklet-did": E.did,
|
|
1838
|
+
sx: {
|
|
1839
|
+
minWidth: {
|
|
1840
|
+
xs: "100%",
|
|
1841
|
+
sm: a
|
|
1842
|
+
},
|
|
1843
|
+
maxWidth: "calc(100vw - 32px)"
|
|
1605
1844
|
},
|
|
1606
|
-
|
|
1607
|
-
children: n({ blocklet: k, blocklets: f, serverVersion: i })
|
|
1845
|
+
children: n({ blocklet: E, blocklets: f, serverVersion: i })
|
|
1608
1846
|
},
|
|
1609
|
-
|
|
1847
|
+
E.did
|
|
1610
1848
|
))
|
|
1611
1849
|
}
|
|
1612
|
-
) : /* @__PURE__ */ t(
|
|
1850
|
+
) : /* @__PURE__ */ t(kr, {});
|
|
1613
1851
|
}
|
|
1614
|
-
function
|
|
1615
|
-
return /* @__PURE__ */
|
|
1616
|
-
|
|
1852
|
+
function C() {
|
|
1853
|
+
return /* @__PURE__ */ p(
|
|
1854
|
+
A,
|
|
1617
1855
|
{
|
|
1618
1856
|
direction: "row",
|
|
1619
1857
|
className: "search-result-title",
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1858
|
+
sx: {
|
|
1859
|
+
alignItems: "center",
|
|
1860
|
+
justifyContent: "space-between",
|
|
1861
|
+
mb: 2,
|
|
1862
|
+
mt: { xs: 2, md: 0 }
|
|
1863
|
+
},
|
|
1624
1864
|
children: [
|
|
1625
1865
|
/* @__PURE__ */ t(
|
|
1626
|
-
|
|
1866
|
+
k,
|
|
1627
1867
|
{
|
|
1628
1868
|
variant: "h3",
|
|
1629
|
-
title:
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1869
|
+
title: h.keyword,
|
|
1870
|
+
sx: {
|
|
1871
|
+
maxWidth: "50vw",
|
|
1872
|
+
overflow: "hidden",
|
|
1873
|
+
textOverflow: "ellipsis",
|
|
1874
|
+
whiteSpace: "nowrap"
|
|
1875
|
+
},
|
|
1876
|
+
children: e("blocklet.search", { keyword: h.keyword })
|
|
1633
1877
|
}
|
|
1634
1878
|
),
|
|
1635
|
-
/* @__PURE__ */ t(
|
|
1879
|
+
/* @__PURE__ */ t(
|
|
1880
|
+
k,
|
|
1881
|
+
{
|
|
1882
|
+
variant: "body1",
|
|
1883
|
+
sx: {
|
|
1884
|
+
color: "text.hint",
|
|
1885
|
+
fontSize: 13
|
|
1886
|
+
},
|
|
1887
|
+
children: e("blocklet.resultCount", { count: u })
|
|
1888
|
+
}
|
|
1889
|
+
)
|
|
1636
1890
|
]
|
|
1637
1891
|
}
|
|
1638
1892
|
);
|
|
1639
1893
|
}
|
|
1640
1894
|
}
|
|
1641
|
-
function
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
variant: "body1",
|
|
1649
|
-
display: { xs: "flex", md: "none" },
|
|
1895
|
+
function Ir() {
|
|
1896
|
+
const { t: e, selectedCategory: r, getCategoryLocale: o, locale: n, search: i } = I(), { toggleOpen: a } = ke(), l = jt().arcSphere, m = !!window.blocklet?.navigation?.some((h) => h.section === "bottomNavigation");
|
|
1897
|
+
return /* @__PURE__ */ p(
|
|
1898
|
+
ee,
|
|
1899
|
+
{
|
|
1900
|
+
sx: {
|
|
1901
|
+
display: "flex",
|
|
1650
1902
|
alignItems: "center",
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1903
|
+
justifyContent: "space-between"
|
|
1904
|
+
},
|
|
1905
|
+
children: [
|
|
1906
|
+
/* @__PURE__ */ p(
|
|
1907
|
+
k,
|
|
1908
|
+
{
|
|
1909
|
+
variant: "body1",
|
|
1910
|
+
sx: {
|
|
1911
|
+
display: { xs: "flex", md: "none" },
|
|
1912
|
+
alignItems: "center",
|
|
1913
|
+
gap: 1,
|
|
1914
|
+
py: 2,
|
|
1915
|
+
fontWeight: "fontWeightMedium"
|
|
1916
|
+
},
|
|
1917
|
+
children: [
|
|
1918
|
+
/* @__PURE__ */ t(Ye, { onClick: () => a(!0), children: /* @__PURE__ */ t($t, {}) }),
|
|
1919
|
+
o(r) || e("common.category")
|
|
1920
|
+
]
|
|
1921
|
+
}
|
|
1922
|
+
),
|
|
1923
|
+
l && m && /* @__PURE__ */ t(
|
|
1924
|
+
et,
|
|
1925
|
+
{
|
|
1926
|
+
locale: n,
|
|
1927
|
+
endpoint: window.blocklet?.prefix || "/",
|
|
1928
|
+
sx: { display: { md: "block", xs: "none" }, mr: 1, width: "350px" },
|
|
1929
|
+
t: e,
|
|
1930
|
+
filters: i.filters,
|
|
1931
|
+
handleKeyword: i.handleKeyword,
|
|
1932
|
+
handleSearchSelect: i.handleSearchSelect
|
|
1933
|
+
}
|
|
1934
|
+
)
|
|
1935
|
+
]
|
|
1936
|
+
}
|
|
1937
|
+
);
|
|
1673
1938
|
}
|
|
1674
|
-
function
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
w,
|
|
1939
|
+
function Br({ menus: e = [], children: r = void 0 }) {
|
|
1940
|
+
const { search: o, layout: n, compact: i } = I(), { filters: a } = o, s = te(null), l = a.category || a.keyword || a.price, m = e.find((h) => h.key === a.menu)?.key;
|
|
1941
|
+
return /* @__PURE__ */ t(Ut, { children: /* @__PURE__ */ p(dt, { FallbackComponent: we, children: [
|
|
1942
|
+
!i && /* @__PURE__ */ t(Ir, {}),
|
|
1943
|
+
/* @__PURE__ */ p(
|
|
1944
|
+
g,
|
|
1681
1945
|
{
|
|
1682
1946
|
ref: s,
|
|
1683
|
-
display: "flex",
|
|
1684
|
-
height: "100%",
|
|
1685
1947
|
className: "list-container",
|
|
1686
|
-
|
|
1948
|
+
sx: {
|
|
1949
|
+
display: "flex",
|
|
1950
|
+
height: "100%",
|
|
1951
|
+
pt: { xs: 0, md: i ? 0 : 5 }
|
|
1952
|
+
},
|
|
1687
1953
|
children: [
|
|
1688
|
-
/* @__PURE__ */ t(
|
|
1689
|
-
/* @__PURE__ */
|
|
1690
|
-
|
|
1954
|
+
/* @__PURE__ */ t(sr, { menus: e }),
|
|
1955
|
+
/* @__PURE__ */ p(
|
|
1956
|
+
A,
|
|
1691
1957
|
{
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1958
|
+
sx: [
|
|
1959
|
+
{
|
|
1960
|
+
height: "100%",
|
|
1961
|
+
position: "relative",
|
|
1962
|
+
flex: 1
|
|
1963
|
+
},
|
|
1964
|
+
i ? {
|
|
1965
|
+
overflowY: "auto",
|
|
1966
|
+
ml: -2,
|
|
1967
|
+
pr: 1,
|
|
1968
|
+
pb: 2
|
|
1969
|
+
} : { overflow: "visible" }
|
|
1970
|
+
],
|
|
1701
1971
|
children: [
|
|
1702
|
-
m &&
|
|
1703
|
-
!m && (n.showExplore && !l ? /* @__PURE__ */ t(
|
|
1972
|
+
m && r?.(m),
|
|
1973
|
+
!m && (n.showExplore && !l ? /* @__PURE__ */ t(fr, {}) : /* @__PURE__ */ t(Sr, {}))
|
|
1704
1974
|
]
|
|
1705
1975
|
}
|
|
1706
1976
|
)
|
|
@@ -1709,31 +1979,64 @@ function Tr({ menus: e, children: r }) {
|
|
|
1709
1979
|
)
|
|
1710
1980
|
] }) });
|
|
1711
1981
|
}
|
|
1712
|
-
function
|
|
1713
|
-
return /* @__PURE__ */
|
|
1714
|
-
/* @__PURE__ */
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1982
|
+
function Mo(e) {
|
|
1983
|
+
return /* @__PURE__ */ p(rt, { variant: "outlined", ...e, sx: { maxWidth: 400, borderRadius: "8px", p: { xs: 2, md: 3 }, ...e.sx }, children: [
|
|
1984
|
+
/* @__PURE__ */ p(
|
|
1985
|
+
ee,
|
|
1986
|
+
{
|
|
1987
|
+
sx: {
|
|
1988
|
+
display: "flex",
|
|
1989
|
+
alignItems: "center",
|
|
1990
|
+
gap: 2,
|
|
1991
|
+
pb: 1
|
|
1992
|
+
},
|
|
1993
|
+
children: [
|
|
1994
|
+
/* @__PURE__ */ p(
|
|
1995
|
+
ee,
|
|
1996
|
+
{
|
|
1997
|
+
sx: {
|
|
1998
|
+
display: "flex",
|
|
1999
|
+
alignItems: "center",
|
|
2000
|
+
gap: 2,
|
|
2001
|
+
flex: 1
|
|
2002
|
+
},
|
|
2003
|
+
children: [
|
|
2004
|
+
/* @__PURE__ */ t(O, { variant: "rounded", width: 48, height: 48 }),
|
|
2005
|
+
/* @__PURE__ */ t(O, { variant: "text", width: 60, height: 28 })
|
|
2006
|
+
]
|
|
2007
|
+
}
|
|
2008
|
+
),
|
|
2009
|
+
/* @__PURE__ */ t(O, { variant: "text", width: 70, height: 40 })
|
|
2010
|
+
]
|
|
2011
|
+
}
|
|
2012
|
+
),
|
|
2013
|
+
/* @__PURE__ */ t(O, { variant: "text", width: "100%", height: 24 }),
|
|
2014
|
+
/* @__PURE__ */ t(O, { variant: "text", width: "90%", height: 24 }),
|
|
2015
|
+
/* @__PURE__ */ p(
|
|
2016
|
+
ee,
|
|
2017
|
+
{
|
|
2018
|
+
sx: {
|
|
2019
|
+
display: "flex",
|
|
2020
|
+
alignItems: "center",
|
|
2021
|
+
gap: 1,
|
|
2022
|
+
pt: 1.5
|
|
2023
|
+
},
|
|
2024
|
+
children: [
|
|
2025
|
+
/* @__PURE__ */ t(O, { variant: "rounded", width: 24, height: 24 }),
|
|
2026
|
+
/* @__PURE__ */ t(O, { variant: "text", width: "15%", height: 20 }),
|
|
2027
|
+
/* @__PURE__ */ t(O, { variant: "rounded", width: 24, height: 24, sx: { ml: 1 } }),
|
|
2028
|
+
/* @__PURE__ */ t(O, { variant: "text", width: "15%", height: 20 })
|
|
2029
|
+
]
|
|
2030
|
+
}
|
|
2031
|
+
)
|
|
1729
2032
|
] });
|
|
1730
2033
|
}
|
|
1731
|
-
function
|
|
1732
|
-
return e ? /* @__PURE__ */ t(
|
|
2034
|
+
function zo({ showSkeleton: e = !1, ...r }) {
|
|
2035
|
+
return e ? /* @__PURE__ */ t(L, { variant: "rectangular", width: r.width, height: r.height }) : /* @__PURE__ */ t(Ht, { ...r });
|
|
1733
2036
|
}
|
|
1734
|
-
function
|
|
1735
|
-
const { menus: r, children: o, ...n } = e, i =
|
|
1736
|
-
|
|
2037
|
+
function _o(e) {
|
|
2038
|
+
const { menus: r, children: o, ...n } = e, i = ye(), a = ot(
|
|
2039
|
+
st({}, i, {
|
|
1737
2040
|
typography: {
|
|
1738
2041
|
h1: {
|
|
1739
2042
|
fontSize: 32,
|
|
@@ -1760,12 +2063,12 @@ function jo(e) {
|
|
|
1760
2063
|
}
|
|
1761
2064
|
})
|
|
1762
2065
|
);
|
|
1763
|
-
return /* @__PURE__ */ t(
|
|
2066
|
+
return /* @__PURE__ */ t(nt, { theme: a, children: /* @__PURE__ */ t(or, { ...n, children: /* @__PURE__ */ t(Br, { menus: r, children: o }) }) });
|
|
1764
2067
|
}
|
|
1765
2068
|
export {
|
|
1766
2069
|
et as Autocomplete,
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
2070
|
+
Mo as CardSkeleton,
|
|
2071
|
+
zo as Image,
|
|
2072
|
+
_o as default,
|
|
2073
|
+
Gt as useSearch
|
|
1771
2074
|
};
|