@chaibuilder/sdk 1.2.25 → 1.2.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AddBlocks-l1JENNvq.js +206 -0
- package/dist/AddBlocks-zPPKkeKs.cjs +1 -0
- package/dist/BrandingOptions-DkpqGARR.cjs +1 -0
- package/dist/{BrandingOptions-iTyWpwTs.js → BrandingOptions-udtH5yJs.js} +54 -40
- package/dist/{CanvasArea-dZjng782.js → CanvasArea-h0W-Tyha.js} +324 -340
- package/dist/CanvasArea-zme1r3Zi.cjs +55 -0
- package/dist/Class-PoYusiA5.cjs +1 -0
- package/dist/{Class-ahc3NIbq.js → Class-lGzsNBOK.js} +29 -26
- package/dist/CurrentPage-Hl52iub_.cjs +1 -0
- package/dist/{CurrentPage-Kmfp-kFk.js → CurrentPage-tJUjXWdb.js} +54 -40
- package/dist/Functions-7jnEwJyw.js +15 -0
- package/dist/Functions-N3yhPYKY.cjs +1 -0
- package/dist/ListTree-WvTjY5rr.cjs +1 -0
- package/dist/{ListTree-N3jeD790.js → ListTree-cZ-Ihlt3.js} +96 -86
- package/dist/MODIFIERS-0g14w5RS.cjs +1 -0
- package/dist/{MODIFIERS-CNqNUapY.js → MODIFIERS-dytZ-osO.js} +4 -10
- package/dist/PagesPanel-6rrLXEO-.js +64 -0
- package/dist/PagesPanel-WzCocl6u.cjs +1 -0
- package/dist/ProjectPanel-o7gdcwPn.cjs +1 -0
- package/dist/ProjectPanel-tz3bjdXy.js +85 -0
- package/dist/{STRINGS-b432aBJJ.js → STRINGS--j49GZJP.js} +2 -2
- package/dist/{Settings-jCcd-VE6.js → Settings-4s2LUVmC.js} +401 -407
- package/dist/Settings-AqoKwR92.cjs +1 -0
- package/dist/SidePanels-3o6Okmvu.cjs +1 -0
- package/dist/{SidePanels-pHMYprpW.js → SidePanels-bugFfInz.js} +118 -108
- package/dist/Topbar-CqW7G360.cjs +1 -0
- package/dist/Topbar-pWzBEOed.js +132 -0
- package/dist/UnsplashImages-NGskB93R.cjs +1 -0
- package/dist/{UnsplashImages-L7x_3RQf.js → UnsplashImages-qvwFbV-E.js} +63 -50
- package/dist/{UploadImages-zdEJRLD8.js → UploadImages-9NapgXBq.js} +60 -37
- package/dist/UploadImages-Oh7Glr9A.cjs +1 -0
- package/dist/_commonjsHelpers-UyOWmZb0.js +8 -0
- package/dist/_commonjsHelpers-wDK0ZLPo.cjs +1 -0
- package/dist/add-page-modal--6TTBRYa.cjs +1 -0
- package/dist/add-page-modal-k2Kb92HS.js +104 -0
- package/dist/confirm-alert-C4M9eF-o.cjs +1 -0
- package/dist/confirm-alert-GUhZ_G8w.js +60 -0
- package/dist/controls-KK2oLIa8.cjs +1 -0
- package/dist/{controls-IS5qnRce.js → controls-OfJWSEqC.js} +85 -20
- package/dist/core.cjs +1 -1
- package/dist/core.js +75 -150
- package/dist/defaultTheme-7VqqhOcp.cjs +1 -0
- package/dist/{defaultTheme-4kA60XdB.js → defaultTheme-D8B4-wHO.js} +8 -6
- package/dist/delete-page-modal-cFoL-wdo.cjs +1 -0
- package/dist/delete-page-modal-zONvdebd.js +83 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +292 -3
- package/dist/email.cjs +1 -1
- package/dist/email.js +37 -18
- package/dist/empty-slot-ZBlsQi6m.js +15 -0
- package/dist/empty-slot-nzYOgZuS.cjs +1 -0
- package/dist/{form-0_RLz2TB.js → form-STUz-6nE.js} +12 -12
- package/dist/form-lBQ_76Uw.cjs +1 -0
- package/dist/{html-to-json-uSnxl72F.cjs → html-to-json-efmv1pCj.cjs} +1 -1
- package/dist/{html-to-json-2xtb7520.js → html-to-json-ngX9ef2u.js} +41 -41
- package/dist/index-Gk6sASBd.js +3080 -0
- package/dist/index-OB199Izc.cjs +206 -0
- package/dist/index-SkyM3d6Q.js +39503 -0
- package/dist/index-YpnaudSM.js +63 -0
- package/dist/index-e0c8PmRQ.js +205 -0
- package/dist/index-ecnGWzh9.cjs +1 -0
- package/dist/index-gi1LIOCw.cjs +1 -0
- package/dist/index-h-hd6EvN.cjs +1 -0
- package/dist/index-llTXLDGE.js +2201 -0
- package/dist/index-mbyqq81O.cjs +1 -0
- package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-WbnYoNE9.js} +109 -106
- package/dist/jsx-runtime-Z_BpKhVy.cjs +27 -0
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +66 -62
- package/dist/page-viewer-2kwnKM6v.cjs +1 -0
- package/dist/{page-viewer-NnOwmAmu.js → page-viewer-Pdg9F5Hv.js} +57 -43
- package/dist/project-general-setting-CnNL98NM.cjs +1 -0
- package/dist/{project-general-setting-9ju3TDju.js → project-general-setting-f8Ebsn6K.js} +43 -35
- package/dist/project-seo-setting-mlxL_e2_.cjs +1 -0
- package/dist/{project-seo-setting-36CdUszM.js → project-seo-setting-pX34Qsym.js} +40 -23
- package/dist/render.cjs +1 -1
- package/dist/render.js +14 -13
- package/dist/single-page-detail-XfzrGlzA.cjs +1 -0
- package/dist/{single-page-detail-hD1jKZ8k.js → single-page-detail-dpe5LT0M.js} +74 -66
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +40 -24
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +160 -365
- package/dist/web-blocks.cjs +6 -1
- package/dist/web-blocks.js +1153 -3
- package/package.json +1 -1
- package/dist/AddBlocks-Ol3iIVKa.js +0 -207
- package/dist/AddBlocks-a1c-7Ewz.cjs +0 -1
- package/dist/BrandingOptions-6rnt0UaA.cjs +0 -1
- package/dist/CanvasArea-R4ogF9AT.cjs +0 -55
- package/dist/ChaiBuilderEditor-m30yoOgJ.cjs +0 -163
- package/dist/ChaiBuilderEditor-vP4at00I.js +0 -27974
- package/dist/Class-eieto7e-.cjs +0 -1
- package/dist/Controls-3Cc1XYXg.js +0 -105
- package/dist/Controls-ky25Ebo3.cjs +0 -1
- package/dist/CurrentPage-3gQTH0Zt.cjs +0 -1
- package/dist/Functions-Hvon6AMZ.cjs +0 -1
- package/dist/Functions-NzT2Six_.js +0 -15
- package/dist/ImagesPanel-J1RlG7xG.cjs +0 -1
- package/dist/ImagesPanel-Wb0GF_NA.js +0 -29
- package/dist/ListTree-CZ-mtjZ9.cjs +0 -1
- package/dist/MODIFIERS-o1p3VnpS.cjs +0 -1
- package/dist/PagesPanel-Gi0z6gaf.cjs +0 -1
- package/dist/PagesPanel-u1IB-nRr.js +0 -48
- package/dist/ProjectPanel-EydGZmMW.js +0 -71
- package/dist/ProjectPanel-kiiljG4H.cjs +0 -1
- package/dist/Settings-8ilCSH8b.cjs +0 -1
- package/dist/SidePanels-T36C6Lhc.cjs +0 -1
- package/dist/Topbar-CvWQuspR.cjs +0 -1
- package/dist/Topbar-pbIDUE_B.js +0 -122
- package/dist/UnsplashImages-KBZPd9dv.cjs +0 -1
- package/dist/UploadImages-GkkJVAgG.cjs +0 -1
- package/dist/accordion-oPUeqPCZ.js +0 -42
- package/dist/accordion-ynvFtV_p.cjs +0 -1
- package/dist/add-page-modal-9SGv2hgc.cjs +0 -1
- package/dist/add-page-modal-JCDXZIPW.js +0 -95
- package/dist/alert-dialog-P9xMMB6C.cjs +0 -1
- package/dist/alert-dialog-rypfO5ly.js +0 -64
- package/dist/badge-E-S7CqUt.cjs +0 -1
- package/dist/badge-tEwO7C51.js +0 -23
- package/dist/block-helpers-OKHmRRol.cjs +0 -1
- package/dist/block-helpers-oSFpSsGz.js +0 -23
- package/dist/command-BxR6jaCI.cjs +0 -1
- package/dist/command-Pn3HKDuV.js +0 -97
- package/dist/confirm-alert-uNm0lZ0y.cjs +0 -1
- package/dist/confirm-alert-wR5_VJ1l.js +0 -36
- package/dist/context-menu-8dC9uGXj.js +0 -122
- package/dist/context-menu-IgLbIuth.cjs +0 -1
- package/dist/controls-L7DPvB0m.cjs +0 -1
- package/dist/defaultTheme-mrkeGFGI.cjs +0 -1
- package/dist/delete-page-modal-7KmP1elv.js +0 -67
- package/dist/delete-page-modal-SgfwvfNu.cjs +0 -1
- package/dist/dropdown-menu-El86_9Uo.js +0 -124
- package/dist/dropdown-menu-SiHzqWwZ.cjs +0 -1
- package/dist/form-W58AVUdf.cjs +0 -1
- package/dist/hover-card-KUwpDkW8.cjs +0 -1
- package/dist/hover-card-q138xxXR.js +0 -45
- package/dist/iconBase-gbUAAO2L.cjs +0 -1
- package/dist/iconBase-h4DuR_XT.js +0 -63
- package/dist/index-9MmykVSc.cjs +0 -1
- package/dist/index-hElOGcFr.js +0 -2200
- package/dist/index-lDTsQp7h.js +0 -188
- package/dist/index-rq5Y9ZDy.cjs +0 -1
- package/dist/jsx-runtime-JYMCiFoE.cjs +0 -27
- package/dist/label-KaP7MRrs.js +0 -10
- package/dist/label-tFm8HZdb.cjs +0 -1
- package/dist/link-WbcKdQ9k.cjs +0 -1
- package/dist/link-xuhP-4dN.js +0 -196
- package/dist/page-viewer-Hx5hxHKm.cjs +0 -1
- package/dist/popover-a84pbVhQ.js +0 -23
- package/dist/popover-fKjgcRUx.cjs +0 -1
- package/dist/project-general-setting-FxkwjvJz.cjs +0 -1
- package/dist/project-seo-setting-RU7qiXxb.cjs +0 -1
- package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
- package/dist/scroll-area-ewXbxc3n.js +0 -30
- package/dist/select-7bjg-rr9.cjs +0 -1
- package/dist/select-POGdEDHT.js +0 -75
- package/dist/separator-3Civ-6hb.cjs +0 -1
- package/dist/separator-SctTn0Qi.js +0 -18
- package/dist/single-page-detail-beY0MT1b.cjs +0 -1
- package/dist/skeleton-STeL9VrJ.cjs +0 -1
- package/dist/skeleton-lu8e7q2y.js +0 -239
- package/dist/tabs-_4WbA1cc.cjs +0 -1
- package/dist/tabs-yQ3oGziM.js +0 -106
- package/dist/textarea-1kZEh7ki.cjs +0 -1
- package/dist/textarea-b2QvVhrK.js +0 -73
- package/dist/useAddBlock-8pxOEYIl.cjs +0 -1
- package/dist/useAddBlock-FEKFJNwQ.js +0 -69
- package/dist/useChaiExternalData-fkFgoS80.js +0 -6
- package/dist/useChaiExternalData-rwoAZ6uU.cjs +0 -1
- package/dist/useDarkMode-7i57segK.cjs +0 -1
- package/dist/useDarkMode-8VHJlYyE.js +0 -23
- package/dist/useSelectedBreakpoints-6NK5qd7T.js +0 -10
- package/dist/useSelectedBreakpoints-7ONXb-vN.cjs +0 -1
- package/dist/useStylingState-Iuj84yvc.js +0 -186
- package/dist/useStylingState-OIvJMV6p.cjs +0 -1
- package/dist/useUiLibraries-nCdauJ4N.cjs +0 -1
- package/dist/useUiLibraries-psyWFbNc.js +0 -12
- package/dist/useUpdateBlocksProps-Unn8lUyj.cjs +0 -1
- package/dist/useUpdateBlocksProps-vWcDp-P9.js +0 -23
- package/dist/utils-dze1SGvB.js +0 -6
- package/dist/utils-qK_SjzzV.cjs +0 -1
|
@@ -0,0 +1,3080 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import tt, { createContext as Es, useContext as Os, useRef as xr, createElement as vr, useReducer as Ls, useEffect as Ae, useDebugValue as zs, useCallback as $, useMemo as Vs, useState as Ce, Suspense as yt } from "react";
|
|
3
|
+
import { memoize as Oe, has as pe, get as J, flatten as re, filter as E, isString as zt, find as oe, map as I, omit as st, each as ce, set as Se, includes as Y, isUndefined as wr, without as Vt, isEmpty as Be, forIn as $t, isObject as $s, first as ee, noop as qe, keys as Fs, startsWith as Ft, isNull as Ke, pick as wt, sortBy as Nt } from "lodash-es";
|
|
4
|
+
import { g as de, a as Us } from "./Functions-7jnEwJyw.js";
|
|
5
|
+
import { getBlockComponent as Le } from "@chaibuilder/runtime";
|
|
6
|
+
import { atom as w, useAtomValue as te, useAtom as O, useSetAtom as _e } from "jotai";
|
|
7
|
+
import { a as fe, I as Ut, S as Je } from "./STRINGS--j49GZJP.js";
|
|
8
|
+
import { g as Ws } from "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
|
+
import { useThrottledCallback as Gs } from "@react-hookz/web";
|
|
10
|
+
import { B as Ye } from "./MODIFIERS-dytZ-osO.js";
|
|
11
|
+
import { a as d, c as Ie } from "./Class-lGzsNBOK.js";
|
|
12
|
+
import "react-i18next";
|
|
13
|
+
import { j as a } from "./jsx-runtime-WbnYoNE9.js";
|
|
14
|
+
import * as Wt from "@radix-ui/react-toggle";
|
|
15
|
+
import { cva as ge } from "class-variance-authority";
|
|
16
|
+
import * as Qe from "@radix-ui/react-switch";
|
|
17
|
+
import { Slot as Hs } from "@radix-ui/react-slot";
|
|
18
|
+
import * as me from "@radix-ui/react-accordion";
|
|
19
|
+
import { ChevronDownIcon as qs, Cross2Icon as ot, ChevronRightIcon as nt, CheckIcon as ze, DotFilledIcon as at, CaretSortIcon as Ks, MagnifyingGlassIcon as Js } from "@radix-ui/react-icons";
|
|
20
|
+
import * as H from "@radix-ui/react-alert-dialog";
|
|
21
|
+
import * as P from "@radix-ui/react-dialog";
|
|
22
|
+
import * as Gt from "@radix-ui/react-label";
|
|
23
|
+
import * as ue from "@radix-ui/react-scroll-area";
|
|
24
|
+
import * as be from "@radix-ui/react-tabs";
|
|
25
|
+
import * as ye from "@radix-ui/react-tooltip";
|
|
26
|
+
import * as je from "@radix-ui/react-popover";
|
|
27
|
+
import * as _ from "@radix-ui/react-menubar";
|
|
28
|
+
import * as Ve from "@radix-ui/react-hover-card";
|
|
29
|
+
import * as U from "@radix-ui/react-select";
|
|
30
|
+
import * as M from "@radix-ui/react-dropdown-menu";
|
|
31
|
+
import * as Ht from "@radix-ui/react-separator";
|
|
32
|
+
import * as Z from "@radix-ui/react-toast";
|
|
33
|
+
import { Command as Q } from "cmdk";
|
|
34
|
+
import * as D from "@radix-ui/react-context-menu";
|
|
35
|
+
import Ys, { IconPickerItem as Qs } from "react-icons-picker";
|
|
36
|
+
import Xs from "react-dom";
|
|
37
|
+
import Zs from "react-quill";
|
|
38
|
+
var W = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
39
|
+
let eo = 0;
|
|
40
|
+
function ae(e, t) {
|
|
41
|
+
const s = `atom${++eo}`, o = {
|
|
42
|
+
toString: () => s
|
|
43
|
+
};
|
|
44
|
+
return typeof e == "function" ? o.read = e : (o.init = e, o.read = (n) => n(o), o.write = (n, i, r) => i(
|
|
45
|
+
o,
|
|
46
|
+
typeof r == "function" ? r(n(o)) : r
|
|
47
|
+
)), t && (o.write = t), o;
|
|
48
|
+
}
|
|
49
|
+
const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new WeakMap(), to = (e, t) => {
|
|
50
|
+
Ee.set(e, t), e.catch(() => {
|
|
51
|
+
}).finally(() => Ee.delete(e));
|
|
52
|
+
}, kt = (e, t) => {
|
|
53
|
+
const s = Ee.get(e);
|
|
54
|
+
s && (Ee.delete(e), s(t));
|
|
55
|
+
}, St = (e, t) => {
|
|
56
|
+
e.status = "fulfilled", e.value = t;
|
|
57
|
+
}, jt = (e, t) => {
|
|
58
|
+
e.status = "rejected", e.reason = t;
|
|
59
|
+
}, so = (e) => typeof (e == null ? void 0 : e.then) == "function", Ne = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), At = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e), xe = (e) => "v" in e && e.v instanceof Promise, oo = (e, t) => "v" in e && "v" in t && e.v.orig && e.v.orig === t.v.orig, Te = (e) => {
|
|
60
|
+
if ("e" in e)
|
|
61
|
+
throw e.e;
|
|
62
|
+
return e.v;
|
|
63
|
+
}, no = () => {
|
|
64
|
+
const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new Map();
|
|
65
|
+
let o, n, i;
|
|
66
|
+
(W ? "production" : void 0) !== "production" && (o = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set());
|
|
67
|
+
const r = (u) => e.get(u), c = (u, g) => {
|
|
68
|
+
(W ? "production" : void 0) !== "production" && Object.freeze(g);
|
|
69
|
+
const x = e.get(u);
|
|
70
|
+
if (e.set(u, g), s.has(u) || s.set(u, x), x && xe(x)) {
|
|
71
|
+
const b = "v" in g ? g.v instanceof Promise ? g.v : Promise.resolve(g.v) : Promise.reject(g.e);
|
|
72
|
+
kt(x.v, b);
|
|
73
|
+
}
|
|
74
|
+
}, p = (u, g, x) => {
|
|
75
|
+
const b = /* @__PURE__ */ new Map();
|
|
76
|
+
let y = !1;
|
|
77
|
+
x.forEach((h, k) => {
|
|
78
|
+
!h && k === u && (h = g), h ? (b.set(k, h), g.d.get(k) !== h && (y = !0)) : (W ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
|
|
79
|
+
}), (y || g.d.size !== b.size) && (g.d = b);
|
|
80
|
+
}, l = (u, g, x) => {
|
|
81
|
+
const b = r(u), y = {
|
|
82
|
+
d: (b == null ? void 0 : b.d) || /* @__PURE__ */ new Map(),
|
|
83
|
+
v: g
|
|
84
|
+
};
|
|
85
|
+
if (x && p(u, y, x), b && Ne(b, y) && b.d === y.d)
|
|
86
|
+
return b;
|
|
87
|
+
if (b && xe(b) && xe(y) && oo(b, y)) {
|
|
88
|
+
if (b.d === y.d)
|
|
89
|
+
return b;
|
|
90
|
+
y.v = b.v;
|
|
91
|
+
}
|
|
92
|
+
return c(u, y), y;
|
|
93
|
+
}, m = (u, g, x, b) => {
|
|
94
|
+
if (so(g)) {
|
|
95
|
+
let y;
|
|
96
|
+
const h = new Promise((k, z) => {
|
|
97
|
+
let A = !1;
|
|
98
|
+
g.then(
|
|
99
|
+
(R) => {
|
|
100
|
+
if (!A) {
|
|
101
|
+
A = !0;
|
|
102
|
+
const C = r(u), se = l(
|
|
103
|
+
u,
|
|
104
|
+
h,
|
|
105
|
+
x
|
|
106
|
+
);
|
|
107
|
+
St(h, R), k(R), (C == null ? void 0 : C.d) !== se.d && q(u, se, C == null ? void 0 : C.d);
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
(R) => {
|
|
111
|
+
if (!A) {
|
|
112
|
+
A = !0;
|
|
113
|
+
const C = r(u), se = l(
|
|
114
|
+
u,
|
|
115
|
+
h,
|
|
116
|
+
x
|
|
117
|
+
);
|
|
118
|
+
jt(h, R), z(R), (C == null ? void 0 : C.d) !== se.d && q(u, se, C == null ? void 0 : C.d);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
), y = (R) => {
|
|
122
|
+
A || (A = !0, R.then(
|
|
123
|
+
(C) => St(h, C),
|
|
124
|
+
(C) => jt(h, C)
|
|
125
|
+
), k(R));
|
|
126
|
+
};
|
|
127
|
+
});
|
|
128
|
+
return h.orig = g, h.status = "pending", to(h, (k) => {
|
|
129
|
+
k && y(k), b == null || b();
|
|
130
|
+
}), l(u, h, x);
|
|
131
|
+
}
|
|
132
|
+
return l(u, g, x);
|
|
133
|
+
}, N = (u, g, x) => {
|
|
134
|
+
const b = r(u), y = {
|
|
135
|
+
d: (b == null ? void 0 : b.d) || /* @__PURE__ */ new Map(),
|
|
136
|
+
e: g
|
|
137
|
+
};
|
|
138
|
+
return x && p(u, y, x), b && At(b, y) && b.d === y.d ? b : (c(u, y), y);
|
|
139
|
+
}, S = (u) => {
|
|
140
|
+
const g = r(u);
|
|
141
|
+
if (g && (g.d.forEach((A, R) => {
|
|
142
|
+
R !== u && !t.has(R) && S(R);
|
|
143
|
+
}), Array.from(g.d).every(([A, R]) => {
|
|
144
|
+
const C = r(A);
|
|
145
|
+
return A === u || C === R || // TODO This is a hack, we should find a better solution.
|
|
146
|
+
C && !xe(C) && Ne(C, R);
|
|
147
|
+
})))
|
|
148
|
+
return g;
|
|
149
|
+
const x = /* @__PURE__ */ new Map();
|
|
150
|
+
let b = !0;
|
|
151
|
+
const y = (A) => {
|
|
152
|
+
if (A === u) {
|
|
153
|
+
const C = r(A);
|
|
154
|
+
if (C)
|
|
155
|
+
return x.set(A, C), Te(C);
|
|
156
|
+
if (Fe(A))
|
|
157
|
+
return x.set(A, void 0), A.init;
|
|
158
|
+
throw new Error("no atom init");
|
|
159
|
+
}
|
|
160
|
+
const R = S(A);
|
|
161
|
+
return x.set(A, R), Te(R);
|
|
162
|
+
};
|
|
163
|
+
let h, k;
|
|
164
|
+
const z = {
|
|
165
|
+
get signal() {
|
|
166
|
+
return h || (h = new AbortController()), h.signal;
|
|
167
|
+
},
|
|
168
|
+
get setSelf() {
|
|
169
|
+
return (W ? "production" : void 0) !== "production" && !Ue(u) && console.warn("setSelf function cannot be used with read-only atom"), !k && Ue(u) && (k = (...A) => {
|
|
170
|
+
if ((W ? "production" : void 0) !== "production" && b && console.warn("setSelf function cannot be called in sync"), !b)
|
|
171
|
+
return G(u, ...A);
|
|
172
|
+
}), k;
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
try {
|
|
176
|
+
const A = u.read(y, z);
|
|
177
|
+
return m(
|
|
178
|
+
u,
|
|
179
|
+
A,
|
|
180
|
+
x,
|
|
181
|
+
() => h == null ? void 0 : h.abort()
|
|
182
|
+
);
|
|
183
|
+
} catch (A) {
|
|
184
|
+
return N(u, A, x);
|
|
185
|
+
} finally {
|
|
186
|
+
b = !1;
|
|
187
|
+
}
|
|
188
|
+
}, v = (u) => Te(S(u)), j = (u) => {
|
|
189
|
+
let g = t.get(u);
|
|
190
|
+
return g || (g = V(u)), g;
|
|
191
|
+
}, L = (u, g) => !g.l.size && (!g.t.size || g.t.size === 1 && g.t.has(u)), F = (u) => {
|
|
192
|
+
const g = t.get(u);
|
|
193
|
+
g && L(u, g) && X(u);
|
|
194
|
+
}, B = (u) => {
|
|
195
|
+
const g = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new WeakMap(), b = (h) => {
|
|
196
|
+
const k = t.get(h);
|
|
197
|
+
k == null || k.t.forEach((z) => {
|
|
198
|
+
z !== h && (g.set(
|
|
199
|
+
z,
|
|
200
|
+
(g.get(z) || /* @__PURE__ */ new Set()).add(h)
|
|
201
|
+
), x.set(z, (x.get(z) || 0) + 1), b(z));
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
b(u);
|
|
205
|
+
const y = (h) => {
|
|
206
|
+
const k = t.get(h);
|
|
207
|
+
k == null || k.t.forEach((z) => {
|
|
208
|
+
var A;
|
|
209
|
+
if (z !== h) {
|
|
210
|
+
let R = x.get(z);
|
|
211
|
+
if (R && x.set(z, --R), !R) {
|
|
212
|
+
let C = !!((A = g.get(z)) != null && A.size);
|
|
213
|
+
if (C) {
|
|
214
|
+
const se = r(z), Ds = S(z);
|
|
215
|
+
C = !se || !Ne(se, Ds);
|
|
216
|
+
}
|
|
217
|
+
C || g.forEach((se) => se.delete(z));
|
|
218
|
+
}
|
|
219
|
+
y(z);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
};
|
|
223
|
+
y(u);
|
|
224
|
+
}, T = (u, ...g) => {
|
|
225
|
+
let x = !0;
|
|
226
|
+
const b = (k) => Te(S(k)), y = (k, ...z) => {
|
|
227
|
+
let A;
|
|
228
|
+
if (k === u) {
|
|
229
|
+
if (!Fe(k))
|
|
230
|
+
throw new Error("atom not writable");
|
|
231
|
+
const R = r(k), C = m(k, z[0]);
|
|
232
|
+
(!R || !Ne(R, C)) && B(k);
|
|
233
|
+
} else
|
|
234
|
+
A = T(k, ...z);
|
|
235
|
+
if (!x) {
|
|
236
|
+
const R = K();
|
|
237
|
+
(W ? "production" : void 0) !== "production" && n.forEach(
|
|
238
|
+
(C) => C({ type: "async-write", flushed: R })
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
return A;
|
|
242
|
+
}, h = u.write(b, y, ...g);
|
|
243
|
+
return x = !1, h;
|
|
244
|
+
}, G = (u, ...g) => {
|
|
245
|
+
const x = T(u, ...g), b = K();
|
|
246
|
+
return (W ? "production" : void 0) !== "production" && n.forEach(
|
|
247
|
+
(y) => y({ type: "write", flushed: b })
|
|
248
|
+
), x;
|
|
249
|
+
}, V = (u, g) => {
|
|
250
|
+
const x = {
|
|
251
|
+
t: new Set(g && [g]),
|
|
252
|
+
l: /* @__PURE__ */ new Set()
|
|
253
|
+
};
|
|
254
|
+
if (t.set(u, x), (W ? "production" : void 0) !== "production" && i.add(u), S(u).d.forEach((b, y) => {
|
|
255
|
+
const h = t.get(y);
|
|
256
|
+
h ? h.t.add(u) : y !== u && V(y, u);
|
|
257
|
+
}), S(u), Ue(u) && u.onMount) {
|
|
258
|
+
const b = u.onMount((...y) => G(u, ...y));
|
|
259
|
+
b && (x.u = b);
|
|
260
|
+
}
|
|
261
|
+
return x;
|
|
262
|
+
}, X = (u) => {
|
|
263
|
+
var g;
|
|
264
|
+
const x = (g = t.get(u)) == null ? void 0 : g.u;
|
|
265
|
+
x && x(), t.delete(u), (W ? "production" : void 0) !== "production" && i.delete(u);
|
|
266
|
+
const b = r(u);
|
|
267
|
+
b ? (xe(b) && kt(b.v), b.d.forEach((y, h) => {
|
|
268
|
+
if (h !== u) {
|
|
269
|
+
const k = t.get(h);
|
|
270
|
+
k && (k.t.delete(u), L(h, k) && X(h));
|
|
271
|
+
}
|
|
272
|
+
})) : (W ? "production" : void 0) !== "production" && console.warn("[Bug] could not find atom state to unmount", u);
|
|
273
|
+
}, q = (u, g, x) => {
|
|
274
|
+
const b = new Set(g.d.keys());
|
|
275
|
+
x == null || x.forEach((y, h) => {
|
|
276
|
+
if (b.has(h)) {
|
|
277
|
+
b.delete(h);
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
const k = t.get(h);
|
|
281
|
+
k && (k.t.delete(u), L(h, k) && X(h));
|
|
282
|
+
}), b.forEach((y) => {
|
|
283
|
+
const h = t.get(y);
|
|
284
|
+
h ? h.t.add(u) : t.has(u) && V(y, u);
|
|
285
|
+
});
|
|
286
|
+
}, K = () => {
|
|
287
|
+
let u;
|
|
288
|
+
for ((W ? "production" : void 0) !== "production" && (u = /* @__PURE__ */ new Set()); s.size; ) {
|
|
289
|
+
const g = Array.from(s);
|
|
290
|
+
s.clear(), g.forEach(([x, b]) => {
|
|
291
|
+
const y = r(x);
|
|
292
|
+
if (y) {
|
|
293
|
+
y.d !== (b == null ? void 0 : b.d) && q(x, y, b == null ? void 0 : b.d);
|
|
294
|
+
const h = t.get(x);
|
|
295
|
+
h && !// TODO This seems pretty hacky. Hope to fix it.
|
|
296
|
+
// Maybe we could `mountDependencies` in `setAtomState`?
|
|
297
|
+
(b && !xe(b) && (Ne(b, y) || At(b, y))) && (h.l.forEach((k) => k()), (W ? "production" : void 0) !== "production" && u.add(x));
|
|
298
|
+
} else
|
|
299
|
+
(W ? "production" : void 0) !== "production" && console.warn("[Bug] no atom state to flush");
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
if ((W ? "production" : void 0) !== "production")
|
|
303
|
+
return o.forEach((g) => g("state")), u;
|
|
304
|
+
}, le = (u, g) => {
|
|
305
|
+
const x = j(u), b = K(), y = x.l;
|
|
306
|
+
return y.add(g), (W ? "production" : void 0) !== "production" && (o.forEach((h) => h("sub")), n.forEach(
|
|
307
|
+
(h) => h({ type: "sub", flushed: b })
|
|
308
|
+
)), () => {
|
|
309
|
+
y.delete(g), F(u), (W ? "production" : void 0) !== "production" && (o.forEach((h) => h("unsub")), n.forEach((h) => h({ type: "unsub" })));
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
return (W ? "production" : void 0) !== "production" ? {
|
|
313
|
+
get: v,
|
|
314
|
+
set: G,
|
|
315
|
+
sub: le,
|
|
316
|
+
// store dev methods (these are tentative and subject to change without notice)
|
|
317
|
+
dev_subscribe_store: (u, g) => g !== 2 ? (console.warn(
|
|
318
|
+
"The current StoreListener revision is 2. The older ones are deprecated."
|
|
319
|
+
), o.add(u), () => {
|
|
320
|
+
o.delete(u);
|
|
321
|
+
}) : (n.add(u), () => {
|
|
322
|
+
n.delete(u);
|
|
323
|
+
}),
|
|
324
|
+
dev_get_mounted_atoms: () => i.values(),
|
|
325
|
+
dev_get_atom_state: (u) => e.get(u),
|
|
326
|
+
dev_get_mounted: (u) => t.get(u),
|
|
327
|
+
dev_restore_atoms: (u) => {
|
|
328
|
+
for (const [x, b] of u)
|
|
329
|
+
Fe(x) && (m(x, b), B(x));
|
|
330
|
+
const g = K();
|
|
331
|
+
n.forEach(
|
|
332
|
+
(x) => x({ type: "restore", flushed: g })
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
} : {
|
|
336
|
+
get: v,
|
|
337
|
+
set: G,
|
|
338
|
+
sub: le
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
let We;
|
|
342
|
+
const ao = () => (We || (We = no()), We);
|
|
343
|
+
var ro = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
344
|
+
const io = Es(void 0), qt = (e) => {
|
|
345
|
+
const t = Os(io);
|
|
346
|
+
return (e == null ? void 0 : e.store) || t || ao();
|
|
347
|
+
};
|
|
348
|
+
const lo = (e) => typeof (e == null ? void 0 : e.then) == "function", co = tt.use || ((e) => {
|
|
349
|
+
if (e.status === "pending")
|
|
350
|
+
throw e;
|
|
351
|
+
if (e.status === "fulfilled")
|
|
352
|
+
return e.value;
|
|
353
|
+
throw e.status === "rejected" ? e.reason : (e.status = "pending", e.then(
|
|
354
|
+
(t) => {
|
|
355
|
+
e.status = "fulfilled", e.value = t;
|
|
356
|
+
},
|
|
357
|
+
(t) => {
|
|
358
|
+
e.status = "rejected", e.reason = t;
|
|
359
|
+
}
|
|
360
|
+
), e);
|
|
361
|
+
});
|
|
362
|
+
function uo(e, t) {
|
|
363
|
+
const s = qt(t), [[o, n, i], r] = Ls(
|
|
364
|
+
(l) => {
|
|
365
|
+
const m = s.get(e);
|
|
366
|
+
return Object.is(l[0], m) && l[1] === s && l[2] === e ? l : [m, s, e];
|
|
367
|
+
},
|
|
368
|
+
void 0,
|
|
369
|
+
() => [s.get(e), s, e]
|
|
370
|
+
);
|
|
371
|
+
let c = o;
|
|
372
|
+
(n !== s || i !== e) && (r(), c = s.get(e));
|
|
373
|
+
const p = t == null ? void 0 : t.delay;
|
|
374
|
+
return Ae(() => {
|
|
375
|
+
const l = s.sub(e, () => {
|
|
376
|
+
if (typeof p == "number") {
|
|
377
|
+
setTimeout(r, p);
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
r();
|
|
381
|
+
});
|
|
382
|
+
return r(), l;
|
|
383
|
+
}, [s, e, p]), zs(c), lo(c) ? co(c) : c;
|
|
384
|
+
}
|
|
385
|
+
function fo(e, t) {
|
|
386
|
+
const s = qt(t);
|
|
387
|
+
return $(
|
|
388
|
+
(...n) => {
|
|
389
|
+
if ((ro ? "production" : void 0) !== "production" && !("write" in e))
|
|
390
|
+
throw new Error("not writable atom");
|
|
391
|
+
return s.set(e, ...n);
|
|
392
|
+
},
|
|
393
|
+
[s, e]
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
function zr(e, t) {
|
|
397
|
+
return [
|
|
398
|
+
uo(e, t),
|
|
399
|
+
// We do wrong type assertion here, which results in throwing an error.
|
|
400
|
+
fo(e, t)
|
|
401
|
+
];
|
|
402
|
+
}
|
|
403
|
+
var rt = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
404
|
+
const Kt = Symbol();
|
|
405
|
+
const Ct = (e, t, s) => (t.has(s) ? t : t.set(s, e())).get(s), mo = /* @__PURE__ */ new WeakMap(), po = (e, t, s) => {
|
|
406
|
+
const o = Ct(() => /* @__PURE__ */ new WeakMap(), mo, t);
|
|
407
|
+
return Ct(e, o, s);
|
|
408
|
+
}, go = {}, Bt = (e) => !!e.write, bo = (e) => typeof e == "function";
|
|
409
|
+
function ho(e, t) {
|
|
410
|
+
return po(
|
|
411
|
+
() => {
|
|
412
|
+
const s = /* @__PURE__ */ new WeakMap(), o = (r, c) => {
|
|
413
|
+
let p = s.get(r);
|
|
414
|
+
if (p)
|
|
415
|
+
return p;
|
|
416
|
+
const l = c && s.get(c), m = [], N = [];
|
|
417
|
+
return r.forEach((S, v) => {
|
|
418
|
+
const j = t ? t(S) : v;
|
|
419
|
+
N[v] = j;
|
|
420
|
+
const L = l && l.atomList[l.keyList.indexOf(j)];
|
|
421
|
+
if (L) {
|
|
422
|
+
m[v] = L;
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
const F = (T) => {
|
|
426
|
+
const G = T(n), V = T(e), q = o(V, G == null ? void 0 : G.arr).keyList.indexOf(j);
|
|
427
|
+
if (q < 0 || q >= V.length) {
|
|
428
|
+
const K = r[o(r).keyList.indexOf(j)];
|
|
429
|
+
if (K)
|
|
430
|
+
return K;
|
|
431
|
+
throw new Error("splitAtom: index out of bounds for read");
|
|
432
|
+
}
|
|
433
|
+
return V[q];
|
|
434
|
+
}, B = (T, G, V) => {
|
|
435
|
+
const X = T(n), q = T(e), le = o(q, X == null ? void 0 : X.arr).keyList.indexOf(j);
|
|
436
|
+
if (le < 0 || le >= q.length)
|
|
437
|
+
throw new Error("splitAtom: index out of bounds for write");
|
|
438
|
+
const u = bo(V) ? V(q[le]) : V;
|
|
439
|
+
G(e, [
|
|
440
|
+
...q.slice(0, le),
|
|
441
|
+
u,
|
|
442
|
+
...q.slice(le + 1)
|
|
443
|
+
]);
|
|
444
|
+
};
|
|
445
|
+
m[v] = Bt(e) ? ae(F, B) : ae(F);
|
|
446
|
+
}), l && l.keyList.length === N.length && l.keyList.every((S, v) => S === N[v]) ? p = l : p = { arr: r, atomList: m, keyList: N }, s.set(r, p), p;
|
|
447
|
+
}, n = ae((r) => {
|
|
448
|
+
const c = r(n), p = r(e);
|
|
449
|
+
return o(p, c == null ? void 0 : c.arr);
|
|
450
|
+
});
|
|
451
|
+
(rt ? "production" : void 0) !== "production" && (n.debugPrivate = !0), n.init = void 0;
|
|
452
|
+
const i = Bt(e) ? ae(
|
|
453
|
+
(r) => r(n).atomList,
|
|
454
|
+
(r, c, p) => {
|
|
455
|
+
switch (p.type) {
|
|
456
|
+
case "remove": {
|
|
457
|
+
const l = r(i).indexOf(p.atom);
|
|
458
|
+
if (l >= 0) {
|
|
459
|
+
const m = r(e);
|
|
460
|
+
c(e, [
|
|
461
|
+
...m.slice(0, l),
|
|
462
|
+
...m.slice(l + 1)
|
|
463
|
+
]);
|
|
464
|
+
}
|
|
465
|
+
break;
|
|
466
|
+
}
|
|
467
|
+
case "insert": {
|
|
468
|
+
const l = p.before ? r(i).indexOf(p.before) : r(i).length;
|
|
469
|
+
if (l >= 0) {
|
|
470
|
+
const m = r(e);
|
|
471
|
+
c(e, [
|
|
472
|
+
...m.slice(0, l),
|
|
473
|
+
p.value,
|
|
474
|
+
...m.slice(l)
|
|
475
|
+
]);
|
|
476
|
+
}
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
case "move": {
|
|
480
|
+
const l = r(i).indexOf(p.atom), m = p.before ? r(i).indexOf(p.before) : r(i).length;
|
|
481
|
+
if (l >= 0 && m >= 0) {
|
|
482
|
+
const N = r(e);
|
|
483
|
+
l < m ? c(e, [
|
|
484
|
+
...N.slice(0, l),
|
|
485
|
+
...N.slice(l + 1, m),
|
|
486
|
+
N[l],
|
|
487
|
+
...N.slice(m)
|
|
488
|
+
]) : c(e, [
|
|
489
|
+
...N.slice(0, m),
|
|
490
|
+
N[l],
|
|
491
|
+
...N.slice(m, l),
|
|
492
|
+
...N.slice(l + 1)
|
|
493
|
+
]);
|
|
494
|
+
}
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
) : ae((r) => r(n).atomList);
|
|
500
|
+
return i;
|
|
501
|
+
},
|
|
502
|
+
e,
|
|
503
|
+
t || go
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
function Vr(e) {
|
|
507
|
+
const t = Symbol(), s = ae(t);
|
|
508
|
+
(rt ? "production" : void 0) !== "production" && (s.debugPrivate = !0);
|
|
509
|
+
const o = ae(
|
|
510
|
+
(n, i) => {
|
|
511
|
+
const r = n(s);
|
|
512
|
+
return r !== t ? r : e(n, i);
|
|
513
|
+
},
|
|
514
|
+
(n, i, r) => {
|
|
515
|
+
if (r === Kt)
|
|
516
|
+
i(s, t);
|
|
517
|
+
else if (typeof r == "function") {
|
|
518
|
+
const c = n(o);
|
|
519
|
+
i(s, r(c));
|
|
520
|
+
} else
|
|
521
|
+
i(s, r);
|
|
522
|
+
}
|
|
523
|
+
);
|
|
524
|
+
return o;
|
|
525
|
+
}
|
|
526
|
+
const xo = (e) => typeof (e == null ? void 0 : e.then) == "function";
|
|
527
|
+
function vo(e) {
|
|
528
|
+
let t, s;
|
|
529
|
+
const o = {
|
|
530
|
+
getItem: (n, i) => {
|
|
531
|
+
var r, c;
|
|
532
|
+
const p = (m) => {
|
|
533
|
+
if (m = m || "", t !== m) {
|
|
534
|
+
try {
|
|
535
|
+
s = JSON.parse(m);
|
|
536
|
+
} catch {
|
|
537
|
+
return i;
|
|
538
|
+
}
|
|
539
|
+
t = m;
|
|
540
|
+
}
|
|
541
|
+
return s;
|
|
542
|
+
}, l = (c = (r = e()) == null ? void 0 : r.getItem(n)) != null ? c : null;
|
|
543
|
+
return xo(l) ? l.then(p) : p(l);
|
|
544
|
+
},
|
|
545
|
+
setItem: (n, i) => {
|
|
546
|
+
var r;
|
|
547
|
+
return (r = e()) == null ? void 0 : r.setItem(n, JSON.stringify(i));
|
|
548
|
+
},
|
|
549
|
+
removeItem: (n) => {
|
|
550
|
+
var i;
|
|
551
|
+
return (i = e()) == null ? void 0 : i.removeItem(n);
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
return typeof window < "u" && typeof window.addEventListener == "function" && (o.subscribe = (n, i, r) => {
|
|
555
|
+
if (!(e() instanceof window.Storage))
|
|
556
|
+
return () => {
|
|
557
|
+
};
|
|
558
|
+
const c = (p) => {
|
|
559
|
+
if (p.storageArea === e() && p.key === n) {
|
|
560
|
+
let l;
|
|
561
|
+
try {
|
|
562
|
+
l = JSON.parse(p.newValue || "");
|
|
563
|
+
} catch {
|
|
564
|
+
l = r;
|
|
565
|
+
}
|
|
566
|
+
i(l);
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
return window.addEventListener("storage", c), () => {
|
|
570
|
+
window.removeEventListener("storage", c);
|
|
571
|
+
};
|
|
572
|
+
}), o;
|
|
573
|
+
}
|
|
574
|
+
const yo = vo(
|
|
575
|
+
() => typeof window < "u" ? window.localStorage : void 0
|
|
576
|
+
);
|
|
577
|
+
function Re(e, t, s = yo, o) {
|
|
578
|
+
const n = o == null ? void 0 : o.unstable_getOnInit, i = ae(
|
|
579
|
+
n ? s.getItem(e, t) : t
|
|
580
|
+
);
|
|
581
|
+
return (rt ? "production" : void 0) !== "production" && (i.debugPrivate = !0), i.onMount = (c) => {
|
|
582
|
+
n || c(s.getItem(e, t));
|
|
583
|
+
let p;
|
|
584
|
+
return s.subscribe && (p = s.subscribe(e, c, t)), p;
|
|
585
|
+
}, ae(
|
|
586
|
+
(c) => c(i),
|
|
587
|
+
(c, p, l) => {
|
|
588
|
+
const m = typeof l == "function" ? l(c(i)) : l;
|
|
589
|
+
return m === Kt ? (p(i, t), s.removeItem(e)) : m instanceof Promise ? m.then((N) => (p(i, N), s.setItem(e, N))) : (p(i, m), s.setItem(e, m));
|
|
590
|
+
}
|
|
591
|
+
);
|
|
592
|
+
}
|
|
593
|
+
const Jt = w(null);
|
|
594
|
+
Jt.debugLabel = "chaiBuilderPropsAtom";
|
|
595
|
+
const wo = w({});
|
|
596
|
+
wo.debugLabel = "chaiExternalDataAtom";
|
|
597
|
+
const $r = () => !1, No = (e) => {
|
|
598
|
+
const t = e.replace(fe, "").split(",");
|
|
599
|
+
return { baseClasses: t[0], classes: t[1] };
|
|
600
|
+
}, _t = Oe((e, t) => {
|
|
601
|
+
if (!e)
|
|
602
|
+
return !0;
|
|
603
|
+
const s = Le(e);
|
|
604
|
+
return s && pe(s, "canAcceptBlock") ? s.canAcceptBlock(t) : !1;
|
|
605
|
+
}), ko = Oe((e, t) => {
|
|
606
|
+
const s = Le(t);
|
|
607
|
+
return s && pe(s, "canBeNested") ? s.canBeNested(e) : !0;
|
|
608
|
+
}), Fr = Oe((e) => {
|
|
609
|
+
const t = Le(e);
|
|
610
|
+
return t && pe(t, "canDuplicate") ? t.canDuplicate() : !0;
|
|
611
|
+
}), Ur = Oe((e) => {
|
|
612
|
+
const t = Le(e);
|
|
613
|
+
return t && pe(t, "canDelete") ? t.canDelete() : !0;
|
|
614
|
+
});
|
|
615
|
+
function Yt(e, t, s) {
|
|
616
|
+
const o = E(e, (i) => i._parent === t), n = [];
|
|
617
|
+
for (let i = 0; i < o.length; i++) {
|
|
618
|
+
const r = Xt(o[i]);
|
|
619
|
+
if (Object.keys(r).length > 0 && Object.keys(r).forEach((c) => {
|
|
620
|
+
o[i][c] = `slot:${de()}`;
|
|
621
|
+
}), E(e, { _parent: o[i]._id }).length > 0) {
|
|
622
|
+
const c = de();
|
|
623
|
+
n.push({ ...o[i], oldId: o[i]._id, _id: c, _parent: s }), n.push(re(Yt(e, o[i]._id, c)));
|
|
624
|
+
} else
|
|
625
|
+
n.push({
|
|
626
|
+
...o[i],
|
|
627
|
+
oldId: o[i]._id,
|
|
628
|
+
_id: de(),
|
|
629
|
+
_parent: s
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
return re(n);
|
|
633
|
+
}
|
|
634
|
+
function Qt(e) {
|
|
635
|
+
const t = {};
|
|
636
|
+
e.forEach((o) => {
|
|
637
|
+
t[o._id] = { ...o, children: [] };
|
|
638
|
+
});
|
|
639
|
+
const s = [];
|
|
640
|
+
return e.forEach((o) => {
|
|
641
|
+
if (o._parent) {
|
|
642
|
+
const n = t[o._parent];
|
|
643
|
+
n && n.children.push(t[o._id]);
|
|
644
|
+
} else
|
|
645
|
+
s.push(t[o._id]);
|
|
646
|
+
}), s;
|
|
647
|
+
}
|
|
648
|
+
const Xt = (e) => {
|
|
649
|
+
const t = {};
|
|
650
|
+
return Object.keys(e).forEach((s) => {
|
|
651
|
+
zt(e[s]) && e[s].startsWith("slot") && (t[s] = e[s].replace("slot:", ""));
|
|
652
|
+
}), t;
|
|
653
|
+
}, So = (e, t, s = null) => {
|
|
654
|
+
let o = oe(e, { _id: t });
|
|
655
|
+
o = { ...o, oldId: o._id, _id: de() }, s && (o = { ...o, _parent: s });
|
|
656
|
+
const n = [o];
|
|
657
|
+
E(e, { _parent: t }).length > 0 && n.push(re(Yt(e, t, o._id)));
|
|
658
|
+
const i = re(n);
|
|
659
|
+
return I(i, (r) => {
|
|
660
|
+
const c = r, p = Xt(c);
|
|
661
|
+
return Object.keys(p).length > 0 && Object.keys(p).forEach((l) => {
|
|
662
|
+
const m = oe(i, { oldId: p[l].replace("slot:", "") });
|
|
663
|
+
c[l] = `slot:${m._id}`;
|
|
664
|
+
}), st(c, ["global", "oldId"]);
|
|
665
|
+
});
|
|
666
|
+
};
|
|
667
|
+
const ie = w([]);
|
|
668
|
+
ie.debugLabel = "presentBlocksAtom";
|
|
669
|
+
const jo = w((e) => {
|
|
670
|
+
const t = e(ie);
|
|
671
|
+
return Qt([...t]);
|
|
672
|
+
});
|
|
673
|
+
jo.debugLabel = "treeDSBlocks";
|
|
674
|
+
ie.debugLabel = "presentBlocksAtom";
|
|
675
|
+
const it = ho(ie);
|
|
676
|
+
it.debugLabel = "pageBlocksAtomsAtom";
|
|
677
|
+
const Ao = w("");
|
|
678
|
+
Ao.debugLabel = "builderActivePageAtom";
|
|
679
|
+
const Co = w(-1);
|
|
680
|
+
Co.debugLabel = "destinationDropIndexAtom";
|
|
681
|
+
const Zt = w([]);
|
|
682
|
+
Zt.debugLabel = "buildingBlocksAtom";
|
|
683
|
+
const Bo = w((e) => {
|
|
684
|
+
const t = e(Zt);
|
|
685
|
+
return E(t, (s) => pe(s, "blockId"));
|
|
686
|
+
});
|
|
687
|
+
Bo.debugLabel = "globalBlocksAtom";
|
|
688
|
+
const lt = w([]);
|
|
689
|
+
lt.debugLabel = "selectedBlockIdsAtom";
|
|
690
|
+
const ct = w((e) => {
|
|
691
|
+
const t = e(ie), s = e(lt);
|
|
692
|
+
return I(
|
|
693
|
+
E(t, ({ _id: o }) => Y(s, o)),
|
|
694
|
+
(o) => ({ ...o })
|
|
695
|
+
);
|
|
696
|
+
});
|
|
697
|
+
ct.debugLabel = "selectedBlocksAtom";
|
|
698
|
+
const dt = w((e) => {
|
|
699
|
+
const t = e(ct);
|
|
700
|
+
return t.length === 0 ? null : t.length === 1 ? t[0] : {
|
|
701
|
+
type: "Multiple",
|
|
702
|
+
id: I(t, "id")
|
|
703
|
+
};
|
|
704
|
+
});
|
|
705
|
+
dt.debugLabel = "selectedBlockAtom";
|
|
706
|
+
const _o = (e) => J(e, "parent", null), Ro = w((e) => {
|
|
707
|
+
const t = e(ct), s = I(t, _o);
|
|
708
|
+
return E(e(ie), (o) => Y(s, o._id));
|
|
709
|
+
});
|
|
710
|
+
Ro.debugLabel = "selectedBlocksParentsAtom";
|
|
711
|
+
const es = w(() => !1);
|
|
712
|
+
es.debugLabel = "selectedBlockFlexChildAtom";
|
|
713
|
+
const ts = w(() => !1);
|
|
714
|
+
ts.debugLabel = "selectedBlockGridChildAtom";
|
|
715
|
+
const ut = w("");
|
|
716
|
+
ut.debugLabel = "styleStateAtom";
|
|
717
|
+
const ss = Re("styleBreakpoint", "xs");
|
|
718
|
+
ss.debugLabel = "styleBreakpointAtom";
|
|
719
|
+
const Wr = () => ({
|
|
720
|
+
flexChild: te(es),
|
|
721
|
+
gridChild: te(ts)
|
|
722
|
+
}), Gr = () => te(dt);
|
|
723
|
+
const $e = () => {
|
|
724
|
+
const [e, t] = O(lt), s = $(
|
|
725
|
+
(o) => {
|
|
726
|
+
t((n) => Y(n, o) ? Vt(n, o) : [...n, o]);
|
|
727
|
+
},
|
|
728
|
+
[t]
|
|
729
|
+
);
|
|
730
|
+
return [e, t, s];
|
|
731
|
+
}, Rt = (e) => {
|
|
732
|
+
switch (e.type) {
|
|
733
|
+
case "singular":
|
|
734
|
+
return e.uiSchema;
|
|
735
|
+
case "model":
|
|
736
|
+
const { properties: t } = e, s = {};
|
|
737
|
+
return Object.keys(t).forEach((i) => {
|
|
738
|
+
const r = t[i];
|
|
739
|
+
if (Y(["slot", "styles"], r.type))
|
|
740
|
+
return;
|
|
741
|
+
const c = i;
|
|
742
|
+
s[c] = Rt(r);
|
|
743
|
+
}), s;
|
|
744
|
+
case "list":
|
|
745
|
+
const { itemProperties: o } = e, n = {
|
|
746
|
+
items: {}
|
|
747
|
+
};
|
|
748
|
+
return Object.keys(o).forEach((i) => {
|
|
749
|
+
const r = o[i];
|
|
750
|
+
if (Y(["slot", "styles"], r.type))
|
|
751
|
+
return;
|
|
752
|
+
const c = i;
|
|
753
|
+
n.items[c] = Rt(r);
|
|
754
|
+
}), n;
|
|
755
|
+
default:
|
|
756
|
+
return {};
|
|
757
|
+
}
|
|
758
|
+
}, Pt = (e) => {
|
|
759
|
+
switch (e.type) {
|
|
760
|
+
case "singular":
|
|
761
|
+
return e.schema;
|
|
762
|
+
case "model":
|
|
763
|
+
const { properties: t, title: s } = e, o = {
|
|
764
|
+
title: s,
|
|
765
|
+
type: "object",
|
|
766
|
+
properties: {}
|
|
767
|
+
};
|
|
768
|
+
return Object.keys(t).forEach((c) => {
|
|
769
|
+
const p = t[c];
|
|
770
|
+
if (Y(["slot", "styles"], p.type))
|
|
771
|
+
return;
|
|
772
|
+
const l = c;
|
|
773
|
+
o.properties[l] = Pt(p);
|
|
774
|
+
}), o;
|
|
775
|
+
case "list":
|
|
776
|
+
const { itemProperties: n, title: i } = e, r = {
|
|
777
|
+
title: i,
|
|
778
|
+
type: "array",
|
|
779
|
+
items: {
|
|
780
|
+
type: "object",
|
|
781
|
+
properties: {}
|
|
782
|
+
}
|
|
783
|
+
};
|
|
784
|
+
return Object.keys(n).forEach((c) => {
|
|
785
|
+
const p = n[c];
|
|
786
|
+
if (Y(["slot", "styles"], p.type))
|
|
787
|
+
return;
|
|
788
|
+
const l = c;
|
|
789
|
+
r.items.properties[l] = Pt(p), Se(r.items, "title", J(p, "itemTitle", `${i} item`));
|
|
790
|
+
}), r;
|
|
791
|
+
default:
|
|
792
|
+
return {};
|
|
793
|
+
}
|
|
794
|
+
}, os = (e) => {
|
|
795
|
+
if (!e)
|
|
796
|
+
return {};
|
|
797
|
+
const t = {};
|
|
798
|
+
return Object.keys(e).forEach((s) => {
|
|
799
|
+
t[s] = To(e[s]);
|
|
800
|
+
}), t;
|
|
801
|
+
}, Po = (e) => {
|
|
802
|
+
if (Be(e.default))
|
|
803
|
+
return [];
|
|
804
|
+
const { itemProperties: t } = e;
|
|
805
|
+
return I(e.default, (s) => {
|
|
806
|
+
const o = { ...s };
|
|
807
|
+
return $t(s, (n, i) => {
|
|
808
|
+
pe(t, i) && J(t[i], "i18n", !1) && (o[i] = Ut);
|
|
809
|
+
}), o;
|
|
810
|
+
});
|
|
811
|
+
}, To = (e) => {
|
|
812
|
+
switch (e.type) {
|
|
813
|
+
case "styles":
|
|
814
|
+
return e.default;
|
|
815
|
+
case "slot":
|
|
816
|
+
return `${Je}${de()}`;
|
|
817
|
+
case "singular":
|
|
818
|
+
const { i18n: t, schema: s } = e;
|
|
819
|
+
return t ? Ut : J(s, "default", "");
|
|
820
|
+
case "model":
|
|
821
|
+
return os(e.properties);
|
|
822
|
+
case "list":
|
|
823
|
+
return Po(e);
|
|
824
|
+
default:
|
|
825
|
+
return "";
|
|
826
|
+
}
|
|
827
|
+
};
|
|
828
|
+
var ft = { exports: {} }, Hr = ft.exports;
|
|
829
|
+
(function(e) {
|
|
830
|
+
(function() {
|
|
831
|
+
"use strict";
|
|
832
|
+
function t(o, n, i) {
|
|
833
|
+
return o.splice(
|
|
834
|
+
n,
|
|
835
|
+
!i || 1 + i - n + (!(i < 0 ^ n >= 0) && (i < 0 || -1) * o.length)
|
|
836
|
+
), o.length;
|
|
837
|
+
}
|
|
838
|
+
let s = function() {
|
|
839
|
+
let o = [], n = -1, i = 0, r = !1, c;
|
|
840
|
+
function p(l, m) {
|
|
841
|
+
return !l || typeof l[m] != "function" ? this : (r = !0, l[m](), r = !1, this);
|
|
842
|
+
}
|
|
843
|
+
return {
|
|
844
|
+
/**
|
|
845
|
+
* Adds a command to the queue.
|
|
846
|
+
* @property {object} command - Command
|
|
847
|
+
* @property {function} command.undo - Undo function
|
|
848
|
+
* @property {function} command.redo - Redo function
|
|
849
|
+
* @property {string} [command.groupId] - Optional group id
|
|
850
|
+
*/
|
|
851
|
+
add: function(l) {
|
|
852
|
+
return r ? this : (o.splice(n + 1, o.length - n), o.push(l), i && o.length > i && t(o, 0, -(i + 1)), n = o.length - 1, c && c(), this);
|
|
853
|
+
},
|
|
854
|
+
/**
|
|
855
|
+
* Pass a function to be called on undo and redo actions.
|
|
856
|
+
* @property {function} callbackFunc - Callback function
|
|
857
|
+
*/
|
|
858
|
+
setCallback: function(l) {
|
|
859
|
+
c = l;
|
|
860
|
+
},
|
|
861
|
+
/**
|
|
862
|
+
* Performs undo: call the undo function at the current index and decrease the index by 1.
|
|
863
|
+
*/
|
|
864
|
+
undo: function() {
|
|
865
|
+
let l = o[n];
|
|
866
|
+
if (!l)
|
|
867
|
+
return this;
|
|
868
|
+
const m = l.groupId;
|
|
869
|
+
for (; l.groupId === m && (p(l, "undo"), n -= 1, l = o[n], !(!l || !l.groupId)); )
|
|
870
|
+
;
|
|
871
|
+
return c && c(), this;
|
|
872
|
+
},
|
|
873
|
+
/**
|
|
874
|
+
* Performs redo: call the redo function at the next index and increase the index by 1.
|
|
875
|
+
*/
|
|
876
|
+
redo: function() {
|
|
877
|
+
let l = o[n + 1];
|
|
878
|
+
if (!l)
|
|
879
|
+
return this;
|
|
880
|
+
const m = l.groupId;
|
|
881
|
+
for (; l.groupId === m && (p(l, "redo"), n += 1, l = o[n + 1], !(!l || !l.groupId)); )
|
|
882
|
+
;
|
|
883
|
+
return c && c(), this;
|
|
884
|
+
},
|
|
885
|
+
/**
|
|
886
|
+
* Clears the memory, losing all stored states. Resets the index.
|
|
887
|
+
*/
|
|
888
|
+
clear: function() {
|
|
889
|
+
let l = o.length;
|
|
890
|
+
o = [], n = -1, c && l > 0 && c();
|
|
891
|
+
},
|
|
892
|
+
/**
|
|
893
|
+
* Tests if any undo actions exist.
|
|
894
|
+
* @returns {boolean}
|
|
895
|
+
*/
|
|
896
|
+
hasUndo: function() {
|
|
897
|
+
return n !== -1;
|
|
898
|
+
},
|
|
899
|
+
/**
|
|
900
|
+
* Tests if any redo actions exist.
|
|
901
|
+
* @returns {boolean}
|
|
902
|
+
*/
|
|
903
|
+
hasRedo: function() {
|
|
904
|
+
return n < o.length - 1;
|
|
905
|
+
},
|
|
906
|
+
/**
|
|
907
|
+
* Returns the list of queued commands.
|
|
908
|
+
* @param {string} [groupId] - Optionally filter commands by group ID
|
|
909
|
+
* @returns {array}
|
|
910
|
+
*/
|
|
911
|
+
getCommands: function(l) {
|
|
912
|
+
return l ? o.filter((m) => m.groupId === l) : o;
|
|
913
|
+
},
|
|
914
|
+
/**
|
|
915
|
+
* Returns the index of the actions list.
|
|
916
|
+
* @returns {number}
|
|
917
|
+
*/
|
|
918
|
+
getIndex: function() {
|
|
919
|
+
return n;
|
|
920
|
+
},
|
|
921
|
+
/**
|
|
922
|
+
* Sets the maximum number of undo steps. Default: 0 (unlimited).
|
|
923
|
+
* @property {number} max - Maximum number of undo steps
|
|
924
|
+
*/
|
|
925
|
+
setLimit: function(l) {
|
|
926
|
+
i = l;
|
|
927
|
+
}
|
|
928
|
+
};
|
|
929
|
+
};
|
|
930
|
+
e.exports ? e.exports = s : window.UndoManager = s;
|
|
931
|
+
})();
|
|
932
|
+
})(ft);
|
|
933
|
+
var Io = ft.exports;
|
|
934
|
+
const Mo = /* @__PURE__ */ Ws(Io), Do = w(Ye), Eo = w(null), ns = () => {
|
|
935
|
+
const [e, t] = O(Do);
|
|
936
|
+
return [
|
|
937
|
+
$s(e) ? { ...Ye, ...e } : Ye,
|
|
938
|
+
t
|
|
939
|
+
];
|
|
940
|
+
}, qr = () => O(Eo), Oo = w(null), Lo = () => ({ currentPage: te(Oo) });
|
|
941
|
+
function zo(e) {
|
|
942
|
+
return Qt(e);
|
|
943
|
+
}
|
|
944
|
+
const mt = (e, t) => re(
|
|
945
|
+
e.map((s) => {
|
|
946
|
+
if (s = t ? { ...s, parent: t } : { ...s }, s.children) {
|
|
947
|
+
const o = [...s.children];
|
|
948
|
+
return delete s.children, re([s, ...mt(o, s._id)]);
|
|
949
|
+
}
|
|
950
|
+
return s;
|
|
951
|
+
})
|
|
952
|
+
);
|
|
953
|
+
function pt(e, t = !1) {
|
|
954
|
+
for (let s = 0; s < e.length; s++) {
|
|
955
|
+
const o = e[s];
|
|
956
|
+
o.global && !t ? e[s] = {
|
|
957
|
+
type: "GlobalBlock",
|
|
958
|
+
blockId: o.blockId,
|
|
959
|
+
_parent: J(o, "parent", null),
|
|
960
|
+
_id: o._id
|
|
961
|
+
} : o.children && o.children.length && pt(o.children);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
function as(e) {
|
|
965
|
+
let t = [], s = E(e, { type: "GlobalBlock" });
|
|
966
|
+
return s.length > 0 && (s = I(s, rs), ce(s, (o) => {
|
|
967
|
+
t = [...t, ...Vo(o)];
|
|
968
|
+
})), t;
|
|
969
|
+
}
|
|
970
|
+
function Vo(e) {
|
|
971
|
+
let t = [];
|
|
972
|
+
const s = J(ee(e), "parent", null);
|
|
973
|
+
Se(ee(e), "parent", null);
|
|
974
|
+
const o = [flatToNestedInstance.convert(is(e))];
|
|
975
|
+
pt(o, !0);
|
|
976
|
+
let n = mt(o, e[0]._id);
|
|
977
|
+
return n = Se(n, "0.parent", s), t = [...t, n, ...as(n)], t;
|
|
978
|
+
}
|
|
979
|
+
function rs(e) {
|
|
980
|
+
const t = oe(Xe, { _id: e._id });
|
|
981
|
+
if (!t)
|
|
982
|
+
return [];
|
|
983
|
+
const s = [t], o = E(Xe, { _parent: e._id });
|
|
984
|
+
return o.length ? re([...s, ...re(I(o, rs))]) : re(s);
|
|
985
|
+
}
|
|
986
|
+
const is = (e) => JSON.parse(JSON.stringify(e));
|
|
987
|
+
let Xe = [];
|
|
988
|
+
function $o(e) {
|
|
989
|
+
Xe = e;
|
|
990
|
+
const t = zo(is(e));
|
|
991
|
+
pt(t);
|
|
992
|
+
const s = mt(t, null), o = as(s), n = {};
|
|
993
|
+
return ce(o, (i) => Se(n, ee(i).blockId, i)), [s, n];
|
|
994
|
+
}
|
|
995
|
+
const Fo = () => {
|
|
996
|
+
const [e] = ns(), { currentPage: t } = Lo(), [s] = we();
|
|
997
|
+
return $(() => {
|
|
998
|
+
const o = I(
|
|
999
|
+
s,
|
|
1000
|
+
(i) => st(i, ["expanded", "order", "title", "siblings", "tempClasses"])
|
|
1001
|
+
), [n = []] = $o(o);
|
|
1002
|
+
return {
|
|
1003
|
+
currentPage: t,
|
|
1004
|
+
blocks: n
|
|
1005
|
+
};
|
|
1006
|
+
}, [e, t, s]);
|
|
1007
|
+
}, ve = (e, t = void 0) => {
|
|
1008
|
+
const s = te(Jt);
|
|
1009
|
+
return J(s, e, t);
|
|
1010
|
+
}, ls = w([]);
|
|
1011
|
+
ls.debugLabel = "dataProvidersAtom";
|
|
1012
|
+
const Uo = () => O(ls), gt = w("SAVED");
|
|
1013
|
+
gt.debugLabel = "builderSaveStateAtom";
|
|
1014
|
+
const Kr = () => {
|
|
1015
|
+
const [e, t] = O(gt), s = ve("onSavePage", async (l) => {
|
|
1016
|
+
}), o = ve("onSave", async (l) => {
|
|
1017
|
+
}), n = ve("onSaveStateChange", qe), i = Fo(), [r] = Uo(), [c] = ns();
|
|
1018
|
+
return { savePage: Gs(
|
|
1019
|
+
async () => {
|
|
1020
|
+
t("SAVING"), n("SAVING");
|
|
1021
|
+
const l = i();
|
|
1022
|
+
return await s({ blocks: l.blocks, providers: r }), await o({ blocks: l.blocks, providers: r, brandingOptions: c }), setTimeout(() => {
|
|
1023
|
+
t("SAVED"), n("SAVED");
|
|
1024
|
+
}, 100), !0;
|
|
1025
|
+
},
|
|
1026
|
+
[i, t, c, o, n],
|
|
1027
|
+
3e3
|
|
1028
|
+
// save only every 5 seconds
|
|
1029
|
+
), saveState: e, setSaveState: t };
|
|
1030
|
+
}, ne = new Mo();
|
|
1031
|
+
ne.setLimit(50);
|
|
1032
|
+
const cs = () => {
|
|
1033
|
+
const [, e] = O(gt), t = ve("onSaveStateChange", qe);
|
|
1034
|
+
return Ae(() => (ne.setCallback(() => {
|
|
1035
|
+
e("UNSAVED"), t("UNSAVED");
|
|
1036
|
+
}), () => {
|
|
1037
|
+
ne.setCallback(qe);
|
|
1038
|
+
}), []), {
|
|
1039
|
+
add: ne.add,
|
|
1040
|
+
undo: ne.undo,
|
|
1041
|
+
redo: ne.redo,
|
|
1042
|
+
hasRedo: ne.hasRedo,
|
|
1043
|
+
hasUndo: ne.hasUndo,
|
|
1044
|
+
clear: ne.clear
|
|
1045
|
+
};
|
|
1046
|
+
}, bt = (e, t) => {
|
|
1047
|
+
const s = [], o = E(e, (n) => Y(t, n._id) || Y(t, n._parent) ? (s.push(n._id), !1) : !0);
|
|
1048
|
+
return Be(s) ? o : bt(o, s);
|
|
1049
|
+
}, Jr = () => {
|
|
1050
|
+
const [e] = we(), [t, s] = $e(), { setNewBlocks: o } = he();
|
|
1051
|
+
return $(
|
|
1052
|
+
(n) => {
|
|
1053
|
+
var r;
|
|
1054
|
+
const i = ((r = oe(e, { _id: n[0] })) == null ? void 0 : r._parent) || null;
|
|
1055
|
+
o(bt(e, n)), setTimeout(() => s(i ? [i] : []), 200);
|
|
1056
|
+
},
|
|
1057
|
+
[e, s, t]
|
|
1058
|
+
);
|
|
1059
|
+
};
|
|
1060
|
+
function Wo(e, t, s, o) {
|
|
1061
|
+
let n = e.filter((c) => !c._parent);
|
|
1062
|
+
s && (n = e.filter((c) => c._parent === s));
|
|
1063
|
+
const i = o !== void 0 ? o : n.length;
|
|
1064
|
+
let r = e.length;
|
|
1065
|
+
for (let c = 0, p = 0; c < e.length; c++)
|
|
1066
|
+
if (e[c]._parent === s) {
|
|
1067
|
+
if (p === i) {
|
|
1068
|
+
r = c;
|
|
1069
|
+
break;
|
|
1070
|
+
}
|
|
1071
|
+
p++;
|
|
1072
|
+
}
|
|
1073
|
+
return !s && o !== void 0 && o >= n.length && (r = e.length), [...e.slice(0, r), ...t, ...e.slice(r)];
|
|
1074
|
+
}
|
|
1075
|
+
function Tt(e) {
|
|
1076
|
+
const t = [], s = /* @__PURE__ */ new Map();
|
|
1077
|
+
e.forEach((n) => {
|
|
1078
|
+
s.set(n._id, n);
|
|
1079
|
+
});
|
|
1080
|
+
function o(n) {
|
|
1081
|
+
const i = s.get(n);
|
|
1082
|
+
t.includes(i) || (t.push(i), e.forEach((r) => {
|
|
1083
|
+
r._parent === n && o(r._id);
|
|
1084
|
+
}));
|
|
1085
|
+
}
|
|
1086
|
+
return e.forEach((n) => {
|
|
1087
|
+
n._parent || o(n._id);
|
|
1088
|
+
}), t;
|
|
1089
|
+
}
|
|
1090
|
+
const Go = (e, t, s, o) => {
|
|
1091
|
+
if (Be(t))
|
|
1092
|
+
return Tt(e);
|
|
1093
|
+
function n(c, p) {
|
|
1094
|
+
const l = c.filter((N) => N._parent === p);
|
|
1095
|
+
let m = [...l];
|
|
1096
|
+
return l.forEach((N) => {
|
|
1097
|
+
m = m.concat(n(c, N._id));
|
|
1098
|
+
}), m;
|
|
1099
|
+
}
|
|
1100
|
+
const i = t.reduce((c, p) => {
|
|
1101
|
+
const l = e.find((m) => m._id === p);
|
|
1102
|
+
if (l) {
|
|
1103
|
+
const m = n(e, p);
|
|
1104
|
+
c.push(l, ...m);
|
|
1105
|
+
}
|
|
1106
|
+
return c;
|
|
1107
|
+
}, []);
|
|
1108
|
+
e = e.filter((c) => !i.includes(c)), i.forEach((c) => {
|
|
1109
|
+
t.includes(c._id) && (c._parent = s);
|
|
1110
|
+
});
|
|
1111
|
+
let r;
|
|
1112
|
+
if (!s)
|
|
1113
|
+
r = o;
|
|
1114
|
+
else {
|
|
1115
|
+
const c = e.findIndex((p) => p._id === s);
|
|
1116
|
+
if (c === -1)
|
|
1117
|
+
r = o;
|
|
1118
|
+
else {
|
|
1119
|
+
r = c + 1;
|
|
1120
|
+
let p = 0;
|
|
1121
|
+
for (; p < o && r < e.length; )
|
|
1122
|
+
e[r]._parent === s && p++, r++;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
return e.splice(r, 0, ...i), Tt(e);
|
|
1126
|
+
}, Ho = () => {
|
|
1127
|
+
const [, e] = we();
|
|
1128
|
+
return {
|
|
1129
|
+
setNewBlocks: (t) => {
|
|
1130
|
+
e(t);
|
|
1131
|
+
},
|
|
1132
|
+
addBlocks: (t, s, o) => {
|
|
1133
|
+
e((n) => Wo(n, t, s, o));
|
|
1134
|
+
},
|
|
1135
|
+
removeBlocks: (t) => {
|
|
1136
|
+
e((s) => bt(s, t));
|
|
1137
|
+
},
|
|
1138
|
+
moveBlocks: (t, s, o) => {
|
|
1139
|
+
e((n) => Go(n, t, s, o));
|
|
1140
|
+
},
|
|
1141
|
+
updateBlocksProps: (t) => {
|
|
1142
|
+
e((s) => {
|
|
1143
|
+
const o = t.map((n) => n._id);
|
|
1144
|
+
return s.map((n) => {
|
|
1145
|
+
if (o.includes(n._id)) {
|
|
1146
|
+
const i = oe(t, { _id: n._id });
|
|
1147
|
+
return { ...n, ...st(i, "_id") };
|
|
1148
|
+
}
|
|
1149
|
+
return n;
|
|
1150
|
+
});
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1153
|
+
};
|
|
1154
|
+
}, we = () => O(ie), he = () => {
|
|
1155
|
+
const { add: e } = cs(), [t] = we(), {
|
|
1156
|
+
setNewBlocks: s,
|
|
1157
|
+
addBlocks: o,
|
|
1158
|
+
removeBlocks: n,
|
|
1159
|
+
moveBlocks: i,
|
|
1160
|
+
updateBlocksProps: r
|
|
1161
|
+
} = Ho();
|
|
1162
|
+
return {
|
|
1163
|
+
moveBlocks: (v, j, L) => {
|
|
1164
|
+
const F = I(v, (T) => {
|
|
1165
|
+
const V = t.find((K) => K._id === T)._parent || null, q = t.filter((K) => V ? K._parent === V : !K._parent).map((K) => K._id).indexOf(T);
|
|
1166
|
+
return { _id: T, oldParent: V, oldPosition: q };
|
|
1167
|
+
}), B = F.find(({ _id: T }) => T === v[0]);
|
|
1168
|
+
B && B.oldParent === j && B.oldPosition === L || (i(v, j, L), e({
|
|
1169
|
+
undo: () => ce(F, ({ _id: T, oldParent: G, oldPosition: V }) => {
|
|
1170
|
+
i([T], G, V);
|
|
1171
|
+
}),
|
|
1172
|
+
redo: () => i(v, j, L)
|
|
1173
|
+
}));
|
|
1174
|
+
},
|
|
1175
|
+
addBlocks: (v, j, L) => {
|
|
1176
|
+
o(v, j, L), e({
|
|
1177
|
+
undo: () => n(I(v, "_id")),
|
|
1178
|
+
redo: () => o(v, j, L)
|
|
1179
|
+
});
|
|
1180
|
+
},
|
|
1181
|
+
removeBlocks: (v) => {
|
|
1182
|
+
var B;
|
|
1183
|
+
const j = (B = ee(v)) == null ? void 0 : B._parent, F = t.filter((T) => j ? T._parent === j : !T._parent).indexOf(ee(v));
|
|
1184
|
+
n(I(v, "_id")), e({
|
|
1185
|
+
undo: () => o(v, j, F),
|
|
1186
|
+
redo: () => n(I(v, "_id"))
|
|
1187
|
+
});
|
|
1188
|
+
},
|
|
1189
|
+
updateBlocks: (v, j, L) => {
|
|
1190
|
+
let F = [];
|
|
1191
|
+
if (L)
|
|
1192
|
+
F = I(v, (B) => ({ _id: B, ...L }));
|
|
1193
|
+
else {
|
|
1194
|
+
const B = Fs(j);
|
|
1195
|
+
F = I(v, (T) => {
|
|
1196
|
+
const G = t.find((X) => X._id === T), V = { _id: T };
|
|
1197
|
+
return ce(B, (X) => V[X] = G[X]), V;
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
r(I(v, (B) => ({ _id: B, ...j }))), e({
|
|
1201
|
+
undo: () => r(F),
|
|
1202
|
+
redo: () => r(I(v, (B) => ({ _id: B, ...j })))
|
|
1203
|
+
});
|
|
1204
|
+
},
|
|
1205
|
+
updateBlocksRuntime: (v, j) => {
|
|
1206
|
+
r(I(v, (L) => ({ _id: L, ...j })));
|
|
1207
|
+
},
|
|
1208
|
+
setNewBlocks: (v) => {
|
|
1209
|
+
s(v), e({
|
|
1210
|
+
undo: () => s(t),
|
|
1211
|
+
redo: () => s(v)
|
|
1212
|
+
});
|
|
1213
|
+
}
|
|
1214
|
+
};
|
|
1215
|
+
}, qo = ge(
|
|
1216
|
+
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
1217
|
+
{
|
|
1218
|
+
variants: {
|
|
1219
|
+
variant: {
|
|
1220
|
+
default: "bg-transparent",
|
|
1221
|
+
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
1222
|
+
},
|
|
1223
|
+
size: {
|
|
1224
|
+
default: "h-10 px-3",
|
|
1225
|
+
sm: "h-9 px-2.5",
|
|
1226
|
+
lg: "h-11 px-5"
|
|
1227
|
+
}
|
|
1228
|
+
},
|
|
1229
|
+
defaultVariants: {
|
|
1230
|
+
variant: "default",
|
|
1231
|
+
size: "default"
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
), Ko = f.forwardRef(({ className: e, variant: t, size: s, ...o }, n) => /* @__PURE__ */ a.jsx(Wt.Root, { ref: n, className: d(qo({ variant: t, size: s, className: e })), ...o }));
|
|
1235
|
+
Ko.displayName = Wt.Root.displayName;
|
|
1236
|
+
const Jo = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1237
|
+
Qe.Root,
|
|
1238
|
+
{
|
|
1239
|
+
className: d(
|
|
1240
|
+
"peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-800 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",
|
|
1241
|
+
e
|
|
1242
|
+
),
|
|
1243
|
+
...t,
|
|
1244
|
+
ref: s,
|
|
1245
|
+
children: /* @__PURE__ */ a.jsx(
|
|
1246
|
+
Qe.Thumb,
|
|
1247
|
+
{
|
|
1248
|
+
className: d(
|
|
1249
|
+
"pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950"
|
|
1250
|
+
)
|
|
1251
|
+
}
|
|
1252
|
+
)
|
|
1253
|
+
}
|
|
1254
|
+
));
|
|
1255
|
+
Jo.displayName = Qe.Root.displayName;
|
|
1256
|
+
const ht = ge(
|
|
1257
|
+
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
1258
|
+
{
|
|
1259
|
+
variants: {
|
|
1260
|
+
variant: {
|
|
1261
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
1262
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
1263
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
1264
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
1265
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
1266
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
1267
|
+
},
|
|
1268
|
+
size: {
|
|
1269
|
+
default: "h-9 px-4 py-2",
|
|
1270
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
1271
|
+
lg: "h-10 rounded-md px-8",
|
|
1272
|
+
icon: "h-9 w-9"
|
|
1273
|
+
}
|
|
1274
|
+
},
|
|
1275
|
+
defaultVariants: {
|
|
1276
|
+
variant: "default",
|
|
1277
|
+
size: "default"
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
), Yo = f.forwardRef(
|
|
1281
|
+
({ className: e, variant: t, size: s, asChild: o = !1, ...n }, i) => {
|
|
1282
|
+
const r = o ? Hs : "button";
|
|
1283
|
+
return /* @__PURE__ */ a.jsx(r, { className: d(ht({ variant: t, size: s, className: e })), ref: i, ...n });
|
|
1284
|
+
}
|
|
1285
|
+
);
|
|
1286
|
+
Yo.displayName = "Button";
|
|
1287
|
+
const Yr = me.Root, Qo = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(me.Item, { ref: s, className: d("border-b", e), ...t }));
|
|
1288
|
+
Qo.displayName = "AccordionItem";
|
|
1289
|
+
const Xo = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsx(me.Header, { className: "flex", children: /* @__PURE__ */ a.jsxs(
|
|
1290
|
+
me.Trigger,
|
|
1291
|
+
{
|
|
1292
|
+
ref: o,
|
|
1293
|
+
className: d(
|
|
1294
|
+
"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
1295
|
+
e
|
|
1296
|
+
),
|
|
1297
|
+
...s,
|
|
1298
|
+
children: [
|
|
1299
|
+
t,
|
|
1300
|
+
/* @__PURE__ */ a.jsx(qs, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
1301
|
+
]
|
|
1302
|
+
}
|
|
1303
|
+
) }));
|
|
1304
|
+
Xo.displayName = me.Trigger.displayName;
|
|
1305
|
+
const Zo = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1306
|
+
me.Content,
|
|
1307
|
+
{
|
|
1308
|
+
ref: o,
|
|
1309
|
+
className: d(
|
|
1310
|
+
"text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
1311
|
+
e
|
|
1312
|
+
),
|
|
1313
|
+
...s,
|
|
1314
|
+
children: /* @__PURE__ */ a.jsx("div", { className: "pb-4 pt-0", children: t })
|
|
1315
|
+
}
|
|
1316
|
+
));
|
|
1317
|
+
Zo.displayName = me.Content.displayName;
|
|
1318
|
+
const en = ge(
|
|
1319
|
+
"relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
1320
|
+
{
|
|
1321
|
+
variants: {
|
|
1322
|
+
variant: {
|
|
1323
|
+
default: "bg-background text-foreground",
|
|
1324
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
defaultVariants: {
|
|
1328
|
+
variant: "default"
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
), tn = f.forwardRef(({ className: e, variant: t, ...s }, o) => /* @__PURE__ */ a.jsx("div", { ref: o, role: "alert", className: d(en({ variant: t }), e), ...s }));
|
|
1332
|
+
tn.displayName = "Alert";
|
|
1333
|
+
const sn = f.forwardRef(
|
|
1334
|
+
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("h5", { ref: s, className: d("mb-1 font-medium leading-none tracking-tight", e), ...t })
|
|
1335
|
+
);
|
|
1336
|
+
sn.displayName = "AlertTitle";
|
|
1337
|
+
const on = f.forwardRef(
|
|
1338
|
+
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("text-sm [&_p]:leading-relaxed", e), ...t })
|
|
1339
|
+
);
|
|
1340
|
+
on.displayName = "AlertDescription";
|
|
1341
|
+
const nn = ge(
|
|
1342
|
+
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
1343
|
+
{
|
|
1344
|
+
variants: {
|
|
1345
|
+
variant: {
|
|
1346
|
+
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
1347
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
1348
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
1349
|
+
outline: "text-foreground"
|
|
1350
|
+
}
|
|
1351
|
+
},
|
|
1352
|
+
defaultVariants: {
|
|
1353
|
+
variant: "default"
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
), Qr = ({ className: e, variant: t, ...s }) => /* @__PURE__ */ a.jsx("div", { className: d(nn({ variant: t }), e), ...s }), Xr = H.Root, Zr = H.Trigger, ds = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(H.Portal, { className: d(e), ...t });
|
|
1357
|
+
ds.displayName = H.Portal.displayName;
|
|
1358
|
+
const us = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1359
|
+
H.Overlay,
|
|
1360
|
+
{
|
|
1361
|
+
className: d(
|
|
1362
|
+
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1363
|
+
e
|
|
1364
|
+
),
|
|
1365
|
+
...t,
|
|
1366
|
+
ref: s
|
|
1367
|
+
}
|
|
1368
|
+
));
|
|
1369
|
+
us.displayName = H.Overlay.displayName;
|
|
1370
|
+
const an = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs(ds, { children: [
|
|
1371
|
+
/* @__PURE__ */ a.jsx(us, {}),
|
|
1372
|
+
/* @__PURE__ */ a.jsx(
|
|
1373
|
+
H.Content,
|
|
1374
|
+
{
|
|
1375
|
+
ref: s,
|
|
1376
|
+
className: d(
|
|
1377
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
|
|
1378
|
+
e
|
|
1379
|
+
),
|
|
1380
|
+
...t
|
|
1381
|
+
}
|
|
1382
|
+
)
|
|
1383
|
+
] }));
|
|
1384
|
+
an.displayName = H.Content.displayName;
|
|
1385
|
+
const rn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
|
|
1386
|
+
rn.displayName = "AlertDialogHeader";
|
|
1387
|
+
const ln = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
1388
|
+
ln.displayName = "AlertDialogFooter";
|
|
1389
|
+
const cn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(H.Title, { ref: s, className: d("text-lg font-semibold", e), ...t }));
|
|
1390
|
+
cn.displayName = H.Title.displayName;
|
|
1391
|
+
const dn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(H.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
|
|
1392
|
+
dn.displayName = H.Description.displayName;
|
|
1393
|
+
const un = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(H.Action, { ref: s, className: d(ht(), e), ...t }));
|
|
1394
|
+
un.displayName = H.Action.displayName;
|
|
1395
|
+
const fn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1396
|
+
H.Cancel,
|
|
1397
|
+
{
|
|
1398
|
+
ref: s,
|
|
1399
|
+
className: d(ht({ variant: "outline" }), "mt-2 sm:mt-0", e),
|
|
1400
|
+
...t
|
|
1401
|
+
}
|
|
1402
|
+
));
|
|
1403
|
+
fn.displayName = H.Cancel.displayName;
|
|
1404
|
+
const fs = P.Root, mn = P.Trigger, ms = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(P.Portal, { className: d(e), ...t });
|
|
1405
|
+
ms.displayName = P.Portal.displayName;
|
|
1406
|
+
const ps = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1407
|
+
P.Overlay,
|
|
1408
|
+
{
|
|
1409
|
+
ref: s,
|
|
1410
|
+
className: d(
|
|
1411
|
+
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1412
|
+
e
|
|
1413
|
+
),
|
|
1414
|
+
...t
|
|
1415
|
+
}
|
|
1416
|
+
));
|
|
1417
|
+
ps.displayName = P.Overlay.displayName;
|
|
1418
|
+
const xt = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(ms, { children: [
|
|
1419
|
+
/* @__PURE__ */ a.jsx(ps, {}),
|
|
1420
|
+
/* @__PURE__ */ a.jsxs(
|
|
1421
|
+
P.Content,
|
|
1422
|
+
{
|
|
1423
|
+
ref: o,
|
|
1424
|
+
className: d(
|
|
1425
|
+
"fixed left-[50%] top-[50%] z-[999] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
|
|
1426
|
+
e
|
|
1427
|
+
),
|
|
1428
|
+
...s,
|
|
1429
|
+
children: [
|
|
1430
|
+
t,
|
|
1431
|
+
/* @__PURE__ */ a.jsxs(P.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
1432
|
+
/* @__PURE__ */ a.jsx(ot, { className: "h-4 w-4" }),
|
|
1433
|
+
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
|
|
1434
|
+
] })
|
|
1435
|
+
]
|
|
1436
|
+
}
|
|
1437
|
+
)
|
|
1438
|
+
] }));
|
|
1439
|
+
xt.displayName = P.Content.displayName;
|
|
1440
|
+
const pn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-1.5 text-center sm:text-left", e), ...t });
|
|
1441
|
+
pn.displayName = "DialogHeader";
|
|
1442
|
+
const gn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
1443
|
+
gn.displayName = "DialogFooter";
|
|
1444
|
+
const bn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1445
|
+
P.Title,
|
|
1446
|
+
{
|
|
1447
|
+
ref: s,
|
|
1448
|
+
className: d("text-lg font-semibold leading-none tracking-tight", e),
|
|
1449
|
+
...t
|
|
1450
|
+
}
|
|
1451
|
+
));
|
|
1452
|
+
bn.displayName = P.Title.displayName;
|
|
1453
|
+
const hn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(P.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
|
|
1454
|
+
hn.displayName = P.Description.displayName;
|
|
1455
|
+
const xn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("rounded-xl border bg-card text-card-foreground shadow", e), ...t }));
|
|
1456
|
+
xn.displayName = "Card";
|
|
1457
|
+
const vn = f.forwardRef(
|
|
1458
|
+
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("flex flex-col space-y-1.5 p-6", e), ...t })
|
|
1459
|
+
);
|
|
1460
|
+
vn.displayName = "CardHeader";
|
|
1461
|
+
const yn = f.forwardRef(
|
|
1462
|
+
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("h3", { ref: s, className: d("font-semibold leading-none tracking-tight", e), ...t })
|
|
1463
|
+
);
|
|
1464
|
+
yn.displayName = "CardTitle";
|
|
1465
|
+
const wn = f.forwardRef(
|
|
1466
|
+
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("p", { ref: s, className: d("text-sm text-muted-foreground", e), ...t })
|
|
1467
|
+
);
|
|
1468
|
+
wn.displayName = "CardDescription";
|
|
1469
|
+
const Nn = f.forwardRef(
|
|
1470
|
+
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("p-6 pt-0", e), ...t })
|
|
1471
|
+
);
|
|
1472
|
+
Nn.displayName = "CardContent";
|
|
1473
|
+
const kn = f.forwardRef(
|
|
1474
|
+
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d(" flex items-center p-6 pt-0", e), ...t })
|
|
1475
|
+
);
|
|
1476
|
+
kn.displayName = "CardFooter";
|
|
1477
|
+
const Sn = f.forwardRef(({ className: e, type: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1478
|
+
"input",
|
|
1479
|
+
{
|
|
1480
|
+
type: t,
|
|
1481
|
+
className: d(
|
|
1482
|
+
"flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
1483
|
+
e
|
|
1484
|
+
),
|
|
1485
|
+
ref: o,
|
|
1486
|
+
...s
|
|
1487
|
+
}
|
|
1488
|
+
));
|
|
1489
|
+
Sn.displayName = "Input";
|
|
1490
|
+
const jn = ge("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), An = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Gt.Root, { ref: s, className: d(jn(), e), ...t }));
|
|
1491
|
+
An.displayName = Gt.Root.displayName;
|
|
1492
|
+
const Cn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1493
|
+
"textarea",
|
|
1494
|
+
{
|
|
1495
|
+
className: d(
|
|
1496
|
+
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
1497
|
+
e
|
|
1498
|
+
),
|
|
1499
|
+
ref: s,
|
|
1500
|
+
...t
|
|
1501
|
+
}
|
|
1502
|
+
));
|
|
1503
|
+
Cn.displayName = "Textarea";
|
|
1504
|
+
const Bn = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(ue.Root, { ref: o, className: d("relative overflow-hidden", e), ...s, children: [
|
|
1505
|
+
/* @__PURE__ */ a.jsx(ue.Viewport, { className: "h-full w-full rounded-[inherit]", children: t }),
|
|
1506
|
+
/* @__PURE__ */ a.jsx(gs, {}),
|
|
1507
|
+
/* @__PURE__ */ a.jsx(ue.Corner, {})
|
|
1508
|
+
] }));
|
|
1509
|
+
Bn.displayName = ue.Root.displayName;
|
|
1510
|
+
const gs = f.forwardRef(({ className: e, orientation: t = "vertical", ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1511
|
+
ue.ScrollAreaScrollbar,
|
|
1512
|
+
{
|
|
1513
|
+
ref: o,
|
|
1514
|
+
orientation: t,
|
|
1515
|
+
className: d(
|
|
1516
|
+
"flex touch-none select-none transition-colors",
|
|
1517
|
+
t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
1518
|
+
t === "horizontal" && "h-2.5 border-t border-t-transparent p-[1px]",
|
|
1519
|
+
e
|
|
1520
|
+
),
|
|
1521
|
+
...s,
|
|
1522
|
+
children: /* @__PURE__ */ a.jsx(ue.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1523
|
+
}
|
|
1524
|
+
));
|
|
1525
|
+
gs.displayName = ue.ScrollAreaScrollbar.displayName;
|
|
1526
|
+
const _n = be.Root, bs = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1527
|
+
be.List,
|
|
1528
|
+
{
|
|
1529
|
+
ref: s,
|
|
1530
|
+
className: d(
|
|
1531
|
+
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
1532
|
+
e
|
|
1533
|
+
),
|
|
1534
|
+
...t
|
|
1535
|
+
}
|
|
1536
|
+
));
|
|
1537
|
+
bs.displayName = be.List.displayName;
|
|
1538
|
+
const Ze = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1539
|
+
be.Trigger,
|
|
1540
|
+
{
|
|
1541
|
+
ref: s,
|
|
1542
|
+
className: d(
|
|
1543
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
1544
|
+
e
|
|
1545
|
+
),
|
|
1546
|
+
...t
|
|
1547
|
+
}
|
|
1548
|
+
));
|
|
1549
|
+
Ze.displayName = be.Trigger.displayName;
|
|
1550
|
+
const et = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1551
|
+
be.Content,
|
|
1552
|
+
{
|
|
1553
|
+
ref: s,
|
|
1554
|
+
className: d(
|
|
1555
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1556
|
+
e
|
|
1557
|
+
),
|
|
1558
|
+
...t
|
|
1559
|
+
}
|
|
1560
|
+
));
|
|
1561
|
+
et.displayName = be.Content.displayName;
|
|
1562
|
+
const ei = ye.Portal, ti = ye.Provider, si = ye.Root, oi = ye.Trigger, Rn = f.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1563
|
+
ye.Content,
|
|
1564
|
+
{
|
|
1565
|
+
ref: o,
|
|
1566
|
+
sideOffset: t,
|
|
1567
|
+
className: d(
|
|
1568
|
+
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1569
|
+
e
|
|
1570
|
+
),
|
|
1571
|
+
...s
|
|
1572
|
+
}
|
|
1573
|
+
));
|
|
1574
|
+
Rn.displayName = ye.Content.displayName;
|
|
1575
|
+
const ni = je.Root, ai = je.Trigger, Pn = f.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...o }, n) => /* @__PURE__ */ a.jsx(je.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
1576
|
+
je.Content,
|
|
1577
|
+
{
|
|
1578
|
+
ref: n,
|
|
1579
|
+
align: t,
|
|
1580
|
+
sideOffset: s,
|
|
1581
|
+
className: d(
|
|
1582
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1583
|
+
e
|
|
1584
|
+
),
|
|
1585
|
+
...o
|
|
1586
|
+
}
|
|
1587
|
+
) }));
|
|
1588
|
+
Pn.displayName = je.Content.displayName;
|
|
1589
|
+
const ri = _.Menu, ii = _.Group, li = _.Portal, ci = _.Sub, di = _.RadioGroup, Tn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1590
|
+
_.Root,
|
|
1591
|
+
{
|
|
1592
|
+
ref: s,
|
|
1593
|
+
className: d("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", e),
|
|
1594
|
+
...t
|
|
1595
|
+
}
|
|
1596
|
+
));
|
|
1597
|
+
Tn.displayName = _.Root.displayName;
|
|
1598
|
+
const In = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1599
|
+
_.Trigger,
|
|
1600
|
+
{
|
|
1601
|
+
ref: s,
|
|
1602
|
+
className: d(
|
|
1603
|
+
"flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
1604
|
+
e
|
|
1605
|
+
),
|
|
1606
|
+
...t
|
|
1607
|
+
}
|
|
1608
|
+
));
|
|
1609
|
+
In.displayName = _.Trigger.displayName;
|
|
1610
|
+
const Mn = f.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
1611
|
+
_.SubTrigger,
|
|
1612
|
+
{
|
|
1613
|
+
ref: n,
|
|
1614
|
+
className: d(
|
|
1615
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
1616
|
+
t && "pl-8",
|
|
1617
|
+
e
|
|
1618
|
+
),
|
|
1619
|
+
...o,
|
|
1620
|
+
children: [
|
|
1621
|
+
s,
|
|
1622
|
+
/* @__PURE__ */ a.jsx(nt, { className: "ml-auto h-4 w-4" })
|
|
1623
|
+
]
|
|
1624
|
+
}
|
|
1625
|
+
));
|
|
1626
|
+
Mn.displayName = _.SubTrigger.displayName;
|
|
1627
|
+
const Dn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1628
|
+
_.SubContent,
|
|
1629
|
+
{
|
|
1630
|
+
ref: s,
|
|
1631
|
+
className: d(
|
|
1632
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1633
|
+
e
|
|
1634
|
+
),
|
|
1635
|
+
...t
|
|
1636
|
+
}
|
|
1637
|
+
));
|
|
1638
|
+
Dn.displayName = _.SubContent.displayName;
|
|
1639
|
+
const En = f.forwardRef(({ className: e, align: t = "start", alignOffset: s = -4, sideOffset: o = 8, ...n }, i) => /* @__PURE__ */ a.jsx(_.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
1640
|
+
_.Content,
|
|
1641
|
+
{
|
|
1642
|
+
ref: i,
|
|
1643
|
+
align: t,
|
|
1644
|
+
alignOffset: s,
|
|
1645
|
+
sideOffset: o,
|
|
1646
|
+
className: d(
|
|
1647
|
+
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1648
|
+
e
|
|
1649
|
+
),
|
|
1650
|
+
...n
|
|
1651
|
+
}
|
|
1652
|
+
) }));
|
|
1653
|
+
En.displayName = _.Content.displayName;
|
|
1654
|
+
const On = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1655
|
+
_.Item,
|
|
1656
|
+
{
|
|
1657
|
+
ref: o,
|
|
1658
|
+
className: d(
|
|
1659
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1660
|
+
t && "pl-8",
|
|
1661
|
+
e
|
|
1662
|
+
),
|
|
1663
|
+
...s
|
|
1664
|
+
}
|
|
1665
|
+
));
|
|
1666
|
+
On.displayName = _.Item.displayName;
|
|
1667
|
+
const Ln = f.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
1668
|
+
_.CheckboxItem,
|
|
1669
|
+
{
|
|
1670
|
+
ref: n,
|
|
1671
|
+
className: d(
|
|
1672
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1673
|
+
e
|
|
1674
|
+
),
|
|
1675
|
+
checked: s,
|
|
1676
|
+
...o,
|
|
1677
|
+
children: [
|
|
1678
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(_.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
|
|
1679
|
+
t
|
|
1680
|
+
]
|
|
1681
|
+
}
|
|
1682
|
+
));
|
|
1683
|
+
Ln.displayName = _.CheckboxItem.displayName;
|
|
1684
|
+
const zn = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
1685
|
+
_.RadioItem,
|
|
1686
|
+
{
|
|
1687
|
+
ref: o,
|
|
1688
|
+
className: d(
|
|
1689
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1690
|
+
e
|
|
1691
|
+
),
|
|
1692
|
+
...s,
|
|
1693
|
+
children: [
|
|
1694
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(_.ItemIndicator, { children: /* @__PURE__ */ a.jsx(at, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1695
|
+
t
|
|
1696
|
+
]
|
|
1697
|
+
}
|
|
1698
|
+
));
|
|
1699
|
+
zn.displayName = _.RadioItem.displayName;
|
|
1700
|
+
const Vn = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1701
|
+
_.Label,
|
|
1702
|
+
{
|
|
1703
|
+
ref: o,
|
|
1704
|
+
className: d("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
|
|
1705
|
+
...s
|
|
1706
|
+
}
|
|
1707
|
+
));
|
|
1708
|
+
Vn.displayName = _.Label.displayName;
|
|
1709
|
+
const $n = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(_.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
1710
|
+
$n.displayName = _.Separator.displayName;
|
|
1711
|
+
const Fn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
1712
|
+
Fn.displayname = "MenubarShortcut";
|
|
1713
|
+
const ui = Ve.Root, fi = Ve.Trigger, Un = f.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...o }, n) => /* @__PURE__ */ a.jsx(
|
|
1714
|
+
Ve.Content,
|
|
1715
|
+
{
|
|
1716
|
+
ref: n,
|
|
1717
|
+
align: t,
|
|
1718
|
+
sideOffset: s,
|
|
1719
|
+
className: d(
|
|
1720
|
+
"z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1721
|
+
e
|
|
1722
|
+
),
|
|
1723
|
+
...o
|
|
1724
|
+
}
|
|
1725
|
+
));
|
|
1726
|
+
Un.displayName = Ve.Content.displayName;
|
|
1727
|
+
const mi = U.Root, pi = U.Group, gi = U.Value, Wn = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
1728
|
+
U.Trigger,
|
|
1729
|
+
{
|
|
1730
|
+
ref: o,
|
|
1731
|
+
className: d(
|
|
1732
|
+
"flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
1733
|
+
e
|
|
1734
|
+
),
|
|
1735
|
+
...s,
|
|
1736
|
+
children: [
|
|
1737
|
+
t,
|
|
1738
|
+
/* @__PURE__ */ a.jsx(U.Icon, { asChild: !0, children: /* @__PURE__ */ a.jsx(Ks, { className: "h-4 w-4 opacity-50" }) })
|
|
1739
|
+
]
|
|
1740
|
+
}
|
|
1741
|
+
));
|
|
1742
|
+
Wn.displayName = U.Trigger.displayName;
|
|
1743
|
+
const Gn = f.forwardRef(({ className: e, children: t, position: s = "popper", ...o }, n) => /* @__PURE__ */ a.jsx(U.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
1744
|
+
U.Content,
|
|
1745
|
+
{
|
|
1746
|
+
ref: n,
|
|
1747
|
+
className: d(
|
|
1748
|
+
"relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1749
|
+
s === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1750
|
+
e
|
|
1751
|
+
),
|
|
1752
|
+
position: s,
|
|
1753
|
+
...o,
|
|
1754
|
+
children: /* @__PURE__ */ a.jsx(
|
|
1755
|
+
U.Viewport,
|
|
1756
|
+
{
|
|
1757
|
+
className: d(
|
|
1758
|
+
"p-1",
|
|
1759
|
+
s === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
1760
|
+
),
|
|
1761
|
+
children: t
|
|
1762
|
+
}
|
|
1763
|
+
)
|
|
1764
|
+
}
|
|
1765
|
+
) }));
|
|
1766
|
+
Gn.displayName = U.Content.displayName;
|
|
1767
|
+
const Hn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(U.Label, { ref: s, className: d("px-2 py-1.5 text-sm font-semibold", e), ...t }));
|
|
1768
|
+
Hn.displayName = U.Label.displayName;
|
|
1769
|
+
const qn = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
1770
|
+
U.Item,
|
|
1771
|
+
{
|
|
1772
|
+
ref: o,
|
|
1773
|
+
className: d(
|
|
1774
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1775
|
+
e
|
|
1776
|
+
),
|
|
1777
|
+
...s,
|
|
1778
|
+
children: [
|
|
1779
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(U.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
|
|
1780
|
+
/* @__PURE__ */ a.jsx(U.ItemText, { children: t })
|
|
1781
|
+
]
|
|
1782
|
+
}
|
|
1783
|
+
));
|
|
1784
|
+
qn.displayName = U.Item.displayName;
|
|
1785
|
+
const Kn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(U.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
1786
|
+
Kn.displayName = U.Separator.displayName;
|
|
1787
|
+
const bi = P.Root, hi = P.Trigger, xi = P.Close, hs = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(P.Portal, { className: d(e), ...t });
|
|
1788
|
+
hs.displayName = P.Portal.displayName;
|
|
1789
|
+
const xs = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1790
|
+
P.Overlay,
|
|
1791
|
+
{
|
|
1792
|
+
className: d(
|
|
1793
|
+
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1794
|
+
e
|
|
1795
|
+
),
|
|
1796
|
+
...t,
|
|
1797
|
+
ref: s
|
|
1798
|
+
}
|
|
1799
|
+
));
|
|
1800
|
+
xs.displayName = P.Overlay.displayName;
|
|
1801
|
+
const Jn = ge(
|
|
1802
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
1803
|
+
{
|
|
1804
|
+
variants: {
|
|
1805
|
+
side: {
|
|
1806
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
1807
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
1808
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
1809
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
1810
|
+
}
|
|
1811
|
+
},
|
|
1812
|
+
defaultVariants: {
|
|
1813
|
+
side: "right"
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
), Yn = f.forwardRef(
|
|
1817
|
+
({ side: e = "right", className: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(hs, { children: [
|
|
1818
|
+
/* @__PURE__ */ a.jsx(xs, {}),
|
|
1819
|
+
/* @__PURE__ */ a.jsxs(P.Content, { ref: n, className: d(Jn({ side: e }), t), ...o, children: [
|
|
1820
|
+
s,
|
|
1821
|
+
/* @__PURE__ */ a.jsxs(P.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
1822
|
+
/* @__PURE__ */ a.jsx(ot, { className: "h-4 w-4" }),
|
|
1823
|
+
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
|
|
1824
|
+
] })
|
|
1825
|
+
] })
|
|
1826
|
+
] })
|
|
1827
|
+
);
|
|
1828
|
+
Yn.displayName = P.Content.displayName;
|
|
1829
|
+
const Qn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
|
|
1830
|
+
Qn.displayName = "SheetHeader";
|
|
1831
|
+
const Xn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
1832
|
+
Xn.displayName = "SheetFooter";
|
|
1833
|
+
const Zn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(P.Title, { ref: s, className: d("text-lg font-semibold text-foreground", e), ...t }));
|
|
1834
|
+
Zn.displayName = P.Title.displayName;
|
|
1835
|
+
const ea = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(P.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
|
|
1836
|
+
ea.displayName = P.Description.displayName;
|
|
1837
|
+
const vi = M.Root, yi = M.Trigger, wi = M.Group, Ni = M.Portal, ki = M.Sub, Si = M.RadioGroup, ta = f.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
1838
|
+
M.SubTrigger,
|
|
1839
|
+
{
|
|
1840
|
+
ref: n,
|
|
1841
|
+
className: d(
|
|
1842
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
1843
|
+
t && "pl-8",
|
|
1844
|
+
e
|
|
1845
|
+
),
|
|
1846
|
+
...o,
|
|
1847
|
+
children: [
|
|
1848
|
+
s,
|
|
1849
|
+
/* @__PURE__ */ a.jsx(nt, { className: "ml-auto h-4 w-4" })
|
|
1850
|
+
]
|
|
1851
|
+
}
|
|
1852
|
+
));
|
|
1853
|
+
ta.displayName = M.SubTrigger.displayName;
|
|
1854
|
+
const sa = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1855
|
+
M.SubContent,
|
|
1856
|
+
{
|
|
1857
|
+
ref: s,
|
|
1858
|
+
className: d(
|
|
1859
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1860
|
+
e
|
|
1861
|
+
),
|
|
1862
|
+
...t
|
|
1863
|
+
}
|
|
1864
|
+
));
|
|
1865
|
+
sa.displayName = M.SubContent.displayName;
|
|
1866
|
+
const oa = f.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__PURE__ */ a.jsx(M.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
1867
|
+
M.Content,
|
|
1868
|
+
{
|
|
1869
|
+
ref: o,
|
|
1870
|
+
sideOffset: t,
|
|
1871
|
+
className: d(
|
|
1872
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1873
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1874
|
+
e
|
|
1875
|
+
),
|
|
1876
|
+
...s
|
|
1877
|
+
}
|
|
1878
|
+
) }));
|
|
1879
|
+
oa.displayName = M.Content.displayName;
|
|
1880
|
+
const na = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1881
|
+
M.Item,
|
|
1882
|
+
{
|
|
1883
|
+
ref: o,
|
|
1884
|
+
className: d(
|
|
1885
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1886
|
+
t && "pl-8",
|
|
1887
|
+
e
|
|
1888
|
+
),
|
|
1889
|
+
...s
|
|
1890
|
+
}
|
|
1891
|
+
));
|
|
1892
|
+
na.displayName = M.Item.displayName;
|
|
1893
|
+
const aa = f.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
1894
|
+
M.CheckboxItem,
|
|
1895
|
+
{
|
|
1896
|
+
ref: n,
|
|
1897
|
+
className: d(
|
|
1898
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1899
|
+
e
|
|
1900
|
+
),
|
|
1901
|
+
checked: s,
|
|
1902
|
+
...o,
|
|
1903
|
+
children: [
|
|
1904
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(M.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
|
|
1905
|
+
t
|
|
1906
|
+
]
|
|
1907
|
+
}
|
|
1908
|
+
));
|
|
1909
|
+
aa.displayName = M.CheckboxItem.displayName;
|
|
1910
|
+
const ra = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
1911
|
+
M.RadioItem,
|
|
1912
|
+
{
|
|
1913
|
+
ref: o,
|
|
1914
|
+
className: d(
|
|
1915
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1916
|
+
e
|
|
1917
|
+
),
|
|
1918
|
+
...s,
|
|
1919
|
+
children: [
|
|
1920
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(M.ItemIndicator, { children: /* @__PURE__ */ a.jsx(at, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1921
|
+
t
|
|
1922
|
+
]
|
|
1923
|
+
}
|
|
1924
|
+
));
|
|
1925
|
+
ra.displayName = M.RadioItem.displayName;
|
|
1926
|
+
const ia = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1927
|
+
M.Label,
|
|
1928
|
+
{
|
|
1929
|
+
ref: o,
|
|
1930
|
+
className: d("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
|
|
1931
|
+
...s
|
|
1932
|
+
}
|
|
1933
|
+
));
|
|
1934
|
+
ia.displayName = M.Label.displayName;
|
|
1935
|
+
const la = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(M.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
1936
|
+
la.displayName = M.Separator.displayName;
|
|
1937
|
+
const ca = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest opacity-60", e), ...t });
|
|
1938
|
+
ca.displayName = "DropdownMenuShortcut";
|
|
1939
|
+
const da = f.forwardRef(({ className: e, orientation: t = "horizontal", decorative: s = !0, ...o }, n) => /* @__PURE__ */ a.jsx(
|
|
1940
|
+
Ht.Root,
|
|
1941
|
+
{
|
|
1942
|
+
ref: n,
|
|
1943
|
+
decorative: s,
|
|
1944
|
+
orientation: t,
|
|
1945
|
+
className: d("shrink-0 bg-border", t === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", e),
|
|
1946
|
+
...o
|
|
1947
|
+
}
|
|
1948
|
+
));
|
|
1949
|
+
da.displayName = Ht.Root.displayName;
|
|
1950
|
+
const ua = 1, fa = 1e6;
|
|
1951
|
+
let Ge = 0;
|
|
1952
|
+
function ma() {
|
|
1953
|
+
return Ge = (Ge + 1) % Number.MAX_VALUE, Ge.toString();
|
|
1954
|
+
}
|
|
1955
|
+
const He = /* @__PURE__ */ new Map(), It = (e) => {
|
|
1956
|
+
if (He.has(e))
|
|
1957
|
+
return;
|
|
1958
|
+
const t = setTimeout(() => {
|
|
1959
|
+
He.delete(e), ke({
|
|
1960
|
+
type: "REMOVE_TOAST",
|
|
1961
|
+
toastId: e
|
|
1962
|
+
});
|
|
1963
|
+
}, fa);
|
|
1964
|
+
He.set(e, t);
|
|
1965
|
+
}, pa = (e, t) => {
|
|
1966
|
+
switch (t.type) {
|
|
1967
|
+
case "ADD_TOAST":
|
|
1968
|
+
return {
|
|
1969
|
+
...e,
|
|
1970
|
+
toasts: [t.toast, ...e.toasts].slice(0, ua)
|
|
1971
|
+
};
|
|
1972
|
+
case "UPDATE_TOAST":
|
|
1973
|
+
return {
|
|
1974
|
+
...e,
|
|
1975
|
+
toasts: e.toasts.map((s) => s.id === t.toast.id ? { ...s, ...t.toast } : s)
|
|
1976
|
+
};
|
|
1977
|
+
case "DISMISS_TOAST": {
|
|
1978
|
+
const { toastId: s } = t;
|
|
1979
|
+
return s ? It(s) : e.toasts.forEach((o) => {
|
|
1980
|
+
It(o.id);
|
|
1981
|
+
}), {
|
|
1982
|
+
...e,
|
|
1983
|
+
toasts: e.toasts.map(
|
|
1984
|
+
(o) => o.id === s || s === void 0 ? {
|
|
1985
|
+
...o,
|
|
1986
|
+
open: !1
|
|
1987
|
+
} : o
|
|
1988
|
+
)
|
|
1989
|
+
};
|
|
1990
|
+
}
|
|
1991
|
+
case "REMOVE_TOAST":
|
|
1992
|
+
return t.toastId === void 0 ? {
|
|
1993
|
+
...e,
|
|
1994
|
+
toasts: []
|
|
1995
|
+
} : {
|
|
1996
|
+
...e,
|
|
1997
|
+
toasts: e.toasts.filter((s) => s.id !== t.toastId)
|
|
1998
|
+
};
|
|
1999
|
+
}
|
|
2000
|
+
}, Me = [];
|
|
2001
|
+
let De = { toasts: [] };
|
|
2002
|
+
function ke(e) {
|
|
2003
|
+
De = pa(De, e), Me.forEach((t) => {
|
|
2004
|
+
t(De);
|
|
2005
|
+
});
|
|
2006
|
+
}
|
|
2007
|
+
function ga({ ...e }) {
|
|
2008
|
+
const t = ma(), s = (n) => ke({
|
|
2009
|
+
type: "UPDATE_TOAST",
|
|
2010
|
+
toast: { ...n, id: t }
|
|
2011
|
+
}), o = () => ke({ type: "DISMISS_TOAST", toastId: t });
|
|
2012
|
+
return ke({
|
|
2013
|
+
type: "ADD_TOAST",
|
|
2014
|
+
toast: {
|
|
2015
|
+
...e,
|
|
2016
|
+
id: t,
|
|
2017
|
+
open: !0,
|
|
2018
|
+
onOpenChange: (n) => {
|
|
2019
|
+
n || o();
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
}), {
|
|
2023
|
+
id: t,
|
|
2024
|
+
dismiss: o,
|
|
2025
|
+
update: s
|
|
2026
|
+
};
|
|
2027
|
+
}
|
|
2028
|
+
function vs() {
|
|
2029
|
+
const [e, t] = f.useState(De);
|
|
2030
|
+
return f.useEffect(() => (Me.push(t), () => {
|
|
2031
|
+
const s = Me.indexOf(t);
|
|
2032
|
+
s > -1 && Me.splice(s, 1);
|
|
2033
|
+
}), [e]), {
|
|
2034
|
+
...e,
|
|
2035
|
+
toast: ga,
|
|
2036
|
+
dismiss: (s) => ke({ type: "DISMISS_TOAST", toastId: s })
|
|
2037
|
+
};
|
|
2038
|
+
}
|
|
2039
|
+
const ba = Z.Provider, ys = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2040
|
+
Z.Viewport,
|
|
2041
|
+
{
|
|
2042
|
+
ref: s,
|
|
2043
|
+
className: d(
|
|
2044
|
+
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
2045
|
+
e
|
|
2046
|
+
),
|
|
2047
|
+
...t
|
|
2048
|
+
}
|
|
2049
|
+
));
|
|
2050
|
+
ys.displayName = Z.Viewport.displayName;
|
|
2051
|
+
const ha = ge(
|
|
2052
|
+
"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
2053
|
+
{
|
|
2054
|
+
variants: {
|
|
2055
|
+
variant: {
|
|
2056
|
+
default: "border bg-background",
|
|
2057
|
+
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
2058
|
+
}
|
|
2059
|
+
},
|
|
2060
|
+
defaultVariants: {
|
|
2061
|
+
variant: "default"
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
), ws = f.forwardRef(({ className: e, variant: t, ...s }, o) => /* @__PURE__ */ a.jsx(Z.Root, { ref: o, className: d(ha({ variant: t }), e), ...s }));
|
|
2065
|
+
ws.displayName = Z.Root.displayName;
|
|
2066
|
+
const xa = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2067
|
+
Z.Action,
|
|
2068
|
+
{
|
|
2069
|
+
ref: s,
|
|
2070
|
+
className: d(
|
|
2071
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
|
|
2072
|
+
e
|
|
2073
|
+
),
|
|
2074
|
+
...t
|
|
2075
|
+
}
|
|
2076
|
+
));
|
|
2077
|
+
xa.displayName = Z.Action.displayName;
|
|
2078
|
+
const Ns = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2079
|
+
Z.Close,
|
|
2080
|
+
{
|
|
2081
|
+
ref: s,
|
|
2082
|
+
className: d(
|
|
2083
|
+
"absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
|
|
2084
|
+
e
|
|
2085
|
+
),
|
|
2086
|
+
"toast-close": "",
|
|
2087
|
+
...t,
|
|
2088
|
+
children: /* @__PURE__ */ a.jsx(ot, { className: "h-4 w-4" })
|
|
2089
|
+
}
|
|
2090
|
+
));
|
|
2091
|
+
Ns.displayName = Z.Close.displayName;
|
|
2092
|
+
const ks = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Z.Title, { ref: s, className: d("text-sm font-semibold [&+div]:text-xs", e), ...t }));
|
|
2093
|
+
ks.displayName = Z.Title.displayName;
|
|
2094
|
+
const Ss = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Z.Description, { ref: s, className: d("text-sm opacity-90", e), ...t }));
|
|
2095
|
+
Ss.displayName = Z.Description.displayName;
|
|
2096
|
+
function ji() {
|
|
2097
|
+
const { toasts: e } = vs();
|
|
2098
|
+
return /* @__PURE__ */ a.jsxs(ba, { children: [
|
|
2099
|
+
e.map(({ id: t, title: s, description: o, action: n, ...i }) => /* @__PURE__ */ a.jsxs(ws, { ...i, children: [
|
|
2100
|
+
/* @__PURE__ */ a.jsxs("div", { className: "grid gap-1", children: [
|
|
2101
|
+
s && /* @__PURE__ */ a.jsx(ks, { children: s }),
|
|
2102
|
+
o && /* @__PURE__ */ a.jsx(Ss, { children: o })
|
|
2103
|
+
] }),
|
|
2104
|
+
n,
|
|
2105
|
+
/* @__PURE__ */ a.jsx(Ns, {})
|
|
2106
|
+
] }, t)),
|
|
2107
|
+
/* @__PURE__ */ a.jsx(ys, {})
|
|
2108
|
+
] });
|
|
2109
|
+
}
|
|
2110
|
+
const Ai = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("animate-pulse rounded-md bg-primary/10", e), ...t }), js = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2111
|
+
Q,
|
|
2112
|
+
{
|
|
2113
|
+
ref: s,
|
|
2114
|
+
className: d(
|
|
2115
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
2116
|
+
e
|
|
2117
|
+
),
|
|
2118
|
+
...t
|
|
2119
|
+
}
|
|
2120
|
+
));
|
|
2121
|
+
js.displayName = Q.displayName;
|
|
2122
|
+
const Ci = ({ children: e, ...t }) => /* @__PURE__ */ a.jsx(fs, { ...t, children: /* @__PURE__ */ a.jsx(xt, { className: "overflow-hidden p-0", children: /* @__PURE__ */ a.jsx(js, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), va = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
2123
|
+
/* @__PURE__ */ a.jsx(Js, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
2124
|
+
/* @__PURE__ */ a.jsx(
|
|
2125
|
+
Q.Input,
|
|
2126
|
+
{
|
|
2127
|
+
ref: s,
|
|
2128
|
+
className: d(
|
|
2129
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
2130
|
+
e
|
|
2131
|
+
),
|
|
2132
|
+
...t
|
|
2133
|
+
}
|
|
2134
|
+
)
|
|
2135
|
+
] }));
|
|
2136
|
+
va.displayName = Q.Input.displayName;
|
|
2137
|
+
const ya = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2138
|
+
Q.List,
|
|
2139
|
+
{
|
|
2140
|
+
ref: s,
|
|
2141
|
+
className: d("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
|
|
2142
|
+
...t
|
|
2143
|
+
}
|
|
2144
|
+
));
|
|
2145
|
+
ya.displayName = Q.List.displayName;
|
|
2146
|
+
const wa = f.forwardRef((e, t) => /* @__PURE__ */ a.jsx(Q.Empty, { ref: t, className: "py-6 text-center text-sm", ...e }));
|
|
2147
|
+
wa.displayName = Q.Empty.displayName;
|
|
2148
|
+
const Na = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2149
|
+
Q.Group,
|
|
2150
|
+
{
|
|
2151
|
+
ref: s,
|
|
2152
|
+
className: d(
|
|
2153
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
2154
|
+
e
|
|
2155
|
+
),
|
|
2156
|
+
...t
|
|
2157
|
+
}
|
|
2158
|
+
));
|
|
2159
|
+
Na.displayName = Q.Group.displayName;
|
|
2160
|
+
const ka = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Q.Separator, { ref: s, className: d("-mx-1 h-px bg-border", e), ...t }));
|
|
2161
|
+
ka.displayName = Q.Separator.displayName;
|
|
2162
|
+
const Sa = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2163
|
+
Q.Item,
|
|
2164
|
+
{
|
|
2165
|
+
ref: s,
|
|
2166
|
+
className: d(
|
|
2167
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2168
|
+
e
|
|
2169
|
+
),
|
|
2170
|
+
...t
|
|
2171
|
+
}
|
|
2172
|
+
));
|
|
2173
|
+
Sa.displayName = Q.Item.displayName;
|
|
2174
|
+
const ja = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
2175
|
+
ja.displayName = "CommandShortcut";
|
|
2176
|
+
const Bi = D.Root, _i = D.Trigger, Ri = D.Group, Pi = D.Portal, Ti = D.Sub, Ii = D.RadioGroup, Aa = f.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2177
|
+
D.SubTrigger,
|
|
2178
|
+
{
|
|
2179
|
+
ref: n,
|
|
2180
|
+
className: d(
|
|
2181
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
2182
|
+
t && "pl-8",
|
|
2183
|
+
e
|
|
2184
|
+
),
|
|
2185
|
+
...o,
|
|
2186
|
+
children: [
|
|
2187
|
+
s,
|
|
2188
|
+
/* @__PURE__ */ a.jsx(nt, { className: "ml-auto h-4 w-4" })
|
|
2189
|
+
]
|
|
2190
|
+
}
|
|
2191
|
+
));
|
|
2192
|
+
Aa.displayName = D.SubTrigger.displayName;
|
|
2193
|
+
const Ca = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2194
|
+
D.SubContent,
|
|
2195
|
+
{
|
|
2196
|
+
ref: s,
|
|
2197
|
+
className: d(
|
|
2198
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2199
|
+
e
|
|
2200
|
+
),
|
|
2201
|
+
...t
|
|
2202
|
+
}
|
|
2203
|
+
));
|
|
2204
|
+
Ca.displayName = D.SubContent.displayName;
|
|
2205
|
+
const Ba = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(D.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
2206
|
+
D.Content,
|
|
2207
|
+
{
|
|
2208
|
+
ref: s,
|
|
2209
|
+
className: d(
|
|
2210
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2211
|
+
e
|
|
2212
|
+
),
|
|
2213
|
+
...t
|
|
2214
|
+
}
|
|
2215
|
+
) }));
|
|
2216
|
+
Ba.displayName = D.Content.displayName;
|
|
2217
|
+
const _a = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2218
|
+
D.Item,
|
|
2219
|
+
{
|
|
2220
|
+
ref: o,
|
|
2221
|
+
className: d(
|
|
2222
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2223
|
+
t && "pl-8",
|
|
2224
|
+
e
|
|
2225
|
+
),
|
|
2226
|
+
...s
|
|
2227
|
+
}
|
|
2228
|
+
));
|
|
2229
|
+
_a.displayName = D.Item.displayName;
|
|
2230
|
+
const Ra = f.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2231
|
+
D.CheckboxItem,
|
|
2232
|
+
{
|
|
2233
|
+
ref: n,
|
|
2234
|
+
className: d(
|
|
2235
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2236
|
+
e
|
|
2237
|
+
),
|
|
2238
|
+
checked: s,
|
|
2239
|
+
...o,
|
|
2240
|
+
children: [
|
|
2241
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(D.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
|
|
2242
|
+
t
|
|
2243
|
+
]
|
|
2244
|
+
}
|
|
2245
|
+
));
|
|
2246
|
+
Ra.displayName = D.CheckboxItem.displayName;
|
|
2247
|
+
const Pa = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
2248
|
+
D.RadioItem,
|
|
2249
|
+
{
|
|
2250
|
+
ref: o,
|
|
2251
|
+
className: d(
|
|
2252
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2253
|
+
e
|
|
2254
|
+
),
|
|
2255
|
+
...s,
|
|
2256
|
+
children: [
|
|
2257
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(D.ItemIndicator, { children: /* @__PURE__ */ a.jsx(at, { className: "h-4 w-4 fill-current" }) }) }),
|
|
2258
|
+
t
|
|
2259
|
+
]
|
|
2260
|
+
}
|
|
2261
|
+
));
|
|
2262
|
+
Pa.displayName = D.RadioItem.displayName;
|
|
2263
|
+
const Ta = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2264
|
+
D.Label,
|
|
2265
|
+
{
|
|
2266
|
+
ref: o,
|
|
2267
|
+
className: d("px-2 py-1.5 text-sm font-semibold text-foreground", t && "pl-8", e),
|
|
2268
|
+
...s
|
|
2269
|
+
}
|
|
2270
|
+
));
|
|
2271
|
+
Ta.displayName = D.Label.displayName;
|
|
2272
|
+
const Ia = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(D.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-border", e), ...t }));
|
|
2273
|
+
Ia.displayName = D.Separator.displayName;
|
|
2274
|
+
const Ma = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
2275
|
+
Ma.displayName = "ContextMenuShortcut";
|
|
2276
|
+
const Da = (e) => {
|
|
2277
|
+
try {
|
|
2278
|
+
const t = document.getElementById("icon-picker-field"), s = document.createElement("div");
|
|
2279
|
+
Xs.render(/* @__PURE__ */ a.jsx(Qs, { value: e }), s), t.appendChild(s), s.hidden = !0;
|
|
2280
|
+
let o = s.innerHTML;
|
|
2281
|
+
setTimeout(() => t.removeChild(s), 100);
|
|
2282
|
+
const i = new DOMParser().parseFromString(o, "image/svg+xml"), r = i.querySelector("svg");
|
|
2283
|
+
return r && (r.removeAttribute("width"), r.removeAttribute("height")), new XMLSerializer().serializeToString(i);
|
|
2284
|
+
} catch (t) {
|
|
2285
|
+
return console.error(t), "";
|
|
2286
|
+
}
|
|
2287
|
+
}, Mi = ({ value: e, onChange: t }) => {
|
|
2288
|
+
const s = (o) => {
|
|
2289
|
+
t("<svg />");
|
|
2290
|
+
const n = Da(o);
|
|
2291
|
+
t(n);
|
|
2292
|
+
};
|
|
2293
|
+
return /* @__PURE__ */ a.jsxs("div", { className: "mt-1 flex h-20 items-center gap-x-2", id: "icon-picker-field", children: [
|
|
2294
|
+
/* @__PURE__ */ a.jsxs("div", { className: "group relative h-12 w-12", children: [
|
|
2295
|
+
/* @__PURE__ */ a.jsx(
|
|
2296
|
+
"div",
|
|
2297
|
+
{
|
|
2298
|
+
dangerouslySetInnerHTML: {
|
|
2299
|
+
__html: e ? e.replace("<svg", '<svg class="h-5 w-5"') : "<svg class='h-5 w-5' />"
|
|
2300
|
+
},
|
|
2301
|
+
className: "absolute left-1/2 top-1/2 z-0 -translate-x-1/2 -translate-y-1/2 transform cursor-pointer bg-white"
|
|
2302
|
+
}
|
|
2303
|
+
),
|
|
2304
|
+
/* @__PURE__ */ a.jsx(
|
|
2305
|
+
Ys,
|
|
2306
|
+
{
|
|
2307
|
+
value: e ? "BiSolidGrid" : null,
|
|
2308
|
+
onChange: s,
|
|
2309
|
+
pickButtonStyle: {
|
|
2310
|
+
position: "relative",
|
|
2311
|
+
height: "48px",
|
|
2312
|
+
width: "48px",
|
|
2313
|
+
border: "1px solid #BBBBBB",
|
|
2314
|
+
display: "flex",
|
|
2315
|
+
alignItems: "center",
|
|
2316
|
+
justifyContent: "center",
|
|
2317
|
+
borderRadius: "6px",
|
|
2318
|
+
backgroundColor: "transparent",
|
|
2319
|
+
zIndex: 1
|
|
2320
|
+
},
|
|
2321
|
+
searchInputStyle: {
|
|
2322
|
+
backgroundColor: "transparent",
|
|
2323
|
+
width: "100%",
|
|
2324
|
+
border: "1px solid #BBBBBB",
|
|
2325
|
+
margin: "0px 10px",
|
|
2326
|
+
padding: "10px"
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
)
|
|
2330
|
+
] }),
|
|
2331
|
+
/* @__PURE__ */ a.jsx(
|
|
2332
|
+
"textarea",
|
|
2333
|
+
{
|
|
2334
|
+
value: e,
|
|
2335
|
+
onChange: (o) => t(o.target.value),
|
|
2336
|
+
className: "h-full w-full rounded-sm border border-foreground/20 px-2 py-1 text-xs shadow-sm focus:border-gray-500/80 focus:outline-none focus:ring-0",
|
|
2337
|
+
placeholder: "Choose icon or enter svg"
|
|
2338
|
+
}
|
|
2339
|
+
)
|
|
2340
|
+
] });
|
|
2341
|
+
}, Ea = tt.lazy(() => import("./UnsplashImages-qvwFbV-E.js")), Oa = tt.lazy(() => import("./UploadImages-9NapgXBq.js")), As = ({
|
|
2342
|
+
isModalView: e = !1,
|
|
2343
|
+
onSelect: t = () => {
|
|
2344
|
+
}
|
|
2345
|
+
}) => {
|
|
2346
|
+
const [s, o] = Ce("upload");
|
|
2347
|
+
return /* @__PURE__ */ a.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
2348
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ a.jsx("h1", { className: "px-1 font-semibold", children: e ? "Select or upload images" : "Images" }) }),
|
|
2349
|
+
/* @__PURE__ */ a.jsxs(_n, { value: s, onValueChange: (n) => o(n), className: "flex h-full w-full flex-col py-2", children: [
|
|
2350
|
+
/* @__PURE__ */ a.jsxs(bs, { className: "w-full", children: [
|
|
2351
|
+
/* @__PURE__ */ a.jsx(Ze, { value: "upload", className: "w-1/2", children: "Upload" }),
|
|
2352
|
+
/* @__PURE__ */ a.jsx(Ze, { value: "unsplash", className: "w-1/2", children: "Unsplash" })
|
|
2353
|
+
] }),
|
|
2354
|
+
s === "unsplash" ? /* @__PURE__ */ a.jsx(et, { value: "unsplash", className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ a.jsx(yt, { fallback: /* @__PURE__ */ a.jsx("div", { className: "h-64 w-full animate-pulse bg-gray-100" }), children: /* @__PURE__ */ a.jsx(Ea, { isModalView: e, onSelect: t }) }) }) : /* @__PURE__ */ a.jsx(et, { value: "upload", className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ a.jsx(yt, { fallback: /* @__PURE__ */ a.jsx("div", { className: "h-64 w-full animate-pulse bg-gray-100" }), children: /* @__PURE__ */ a.jsx(Oa, { isModalView: e, onSelect: t }) }) })
|
|
2355
|
+
] })
|
|
2356
|
+
] });
|
|
2357
|
+
}, Di = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2358
|
+
__proto__: null,
|
|
2359
|
+
default: As
|
|
2360
|
+
}, Symbol.toStringTag, { value: "Module" })), Mt = ({ children: e, onSelect: t }) => {
|
|
2361
|
+
const [s, o] = Ce(!1), n = (...i) => {
|
|
2362
|
+
t.call(void 0, ...i), o(!1);
|
|
2363
|
+
};
|
|
2364
|
+
return /* @__PURE__ */ a.jsxs(fs, { open: s, onOpenChange: (i) => o(i), children: [
|
|
2365
|
+
/* @__PURE__ */ a.jsx(mn, { asChild: !0, children: e }),
|
|
2366
|
+
/* @__PURE__ */ a.jsx(xt, { className: "flex h-3/4 max-w-5xl", children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ a.jsx(As, { isModalView: !0, onSelect: n }) }) })
|
|
2367
|
+
] });
|
|
2368
|
+
}, Ei = ({ value: e, onChange: t, id: s, onBlur: o }) => /* @__PURE__ */ a.jsxs("div", { className: "mt-1.5 flex items-center gap-x-3", children: [
|
|
2369
|
+
e ? /* @__PURE__ */ a.jsx("img", { src: e, className: "h-20 w-20 overflow-hidden rounded-md border object-cover", alt: "" }) : /* @__PURE__ */ a.jsx(Mt, { onSelect: t, children: /* @__PURE__ */ a.jsx("div", { className: "h-20 w-20 cursor-pointer rounded-md border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px] hover:border-gray-400" }) }),
|
|
2370
|
+
/* @__PURE__ */ a.jsxs("div", { className: "flex w-3/5 flex-col", children: [
|
|
2371
|
+
/* @__PURE__ */ a.jsx(Mt, { onSelect: t, children: /* @__PURE__ */ a.jsx("small", { className: "cursor-pointer rounded-full bg-gray-600 px-2 py-1 text-center text-xs text-white hover:bg-gray-500 dark:bg-gray-700", children: e || !Be(e) ? "Replace Image" : "Choose Image" }) }),
|
|
2372
|
+
/* @__PURE__ */ a.jsx("small", { className: "-pl-4 pt-2 text-center text-xs text-gray-600", children: "OR" }),
|
|
2373
|
+
/* @__PURE__ */ a.jsx(
|
|
2374
|
+
"input",
|
|
2375
|
+
{
|
|
2376
|
+
type: "url",
|
|
2377
|
+
className: "text-xs",
|
|
2378
|
+
placeholder: "Enter image URL",
|
|
2379
|
+
value: e,
|
|
2380
|
+
onBlur: ({ target: { value: n } }) => o(s, n),
|
|
2381
|
+
onChange: (n) => t(n.target.value)
|
|
2382
|
+
}
|
|
2383
|
+
)
|
|
2384
|
+
] })
|
|
2385
|
+
] }), Oi = ({ id: e, placeholder: t, value: s, onChange: o, onBlur: n }) => {
|
|
2386
|
+
const i = {
|
|
2387
|
+
toolbar: [
|
|
2388
|
+
["bold", "italic", "underline", "strike", "blockquote"],
|
|
2389
|
+
[{ list: "ordered" }, { list: "bullet" }],
|
|
2390
|
+
[{ color: [] }, { background: [] }, { align: [] }],
|
|
2391
|
+
["link", "clean"]
|
|
2392
|
+
]
|
|
2393
|
+
}, r = [
|
|
2394
|
+
"header",
|
|
2395
|
+
"font",
|
|
2396
|
+
"list",
|
|
2397
|
+
"bold",
|
|
2398
|
+
"italic",
|
|
2399
|
+
"underline",
|
|
2400
|
+
"strike",
|
|
2401
|
+
"blockquote",
|
|
2402
|
+
"color",
|
|
2403
|
+
"background",
|
|
2404
|
+
"align",
|
|
2405
|
+
"link",
|
|
2406
|
+
"image"
|
|
2407
|
+
];
|
|
2408
|
+
return typeof window > "u" ? null : /* @__PURE__ */ a.jsx(
|
|
2409
|
+
Zs,
|
|
2410
|
+
{
|
|
2411
|
+
id: e,
|
|
2412
|
+
value: s,
|
|
2413
|
+
onBlur: (c) => n(e, c),
|
|
2414
|
+
onChange: (c) => o(c),
|
|
2415
|
+
modules: i,
|
|
2416
|
+
formats: r,
|
|
2417
|
+
placeholder: t,
|
|
2418
|
+
className: "mt-1 rounded-md"
|
|
2419
|
+
}
|
|
2420
|
+
);
|
|
2421
|
+
}, Li = ({ schema: e, formData: t, onChange: s }) => {
|
|
2422
|
+
const [o, n] = Ce([]), i = ve("getPages", () => []), { type: r = "page", href: c = "", target: p = "self" } = t;
|
|
2423
|
+
return Ae(() => {
|
|
2424
|
+
(async () => {
|
|
2425
|
+
const l = await i();
|
|
2426
|
+
n(l || []);
|
|
2427
|
+
})();
|
|
2428
|
+
}, []), /* @__PURE__ */ a.jsxs("div", { children: [
|
|
2429
|
+
/* @__PURE__ */ a.jsx("span", { className: "text-xs font-medium", children: (e == null ? void 0 : e.title) ?? "Link" }),
|
|
2430
|
+
/* @__PURE__ */ a.jsxs("div", { className: "flex flex-col gap-y-1.5", children: [
|
|
2431
|
+
/* @__PURE__ */ a.jsx("select", { name: "type", value: r, onChange: (l) => s({ ...t, type: l.target.value }), children: [
|
|
2432
|
+
{ const: "page", title: "Open Page" },
|
|
2433
|
+
{ const: "url", title: "Open URL" },
|
|
2434
|
+
{ const: "email", title: "Compose Email" },
|
|
2435
|
+
{ const: "telephone", title: "Call Phone" },
|
|
2436
|
+
{ const: "scroll", title: "Scroll to element" }
|
|
2437
|
+
].map((l) => /* @__PURE__ */ a.jsx("option", { value: l.const, children: l.title }, l.const)) }),
|
|
2438
|
+
r === "page" ? /* @__PURE__ */ a.jsxs(
|
|
2439
|
+
"select",
|
|
2440
|
+
{
|
|
2441
|
+
name: "href",
|
|
2442
|
+
placeholder: "Choose Page",
|
|
2443
|
+
value: c,
|
|
2444
|
+
onChange: (l) => s({ ...t, href: l.target.value }),
|
|
2445
|
+
children: [
|
|
2446
|
+
/* @__PURE__ */ a.jsx("option", { value: "", children: "Choose page" }),
|
|
2447
|
+
I(o, (l) => /* @__PURE__ */ a.jsx("option", { value: l.slug, children: l.name }, l.uuid))
|
|
2448
|
+
]
|
|
2449
|
+
}
|
|
2450
|
+
) : /* @__PURE__ */ a.jsx(
|
|
2451
|
+
"input",
|
|
2452
|
+
{
|
|
2453
|
+
name: "href",
|
|
2454
|
+
type: "text",
|
|
2455
|
+
value: c,
|
|
2456
|
+
onChange: (l) => s({ ...t, href: l.target.value }),
|
|
2457
|
+
placeholder: r === "page" || r === "url" ? "Enter URL" : r === "scroll" ? "#ElementID" : "Enter detail"
|
|
2458
|
+
}
|
|
2459
|
+
),
|
|
2460
|
+
(r === "page" || r === "url") && /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
2461
|
+
/* @__PURE__ */ a.jsx(
|
|
2462
|
+
"input",
|
|
2463
|
+
{
|
|
2464
|
+
type: "checkbox",
|
|
2465
|
+
defaultChecked: p === "_blank",
|
|
2466
|
+
className: "cursor-pointer rounded-md border border-border",
|
|
2467
|
+
onChange: () => s({ ...t, target: p === "_blank" ? "_self" : "_blank" })
|
|
2468
|
+
}
|
|
2469
|
+
),
|
|
2470
|
+
/* @__PURE__ */ a.jsx("span", { className: "pt-1 text-xs", children: "Open in new tab" })
|
|
2471
|
+
] })
|
|
2472
|
+
] })
|
|
2473
|
+
] });
|
|
2474
|
+
}, zi = () => {
|
|
2475
|
+
const [e] = we(), [, t] = $e(), { addBlocks: s } = he(), { toast: o } = vs(), n = $(
|
|
2476
|
+
(r, c, p) => {
|
|
2477
|
+
var v;
|
|
2478
|
+
for (let j = 0; j < r.length; j++) {
|
|
2479
|
+
const { _id: L } = r[j];
|
|
2480
|
+
r[j]._id = de();
|
|
2481
|
+
const F = E(r, { _parent: L });
|
|
2482
|
+
for (let B = 0; B < F.length; B++)
|
|
2483
|
+
F[B]._parent = r[j]._id;
|
|
2484
|
+
}
|
|
2485
|
+
const l = ee(r);
|
|
2486
|
+
let m, N;
|
|
2487
|
+
return c && (m = oe(e, { _id: c }), r[0]._parent = c, N = c), !(m ? _t(m._type, l._type) : !0) && m && (r[0]._parent = m._parent, N = m._parent), s(r, N, p), t([(v = ee(r)) == null ? void 0 : v._id]), ee(r);
|
|
2488
|
+
},
|
|
2489
|
+
[e, t]
|
|
2490
|
+
);
|
|
2491
|
+
return { addCoreBlock: $(
|
|
2492
|
+
(r, c, p) => {
|
|
2493
|
+
if (pe(r, "blocks")) {
|
|
2494
|
+
const B = r.blocks;
|
|
2495
|
+
return n(B, c, p);
|
|
2496
|
+
}
|
|
2497
|
+
const l = de(), m = os(r.props), N = [];
|
|
2498
|
+
$t(m, (B, T) => {
|
|
2499
|
+
if (Ft(B, Je)) {
|
|
2500
|
+
const G = B.replace(Je, "");
|
|
2501
|
+
N.push({
|
|
2502
|
+
_id: G,
|
|
2503
|
+
_type: "Slot",
|
|
2504
|
+
_parent: l,
|
|
2505
|
+
_name: r.props[T].name,
|
|
2506
|
+
_styles: r.props[T].styles,
|
|
2507
|
+
_emptyStyles: r.props[T].emptyStyles
|
|
2508
|
+
});
|
|
2509
|
+
}
|
|
2510
|
+
});
|
|
2511
|
+
const S = {
|
|
2512
|
+
_type: r.type,
|
|
2513
|
+
_id: l,
|
|
2514
|
+
...m
|
|
2515
|
+
};
|
|
2516
|
+
let v, j;
|
|
2517
|
+
if (c && (v = oe(e, { _id: c }), S._parent = c, j = c), !ko(v == null ? void 0 : v._type, r.type)) {
|
|
2518
|
+
o({
|
|
2519
|
+
variant: "destructive",
|
|
2520
|
+
title: "Error",
|
|
2521
|
+
description: `"${r.type}" cannot be added under "${v ? v == null ? void 0 : v._type : "root"}"`
|
|
2522
|
+
}), t([]);
|
|
2523
|
+
return;
|
|
2524
|
+
}
|
|
2525
|
+
!(v ? _t(v._type, r.type) : !0) && v && (S._parent = v._parent, j = v._parent);
|
|
2526
|
+
const F = [S, ...N];
|
|
2527
|
+
return s(F, j, p), t([S._id]), S;
|
|
2528
|
+
},
|
|
2529
|
+
[n, e, t]
|
|
2530
|
+
), addPredefinedBlock: n };
|
|
2531
|
+
}, Dt = {
|
|
2532
|
+
xs: 420,
|
|
2533
|
+
sm: 620,
|
|
2534
|
+
md: 768,
|
|
2535
|
+
lg: 1024,
|
|
2536
|
+
xl: 1280,
|
|
2537
|
+
"2xl": 1536
|
|
2538
|
+
}, Et = ["xs", "sm", "md", "lg", "xl", "2xl"];
|
|
2539
|
+
function La(e, t) {
|
|
2540
|
+
if (t === null)
|
|
2541
|
+
return "baseClasses";
|
|
2542
|
+
const s = t.mq;
|
|
2543
|
+
if (s === "xs" || t.dark || t.mod !== "")
|
|
2544
|
+
return "classes";
|
|
2545
|
+
let o = "baseClasses", n = Et.indexOf(s);
|
|
2546
|
+
for (; n > 0; ) {
|
|
2547
|
+
const i = Et[n - 1];
|
|
2548
|
+
if (oe(e, {
|
|
2549
|
+
mq: i,
|
|
2550
|
+
property: t.property
|
|
2551
|
+
})) {
|
|
2552
|
+
o = "classes";
|
|
2553
|
+
break;
|
|
2554
|
+
}
|
|
2555
|
+
n--;
|
|
2556
|
+
}
|
|
2557
|
+
return o;
|
|
2558
|
+
}
|
|
2559
|
+
const Ot = [];
|
|
2560
|
+
function za(e = "", t = "", s = []) {
|
|
2561
|
+
e = e.trim().replace(/ +/g, "");
|
|
2562
|
+
let o = E(
|
|
2563
|
+
I(e.split(" "), Ie),
|
|
2564
|
+
(l) => !Ke(l)
|
|
2565
|
+
), n = E(I(t.split(" "), Ie), (l) => !Ke(l));
|
|
2566
|
+
n = E(
|
|
2567
|
+
n,
|
|
2568
|
+
(l) => !Y(Ot, l.property)
|
|
2569
|
+
);
|
|
2570
|
+
const i = [], r = [];
|
|
2571
|
+
ce(s, (l) => {
|
|
2572
|
+
const m = Ie(l), N = oe(o, wt(m, ["dark", "mq", "mod", "property"]));
|
|
2573
|
+
if (N && (o = E(
|
|
2574
|
+
o,
|
|
2575
|
+
(S) => S.fullCls !== (N == null ? void 0 : N.fullCls)
|
|
2576
|
+
)), i.push(m), m.mq === "xs" && !m.dark && m.mod === "" && (n = E(n, (S) => S.property !== m.property)), La(o, m) === "baseClasses" && !Y(Ot, m.property)) {
|
|
2577
|
+
const S = oe(n, wt(m, ["property"]));
|
|
2578
|
+
N && (n = E(
|
|
2579
|
+
n,
|
|
2580
|
+
(v) => v.fullCls !== (S == null ? void 0 : S.fullCls)
|
|
2581
|
+
)), r.push({
|
|
2582
|
+
...m,
|
|
2583
|
+
fullCls: m.cls,
|
|
2584
|
+
mq: "xs"
|
|
2585
|
+
});
|
|
2586
|
+
}
|
|
2587
|
+
});
|
|
2588
|
+
const c = I(
|
|
2589
|
+
Nt([...o, ...i], (l) => Dt[l.mq]),
|
|
2590
|
+
"fullCls"
|
|
2591
|
+
).join(" ");
|
|
2592
|
+
return `${I(
|
|
2593
|
+
Nt([...n, ...r], (l) => Dt[l.mq]),
|
|
2594
|
+
"fullCls"
|
|
2595
|
+
).join(" ").trim()},${c.trim()}`.trim().replace(/ +/g, "");
|
|
2596
|
+
}
|
|
2597
|
+
const Pe = w([]);
|
|
2598
|
+
Pe.debugLabel = "selectedStylingBlocksAtom";
|
|
2599
|
+
const Va = () => O(Pe), $a = (e) => {
|
|
2600
|
+
const t = e.replace(fe, "").split(",");
|
|
2601
|
+
return { baseClasses: t[0], classes: t[1] };
|
|
2602
|
+
}, Fa = w(null, (e, t, { blockIds: s, newClasses: o }) => {
|
|
2603
|
+
const n = E(
|
|
2604
|
+
e(it),
|
|
2605
|
+
(r) => (
|
|
2606
|
+
// @ts-ignore
|
|
2607
|
+
s.includes(e(r)._id)
|
|
2608
|
+
)
|
|
2609
|
+
), i = ee(e(Pe));
|
|
2610
|
+
return I(n, (r) => {
|
|
2611
|
+
const c = e(r), p = J(c, i.prop, `${fe},`), { baseClasses: l, classes: m } = $a(p);
|
|
2612
|
+
return {
|
|
2613
|
+
ids: [c._id],
|
|
2614
|
+
props: { [i.prop]: `${fe}${za(m, l, o)}` }
|
|
2615
|
+
};
|
|
2616
|
+
});
|
|
2617
|
+
}), Vi = () => {
|
|
2618
|
+
const e = _e(Fa), { updateBlocks: t, updateBlocksRuntime: s } = he();
|
|
2619
|
+
return $(
|
|
2620
|
+
(o, n, i = !1) => {
|
|
2621
|
+
const r = e({ blockIds: o, newClasses: n });
|
|
2622
|
+
if (!i) {
|
|
2623
|
+
s(o, r[0].props);
|
|
2624
|
+
return;
|
|
2625
|
+
}
|
|
2626
|
+
t(o, r[0].props);
|
|
2627
|
+
},
|
|
2628
|
+
[e]
|
|
2629
|
+
);
|
|
2630
|
+
}, Ua = () => O(ss), Cs = Re("canvasWidth", 800), Bs = w((e) => {
|
|
2631
|
+
const t = e(Cs);
|
|
2632
|
+
return Us(t).toLowerCase();
|
|
2633
|
+
}), $i = () => {
|
|
2634
|
+
const [e, t] = O(Cs), s = te(Bs), [o, n] = Ua();
|
|
2635
|
+
return Ae(() => {
|
|
2636
|
+
o !== "xs" && n(s);
|
|
2637
|
+
}, [s, o, n]), [e, s, t];
|
|
2638
|
+
}, Wa = Re("canvasZoom", 100), Fi = () => O(Wa), _s = w([]), Ga = () => {
|
|
2639
|
+
const [e, t] = O(_s), s = _e(vt), o = $(
|
|
2640
|
+
(n) => {
|
|
2641
|
+
t(n), s([]);
|
|
2642
|
+
},
|
|
2643
|
+
[t, s]
|
|
2644
|
+
);
|
|
2645
|
+
return [e, o];
|
|
2646
|
+
}, vt = w([]), Ui = () => {
|
|
2647
|
+
const [e, t] = O(vt), s = _e(_s), o = $(
|
|
2648
|
+
(n) => {
|
|
2649
|
+
t(n), s([]);
|
|
2650
|
+
},
|
|
2651
|
+
[t, s]
|
|
2652
|
+
);
|
|
2653
|
+
return [e, o];
|
|
2654
|
+
}, Rs = Re("darkMode", !1), Wi = () => {
|
|
2655
|
+
const [e, t] = O(Rs);
|
|
2656
|
+
return [e, t];
|
|
2657
|
+
}, Ha = () => {
|
|
2658
|
+
const [e] = we(), [, t] = $e(), { addBlocks: s } = he();
|
|
2659
|
+
return $(
|
|
2660
|
+
(o, n = null) => {
|
|
2661
|
+
const i = [];
|
|
2662
|
+
ce(o, (r) => {
|
|
2663
|
+
const c = e.find((S) => S._id === r);
|
|
2664
|
+
n || (n = c._parent);
|
|
2665
|
+
const m = E(
|
|
2666
|
+
e,
|
|
2667
|
+
(S) => zt(n) ? S._parent === n : !c._parent
|
|
2668
|
+
).indexOf(c) + 1, N = So(e, r, n);
|
|
2669
|
+
s(N, n, m), i.push(J(N, "0._id", ""));
|
|
2670
|
+
}), t(i);
|
|
2671
|
+
},
|
|
2672
|
+
[e, t]
|
|
2673
|
+
);
|
|
2674
|
+
}, qa = w([]), Gi = () => {
|
|
2675
|
+
const [e, t] = O(qa), s = $(
|
|
2676
|
+
(o) => {
|
|
2677
|
+
t((n) => Y(n, o) ? Vt(n, o) : [...n, o]);
|
|
2678
|
+
},
|
|
2679
|
+
[t]
|
|
2680
|
+
);
|
|
2681
|
+
return [e, t, s];
|
|
2682
|
+
}, Ka = w(""), Ja = () => O(Ka), Ya = () => {
|
|
2683
|
+
const e = te(ie);
|
|
2684
|
+
return $(
|
|
2685
|
+
(t, s) => {
|
|
2686
|
+
const o = I(e, (n) => (Y(t, J(n, "_id")) && Se(n, "_parent", s), n));
|
|
2687
|
+
console.log("newBlocks", o);
|
|
2688
|
+
},
|
|
2689
|
+
[e]
|
|
2690
|
+
);
|
|
2691
|
+
}, Hi = () => {
|
|
2692
|
+
console.warn("usePasteBlocks is not implemented");
|
|
2693
|
+
const e = te(vt), [t, s] = Ga(), o = Ha(), n = Ya();
|
|
2694
|
+
return {
|
|
2695
|
+
canPaste: Vs(
|
|
2696
|
+
() => t.length > 0 || e.length > 0,
|
|
2697
|
+
[e, t]
|
|
2698
|
+
),
|
|
2699
|
+
pasteBlocks: $(
|
|
2700
|
+
(r) => {
|
|
2701
|
+
Be(e) ? n(t, r) : o(e, r), s(() => []);
|
|
2702
|
+
},
|
|
2703
|
+
[t, e, o, n, s]
|
|
2704
|
+
)
|
|
2705
|
+
};
|
|
2706
|
+
}, Qa = w(!1), qi = () => {
|
|
2707
|
+
const [e, t] = O(Qa);
|
|
2708
|
+
return [e, t];
|
|
2709
|
+
}, Xa = w(null, (e, t, { blockIds: s, fullClasses: o }) => {
|
|
2710
|
+
const n = ee(e(Pe)), i = E(
|
|
2711
|
+
e(it),
|
|
2712
|
+
(r) => (
|
|
2713
|
+
// @ts-ignore
|
|
2714
|
+
s.includes(e(r)._id)
|
|
2715
|
+
)
|
|
2716
|
+
);
|
|
2717
|
+
return I(i, (r) => {
|
|
2718
|
+
const c = e(r), p = o;
|
|
2719
|
+
let { classes: l, baseClasses: m } = No(J(c, n.prop, "styles:,"));
|
|
2720
|
+
return ce(p, (N) => {
|
|
2721
|
+
const S = new RegExp(`(^| )${N.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
|
|
2722
|
+
l = l.replace(S, " ").replace(/ +/g, " ").trim();
|
|
2723
|
+
const v = ee(N.split(":"));
|
|
2724
|
+
Y(["2xl", "xl", "lg", "md", "sm"], v) && p.push(N.split(":").pop().trim());
|
|
2725
|
+
}), ce(p, (N) => {
|
|
2726
|
+
const S = new RegExp(`(^| )${N.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
|
|
2727
|
+
m = m.replace(S, " ").replace(/ +/g, " ").trim();
|
|
2728
|
+
}), {
|
|
2729
|
+
ids: [c._id],
|
|
2730
|
+
props: {
|
|
2731
|
+
[n.prop]: `${fe}${m},${l}`
|
|
2732
|
+
}
|
|
2733
|
+
};
|
|
2734
|
+
});
|
|
2735
|
+
}), Ki = () => {
|
|
2736
|
+
const { updateBlocks: e } = he(), t = _e(Xa);
|
|
2737
|
+
return $(
|
|
2738
|
+
(s, o) => {
|
|
2739
|
+
const n = t({ blockIds: s, fullClasses: o });
|
|
2740
|
+
e(s, n[0].props);
|
|
2741
|
+
},
|
|
2742
|
+
[t]
|
|
2743
|
+
);
|
|
2744
|
+
}, Ps = w((e) => {
|
|
2745
|
+
const t = ee(e(Pe)), s = e(dt);
|
|
2746
|
+
if (!t || t.blockId !== J(s, "_id", null))
|
|
2747
|
+
return [];
|
|
2748
|
+
const n = J(s, t.prop, `${fe},`).replace(fe, "").split(",").join(" ");
|
|
2749
|
+
return E(I(n.trim().split(" "), Ie), (i) => !Ke(i));
|
|
2750
|
+
}), Ji = () => te(Ps), Lt = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, Za = w((e) => {
|
|
2751
|
+
const t = e(Bs), s = e(ut), o = e(Rs), n = er(t);
|
|
2752
|
+
let i = E(e(Ps), { mod: s });
|
|
2753
|
+
return Ft(s, "_") || (i = E(i, (r) => n.includes(r.mq))), i = i.sort((r, c) => Lt[r.mq] - Lt[c.mq]), o || (i = E(i, { dark: !1 })), i;
|
|
2754
|
+
}), er = (e) => {
|
|
2755
|
+
let t = [];
|
|
2756
|
+
switch (e) {
|
|
2757
|
+
case "xs":
|
|
2758
|
+
t = ["xs"];
|
|
2759
|
+
break;
|
|
2760
|
+
case "sm":
|
|
2761
|
+
t = ["xs", "sm"];
|
|
2762
|
+
break;
|
|
2763
|
+
case "md":
|
|
2764
|
+
t = ["xs", "sm", "md"];
|
|
2765
|
+
break;
|
|
2766
|
+
case "lg":
|
|
2767
|
+
t = ["xs", "sm", "md", "lg"];
|
|
2768
|
+
break;
|
|
2769
|
+
case "xl":
|
|
2770
|
+
t = ["xs", "sm", "md", "lg", "xl"];
|
|
2771
|
+
break;
|
|
2772
|
+
case "2xl":
|
|
2773
|
+
t = ["xs", "sm", "md", "lg", "xl", "2xl"];
|
|
2774
|
+
break;
|
|
2775
|
+
default:
|
|
2776
|
+
t = ["xs"];
|
|
2777
|
+
break;
|
|
2778
|
+
}
|
|
2779
|
+
return t;
|
|
2780
|
+
}, Yi = () => te(Za), Qi = () => O(ut), Xi = () => {
|
|
2781
|
+
const { updateBlocks: e } = he();
|
|
2782
|
+
return $(
|
|
2783
|
+
(t, s, o) => {
|
|
2784
|
+
e(t, s, o);
|
|
2785
|
+
},
|
|
2786
|
+
[e]
|
|
2787
|
+
);
|
|
2788
|
+
}, Zi = () => {
|
|
2789
|
+
const { updateBlocksRuntime: e } = he();
|
|
2790
|
+
return $(
|
|
2791
|
+
(t, s) => {
|
|
2792
|
+
e(t, s);
|
|
2793
|
+
},
|
|
2794
|
+
[e]
|
|
2795
|
+
);
|
|
2796
|
+
}, Ts = {
|
|
2797
|
+
name: "",
|
|
2798
|
+
props: {},
|
|
2799
|
+
modalProps: {},
|
|
2800
|
+
backdropClose: !0
|
|
2801
|
+
}, tr = w(Ts), el = () => {
|
|
2802
|
+
const [e, t] = O(tr), s = $(
|
|
2803
|
+
(n, i = {}, r = {}) => {
|
|
2804
|
+
t({ name: n, props: i, modalProps: r });
|
|
2805
|
+
},
|
|
2806
|
+
[t]
|
|
2807
|
+
), o = $(
|
|
2808
|
+
(...n) => {
|
|
2809
|
+
J(e, "props.onClose", () => {
|
|
2810
|
+
})(...n), t(Ts);
|
|
2811
|
+
},
|
|
2812
|
+
[t, e]
|
|
2813
|
+
);
|
|
2814
|
+
return {
|
|
2815
|
+
activeModal: e,
|
|
2816
|
+
openModal: s,
|
|
2817
|
+
closeModal: o
|
|
2818
|
+
};
|
|
2819
|
+
}, tl = () => (console.warn("useAllBlocks is deprecated, use useBlocksStore() instead"), te(ie)), Is = w(!1);
|
|
2820
|
+
Is.debugLabel = "readOnlyModeAtom";
|
|
2821
|
+
const sr = w("online");
|
|
2822
|
+
sr.debugLabel = "networkModeAtom";
|
|
2823
|
+
const or = w(!1);
|
|
2824
|
+
or.debugLabel = "codeEditorOpenAtom";
|
|
2825
|
+
const nr = w(!1);
|
|
2826
|
+
nr.debugLabel = "editLayerNameAtom";
|
|
2827
|
+
const ar = w("");
|
|
2828
|
+
ar.debugLabel = "activeLanguageAtom";
|
|
2829
|
+
const rr = w("");
|
|
2830
|
+
rr.debugLabel = "primaryLanguageAtom";
|
|
2831
|
+
const ir = w(null);
|
|
2832
|
+
ir.debugLabel = "canvasIframeAtom";
|
|
2833
|
+
const lr = w("outline");
|
|
2834
|
+
lr.debugLabel = "activePanelAtom";
|
|
2835
|
+
const cr = w("");
|
|
2836
|
+
cr.debugLabel = "showPredefinedBlockCategoryAtom";
|
|
2837
|
+
const Ms = w({ undoCount: 0, redoCount: 0 });
|
|
2838
|
+
Ms.debugLabel = "historyStatesAtom";
|
|
2839
|
+
const dr = w("");
|
|
2840
|
+
dr.debugLabel = "inlineEditingActiveAtom";
|
|
2841
|
+
const ur = w(!1);
|
|
2842
|
+
ur.debugLabel = "draggingFlagAtom";
|
|
2843
|
+
const fr = w("");
|
|
2844
|
+
fr.debugLabel = "draggedBlockIdAtom";
|
|
2845
|
+
const sl = () => te(Is), mr = w(""), pr = w(null), ol = () => O(mr), nl = () => O(pr), gr = Re("selectedBreakpoints", ["XS", "MD", "XL"]), al = () => {
|
|
2846
|
+
const [e, t] = O(gr);
|
|
2847
|
+
return [e, t];
|
|
2848
|
+
}, rl = () => {
|
|
2849
|
+
const e = _e(Ms), { clear: t } = cs(), [, s] = $e(), [, o] = Ja(), [, n] = Va();
|
|
2850
|
+
return () => {
|
|
2851
|
+
s([]), n([]), o(""), t(), e({ undoCount: 0, redoCount: 0 });
|
|
2852
|
+
};
|
|
2853
|
+
}, br = w([]), il = () => {
|
|
2854
|
+
const [e, t] = Ce(!1), [s, o] = O(br), n = ve("getUILibraryBlocks", () => []);
|
|
2855
|
+
return Ae(() => {
|
|
2856
|
+
(async () => s.length > 0 || (t(!0), o(await n()), t(!1)))();
|
|
2857
|
+
}, []), { data: s, isLoading: e };
|
|
2858
|
+
}, ll = () => {
|
|
2859
|
+
const [e, t] = Ce(null), s = $(async (o) => {
|
|
2860
|
+
if (!(navigator != null && navigator.clipboard))
|
|
2861
|
+
return console.warn("Clipboard not supported"), !1;
|
|
2862
|
+
try {
|
|
2863
|
+
return await navigator.clipboard.writeText(o), t(o), !0;
|
|
2864
|
+
} catch (n) {
|
|
2865
|
+
return console.warn("Copy failed", n), t(null), !1;
|
|
2866
|
+
}
|
|
2867
|
+
}, []);
|
|
2868
|
+
return [e, s];
|
|
2869
|
+
};
|
|
2870
|
+
export {
|
|
2871
|
+
Yi as $,
|
|
2872
|
+
Xr as A,
|
|
2873
|
+
Yo as B,
|
|
2874
|
+
gt as C,
|
|
2875
|
+
$r as D,
|
|
2876
|
+
we as E,
|
|
2877
|
+
ns as F,
|
|
2878
|
+
Jt as G,
|
|
2879
|
+
ls as H,
|
|
2880
|
+
ji as I,
|
|
2881
|
+
sl as J,
|
|
2882
|
+
el as K,
|
|
2883
|
+
zi as L,
|
|
2884
|
+
Vi as M,
|
|
2885
|
+
$i as N,
|
|
2886
|
+
Fi as O,
|
|
2887
|
+
Ui as P,
|
|
2888
|
+
ll as Q,
|
|
2889
|
+
Lo as R,
|
|
2890
|
+
Ai as S,
|
|
2891
|
+
ti as T,
|
|
2892
|
+
Ga as U,
|
|
2893
|
+
Wi as V,
|
|
2894
|
+
Fo as W,
|
|
2895
|
+
Gi as X,
|
|
2896
|
+
Ja as Y,
|
|
2897
|
+
Hi as Z,
|
|
2898
|
+
Ki as _,
|
|
2899
|
+
Zr as a,
|
|
2900
|
+
wa as a$,
|
|
2901
|
+
Ji as a0,
|
|
2902
|
+
Gr as a1,
|
|
2903
|
+
Ua as a2,
|
|
2904
|
+
il as a3,
|
|
2905
|
+
Qi as a4,
|
|
2906
|
+
Xi as a5,
|
|
2907
|
+
Zi as a6,
|
|
2908
|
+
Wr as a7,
|
|
2909
|
+
tl as a8,
|
|
2910
|
+
ol as a9,
|
|
2911
|
+
da as aA,
|
|
2912
|
+
An as aB,
|
|
2913
|
+
Jo as aC,
|
|
2914
|
+
ui as aD,
|
|
2915
|
+
fi as aE,
|
|
2916
|
+
Un as aF,
|
|
2917
|
+
vi as aG,
|
|
2918
|
+
yi as aH,
|
|
2919
|
+
oa as aI,
|
|
2920
|
+
ia as aJ,
|
|
2921
|
+
la as aK,
|
|
2922
|
+
aa as aL,
|
|
2923
|
+
he as aM,
|
|
2924
|
+
ur as aN,
|
|
2925
|
+
dr as aO,
|
|
2926
|
+
nr as aP,
|
|
2927
|
+
fr as aQ,
|
|
2928
|
+
Fr as aR,
|
|
2929
|
+
Ur as aS,
|
|
2930
|
+
sr as aT,
|
|
2931
|
+
ir as aU,
|
|
2932
|
+
ni as aV,
|
|
2933
|
+
ai as aW,
|
|
2934
|
+
Pn as aX,
|
|
2935
|
+
js as aY,
|
|
2936
|
+
va as aZ,
|
|
2937
|
+
ya as a_,
|
|
2938
|
+
nl as aa,
|
|
2939
|
+
al as ab,
|
|
2940
|
+
Va as ac,
|
|
2941
|
+
fs as ad,
|
|
2942
|
+
xt as ae,
|
|
2943
|
+
pn as af,
|
|
2944
|
+
bn as ag,
|
|
2945
|
+
hn as ah,
|
|
2946
|
+
un as ai,
|
|
2947
|
+
mi as aj,
|
|
2948
|
+
Wn as ak,
|
|
2949
|
+
gi as al,
|
|
2950
|
+
Gn as am,
|
|
2951
|
+
qn as an,
|
|
2952
|
+
mn as ao,
|
|
2953
|
+
si as ap,
|
|
2954
|
+
oi as aq,
|
|
2955
|
+
Rn as ar,
|
|
2956
|
+
Qr as as,
|
|
2957
|
+
lr as at,
|
|
2958
|
+
_n as au,
|
|
2959
|
+
bs as av,
|
|
2960
|
+
Ze as aw,
|
|
2961
|
+
et as ax,
|
|
2962
|
+
pi as ay,
|
|
2963
|
+
Hn as az,
|
|
2964
|
+
an as b,
|
|
2965
|
+
Qn as b$,
|
|
2966
|
+
Na as b0,
|
|
2967
|
+
Sa as b1,
|
|
2968
|
+
gn as b2,
|
|
2969
|
+
Pt as b3,
|
|
2970
|
+
Rt as b4,
|
|
2971
|
+
Oi as b5,
|
|
2972
|
+
Mi as b6,
|
|
2973
|
+
Ei as b7,
|
|
2974
|
+
Li as b8,
|
|
2975
|
+
Yr as b9,
|
|
2976
|
+
qo as bA,
|
|
2977
|
+
ht as bB,
|
|
2978
|
+
on as bC,
|
|
2979
|
+
nn as bD,
|
|
2980
|
+
yn as bE,
|
|
2981
|
+
gs as bF,
|
|
2982
|
+
Tn as bG,
|
|
2983
|
+
ri as bH,
|
|
2984
|
+
In as bI,
|
|
2985
|
+
En as bJ,
|
|
2986
|
+
On as bK,
|
|
2987
|
+
$n as bL,
|
|
2988
|
+
Vn as bM,
|
|
2989
|
+
Ln as bN,
|
|
2990
|
+
di as bO,
|
|
2991
|
+
zn as bP,
|
|
2992
|
+
li as bQ,
|
|
2993
|
+
Dn as bR,
|
|
2994
|
+
Mn as bS,
|
|
2995
|
+
ii as bT,
|
|
2996
|
+
ci as bU,
|
|
2997
|
+
Fn as bV,
|
|
2998
|
+
Kn as bW,
|
|
2999
|
+
bi as bX,
|
|
3000
|
+
hi as bY,
|
|
3001
|
+
xi as bZ,
|
|
3002
|
+
Yn as b_,
|
|
3003
|
+
Qo as ba,
|
|
3004
|
+
Xo as bb,
|
|
3005
|
+
Zo as bc,
|
|
3006
|
+
Sn as bd,
|
|
3007
|
+
ei as be,
|
|
3008
|
+
Bn as bf,
|
|
3009
|
+
wi as bg,
|
|
3010
|
+
na as bh,
|
|
3011
|
+
ca as bi,
|
|
3012
|
+
xn as bj,
|
|
3013
|
+
vn as bk,
|
|
3014
|
+
wn as bl,
|
|
3015
|
+
Nn as bm,
|
|
3016
|
+
Cn as bn,
|
|
3017
|
+
kn as bo,
|
|
3018
|
+
tn as bp,
|
|
3019
|
+
sn as bq,
|
|
3020
|
+
cr as br,
|
|
3021
|
+
_a as bs,
|
|
3022
|
+
Ba as bt,
|
|
3023
|
+
Bi as bu,
|
|
3024
|
+
_i as bv,
|
|
3025
|
+
_t as bw,
|
|
3026
|
+
jo as bx,
|
|
3027
|
+
qr as by,
|
|
3028
|
+
Ko as bz,
|
|
3029
|
+
rn as c,
|
|
3030
|
+
Xn as c0,
|
|
3031
|
+
Zn as c1,
|
|
3032
|
+
ea as c2,
|
|
3033
|
+
ra as c3,
|
|
3034
|
+
Ni as c4,
|
|
3035
|
+
ki as c5,
|
|
3036
|
+
sa as c6,
|
|
3037
|
+
ta as c7,
|
|
3038
|
+
Si as c8,
|
|
3039
|
+
pa as c9,
|
|
3040
|
+
vs as ca,
|
|
3041
|
+
ga as cb,
|
|
3042
|
+
Ci as cc,
|
|
3043
|
+
ja as cd,
|
|
3044
|
+
ka as ce,
|
|
3045
|
+
Ra as cf,
|
|
3046
|
+
Pa as cg,
|
|
3047
|
+
Ta as ch,
|
|
3048
|
+
Ia as ci,
|
|
3049
|
+
Ma as cj,
|
|
3050
|
+
Ri as ck,
|
|
3051
|
+
Pi as cl,
|
|
3052
|
+
Ti as cm,
|
|
3053
|
+
Ca as cn,
|
|
3054
|
+
Aa as co,
|
|
3055
|
+
Ii as cp,
|
|
3056
|
+
Di as cq,
|
|
3057
|
+
cn as d,
|
|
3058
|
+
dn as e,
|
|
3059
|
+
ln as f,
|
|
3060
|
+
fn as g,
|
|
3061
|
+
ve as h,
|
|
3062
|
+
qt as i,
|
|
3063
|
+
zr as j,
|
|
3064
|
+
no as k,
|
|
3065
|
+
ae as l,
|
|
3066
|
+
fo as m,
|
|
3067
|
+
uo as n,
|
|
3068
|
+
Re as o,
|
|
3069
|
+
Vr as p,
|
|
3070
|
+
qi as q,
|
|
3071
|
+
$e as r,
|
|
3072
|
+
Jr as s,
|
|
3073
|
+
Ha as t,
|
|
3074
|
+
rl as u,
|
|
3075
|
+
cs as v,
|
|
3076
|
+
ie as w,
|
|
3077
|
+
wo as x,
|
|
3078
|
+
Uo as y,
|
|
3079
|
+
Kr as z
|
|
3080
|
+
};
|