@chaibuilder/sdk 1.2.67 → 1.2.68
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-mbuhydG3.js → AddBlocks-ZpUetK5a.js} +1 -1
- package/dist/{AddBlocks-TVOOPK2w.cjs → AddBlocks-yiQ5OTLv.cjs} +1 -1
- package/dist/{CanvasArea-KJMcis97.cjs → CanvasArea-2cBQ9dE5.cjs} +1 -1
- package/dist/{CanvasArea-kg3Rgg9t.js → CanvasArea-jo84KvNu.js} +2 -2
- package/dist/{CodeEditor-q5unEaUI.js → CodeEditor-Jw5dt0Xj.js} +4 -4
- package/dist/{CodeEditor-QP6l0mv4.cjs → CodeEditor-KGtD1Of3.cjs} +1 -1
- package/dist/{SettingsPanel-MWeQjDWs.cjs → SettingsPanel-J5bAM-ug.cjs} +1 -1
- package/dist/{SettingsPanel-pomLrOxB.js → SettingsPanel-ukU3Ay9U.js} +6 -6
- package/dist/SidePanels-VyoLHl0W.cjs +1 -0
- package/dist/{SidePanels-YpRrvfiH.js → SidePanels-miYmxJN0.js} +41 -34
- package/dist/{Topbar-kVBx7pp4.js → Topbar-J3_SbpA_.js} +1 -1
- package/dist/{Topbar-veJ2_blW.cjs → Topbar-gVd8cET_.cjs} +1 -1
- package/dist/{UnsplashImages-sotLcz6r.js → UnsplashImages-7vkIHXUl.js} +1 -1
- package/dist/{UnsplashImages--MXx-DYM.cjs → UnsplashImages-hYgO0rjn.cjs} +1 -1
- package/dist/{UploadImages-xhxeYKkl.cjs → UploadImages-_t2yeuXp.cjs} +1 -1
- package/dist/{UploadImages-I0QQ6vj1.js → UploadImages-dHtEwNpW.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +8 -0
- package/dist/core.js +64 -61
- package/dist/{index-5hfuDpYs.cjs → index-CatHvcI6.cjs} +18 -18
- package/dist/{index-Zu-K_BX7.js → index-ElwrrnPk.js} +831 -661
- package/package.json +1 -1
- package/dist/SidePanels-9sbERNEv.cjs +0 -1
- package/dist/UILibrariesPanel-ES8YzN9C.js +0 -226
- package/dist/UILibrariesPanel-H8t36R6M.cjs +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var mt = Object.defineProperty;
|
|
2
2
|
var gt = (r, n, o) => n in r ? mt(r, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[n] = o;
|
|
3
|
-
var
|
|
3
|
+
var Ve = (r, n, o) => (gt(r, typeof n != "symbol" ? n + "" : n, o), o);
|
|
4
4
|
import { j as jsxRuntimeExports } from "./jsx-runtime-Sp0orL4X.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import React__default, { createContext as createContext$1, useReducer, useEffect as useEffect$1, useDebugValue, useCallback as useCallback$1, useContext as useContext$1, useState as useState$1, Component, Children, Suspense, useMemo as useMemo$1, useRef as useRef$1, memo, createElement as createElement$1, useLayoutEffect as useLayoutEffect$1, forwardRef as forwardRef$1, cloneElement, Fragment, isValidElement, lazy } from "react";
|
|
7
|
-
import { memoize as memoize$1, has, find, filter, flatten, map, omit, isString as isString$1, includes, without, get as get$1, set, isEmpty, forIn, isObject as isObject$2, each, first, noop as noop$1, keys, startsWith, range, values, flattenDeep, isNull, pick, sortBy, chunk, throttle, debounce as debounce$1, isEqual, flatMapDeep, forEach, capitalize, last, startCase, truncate, isArray as isArray$5, split, toLower, cloneDeep, reject, nth, isNumber as isNumber$1, parseInt as parseInt$1, isNaN as isNaN$1, findLast, intersection, toUpper } from "lodash-es";
|
|
7
|
+
import { memoize as memoize$1, has, find, filter, flatten, map, omit, isString as isString$1, includes, without, get as get$1, set, isEmpty, forIn, isObject as isObject$2, each, first, noop as noop$1, keys, startsWith, range, values, flattenDeep, isNull, pick, sortBy, chunk, throttle, debounce as debounce$1, isEqual, flatMapDeep, forEach, capitalize, last, startCase, truncate, isArray as isArray$5, split, toLower, cloneDeep, reject, nth, isNumber as isNumber$1, parseInt as parseInt$1, isNaN as isNaN$1, findLast, intersection, groupBy, toUpper } from "lodash-es";
|
|
8
8
|
import { atom as atom$1, useAtomValue as useAtomValue$1, useAtom as useAtom$1, useSetAtom as useSetAtom$1, getDefaultStore as getDefaultStore$1 } from "jotai";
|
|
9
9
|
import { g as generateUUID, a as getBreakpointValue$1, f, y, s, c as cn, G as GenIcon } from "./iconBase-zweRWSz0.js";
|
|
10
|
-
import { getBlockComponent, getChaiDataProviders, useGlobalStylingPresets, syncBlocksWithDefaults } from "@chaibuilder/runtime";
|
|
10
|
+
import { getBlockComponent, getChaiDataProviders, useGlobalStylingPresets, useChaiBlocks, syncBlocksWithDefaults } from "@chaibuilder/runtime";
|
|
11
11
|
import { useTranslation, initReactI18next } from "react-i18next";
|
|
12
12
|
import { g as getDefaultExportFromCjs, p as plugin, c as commonjsGlobal } from "./plugin-sJ3Hzvpv.js";
|
|
13
13
|
import { useThrottledCallback, useResizeObserver, useDebouncedCallback, useIntervalEffect } from "@react-hookz/web";
|
|
@@ -17,7 +17,7 @@ import { S as SLOT_KEY, I as I18N_KEY, a as STYLES_KEY, O as OUTLINE_KEY } from
|
|
|
17
17
|
import { useHotkeys } from "react-hotkeys-hook";
|
|
18
18
|
import { flip as flip$2 } from "@floating-ui/dom";
|
|
19
19
|
import { useFloating as useFloating$1, shift, getOverflowAncestors, autoUpdate, size, offset, limitShift, flip as flip$3, inline, arrow } from "@floating-ui/react-dom";
|
|
20
|
-
import { ArrowUpIcon, CopyIcon as CopyIcon$1, TrashIcon, DragHandleDots2Icon, BoxModelIcon, BoxIcon, DragHandleHorizontalIcon, ViewHorizontalIcon, BorderAllIcon, BorderTopIcon, TableIcon, DropdownMenuIcon, RadiobuttonIcon, InputIcon, ButtonIcon, CheckboxIcon, GroupIcon, SpaceBetweenVerticallyIcon, ColumnsIcon, RowsIcon, TextIcon, SketchLogoIcon, DividerHorizontalIcon, CodeIcon, CursorTextIcon, VideoIcon, Link1Icon, HeadingIcon, ImageIcon, CardStackPlusIcon, CardStackIcon, ScissorsIcon, TriangleRightIcon, PlusIcon, Cross2Icon, EyeOpenIcon, EyeClosedIcon, WidthIcon, HeightIcon, ArrowRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowTopLeftIcon, ArrowTopRightIcon, ArrowBottomRightIcon, ArrowBottomLeftIcon, AlignLeftIcon, AlignCenterHorizontallyIcon, AlignRightIcon, StretchHorizontallyIcon, FontItalicIcon, UnderlineIcon, OverlineIcon, LetterCaseUppercaseIcon, Cross1Icon, InfoCircledIcon, MinusIcon, TriangleDownIcon, RowSpacingIcon, CrossCircledIcon, CaretDownIcon, CheckIcon, SunIcon, DotsVerticalIcon, MobileIcon, LaptopIcon, DesktopIcon, ResetIcon } from "@radix-ui/react-icons";
|
|
20
|
+
import { ArrowUpIcon, CopyIcon as CopyIcon$1, TrashIcon, DragHandleDots2Icon, BoxModelIcon, BoxIcon, DragHandleHorizontalIcon, ViewHorizontalIcon, BorderAllIcon, BorderTopIcon, TableIcon, DropdownMenuIcon, RadiobuttonIcon, InputIcon, ButtonIcon, CheckboxIcon, GroupIcon, SpaceBetweenVerticallyIcon, ColumnsIcon, RowsIcon, TextIcon, SketchLogoIcon, DividerHorizontalIcon, CodeIcon, CursorTextIcon, VideoIcon, Link1Icon, HeadingIcon, ImageIcon, CardStackPlusIcon, CardStackIcon, ScissorsIcon, TriangleRightIcon, PlusIcon, Cross2Icon, EyeOpenIcon, EyeClosedIcon, WidthIcon, HeightIcon, ArrowRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowTopLeftIcon, ArrowTopRightIcon, ArrowBottomRightIcon, ArrowBottomLeftIcon, AlignLeftIcon, AlignCenterHorizontallyIcon, AlignRightIcon, StretchHorizontallyIcon, FontItalicIcon, UnderlineIcon, OverlineIcon, LetterCaseUppercaseIcon, Cross1Icon, InfoCircledIcon, MinusIcon, TriangleDownIcon, RowSpacingIcon, CrossCircledIcon, CaretDownIcon, CaretSortIcon, CheckIcon, CaretRightIcon, SunIcon, DotsVerticalIcon, MobileIcon, LaptopIcon, DesktopIcon, ResetIcon } from "@radix-ui/react-icons";
|
|
21
21
|
import { useFeature, FlagsProvider } from "flagged";
|
|
22
22
|
import typography from "@tailwindcss/typography";
|
|
23
23
|
import forms from "@tailwindcss/forms";
|
|
@@ -31,13 +31,13 @@ import PropTypes from "prop-types";
|
|
|
31
31
|
import validator from "@rjsf/validator-ajv8";
|
|
32
32
|
import Form from "@rjsf/core";
|
|
33
33
|
import { Tree } from "react-arborist";
|
|
34
|
-
import { DatabaseIcon, EditIcon, TrashIcon as TrashIcon$1, Check, Loader as Loader$1, SparklesIcon,
|
|
34
|
+
import { DatabaseIcon, EditIcon, TrashIcon as TrashIcon$1, Check, Loader as Loader$1, SparklesIcon, SmileIcon, ShuffleIcon, Edit2, X } from "lucide-react";
|
|
35
35
|
import { parse as parse$1, stringify as stringify$3 } from "himalaya";
|
|
36
36
|
import IconPicker, { IconPickerItem } from "react-icons-picker";
|
|
37
37
|
import Autosuggest from "react-autosuggest";
|
|
38
38
|
import Fuse from "fuse.js";
|
|
39
|
-
import i18n from "i18next";
|
|
40
39
|
import clsx from "clsx";
|
|
40
|
+
import i18n from "i18next";
|
|
41
41
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
42
42
|
const canAcceptChildBlock = memoize$1((r, n) => {
|
|
43
43
|
if (!r)
|
|
@@ -94,30 +94,30 @@ const hasInitialValue = (r) => "init" in r, isActuallyWritableAtom = (r) => !!r.
|
|
|
94
94
|
}
|
|
95
95
|
}, d = (k, O, T) => {
|
|
96
96
|
const M = /* @__PURE__ */ new Map();
|
|
97
|
-
let
|
|
97
|
+
let L = !1;
|
|
98
98
|
T.forEach((D, W) => {
|
|
99
|
-
!D && W === k && (D = O), D ? (M.set(W, D), O.d.get(W) !== D && (
|
|
100
|
-
}), (
|
|
99
|
+
!D && W === k && (D = O), D ? (M.set(W, D), O.d.get(W) !== D && (L = !0)) : (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
|
|
100
|
+
}), (L || O.d.size !== M.size) && (O.d = M);
|
|
101
101
|
}, p = (k, O, T) => {
|
|
102
|
-
const M = c(k),
|
|
102
|
+
const M = c(k), L = {
|
|
103
103
|
d: (M == null ? void 0 : M.d) || /* @__PURE__ */ new Map(),
|
|
104
104
|
v: O
|
|
105
105
|
};
|
|
106
|
-
if (T && d(k,
|
|
106
|
+
if (T && d(k, L, T), M && isEqualAtomValue(M, L) && M.d === L.d)
|
|
107
107
|
return M;
|
|
108
|
-
if (M && hasPromiseAtomValue(M) && hasPromiseAtomValue(
|
|
109
|
-
if (M.d ===
|
|
108
|
+
if (M && hasPromiseAtomValue(M) && hasPromiseAtomValue(L) && isEqualPromiseAtomValue(M, L)) {
|
|
109
|
+
if (M.d === L.d)
|
|
110
110
|
return M;
|
|
111
|
-
|
|
111
|
+
L.v = M.v;
|
|
112
112
|
}
|
|
113
|
-
return u(k,
|
|
113
|
+
return u(k, L), L;
|
|
114
114
|
}, m = (k, O, T, M) => {
|
|
115
115
|
if (isPromiseLike$2(O)) {
|
|
116
|
-
let
|
|
116
|
+
let L;
|
|
117
117
|
const D = new Promise((W, J) => {
|
|
118
118
|
let F = !1;
|
|
119
119
|
O.then(
|
|
120
|
-
(
|
|
120
|
+
(z) => {
|
|
121
121
|
if (!F) {
|
|
122
122
|
F = !0;
|
|
123
123
|
const q = c(k), H = p(
|
|
@@ -125,10 +125,10 @@ const hasInitialValue = (r) => "init" in r, isActuallyWritableAtom = (r) => !!r.
|
|
|
125
125
|
D,
|
|
126
126
|
T
|
|
127
127
|
);
|
|
128
|
-
resolvePromise(D,
|
|
128
|
+
resolvePromise(D, z), W(z), (q == null ? void 0 : q.d) !== H.d && P(k, H, q == null ? void 0 : q.d);
|
|
129
129
|
}
|
|
130
130
|
},
|
|
131
|
-
(
|
|
131
|
+
(z) => {
|
|
132
132
|
if (!F) {
|
|
133
133
|
F = !0;
|
|
134
134
|
const q = c(k), H = p(
|
|
@@ -136,40 +136,40 @@ const hasInitialValue = (r) => "init" in r, isActuallyWritableAtom = (r) => !!r.
|
|
|
136
136
|
D,
|
|
137
137
|
T
|
|
138
138
|
);
|
|
139
|
-
rejectPromise(D,
|
|
139
|
+
rejectPromise(D, z), J(z), (q == null ? void 0 : q.d) !== H.d && P(k, H, q == null ? void 0 : q.d);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
),
|
|
143
|
-
F || (F = !0,
|
|
142
|
+
), L = (z) => {
|
|
143
|
+
F || (F = !0, z.then(
|
|
144
144
|
(q) => resolvePromise(D, q),
|
|
145
145
|
(q) => rejectPromise(D, q)
|
|
146
|
-
), W(
|
|
146
|
+
), W(z));
|
|
147
147
|
};
|
|
148
148
|
});
|
|
149
149
|
return D.orig = O, D.status = "pending", registerCancelPromise(D, (W) => {
|
|
150
|
-
W &&
|
|
150
|
+
W && L(W), M == null || M();
|
|
151
151
|
}), p(k, D, T);
|
|
152
152
|
}
|
|
153
153
|
return p(k, O, T);
|
|
154
154
|
}, g = (k, O, T) => {
|
|
155
|
-
const M = c(k),
|
|
155
|
+
const M = c(k), L = {
|
|
156
156
|
d: (M == null ? void 0 : M.d) || /* @__PURE__ */ new Map(),
|
|
157
157
|
e: O
|
|
158
158
|
};
|
|
159
|
-
return T && d(k,
|
|
159
|
+
return T && d(k, L, T), M && isEqualAtomError(M, L) && M.d === L.d ? M : (u(k, L), L);
|
|
160
160
|
}, h = (k) => {
|
|
161
161
|
const O = c(k);
|
|
162
|
-
if (O && (O.d.forEach((F,
|
|
163
|
-
|
|
164
|
-
}), Array.from(O.d).every(([F,
|
|
162
|
+
if (O && (O.d.forEach((F, z) => {
|
|
163
|
+
z !== k && !n.has(z) && h(z);
|
|
164
|
+
}), Array.from(O.d).every(([F, z]) => {
|
|
165
165
|
const q = c(F);
|
|
166
|
-
return F === k || q ===
|
|
167
|
-
q && !hasPromiseAtomValue(q) && isEqualAtomValue(q,
|
|
166
|
+
return F === k || q === z || // TODO This is a hack, we should find a better solution.
|
|
167
|
+
q && !hasPromiseAtomValue(q) && isEqualAtomValue(q, z);
|
|
168
168
|
})))
|
|
169
169
|
return O;
|
|
170
170
|
const T = /* @__PURE__ */ new Map();
|
|
171
171
|
let M = !0;
|
|
172
|
-
const
|
|
172
|
+
const L = (F) => {
|
|
173
173
|
if (F === k) {
|
|
174
174
|
const q = c(F);
|
|
175
175
|
if (q)
|
|
@@ -178,8 +178,8 @@ const hasInitialValue = (r) => "init" in r, isActuallyWritableAtom = (r) => !!r.
|
|
|
178
178
|
return T.set(F, void 0), F.init;
|
|
179
179
|
throw new Error("no atom init");
|
|
180
180
|
}
|
|
181
|
-
const
|
|
182
|
-
return T.set(F,
|
|
181
|
+
const z = h(F);
|
|
182
|
+
return T.set(F, z), returnAtomValue(z);
|
|
183
183
|
};
|
|
184
184
|
let D, W;
|
|
185
185
|
const J = {
|
|
@@ -194,7 +194,7 @@ const hasInitialValue = (r) => "init" in r, isActuallyWritableAtom = (r) => !!r.
|
|
|
194
194
|
}
|
|
195
195
|
};
|
|
196
196
|
try {
|
|
197
|
-
const F = k.read(
|
|
197
|
+
const F = k.read(L, J);
|
|
198
198
|
return m(
|
|
199
199
|
k,
|
|
200
200
|
F,
|
|
@@ -223,13 +223,13 @@ const hasInitialValue = (r) => "init" in r, isActuallyWritableAtom = (r) => !!r.
|
|
|
223
223
|
});
|
|
224
224
|
};
|
|
225
225
|
M(k);
|
|
226
|
-
const
|
|
226
|
+
const L = (D) => {
|
|
227
227
|
const W = n.get(D);
|
|
228
228
|
W == null || W.t.forEach((J) => {
|
|
229
229
|
var F;
|
|
230
230
|
if (J !== D) {
|
|
231
|
-
let
|
|
232
|
-
if (
|
|
231
|
+
let z = T.get(J);
|
|
232
|
+
if (z && T.set(J, --z), !z) {
|
|
233
233
|
let q = !!((F = O.get(J)) != null && F.size);
|
|
234
234
|
if (q) {
|
|
235
235
|
const H = c(J), ee = h(J);
|
|
@@ -237,46 +237,46 @@ const hasInitialValue = (r) => "init" in r, isActuallyWritableAtom = (r) => !!r.
|
|
|
237
237
|
}
|
|
238
238
|
q || O.forEach((H) => H.delete(J));
|
|
239
239
|
}
|
|
240
|
-
|
|
240
|
+
L(J);
|
|
241
241
|
}
|
|
242
242
|
});
|
|
243
243
|
};
|
|
244
|
-
|
|
244
|
+
L(k);
|
|
245
245
|
}, E = (k, ...O) => {
|
|
246
246
|
let T = !0;
|
|
247
|
-
const M = (W) => returnAtomValue(h(W)),
|
|
247
|
+
const M = (W) => returnAtomValue(h(W)), L = (W, ...J) => {
|
|
248
248
|
let F;
|
|
249
249
|
if (W === k) {
|
|
250
250
|
if (!hasInitialValue(W))
|
|
251
251
|
throw new Error("atom not writable");
|
|
252
|
-
const
|
|
253
|
-
(!
|
|
252
|
+
const z = c(W), q = m(W, J[0]);
|
|
253
|
+
(!z || !isEqualAtomValue(z, q)) && w(W);
|
|
254
254
|
} else
|
|
255
255
|
F = E(W, ...J);
|
|
256
256
|
if (!T) {
|
|
257
|
-
const
|
|
257
|
+
const z = I();
|
|
258
258
|
(define_import_meta_env_default$2 ? "production" : void 0) !== "production" && i.forEach(
|
|
259
|
-
(q) => q({ type: "async-write", flushed:
|
|
259
|
+
(q) => q({ type: "async-write", flushed: z })
|
|
260
260
|
);
|
|
261
261
|
}
|
|
262
262
|
return F;
|
|
263
|
-
}, D = k.write(M,
|
|
263
|
+
}, D = k.write(M, L, ...O);
|
|
264
264
|
return T = !1, D;
|
|
265
265
|
}, A = (k, ...O) => {
|
|
266
266
|
const T = E(k, ...O), M = I();
|
|
267
267
|
return (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && i.forEach(
|
|
268
|
-
(
|
|
268
|
+
(L) => L({ type: "write", flushed: M })
|
|
269
269
|
), T;
|
|
270
270
|
}, C = (k, O) => {
|
|
271
271
|
const T = {
|
|
272
272
|
t: new Set(O && [O]),
|
|
273
273
|
l: /* @__PURE__ */ new Set()
|
|
274
274
|
};
|
|
275
|
-
if (n.set(k, T), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && l.add(k), h(k).d.forEach((M,
|
|
276
|
-
const D = n.get(
|
|
277
|
-
D ? D.t.add(k) :
|
|
275
|
+
if (n.set(k, T), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && l.add(k), h(k).d.forEach((M, L) => {
|
|
276
|
+
const D = n.get(L);
|
|
277
|
+
D ? D.t.add(k) : L !== k && C(L, k);
|
|
278
278
|
}), h(k), isActuallyWritableAtom(k) && k.onMount) {
|
|
279
|
-
const M = k.onMount((...
|
|
279
|
+
const M = k.onMount((...L) => A(k, ...L));
|
|
280
280
|
M && (T.u = M);
|
|
281
281
|
}
|
|
282
282
|
return T;
|
|
@@ -285,7 +285,7 @@ const hasInitialValue = (r) => "init" in r, isActuallyWritableAtom = (r) => !!r.
|
|
|
285
285
|
const T = (O = n.get(k)) == null ? void 0 : O.u;
|
|
286
286
|
T && T(), n.delete(k), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && l.delete(k);
|
|
287
287
|
const M = c(k);
|
|
288
|
-
M ? (hasPromiseAtomValue(M) && cancelPromise(M.v), M.d.forEach((
|
|
288
|
+
M ? (hasPromiseAtomValue(M) && cancelPromise(M.v), M.d.forEach((L, D) => {
|
|
289
289
|
if (D !== k) {
|
|
290
290
|
const W = n.get(D);
|
|
291
291
|
W && (W.t.delete(k), v(D, W) && R(D));
|
|
@@ -293,29 +293,29 @@ const hasInitialValue = (r) => "init" in r, isActuallyWritableAtom = (r) => !!r.
|
|
|
293
293
|
})) : (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && console.warn("[Bug] could not find atom state to unmount", k);
|
|
294
294
|
}, P = (k, O, T) => {
|
|
295
295
|
const M = new Set(O.d.keys());
|
|
296
|
-
T == null || T.forEach((
|
|
296
|
+
T == null || T.forEach((L, D) => {
|
|
297
297
|
if (M.has(D)) {
|
|
298
298
|
M.delete(D);
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
301
|
const W = n.get(D);
|
|
302
302
|
W && (W.t.delete(k), v(D, W) && R(D));
|
|
303
|
-
}), M.forEach((
|
|
304
|
-
const D = n.get(
|
|
305
|
-
D ? D.t.add(k) : n.has(k) && C(
|
|
303
|
+
}), M.forEach((L) => {
|
|
304
|
+
const D = n.get(L);
|
|
305
|
+
D ? D.t.add(k) : n.has(k) && C(L, k);
|
|
306
306
|
});
|
|
307
307
|
}, I = () => {
|
|
308
308
|
let k;
|
|
309
309
|
for ((define_import_meta_env_default$2 ? "production" : void 0) !== "production" && (k = /* @__PURE__ */ new Set()); o.size; ) {
|
|
310
310
|
const O = Array.from(o);
|
|
311
311
|
o.clear(), O.forEach(([T, M]) => {
|
|
312
|
-
const
|
|
313
|
-
if (
|
|
314
|
-
|
|
312
|
+
const L = c(T);
|
|
313
|
+
if (L) {
|
|
314
|
+
L.d !== (M == null ? void 0 : M.d) && P(T, L, M == null ? void 0 : M.d);
|
|
315
315
|
const D = n.get(T);
|
|
316
316
|
D && !// TODO This seems pretty hacky. Hope to fix it.
|
|
317
317
|
// Maybe we could `mountDependencies` in `setAtomState`?
|
|
318
|
-
(M && !hasPromiseAtomValue(M) && (isEqualAtomValue(M,
|
|
318
|
+
(M && !hasPromiseAtomValue(M) && (isEqualAtomValue(M, L) || isEqualAtomError(M, L))) && (D.l.forEach((W) => W()), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && k.add(T));
|
|
319
319
|
} else
|
|
320
320
|
(define_import_meta_env_default$2 ? "production" : void 0) !== "production" && console.warn("[Bug] no atom state to flush");
|
|
321
321
|
});
|
|
@@ -323,11 +323,11 @@ const hasInitialValue = (r) => "init" in r, isActuallyWritableAtom = (r) => !!r.
|
|
|
323
323
|
if ((define_import_meta_env_default$2 ? "production" : void 0) !== "production")
|
|
324
324
|
return a.forEach((O) => O("state")), k;
|
|
325
325
|
}, j = (k, O) => {
|
|
326
|
-
const T = x(k), M = I(),
|
|
327
|
-
return
|
|
326
|
+
const T = x(k), M = I(), L = T.l;
|
|
327
|
+
return L.add(O), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && (a.forEach((D) => D("sub")), i.forEach(
|
|
328
328
|
(D) => D({ type: "sub", flushed: M })
|
|
329
329
|
)), () => {
|
|
330
|
-
|
|
330
|
+
L.delete(O), S(k), (define_import_meta_env_default$2 ? "production" : void 0) !== "production" && (a.forEach((D) => D("unsub")), i.forEach((D) => D({ type: "unsub" })));
|
|
331
331
|
};
|
|
332
332
|
};
|
|
333
333
|
return (define_import_meta_env_default$2 ? "production" : void 0) !== "production" ? {
|
|
@@ -2867,7 +2867,7 @@ class Content extends Component {
|
|
|
2867
2867
|
return Children.only(this.props.children);
|
|
2868
2868
|
}
|
|
2869
2869
|
}
|
|
2870
|
-
|
|
2870
|
+
Ve(Content, "propTypes", {
|
|
2871
2871
|
children: PropTypes.element.isRequired,
|
|
2872
2872
|
contentDidMount: PropTypes.func.isRequired,
|
|
2873
2873
|
contentDidUpdate: PropTypes.func.isRequired
|
|
@@ -2875,17 +2875,17 @@ Le(Content, "propTypes", {
|
|
|
2875
2875
|
class Frame extends Component {
|
|
2876
2876
|
constructor(o, a) {
|
|
2877
2877
|
super(o, a);
|
|
2878
|
-
|
|
2878
|
+
Ve(this, "setRef", (o) => {
|
|
2879
2879
|
this.nodeRef.current = o;
|
|
2880
2880
|
const { forwardedRef: a } = this.props;
|
|
2881
2881
|
typeof a == "function" ? a(o) : a && (a.current = o);
|
|
2882
2882
|
});
|
|
2883
|
-
|
|
2883
|
+
Ve(this, "handleLoad", () => {
|
|
2884
2884
|
clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
|
|
2885
2885
|
});
|
|
2886
2886
|
// In certain situations on a cold cache DOMContentLoaded never gets called
|
|
2887
2887
|
// fallback to an interval to check if that's the case
|
|
2888
|
-
|
|
2888
|
+
Ve(this, "loadCheck", () => setInterval(() => {
|
|
2889
2889
|
this.handleLoad();
|
|
2890
2890
|
}, 500));
|
|
2891
2891
|
this._isMounted = !1, this.nodeRef = React__default.createRef(), this.state = { iframeLoaded: !1 };
|
|
@@ -2926,7 +2926,7 @@ class Frame extends Component {
|
|
|
2926
2926
|
// also inject into the body and can mess up React. For this reason
|
|
2927
2927
|
// initialContent is expected to have a div inside of the body
|
|
2928
2928
|
// element that we render react into.
|
|
2929
|
-
|
|
2929
|
+
Ve(Frame, "propTypes", {
|
|
2930
2930
|
style: PropTypes.object,
|
|
2931
2931
|
// eslint-disable-line
|
|
2932
2932
|
head: PropTypes.node,
|
|
@@ -2936,7 +2936,7 @@ Le(Frame, "propTypes", {
|
|
|
2936
2936
|
contentDidMount: PropTypes.func,
|
|
2937
2937
|
contentDidUpdate: PropTypes.func,
|
|
2938
2938
|
children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)])
|
|
2939
|
-
}),
|
|
2939
|
+
}), Ve(Frame, "defaultProps", {
|
|
2940
2940
|
style: {},
|
|
2941
2941
|
head: null,
|
|
2942
2942
|
children: void 0,
|
|
@@ -3932,7 +3932,7 @@ const Node = memo(({ node: r, style: n, dragHandle: o }) => {
|
|
|
3932
3932
|
C.preventDefault(), A(u, "no");
|
|
3933
3933
|
},
|
|
3934
3934
|
className: cn(
|
|
3935
|
-
"group flex !h-fit w-full items-center justify-between space-x-px py-px outline-none",
|
|
3935
|
+
"group flex !h-fit w-full items-center justify-between space-x-px !rounded-md py-px outline-none",
|
|
3936
3936
|
p ? "bg-blue-500 text-white" : "text-gray-600 hover:bg-gray-200 dark:hover:bg-gray-800",
|
|
3937
3937
|
m && canAcceptChildBlock(d._type, "Icon") ? "bg-green-200" : "",
|
|
3938
3938
|
g && "opacity-20"
|
|
@@ -4885,7 +4885,7 @@ const ViewData = ({ data: r, fullView: n }) => {
|
|
|
4885
4885
|
}
|
|
4886
4886
|
)
|
|
4887
4887
|
] });
|
|
4888
|
-
}, UnsplashImages = React__default.lazy(() => import("./UnsplashImages-
|
|
4888
|
+
}, UnsplashImages = React__default.lazy(() => import("./UnsplashImages-7vkIHXUl.js")), UploadImages = React__default.lazy(() => import("./UploadImages-dHtEwNpW.js")), ImagesPanel = ({
|
|
4889
4889
|
isModalView: r = !1,
|
|
4890
4890
|
onSelect: n = () => {
|
|
4891
4891
|
}
|
|
@@ -5309,9 +5309,9 @@ function ManualClasses() {
|
|
|
5309
5309
|
let k = [];
|
|
5310
5310
|
if (j && j.length > 0) {
|
|
5311
5311
|
const [O] = j, T = I.replace(O, "");
|
|
5312
|
-
k = fuse.search(T).map((
|
|
5313
|
-
...
|
|
5314
|
-
item: { ...
|
|
5312
|
+
k = fuse.search(T).map((L) => ({
|
|
5313
|
+
...L,
|
|
5314
|
+
item: { ...L.item, name: O + L.item.name }
|
|
5315
5315
|
}));
|
|
5316
5316
|
} else
|
|
5317
5317
|
k = fuse.search(I);
|
|
@@ -6086,8 +6086,8 @@ const RangeChoices = ({ property: r, onChange: n }) => {
|
|
|
6086
6086
|
}
|
|
6087
6087
|
if (get$1(O, "value") === "")
|
|
6088
6088
|
return;
|
|
6089
|
-
const
|
|
6090
|
-
k ? P(
|
|
6089
|
+
const L = `${get$1(O, "value", "").startsWith("-") ? "-" : ""}${u}[${get$1(O, "value", "").replace("-", "")}${T === "-" ? "" : T}]`;
|
|
6090
|
+
k ? P(L) : R(L);
|
|
6091
6091
|
},
|
|
6092
6092
|
[R, P, a, g, u, p]
|
|
6093
6093
|
), j = useCallback$1(
|
|
@@ -6103,8 +6103,8 @@ const RangeChoices = ({ property: r, onChange: n }) => {
|
|
|
6103
6103
|
}
|
|
6104
6104
|
if (get$1(O, "value") === "")
|
|
6105
6105
|
return;
|
|
6106
|
-
const T = get$1(O, "unit") !== "" ? get$1(O, "unit") : k,
|
|
6107
|
-
R(
|
|
6106
|
+
const T = get$1(O, "unit") !== "" ? get$1(O, "unit") : k, L = `${get$1(O, "value", "").startsWith("-") ? "-" : ""}${u}[${get$1(O, "value", "").replace("-", "")}${T === "-" ? "" : T}]`;
|
|
6107
|
+
R(L);
|
|
6108
6108
|
},
|
|
6109
6109
|
[R, a, u, p]
|
|
6110
6110
|
);
|
|
@@ -6561,7 +6561,178 @@ function BlockStyling() {
|
|
|
6561
6561
|
] })
|
|
6562
6562
|
] });
|
|
6563
6563
|
}
|
|
6564
|
-
|
|
6564
|
+
function UILibrariesSelect({
|
|
6565
|
+
uiLibraries: r,
|
|
6566
|
+
library: n,
|
|
6567
|
+
setLibrary: o
|
|
6568
|
+
}) {
|
|
6569
|
+
var c;
|
|
6570
|
+
const [a, i] = React.useState(!1), { t: l } = useTranslation();
|
|
6571
|
+
return n ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Popover$1, { open: a, onOpenChange: i, children: [
|
|
6572
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(PopoverTrigger, { asChild: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
6573
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: l("Choose Library") }),
|
|
6574
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
6575
|
+
Button$1,
|
|
6576
|
+
{
|
|
6577
|
+
variant: "outline",
|
|
6578
|
+
size: "sm",
|
|
6579
|
+
role: "combobox",
|
|
6580
|
+
"aria-expanded": a,
|
|
6581
|
+
className: "w-[200px] justify-between",
|
|
6582
|
+
children: [
|
|
6583
|
+
n ? (c = r.find((u) => u.uuid === n)) == null ? void 0 : c.name : l("Select library"),
|
|
6584
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CaretSortIcon, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
6585
|
+
]
|
|
6586
|
+
}
|
|
6587
|
+
)
|
|
6588
|
+
] }) }),
|
|
6589
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(PopoverContent, { className: "w-[200px] p-0", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Command, { children: [
|
|
6590
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CommandInput, { placeholder: "Search library...", className: "h-9" }),
|
|
6591
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(CommandList, { children: [
|
|
6592
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CommandEmpty, { children: "No library found." }),
|
|
6593
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CommandGroup, { children: r.map((u) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
6594
|
+
CommandItem,
|
|
6595
|
+
{
|
|
6596
|
+
value: u.uuid,
|
|
6597
|
+
onSelect: (d) => {
|
|
6598
|
+
o(d), i(!1);
|
|
6599
|
+
},
|
|
6600
|
+
children: [
|
|
6601
|
+
u.name,
|
|
6602
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
6603
|
+
CheckIcon,
|
|
6604
|
+
{
|
|
6605
|
+
className: cn("ml-auto h-4 w-4", n === u.uuid ? "opacity-100" : "opacity-0")
|
|
6606
|
+
}
|
|
6607
|
+
)
|
|
6608
|
+
]
|
|
6609
|
+
},
|
|
6610
|
+
u.uuid
|
|
6611
|
+
)) })
|
|
6612
|
+
] })
|
|
6613
|
+
] }) })
|
|
6614
|
+
] }) : null;
|
|
6615
|
+
}
|
|
6616
|
+
const BlockCard = ({
|
|
6617
|
+
block: r,
|
|
6618
|
+
closePopover: n,
|
|
6619
|
+
library: o
|
|
6620
|
+
}) => {
|
|
6621
|
+
const [a, i] = useState$1(!1), l = useBuilderProp("getUILibraryBlock", noop$1), { addCoreBlock: c, addPredefinedBlock: u } = useAddBlock(), [d, p] = useSelectedBlockIds(), [, m] = useHighlightBlockId(), g = get$1(r, "name", get$1(r, "label")), h = useFeature("dnd"), [, b] = useAtom$1(draggedBlockAtom), x = (w) => {
|
|
6622
|
+
const E = has(w, "styles_attrs.data-page-section");
|
|
6623
|
+
return w._type === "Box" && E;
|
|
6624
|
+
}, v = useCallback$1(
|
|
6625
|
+
async (w) => {
|
|
6626
|
+
if (w.stopPropagation(), has(r, "component")) {
|
|
6627
|
+
c(r, first(d)), n();
|
|
6628
|
+
return;
|
|
6629
|
+
}
|
|
6630
|
+
i(!0);
|
|
6631
|
+
const E = await l(o, r);
|
|
6632
|
+
let A = first(d);
|
|
6633
|
+
x(first(E)) && (A = null), isEmpty(E) || u(syncBlocksWithDefaults(E), A), n();
|
|
6634
|
+
},
|
|
6635
|
+
[r]
|
|
6636
|
+
), S = async (w) => {
|
|
6637
|
+
const E = await l(o, r);
|
|
6638
|
+
let A = first(d);
|
|
6639
|
+
if (x(first(E)) && (A = null), !isEmpty(E)) {
|
|
6640
|
+
const C = { blocks: E, uiLibrary: !0, parent: A };
|
|
6641
|
+
if (w.dataTransfer.setData("text/plain", JSON.stringify(C)), r.preview) {
|
|
6642
|
+
const R = new Image();
|
|
6643
|
+
R.src = r.preview, R.onload = () => {
|
|
6644
|
+
w.dataTransfer.setDragImage(R, 0, 0);
|
|
6645
|
+
};
|
|
6646
|
+
} else
|
|
6647
|
+
w.dataTransfer.setDragImage(new Image(), 0, 0);
|
|
6648
|
+
b(C), setTimeout(() => {
|
|
6649
|
+
p([]), m(null), n();
|
|
6650
|
+
}, 200);
|
|
6651
|
+
}
|
|
6652
|
+
};
|
|
6653
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip$1, { children: [
|
|
6654
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
6655
|
+
"div",
|
|
6656
|
+
{
|
|
6657
|
+
onClick: a ? () => {
|
|
6658
|
+
} : v,
|
|
6659
|
+
draggable: h ? "true" : "false",
|
|
6660
|
+
onDragStart: S,
|
|
6661
|
+
className: clsx(
|
|
6662
|
+
"relative mt-2 cursor-pointer overflow-hidden rounded-md border border-gray-300 bg-white duration-200 hover:border-blue-500 hover:shadow-xl"
|
|
6663
|
+
),
|
|
6664
|
+
children: [
|
|
6665
|
+
a && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute flex h-full w-full items-center justify-center bg-black/70", children: [
|
|
6666
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Loader$1, { className: "animate-spin", size: 15, color: "white" }),
|
|
6667
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "pl-2 text-sm text-white", children: "Adding..." })
|
|
6668
|
+
] }),
|
|
6669
|
+
r.preview ? /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: r.preview, className: "min-h-[25px] w-full rounded-md", alt: g }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-20 items-center justify-center rounded-md border border-border border-gray-300 bg-gray-200", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "max-w-xs text-center text-sm text-gray-700", children: g }) })
|
|
6670
|
+
]
|
|
6671
|
+
}
|
|
6672
|
+
) }),
|
|
6673
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: g }) })
|
|
6674
|
+
] });
|
|
6675
|
+
}, libraryBlocksAtom = atom$1({}), useLibraryBlocks = (r) => {
|
|
6676
|
+
const [n, o] = useAtom$1(libraryBlocksAtom), a = useBuilderProp("getUILibraryBlocks", noop$1), i = get$1(n, `${r == null ? void 0 : r.uuid}.blocks`, []), l = get$1(n, `${r == null ? void 0 : r.uuid}.loading`, !1);
|
|
6677
|
+
return useEffect$1(() => {
|
|
6678
|
+
(async () => {
|
|
6679
|
+
if (l || i.length > 0 || !r)
|
|
6680
|
+
return;
|
|
6681
|
+
o((u) => ({ ...u, [r == null ? void 0 : r.uuid]: { loading: !0, blocks: [] } }));
|
|
6682
|
+
const c = await a(r);
|
|
6683
|
+
o((u) => ({ ...u, [r == null ? void 0 : r.uuid]: { loading: !1, blocks: c || [] } }));
|
|
6684
|
+
})();
|
|
6685
|
+
}, [r, i, l]), { data: i, isLoading: l };
|
|
6686
|
+
}, selectedLibraryAtom = atomWithStorage("_selectedLibrary", null), UILibrarySection = () => {
|
|
6687
|
+
const [r, n] = useAtom$1(selectedLibraryAtom), o = useBuilderProp("uiLibraries", []), a = useChaiBlocks(), i = values(a).filter((S) => S.category === "custom"), l = o.find((S) => S.uuid === r) || first(o), { data: c, isLoading: u } = useLibraryBlocks(l), d = groupBy([...c, ...i], "group"), [p, m] = useState$1("Hero"), [, g] = useAtom$1(activePanelAtom$1), h = get$1(d, p, []), { t: b } = useTranslation(), x = useRef$1(null), v = (S) => {
|
|
6688
|
+
x.current && (clearTimeout(x.current), x.current = null), x.current = setTimeout(() => {
|
|
6689
|
+
x.current && m(S);
|
|
6690
|
+
}, 300);
|
|
6691
|
+
};
|
|
6692
|
+
return u ? /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-full w-full" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative flex h-full max-h-full w-[460px] flex-col overflow-hidden bg-background", children: [
|
|
6693
|
+
l != null && l.uuid ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sticky top-0 flex h-fit flex-col", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "flex w-full flex-col items-baseline truncate px-1 text-sm font-semibold xl:flex-col", children: /* @__PURE__ */ jsxRuntimeExports.jsx(UILibrariesSelect, { library: l == null ? void 0 : l.uuid, setLibrary: n, uiLibraries: o }) }) }) }) : null,
|
|
6694
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-[95%] border-t border-gray-300 pt-2", children: [
|
|
6695
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-full w-40 flex-col gap-1 px-1", children: React__default.Children.toArray(
|
|
6696
|
+
map(d, (S, w) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
6697
|
+
"div",
|
|
6698
|
+
{
|
|
6699
|
+
onMouseEnter: () => v(w),
|
|
6700
|
+
onMouseLeave: () => clearTimeout(x.current),
|
|
6701
|
+
onClick: () => m(w),
|
|
6702
|
+
className: cn(
|
|
6703
|
+
"flex w-full cursor-pointer items-center justify-between rounded-md p-1 text-sm transition-all ease-in-out hover:bg-gray-200",
|
|
6704
|
+
w === p ? "bg-blue-500 text-white hover:bg-blue-600" : ""
|
|
6705
|
+
),
|
|
6706
|
+
children: [
|
|
6707
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: capitalize(w) }),
|
|
6708
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CaretRightIcon, { className: "ml-2 h-5 w-5" })
|
|
6709
|
+
]
|
|
6710
|
+
},
|
|
6711
|
+
w
|
|
6712
|
+
))
|
|
6713
|
+
) }),
|
|
6714
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
6715
|
+
ScrollArea$1,
|
|
6716
|
+
{
|
|
6717
|
+
onMouseEnter: () => x.current ? clearTimeout(x.current) : null,
|
|
6718
|
+
className: "z-10 -mt-2 flex h-full max-h-full w-[300px] flex-col gap-2 border-l border-gray-300 transition-all ease-linear",
|
|
6719
|
+
children: [
|
|
6720
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sticky top-0 z-30 border-b border-gray-300 bg-gray-200 p-2 text-[9px] font-light leading-3 text-gray-500", children: b("Click on a block to add it to the page") }),
|
|
6721
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-2 px-2", children: React__default.Children.toArray(
|
|
6722
|
+
h.map((S) => /* @__PURE__ */ jsxRuntimeExports.jsx(BlockCard, { block: S, library: l, closePopover: () => g(OUTLINE_KEY) }))
|
|
6723
|
+
) }),
|
|
6724
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
6725
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
6726
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {})
|
|
6727
|
+
]
|
|
6728
|
+
}
|
|
6729
|
+
)
|
|
6730
|
+
] })
|
|
6731
|
+
] }) });
|
|
6732
|
+
}, UILibrariesPanel = () => /* @__PURE__ */ jsxRuntimeExports.jsx(UILibrarySection, {}), UILibrariesPanel$1 = UILibrariesPanel, UILibrariesPanel$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6733
|
+
__proto__: null,
|
|
6734
|
+
default: UILibrariesPanel$1
|
|
6735
|
+
}, Symbol.toStringTag, { value: "Module" })), add_block$2 = "Add block", enter_paste_tailwind_html$2 = "(Enter or paste TailwindCSS HTML snippet)", click_to_add_block$2 = "(Click to add block to page)", core$2 = "Core", custom_blocks$2 = "Custom Blocks", ui_library$2 = "UI Library", html_snippet_description$2 = "Use HTML snippets from Tailwind CSS component libraries etc. or just copy paste your own HTML code.", tailwind_html_snippet$2 = "Tailwind HTML snippet:", enter_code_snippet$2 = "Enter your code snippet here...", import_html$2 = "Import HTML", note_imported_html$2 = "NOTE: Imported html will be added to the currently selected block. If no block is selected, the html will be added to the page.", dark_mode$2 = "Dark mode", tree_view_no_blocks$2 = "This page has no blocks. Add a block by clicking the + button", canvas_empty$2 = "This page is empty", no_block_selected_for_styling$2 = "Please select a block to edit settings or styles", no_block_selected_for_ask_ai = "Please select a block to ask AI", no_styling_block_selected$2 = "Please select a styling block", drop_here_message$2 = "Drop your block here", use_setting$2 = "Use setting", mobile_xs_title$2 = "Mobile (XS)", mobile_xs_content$2 = "Styles set here are applied to all screen unless edited at higher breakpoint", mobile_sm_title$2 = "Mobile landscape (SM)", mobile_sm_content$2 = "Styles set here are applied at 640px and up unless edited at higher breakpoint", tablet_md_title$2 = "Tablet (MD)", tablet_md_content$2 = "Styles set here are applied at 768px and up", tablet_lg_title$2 = "Tablet Landscape (LG)", tablet_lg_content$2 = "Styles set here are applied at 1024px and up unless edited at higher breakpoint", desktop_xl_title$2 = "Desktop (XL)", desktop_xl_content$2 = "Styles set here are applied at 1280px and up unless edited at higher breakpoint", large_desktop_2xl_title$2 = "Large Desktop (2XL)", large_desktop_2xl_content$2 = "Styles set here are applied at 1536px and up", Breakpoints$3 = "Breakpoints", clear$2 = "Clear", clear_canvas_title$2 = "Clear whole canvas?", clear_canvas_description$2 = "Are you sure you want to clear the whole canvas?", cancel$2 = "Cancel", yes$2 = "Yes", preview$2 = "Preview", settings$2 = "Settings", styling$2 = "Styling", data_provider$2 = "Data Provider", remove_provider_confirmation$2 = "Are you sure you want to remove <span class='text-blue-500'>{name}</span> provider?", remove_provider_warning$2 = "Your data provider will be removed from this page and all added data binding will be not visible on blocks.", remove$2 = "Remove", no_data_providers$2 = "You have no data providers registered. Please add a data provider to your project.", learn_more$2 = "Learn more", add_data_providers$2 = "Add data providers:", select_provider$2 = "Select a provider", choose$2 = "Choose", page_data_providers$2 = "Page data providers:", view_data$2 = "View Data", mark_as_global$2 = "Mark as Global", global_block_note$2 = "Note: Global blocks are single instances. Editing global blocks will be reflected on all pages using these blocks.", global_block_indicator$2 = "Global blocks are indicated with", global_block_category$2 = "Global blocks are available under 'Global' category", enter_global_block_name$2 = "Enter global block name", eg_header_footer$2 = "Eg: Header, Footer", blocks_selected$2 = "{{length}} blocks selected.", cut$2 = "Cut", copy$3 = "Copy", clear_selection$2 = "Clear Selection", dev_mode_message$2 = "This is dev mode. Visit", to_see_page_preview$2 = "to see page preview", lngEn = {
|
|
6565
6736
|
add_block: add_block$2,
|
|
6566
6737
|
enter_paste_tailwind_html: enter_paste_tailwind_html$2,
|
|
6567
6738
|
click_to_add_block: click_to_add_block$2,
|
|
@@ -7285,7 +7456,254 @@ i18n.use(initReactI18next).init({
|
|
|
7285
7456
|
// react already safes from xss => https://www.i18next.com/translation-function/interpolation#unescape
|
|
7286
7457
|
}
|
|
7287
7458
|
});
|
|
7288
|
-
|
|
7459
|
+
function FaCircleCheck(r) {
|
|
7460
|
+
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z" }, child: [] }] })(r);
|
|
7461
|
+
}
|
|
7462
|
+
function FaFilePen(r) {
|
|
7463
|
+
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V299.6l-94.7 94.7c-8.2 8.2-14 18.5-16.8 29.7l-15 60.1c-2.3 9.4-1.8 19 1.4 27.8H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM549.8 235.7l14.4 14.4c15.6 15.6 15.6 40.9 0 56.6l-29.4 29.4-71-71 29.4-29.4c15.6-15.6 40.9-15.6 56.6 0zM311.9 417L441.1 287.8l71 71L382.9 487.9c-4.1 4.1-9.2 7-14.9 8.4l-60.1 15c-5.5 1.4-11.2-.2-15.2-4.2s-5.6-9.7-4.2-15.2l15-60.1c1.4-5.6 4.3-10.8 8.4-14.9z" }, child: [] }] })(r);
|
|
7464
|
+
}
|
|
7465
|
+
const QUICK_PROMPTS = [
|
|
7466
|
+
{
|
|
7467
|
+
name: "Improve writing",
|
|
7468
|
+
icon: FaFilePen,
|
|
7469
|
+
prompt: "Improving writing in all text elements. Replacing placeholder content with meaningful relevant content."
|
|
7470
|
+
},
|
|
7471
|
+
{
|
|
7472
|
+
name: "Replace placeholder content",
|
|
7473
|
+
icon: FaRecycle,
|
|
7474
|
+
prompt: "Discard current placeholder content and replace with meaningful relevant content."
|
|
7475
|
+
},
|
|
7476
|
+
// {
|
|
7477
|
+
// name: "Change tone",
|
|
7478
|
+
// icon: MegaphoneIcon,
|
|
7479
|
+
// subMenus: ["joyful", "serious", "angry", "sad", "excited", "relaxed", "confident", "assertive", "polite"],
|
|
7480
|
+
// prompt: "Change tone in all text elements. Rewrite all text elements in a more _TONE_ tone.",
|
|
7481
|
+
// },
|
|
7482
|
+
{
|
|
7483
|
+
name: "Fix grammar",
|
|
7484
|
+
icon: CheckIcon,
|
|
7485
|
+
prompt: "Fix grammar in all text elements. Ensuring the text is grammatically correct and free of errors."
|
|
7486
|
+
},
|
|
7487
|
+
// {
|
|
7488
|
+
// name: "Translate",
|
|
7489
|
+
// icon: GlobeIcon,
|
|
7490
|
+
// subMenus: ["English", "Spanish", "French", "German", "Italian", "Portuguese", "Chinese", "Japanese", "Korean"],
|
|
7491
|
+
// prompt: "Translate all text elements to a __LANG__ language.",
|
|
7492
|
+
// },
|
|
7493
|
+
{
|
|
7494
|
+
name: "Make longer",
|
|
7495
|
+
icon: ArrowUpIcon,
|
|
7496
|
+
prompt: "Make all text elements longer."
|
|
7497
|
+
},
|
|
7498
|
+
{
|
|
7499
|
+
name: "Make shorter",
|
|
7500
|
+
icon: ArrowDownIcon,
|
|
7501
|
+
prompt: "Make all text elements shorter."
|
|
7502
|
+
},
|
|
7503
|
+
{
|
|
7504
|
+
name: "Add emojis",
|
|
7505
|
+
icon: SmileIcon,
|
|
7506
|
+
prompt: "Add emojis to text elements if relevant."
|
|
7507
|
+
},
|
|
7508
|
+
{
|
|
7509
|
+
name: "Randomize",
|
|
7510
|
+
icon: ShuffleIcon,
|
|
7511
|
+
prompt: "Randomize all text elements."
|
|
7512
|
+
}
|
|
7513
|
+
];
|
|
7514
|
+
function QuickPrompts({ onClick: r }) {
|
|
7515
|
+
const { loading: n } = useAskAi();
|
|
7516
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: n ? "pointer-events-none opacity-50" : "", children: /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "space-y-2", children: QUICK_PROMPTS.map(
|
|
7517
|
+
({ name: o, icon: a, subMenus: i, prompt: l }) => i ? /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu, { children: [
|
|
7518
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuTrigger, { asChild: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "flex cursor-pointer items-center space-x-2 hover:bg-gray-100", children: [
|
|
7519
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(a, { className: "h-4 w-4" }),
|
|
7520
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: o })
|
|
7521
|
+
] }, o) }),
|
|
7522
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuContent, { children: [
|
|
7523
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuLabel, { children: "My Account" }),
|
|
7524
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuSeparator, {}),
|
|
7525
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuItem, { children: "Profile" }),
|
|
7526
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuItem, { children: "Billing" }),
|
|
7527
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuItem, { children: "Team" }),
|
|
7528
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuItem, { children: "Subscription" })
|
|
7529
|
+
] })
|
|
7530
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
7531
|
+
"li",
|
|
7532
|
+
{
|
|
7533
|
+
onClick: () => r(l),
|
|
7534
|
+
className: "flex cursor-pointer items-center space-x-2 rounded p-1 pl-2 text-sm hover:bg-gray-100",
|
|
7535
|
+
children: [
|
|
7536
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(a, { className: "h-4 w-4" }),
|
|
7537
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: o })
|
|
7538
|
+
]
|
|
7539
|
+
},
|
|
7540
|
+
o
|
|
7541
|
+
)
|
|
7542
|
+
) }) });
|
|
7543
|
+
}
|
|
7544
|
+
const AIUserPrompt = ({ blockId: r }) => {
|
|
7545
|
+
const { t: n } = useTranslation(), { askAi: o, loading: a, error: i } = useAskAi(), [l, c] = useState$1(""), u = useRef$1(null);
|
|
7546
|
+
useEffect$1(() => {
|
|
7547
|
+
var p;
|
|
7548
|
+
(p = u.current) == null || p.focus();
|
|
7549
|
+
}, []);
|
|
7550
|
+
const d = () => {
|
|
7551
|
+
i || c("");
|
|
7552
|
+
};
|
|
7553
|
+
return r ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4", children: [
|
|
7554
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("h2", { className: "mb-2 text-xs font-semibold leading-none tracking-tight text-gray-500", children: [
|
|
7555
|
+
n("Ask AI"),
|
|
7556
|
+
" (GPT-4o mini)"
|
|
7557
|
+
] }),
|
|
7558
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7559
|
+
Textarea,
|
|
7560
|
+
{
|
|
7561
|
+
ref: u,
|
|
7562
|
+
value: l,
|
|
7563
|
+
onChange: (p) => c(p.target.value),
|
|
7564
|
+
placeholder: n("Ask AI to edit content"),
|
|
7565
|
+
className: "w-full border border-gray-400 focus:border-0",
|
|
7566
|
+
rows: 3,
|
|
7567
|
+
onKeyDown: (p) => {
|
|
7568
|
+
p.key === "Enter" && (p.preventDefault(), o("content", r, l, d));
|
|
7569
|
+
}
|
|
7570
|
+
}
|
|
7571
|
+
),
|
|
7572
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "my-2 flex items-center gap-2", children: [
|
|
7573
|
+
a ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7574
|
+
Button$1,
|
|
7575
|
+
{
|
|
7576
|
+
disabled: l.trim().length < 5 || a,
|
|
7577
|
+
onClick: () => o("content", r, l, d),
|
|
7578
|
+
variant: "default",
|
|
7579
|
+
className: "w-fit",
|
|
7580
|
+
size: "sm",
|
|
7581
|
+
children: a ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
7582
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Loader$1, { className: "h-5 w-5 animate-spin" }),
|
|
7583
|
+
n("Generating... Please wait")
|
|
7584
|
+
] }) : n("Edit with AI")
|
|
7585
|
+
}
|
|
7586
|
+
),
|
|
7587
|
+
a ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
7588
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Skeleton, { className: "flex w-full items-center space-x-1 px-4 py-1 pl-2", children: [
|
|
7589
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FaSpinner, { className: "h-4 w-4 animate-spin text-gray-500" }),
|
|
7590
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: n("Generating... Please wait") })
|
|
7591
|
+
] }),
|
|
7592
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { variant: "destructive", onClick: () => stop(), className: "hidden w-fit", size: "sm", children: n("Stop") })
|
|
7593
|
+
] }) : null
|
|
7594
|
+
] }),
|
|
7595
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "max-w-full", children: i && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "break-words rounded border border-red-500 bg-red-100 p-1 text-xs text-red-500", children: i.message }) }),
|
|
7596
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(QuickPrompts, { onClick: (p) => o("content", r, p, d) })
|
|
7597
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
|
|
7598
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SparklesIcon, { className: "mx-auto text-3xl" }),
|
|
7599
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { children: n("no_block_selected_for_ask_ai") })
|
|
7600
|
+
] }) });
|
|
7601
|
+
}, AISetContext = () => {
|
|
7602
|
+
const { t: r } = useTranslation(), n = useBuilderProp("aiContext", ""), [o, a] = useState$1(n), i = useRef$1(null), l = useBuilderProp("saveAiContextCallback", noop$1), [c, u] = useState$1(!1), [d, p] = useState$1(null), [m, g] = useState$1(!1), { toast: h } = useToast(), b = useRef$1(null);
|
|
7603
|
+
useEffect$1(() => {
|
|
7604
|
+
n && a(n);
|
|
7605
|
+
}, [n]);
|
|
7606
|
+
const x = async () => {
|
|
7607
|
+
try {
|
|
7608
|
+
u(!0), p(null), await l(o), h({
|
|
7609
|
+
title: r("AI Context updated"),
|
|
7610
|
+
description: r("You can now ask AI to edit your content"),
|
|
7611
|
+
variant: "default"
|
|
7612
|
+
}), b.current.click();
|
|
7613
|
+
} catch (v) {
|
|
7614
|
+
p(v);
|
|
7615
|
+
} finally {
|
|
7616
|
+
u(!1);
|
|
7617
|
+
}
|
|
7618
|
+
};
|
|
7619
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7620
|
+
Accordion,
|
|
7621
|
+
{
|
|
7622
|
+
onValueChange: (v) => {
|
|
7623
|
+
g(v !== "");
|
|
7624
|
+
},
|
|
7625
|
+
type: "single",
|
|
7626
|
+
collapsible: !0,
|
|
7627
|
+
className: "rounded-md border bg-gray-100 px-2",
|
|
7628
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionItem, { value: "set-context", children: [
|
|
7629
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionTrigger, { ref: b, hideArrow: !0, className: "py-1 hover:no-underline", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-between", children: [
|
|
7630
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-semibold", children: r("AI Context") }),
|
|
7631
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Button$1, { variant: "default", size: "sm", children: [
|
|
7632
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: r(m ? "Cancel" : "Edit") }),
|
|
7633
|
+
" ",
|
|
7634
|
+
m ? /* @__PURE__ */ jsxRuntimeExports.jsx(Cross2Icon, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, { className: "h-4 w-4" })
|
|
7635
|
+
] })
|
|
7636
|
+
] }) }),
|
|
7637
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionContent, { children: [
|
|
7638
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7639
|
+
Textarea,
|
|
7640
|
+
{
|
|
7641
|
+
ref: i,
|
|
7642
|
+
value: o,
|
|
7643
|
+
onChange: (v) => a(v.target.value),
|
|
7644
|
+
placeholder: r("Tell about this page. Eg: This page is about ..."),
|
|
7645
|
+
className: "w-full border border-gray-400 bg-background focus:border",
|
|
7646
|
+
rows: 10,
|
|
7647
|
+
onKeyDown: (v) => {
|
|
7648
|
+
v.key === "Enter" && (v.preventDefault(), x());
|
|
7649
|
+
}
|
|
7650
|
+
}
|
|
7651
|
+
),
|
|
7652
|
+
n.trim().length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-xs text-gray-500", children: r(
|
|
7653
|
+
"Eg: This page is about an AI assistant app called Chai Studio. It allows users to create beautiful webpages and edit content with AI."
|
|
7654
|
+
) }) : null,
|
|
7655
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 flex items-center", children: [
|
|
7656
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7657
|
+
Button$1,
|
|
7658
|
+
{
|
|
7659
|
+
disabled: o.trim().length < 5,
|
|
7660
|
+
onClick: () => x(),
|
|
7661
|
+
variant: "default",
|
|
7662
|
+
className: "w-fit",
|
|
7663
|
+
size: "sm",
|
|
7664
|
+
children: c ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
7665
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Loader$1, { className: "h-5 w-5 animate-spin" }),
|
|
7666
|
+
r("Generating... Please wait")
|
|
7667
|
+
] }) : r("Save")
|
|
7668
|
+
}
|
|
7669
|
+
),
|
|
7670
|
+
n.trim().length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialog, { children: [
|
|
7671
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogTrigger, { asChild: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { disabled: n.trim().length === 0, variant: "ghost", className: "w-fit", size: "sm", children: c ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
7672
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Loader$1, { className: "h-5 w-5 animate-spin" }),
|
|
7673
|
+
r("Generating... Please wait")
|
|
7674
|
+
] }) : r("Delete") }) }),
|
|
7675
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogContent, { children: [
|
|
7676
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogHeader, { children: [
|
|
7677
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogTitle, { children: r("Remove context?") }),
|
|
7678
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogDescription, {})
|
|
7679
|
+
] }),
|
|
7680
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogFooter, { children: [
|
|
7681
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogCancel, { children: r("Cancel") }),
|
|
7682
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7683
|
+
AlertDialogAction,
|
|
7684
|
+
{
|
|
7685
|
+
onClick: () => {
|
|
7686
|
+
a(""), x();
|
|
7687
|
+
},
|
|
7688
|
+
children: "Yes, Delete"
|
|
7689
|
+
}
|
|
7690
|
+
)
|
|
7691
|
+
] })
|
|
7692
|
+
] })
|
|
7693
|
+
] }) : null
|
|
7694
|
+
] }),
|
|
7695
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2 max-w-full", children: d && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "break-words rounded border border-red-500 bg-red-100 p-1 text-xs text-red-500", children: d.message }) })
|
|
7696
|
+
] })
|
|
7697
|
+
] })
|
|
7698
|
+
}
|
|
7699
|
+
);
|
|
7700
|
+
}, AskAI = () => {
|
|
7701
|
+
const [r] = useSelectedBlockIds();
|
|
7702
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute inset-0 z-50 h-full w-full bg-background p-2", children: [
|
|
7703
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AISetContext, {}),
|
|
7704
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AIUserPrompt, { blockId: first(r) })
|
|
7705
|
+
] });
|
|
7706
|
+
}, AttrsEditor = React__default.memo(function r({ preloadedAttributes: n = [], onAttributesChange: o }) {
|
|
7289
7707
|
const [a, i] = useState$1([]), [l, c] = useState$1(""), [u, d] = useState$1(""), [p, m] = useState$1(null), [g, h] = useState$1(""), b = useRef$1(null), x = useRef$1(null);
|
|
7290
7708
|
useEffect$1(() => {
|
|
7291
7709
|
b.current && b.current.focus();
|
|
@@ -8267,9 +8685,9 @@ function requireReactIs_development() {
|
|
|
8267
8685
|
}
|
|
8268
8686
|
}
|
|
8269
8687
|
}
|
|
8270
|
-
var R = d, P = p, I = u, j = c, k = n, O = m, T = a, M = x,
|
|
8688
|
+
var R = d, P = p, I = u, j = c, k = n, O = m, T = a, M = x, L = b, D = o, W = l, J = i, F = g, z = !1;
|
|
8271
8689
|
function q(K) {
|
|
8272
|
-
return
|
|
8690
|
+
return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), H(K) || C(K) === d;
|
|
8273
8691
|
}
|
|
8274
8692
|
function H(K) {
|
|
8275
8693
|
return C(K) === p;
|
|
@@ -8277,7 +8695,7 @@ function requireReactIs_development() {
|
|
|
8277
8695
|
function ee(K) {
|
|
8278
8696
|
return C(K) === u;
|
|
8279
8697
|
}
|
|
8280
|
-
function
|
|
8698
|
+
function V(K) {
|
|
8281
8699
|
return C(K) === c;
|
|
8282
8700
|
}
|
|
8283
8701
|
function U(K) {
|
|
@@ -8307,7 +8725,7 @@ function requireReactIs_development() {
|
|
|
8307
8725
|
function se(K) {
|
|
8308
8726
|
return C(K) === g;
|
|
8309
8727
|
}
|
|
8310
|
-
reactIs_development.AsyncMode = R, reactIs_development.ConcurrentMode = P, reactIs_development.ContextConsumer = I, reactIs_development.ContextProvider = j, reactIs_development.Element = k, reactIs_development.ForwardRef = O, reactIs_development.Fragment = T, reactIs_development.Lazy = M, reactIs_development.Memo =
|
|
8728
|
+
reactIs_development.AsyncMode = R, reactIs_development.ConcurrentMode = P, reactIs_development.ContextConsumer = I, reactIs_development.ContextProvider = j, reactIs_development.Element = k, reactIs_development.ForwardRef = O, reactIs_development.Fragment = T, reactIs_development.Lazy = M, reactIs_development.Memo = L, reactIs_development.Portal = D, reactIs_development.Profiler = W, reactIs_development.StrictMode = J, reactIs_development.Suspense = F, reactIs_development.isAsyncMode = q, reactIs_development.isConcurrentMode = H, reactIs_development.isContextConsumer = ee, reactIs_development.isContextProvider = V, reactIs_development.isElement = U, reactIs_development.isForwardRef = te, reactIs_development.isFragment = _, reactIs_development.isLazy = Q, reactIs_development.isMemo = ne, reactIs_development.isPortal = re, reactIs_development.isProfiler = $, reactIs_development.isStrictMode = ae, reactIs_development.isSuspense = se, reactIs_development.isValidElementType = A, reactIs_development.typeOf = C;
|
|
8311
8729
|
}()), reactIs_development;
|
|
8312
8730
|
}
|
|
8313
8731
|
process.env.NODE_ENV === "production" ? reactIs$1.exports = requireReactIs_production_min() : reactIs$1.exports = requireReactIs_development();
|
|
@@ -10551,16 +10969,16 @@ function extractSystemStyles(r) {
|
|
|
10551
10969
|
tt: O,
|
|
10552
10970
|
td: T,
|
|
10553
10971
|
w: M,
|
|
10554
|
-
miw:
|
|
10972
|
+
miw: L,
|
|
10555
10973
|
maw: D,
|
|
10556
10974
|
h: W,
|
|
10557
10975
|
mih: J,
|
|
10558
10976
|
mah: F,
|
|
10559
|
-
bgsz:
|
|
10977
|
+
bgsz: z,
|
|
10560
10978
|
bgp: q,
|
|
10561
10979
|
bgr: H,
|
|
10562
10980
|
bga: ee,
|
|
10563
|
-
pos:
|
|
10981
|
+
pos: V,
|
|
10564
10982
|
top: U,
|
|
10565
10983
|
left: te,
|
|
10566
10984
|
bottom: _,
|
|
@@ -10640,16 +11058,16 @@ function extractSystemStyles(r) {
|
|
|
10640
11058
|
tt: O,
|
|
10641
11059
|
td: T,
|
|
10642
11060
|
w: M,
|
|
10643
|
-
miw:
|
|
11061
|
+
miw: L,
|
|
10644
11062
|
maw: D,
|
|
10645
11063
|
h: W,
|
|
10646
11064
|
mih: J,
|
|
10647
11065
|
mah: F,
|
|
10648
|
-
bgsz:
|
|
11066
|
+
bgsz: z,
|
|
10649
11067
|
bgp: q,
|
|
10650
11068
|
bgr: H,
|
|
10651
11069
|
bga: ee,
|
|
10652
|
-
pos:
|
|
11070
|
+
pos: V,
|
|
10653
11071
|
top: U,
|
|
10654
11072
|
left: te,
|
|
10655
11073
|
bottom: _,
|
|
@@ -12463,7 +12881,7 @@ const useHover = function(r, n) {
|
|
|
12463
12881
|
W && !R.current ? (clearTimeout(C.current), C.current = setTimeout(() => p(!1), W)) : D && (clearTimeout(C.current), p(!1));
|
|
12464
12882
|
}, [E, p]), M = React.useCallback(() => {
|
|
12465
12883
|
k.current(), R.current = void 0;
|
|
12466
|
-
}, []),
|
|
12884
|
+
}, []), L = React.useCallback(() => {
|
|
12467
12885
|
if (j.current) {
|
|
12468
12886
|
const D = getDocument(x.floating.current).body;
|
|
12469
12887
|
D.style.pointerEvents = "", D.removeAttribute(safePolygonIdentifier), j.current = !1;
|
|
@@ -12475,16 +12893,16 @@ const useHover = function(r, n) {
|
|
|
12475
12893
|
function D() {
|
|
12476
12894
|
return m.current.openEvent ? ["click", "mousedown"].includes(m.current.openEvent.type) : !1;
|
|
12477
12895
|
}
|
|
12478
|
-
function W(
|
|
12896
|
+
function W(z) {
|
|
12479
12897
|
if (clearTimeout(C.current), I.current = !1, l && !isMouseLikePointerType(A.current) || c > 0 && getDelay(E.current, "open") === 0)
|
|
12480
12898
|
return;
|
|
12481
|
-
m.current.openEvent =
|
|
12899
|
+
m.current.openEvent = z;
|
|
12482
12900
|
const q = getDelay(E.current, "open", A.current);
|
|
12483
12901
|
q ? C.current = setTimeout(() => {
|
|
12484
12902
|
p(!0);
|
|
12485
12903
|
}, q) : p(!0);
|
|
12486
12904
|
}
|
|
12487
|
-
function J(
|
|
12905
|
+
function J(z) {
|
|
12488
12906
|
if (D())
|
|
12489
12907
|
return;
|
|
12490
12908
|
k.current();
|
|
@@ -12493,10 +12911,10 @@ const useHover = function(r, n) {
|
|
|
12493
12911
|
d || clearTimeout(C.current), R.current = w.current({
|
|
12494
12912
|
...r,
|
|
12495
12913
|
tree: v,
|
|
12496
|
-
x:
|
|
12497
|
-
y:
|
|
12914
|
+
x: z.clientX,
|
|
12915
|
+
y: z.clientY,
|
|
12498
12916
|
onClose() {
|
|
12499
|
-
|
|
12917
|
+
L(), M(), T();
|
|
12500
12918
|
}
|
|
12501
12919
|
});
|
|
12502
12920
|
const H = R.current;
|
|
@@ -12507,42 +12925,42 @@ const useHover = function(r, n) {
|
|
|
12507
12925
|
}
|
|
12508
12926
|
T();
|
|
12509
12927
|
}
|
|
12510
|
-
function F(
|
|
12928
|
+
function F(z) {
|
|
12511
12929
|
D() || w.current == null || w.current({
|
|
12512
12930
|
...r,
|
|
12513
12931
|
tree: v,
|
|
12514
|
-
x:
|
|
12515
|
-
y:
|
|
12932
|
+
x: z.clientX,
|
|
12933
|
+
y: z.clientY,
|
|
12516
12934
|
onClose() {
|
|
12517
|
-
|
|
12935
|
+
L(), M(), T();
|
|
12518
12936
|
}
|
|
12519
|
-
})(
|
|
12937
|
+
})(z);
|
|
12520
12938
|
}
|
|
12521
12939
|
if (isElement(h)) {
|
|
12522
|
-
const
|
|
12523
|
-
return d &&
|
|
12940
|
+
const z = h;
|
|
12941
|
+
return d && z.addEventListener("mouseleave", F), b == null || b.addEventListener("mouseleave", F), u && z.addEventListener("mousemove", W, {
|
|
12524
12942
|
once: !0
|
|
12525
|
-
}),
|
|
12526
|
-
d &&
|
|
12943
|
+
}), z.addEventListener("mouseenter", W), z.addEventListener("mouseleave", J), () => {
|
|
12944
|
+
d && z.removeEventListener("mouseleave", F), b == null || b.removeEventListener("mouseleave", F), u && z.removeEventListener("mousemove", W), z.removeEventListener("mouseenter", W), z.removeEventListener("mouseleave", J);
|
|
12527
12945
|
};
|
|
12528
12946
|
}
|
|
12529
|
-
}, [h, b, o, r, l, c, u, T, M,
|
|
12947
|
+
}, [h, b, o, r, l, c, u, T, M, L, p, d, v, E, w, m]), index(() => {
|
|
12530
12948
|
var D;
|
|
12531
12949
|
if (o && d && (D = w.current) != null && D.__options.blockPointerEvents && O()) {
|
|
12532
12950
|
const F = getDocument(b).body;
|
|
12533
12951
|
if (F.setAttribute(safePolygonIdentifier, ""), F.style.pointerEvents = "none", j.current = !0, isElement(h) && b) {
|
|
12534
12952
|
var W, J;
|
|
12535
|
-
const
|
|
12536
|
-
return q && (q.style.pointerEvents = ""),
|
|
12537
|
-
|
|
12953
|
+
const z = h, q = v == null || (W = v.nodesRef.current.find((H) => H.id === S)) == null || (J = W.context) == null ? void 0 : J.elements.floating;
|
|
12954
|
+
return q && (q.style.pointerEvents = ""), z.style.pointerEvents = "auto", b.style.pointerEvents = "auto", () => {
|
|
12955
|
+
z.style.pointerEvents = "", b.style.pointerEvents = "";
|
|
12538
12956
|
};
|
|
12539
12957
|
}
|
|
12540
12958
|
}
|
|
12541
12959
|
}, [o, d, S, b, h, v, w, m, O]), index(() => {
|
|
12542
|
-
d || (A.current = void 0, M(),
|
|
12543
|
-
}, [d, M,
|
|
12544
|
-
M(), clearTimeout(C.current), clearTimeout(P.current),
|
|
12545
|
-
}, [o, M,
|
|
12960
|
+
d || (A.current = void 0, M(), L());
|
|
12961
|
+
}, [d, M, L]), React.useEffect(() => () => {
|
|
12962
|
+
M(), clearTimeout(C.current), clearTimeout(P.current), L();
|
|
12963
|
+
}, [o, M, L]), React.useMemo(() => {
|
|
12546
12964
|
if (!o)
|
|
12547
12965
|
return {};
|
|
12548
12966
|
function D(W) {
|
|
@@ -12770,8 +13188,8 @@ const bubbleHandlerKeys = {
|
|
|
12770
13188
|
if (W.length > 0) {
|
|
12771
13189
|
let J = !0;
|
|
12772
13190
|
if (W.forEach((F) => {
|
|
12773
|
-
var
|
|
12774
|
-
if ((
|
|
13191
|
+
var z;
|
|
13192
|
+
if ((z = F.context) != null && z.open && !F.context.dataRef.current.__escapeKeyBubbles) {
|
|
12775
13193
|
J = !1;
|
|
12776
13194
|
return;
|
|
12777
13195
|
}
|
|
@@ -12795,8 +13213,8 @@ const bubbleHandlerKeys = {
|
|
|
12795
13213
|
const J = getTarget(D);
|
|
12796
13214
|
if (isHTMLElement(J) && d) {
|
|
12797
13215
|
const q = d.ownerDocument.defaultView || window, H = J.scrollWidth > J.clientWidth, ee = J.scrollHeight > J.clientHeight;
|
|
12798
|
-
let
|
|
12799
|
-
if (ee && q.getComputedStyle(J).direction === "rtl" && (
|
|
13216
|
+
let V = ee && D.offsetX > J.clientWidth;
|
|
13217
|
+
if (ee && q.getComputedStyle(J).direction === "rtl" && (V = D.offsetX <= J.offsetWidth - J.clientWidth), V || H && D.offsetY > J.clientHeight)
|
|
12800
13218
|
return;
|
|
12801
13219
|
}
|
|
12802
13220
|
const F = E && getChildren(E.nodesRef.current, l).some((q) => {
|
|
@@ -12805,10 +13223,10 @@ const bubbleHandlerKeys = {
|
|
|
12805
13223
|
});
|
|
12806
13224
|
if (isEventTargetWithin(D, d) || isEventTargetWithin(D, u) || F)
|
|
12807
13225
|
return;
|
|
12808
|
-
const
|
|
12809
|
-
if (
|
|
13226
|
+
const z = E ? getChildren(E.nodesRef.current, l) : [];
|
|
13227
|
+
if (z.length > 0) {
|
|
12810
13228
|
let q = !0;
|
|
12811
|
-
if (
|
|
13229
|
+
if (z.forEach((H) => {
|
|
12812
13230
|
var ee;
|
|
12813
13231
|
if ((ee = H.context) != null && ee.open && !H.context.dataRef.current.__outsidePressBubbles) {
|
|
12814
13232
|
q = !1;
|
|
@@ -12831,16 +13249,16 @@ const bubbleHandlerKeys = {
|
|
|
12831
13249
|
}
|
|
12832
13250
|
const M = getDocument(d);
|
|
12833
13251
|
g && M.addEventListener("keydown", k), R && M.addEventListener(b, O);
|
|
12834
|
-
let
|
|
12835
|
-
return S && (isElement(u) && (
|
|
13252
|
+
let L = [];
|
|
13253
|
+
return S && (isElement(u) && (L = getOverflowAncestors(u)), isElement(d) && (L = L.concat(getOverflowAncestors(d))), !isElement(c) && c && c.contextElement && (L = L.concat(getOverflowAncestors(c.contextElement)))), L = L.filter((D) => {
|
|
12836
13254
|
var W;
|
|
12837
13255
|
return D !== ((W = M.defaultView) == null ? void 0 : W.visualViewport);
|
|
12838
|
-
}),
|
|
13256
|
+
}), L.forEach((D) => {
|
|
12839
13257
|
D.addEventListener("scroll", T, {
|
|
12840
13258
|
passive: !0
|
|
12841
13259
|
});
|
|
12842
13260
|
}), () => {
|
|
12843
|
-
g && M.removeEventListener("keydown", k), R && M.removeEventListener(b, O),
|
|
13261
|
+
g && M.removeEventListener("keydown", k), R && M.removeEventListener(b, O), L.forEach((D) => {
|
|
12844
13262
|
D.removeEventListener("scroll", T);
|
|
12845
13263
|
});
|
|
12846
13264
|
};
|
|
@@ -13539,16 +13957,16 @@ function Popover(r) {
|
|
|
13539
13957
|
closeOnClickOutside: O,
|
|
13540
13958
|
withinPortal: T,
|
|
13541
13959
|
portalProps: M,
|
|
13542
|
-
closeOnEscape:
|
|
13960
|
+
closeOnEscape: L,
|
|
13543
13961
|
clickOutsideEvents: D,
|
|
13544
13962
|
trapFocus: W,
|
|
13545
13963
|
onClose: J,
|
|
13546
13964
|
onOpen: F,
|
|
13547
|
-
onChange:
|
|
13965
|
+
onChange: z,
|
|
13548
13966
|
zIndex: q,
|
|
13549
13967
|
radius: H,
|
|
13550
13968
|
shadow: ee,
|
|
13551
|
-
id:
|
|
13969
|
+
id: V,
|
|
13552
13970
|
defaultOpened: U,
|
|
13553
13971
|
__staticSelector: te,
|
|
13554
13972
|
withRoles: _,
|
|
@@ -13594,7 +14012,7 @@ function Popover(r) {
|
|
|
13594
14012
|
"returnFocus",
|
|
13595
14013
|
"variant",
|
|
13596
14014
|
"keepMounted"
|
|
13597
|
-
]), [se, K] = useState$1(null), [Z, le] = useState$1(null), fe = useId$2(
|
|
14015
|
+
]), [se, K] = useState$1(null), [Z, le] = useState$1(null), fe = useId$2(V), Te = useMantineTheme(), be = usePopover({
|
|
13598
14016
|
middlewares: w,
|
|
13599
14017
|
width: S,
|
|
13600
14018
|
position: getFloatingPosition(Te.dir, m),
|
|
@@ -13605,7 +14023,7 @@ function Popover(r) {
|
|
|
13605
14023
|
positionDependencies: b,
|
|
13606
14024
|
opened: x,
|
|
13607
14025
|
defaultOpened: U,
|
|
13608
|
-
onChange:
|
|
14026
|
+
onChange: z,
|
|
13609
14027
|
onOpen: F,
|
|
13610
14028
|
onClose: J
|
|
13611
14029
|
});
|
|
@@ -13642,7 +14060,7 @@ function Popover(r) {
|
|
|
13642
14060
|
zIndex: q,
|
|
13643
14061
|
radius: H,
|
|
13644
14062
|
shadow: ee,
|
|
13645
|
-
closeOnEscape:
|
|
14063
|
+
closeOnEscape: L,
|
|
13646
14064
|
onClose: be.onClose,
|
|
13647
14065
|
onToggle: be.onToggle,
|
|
13648
14066
|
getTargetId: () => `${fe}-target`,
|
|
@@ -13825,7 +14243,7 @@ function useInputProps(r, n, o) {
|
|
|
13825
14243
|
"inputWrapperOrder",
|
|
13826
14244
|
"withAsterisk",
|
|
13827
14245
|
"variant"
|
|
13828
|
-
]), O = useId$2(E), { systemStyles: T, rest: M } = extractSystemStyles(k),
|
|
14246
|
+
]), O = useId$2(E), { systemStyles: T, rest: M } = extractSystemStyles(k), L = __spreadValues$R({
|
|
13829
14247
|
label: i,
|
|
13830
14248
|
description: l,
|
|
13831
14249
|
error: c,
|
|
@@ -13851,7 +14269,7 @@ function useInputProps(r, n, o) {
|
|
|
13851
14269
|
classNames: d,
|
|
13852
14270
|
styles: p,
|
|
13853
14271
|
unstyled: g,
|
|
13854
|
-
wrapperProps: __spreadValues$R(__spreadValues$R({},
|
|
14272
|
+
wrapperProps: __spreadValues$R(__spreadValues$R({}, L), T),
|
|
13855
14273
|
inputProps: {
|
|
13856
14274
|
required: u,
|
|
13857
14275
|
classNames: d,
|
|
@@ -14164,31 +14582,31 @@ const defaultProps$q = {
|
|
|
14164
14582
|
size: S,
|
|
14165
14583
|
variant: P,
|
|
14166
14584
|
__staticSelector: E
|
|
14167
|
-
}, T = typeof R == "boolean" ? R : c, M = u ? `${u}-error` : b == null ? void 0 : b.id,
|
|
14585
|
+
}, T = typeof R == "boolean" ? R : c, M = u ? `${u}-error` : b == null ? void 0 : b.id, L = u ? `${u}-description` : h == null ? void 0 : h.id, W = `${!!d && typeof d != "boolean" ? M : ""} ${p ? L : ""}`, J = W.trim().length > 0 ? W.trim() : void 0, F = i && /* @__PURE__ */ React__default.createElement(InputLabel, __spreadValues$M(__spreadValues$M({
|
|
14168
14586
|
key: "label",
|
|
14169
14587
|
labelElement: m,
|
|
14170
14588
|
id: u ? `${u}-label` : void 0,
|
|
14171
14589
|
htmlFor: u,
|
|
14172
14590
|
required: T
|
|
14173
|
-
}, O), g), i),
|
|
14591
|
+
}, O), g), i), z = p && /* @__PURE__ */ React__default.createElement(InputDescription, __spreadProps$x(__spreadValues$M(__spreadValues$M({
|
|
14174
14592
|
key: "description"
|
|
14175
14593
|
}, h), O), {
|
|
14176
14594
|
size: (h == null ? void 0 : h.size) || O.size,
|
|
14177
|
-
id: (h == null ? void 0 : h.id) ||
|
|
14595
|
+
id: (h == null ? void 0 : h.id) || L
|
|
14178
14596
|
}), p), q = /* @__PURE__ */ React__default.createElement(Fragment, {
|
|
14179
14597
|
key: "input"
|
|
14180
14598
|
}, w(l)), H = typeof d != "boolean" && d && /* @__PURE__ */ React__default.createElement(InputError, __spreadProps$x(__spreadValues$M(__spreadValues$M({}, b), O), {
|
|
14181
14599
|
size: (b == null ? void 0 : b.size) || O.size,
|
|
14182
14600
|
key: "error",
|
|
14183
14601
|
id: (b == null ? void 0 : b.id) || M
|
|
14184
|
-
}), d), ee = C.map((
|
|
14185
|
-
switch (
|
|
14602
|
+
}), d), ee = C.map((V) => {
|
|
14603
|
+
switch (V) {
|
|
14186
14604
|
case "label":
|
|
14187
14605
|
return F;
|
|
14188
14606
|
case "input":
|
|
14189
14607
|
return q;
|
|
14190
14608
|
case "description":
|
|
14191
|
-
return
|
|
14609
|
+
return z;
|
|
14192
14610
|
case "error":
|
|
14193
14611
|
return H;
|
|
14194
14612
|
default:
|
|
@@ -14199,7 +14617,7 @@ const defaultProps$q = {
|
|
|
14199
14617
|
value: __spreadValues$M({
|
|
14200
14618
|
describedBy: J
|
|
14201
14619
|
}, getInputOffsets(C, {
|
|
14202
|
-
hasDescription: !!
|
|
14620
|
+
hasDescription: !!z,
|
|
14203
14621
|
hasError: !!H
|
|
14204
14622
|
}))
|
|
14205
14623
|
}, /* @__PURE__ */ React__default.createElement(Box, __spreadValues$M({
|
|
@@ -14445,7 +14863,7 @@ const defaultProps$o = {
|
|
|
14445
14863
|
"sx",
|
|
14446
14864
|
"unstyled",
|
|
14447
14865
|
"pointer"
|
|
14448
|
-
]), { offsetBottom: k, offsetTop: O, describedBy: T } = useInputWrapperContext(), { classes: M, cx:
|
|
14866
|
+
]), { offsetBottom: k, offsetTop: O, describedBy: T } = useInputWrapperContext(), { classes: M, cx: L } = useStyles$v({
|
|
14449
14867
|
radius: x,
|
|
14450
14868
|
multiline: C,
|
|
14451
14869
|
invalid: !!i,
|
|
@@ -14457,7 +14875,7 @@ const defaultProps$o = {
|
|
|
14457
14875
|
pointer: I
|
|
14458
14876
|
}, { classNames: w, styles: E, name: ["Input", A], unstyled: P, variant: u, size: v }), { systemStyles: D, rest: W } = extractSystemStyles(j);
|
|
14459
14877
|
return /* @__PURE__ */ React__default.createElement(Box, __spreadValues$J(__spreadValues$J({
|
|
14460
|
-
className:
|
|
14878
|
+
className: L(M.wrapper, a),
|
|
14461
14879
|
sx: R,
|
|
14462
14880
|
style: p
|
|
14463
14881
|
}, D), S), d && /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -15821,14 +16239,14 @@ const defaultProps$c = {
|
|
|
15821
16239
|
defaultValue: w,
|
|
15822
16240
|
finalValue: !1,
|
|
15823
16241
|
onChange: E
|
|
15824
|
-
}), M = !!v,
|
|
16242
|
+
}), M = !!v, L = (D) => {
|
|
15825
16243
|
M ? (D.preventDefault(), P == null || P(D), T(!O)) : P == null || P(D);
|
|
15826
16244
|
};
|
|
15827
16245
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(UnstyledButton, __spreadValues$m({
|
|
15828
16246
|
ref: n,
|
|
15829
16247
|
className: k(j.root, u),
|
|
15830
16248
|
"data-active": g || void 0,
|
|
15831
|
-
onClick:
|
|
16249
|
+
onClick: L,
|
|
15832
16250
|
unstyled: m,
|
|
15833
16251
|
"data-expanded": O || void 0,
|
|
15834
16252
|
"data-disabled": R || void 0,
|
|
@@ -16047,7 +16465,7 @@ function TooltipFloating(r) {
|
|
|
16047
16465
|
"zIndex",
|
|
16048
16466
|
"disabled",
|
|
16049
16467
|
"variant"
|
|
16050
|
-
]), { handleMouseMove: I, x: j, y: k, opened: O, boundaryRef: T, floating: M, setOpened:
|
|
16468
|
+
]), { handleMouseMove: I, x: j, y: k, opened: O, boundaryRef: T, floating: M, setOpened: L } = useFloatingTooltip({
|
|
16051
16469
|
offset: v,
|
|
16052
16470
|
position: S
|
|
16053
16471
|
}), { classes: D, cx: W } = useStyles$h({ radius: h, color: b, multiline: w, width: E }, { name: "TooltipFloating", classNames: p, styles: m, unstyled: g, variant: R });
|
|
@@ -16055,10 +16473,10 @@ function TooltipFloating(r) {
|
|
|
16055
16473
|
throw new Error(TOOLTIP_ERRORS.children);
|
|
16056
16474
|
const J = useMergedRef(T, a.ref), F = (q) => {
|
|
16057
16475
|
var H, ee;
|
|
16058
|
-
(ee = (H = a.props).onMouseEnter) == null || ee.call(H, q), I(q),
|
|
16059
|
-
},
|
|
16476
|
+
(ee = (H = a.props).onMouseEnter) == null || ee.call(H, q), I(q), L(!0);
|
|
16477
|
+
}, z = (q) => {
|
|
16060
16478
|
var H, ee;
|
|
16061
|
-
(ee = (H = a.props).onMouseLeave) == null || ee.call(H, q),
|
|
16479
|
+
(ee = (H = a.props).onMouseLeave) == null || ee.call(H, q), L(!1);
|
|
16062
16480
|
};
|
|
16063
16481
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(OptionalPortal, __spreadProps$g(__spreadValues$j({}, c), {
|
|
16064
16482
|
withinPortal: l
|
|
@@ -16074,7 +16492,7 @@ function TooltipFloating(r) {
|
|
|
16074
16492
|
}), x)), cloneElement(a, __spreadProps$g(__spreadValues$j({}, a.props), {
|
|
16075
16493
|
[i]: J,
|
|
16076
16494
|
onMouseEnter: F,
|
|
16077
|
-
onMouseLeave:
|
|
16495
|
+
onMouseLeave: z
|
|
16078
16496
|
})));
|
|
16079
16497
|
}
|
|
16080
16498
|
TooltipFloating.displayName = "@mantine/core/TooltipFloating";
|
|
@@ -16193,16 +16611,16 @@ const defaultProps$9 = {
|
|
|
16193
16611
|
arrowPosition: O,
|
|
16194
16612
|
offset: T,
|
|
16195
16613
|
transitionProps: M,
|
|
16196
|
-
multiline:
|
|
16614
|
+
multiline: L,
|
|
16197
16615
|
width: D,
|
|
16198
16616
|
events: W,
|
|
16199
16617
|
zIndex: J,
|
|
16200
16618
|
disabled: F,
|
|
16201
|
-
positionDependencies:
|
|
16619
|
+
positionDependencies: z,
|
|
16202
16620
|
onClick: q,
|
|
16203
16621
|
onMouseEnter: H,
|
|
16204
16622
|
onMouseLeave: ee,
|
|
16205
|
-
inline:
|
|
16623
|
+
inline: V,
|
|
16206
16624
|
variant: U,
|
|
16207
16625
|
keepMounted: te
|
|
16208
16626
|
} = i, _ = __objRest$d(i, [
|
|
@@ -16242,7 +16660,7 @@ const defaultProps$9 = {
|
|
|
16242
16660
|
"inline",
|
|
16243
16661
|
"variant",
|
|
16244
16662
|
"keepMounted"
|
|
16245
|
-
]), { classes: Q, cx: ne, theme: re } = useStyles$h({ radius: v, color: S, width: D, multiline:
|
|
16663
|
+
]), { classes: Q, cx: ne, theme: re } = useStyles$h({ radius: v, color: S, width: D, multiline: L }, { name: "Tooltip", classNames: w, styles: E, unstyled: A, variant: U }), $ = useTooltip({
|
|
16246
16664
|
position: getFloatingPosition(re.dir, c),
|
|
16247
16665
|
closeDelay: m,
|
|
16248
16666
|
openDelay: p,
|
|
@@ -16252,8 +16670,8 @@ const defaultProps$9 = {
|
|
|
16252
16670
|
arrowRef: a,
|
|
16253
16671
|
arrowOffset: j,
|
|
16254
16672
|
offset: T + (P ? I / 2 : 0),
|
|
16255
|
-
positionDependencies: [...
|
|
16256
|
-
inline:
|
|
16673
|
+
positionDependencies: [...z, l],
|
|
16674
|
+
inline: V
|
|
16257
16675
|
});
|
|
16258
16676
|
if (!isElement$1(l))
|
|
16259
16677
|
throw new Error(TOOLTIP_ERRORS.children);
|
|
@@ -16409,16 +16827,16 @@ const defaultProps$8 = {
|
|
|
16409
16827
|
onSearchChange: O,
|
|
16410
16828
|
searchValue: T,
|
|
16411
16829
|
rightSection: M,
|
|
16412
|
-
rightSectionWidth:
|
|
16830
|
+
rightSectionWidth: L,
|
|
16413
16831
|
creatable: D,
|
|
16414
16832
|
getCreateLabel: W,
|
|
16415
16833
|
shouldCreate: J,
|
|
16416
16834
|
selectOnBlur: F,
|
|
16417
|
-
onCreate:
|
|
16835
|
+
onCreate: z,
|
|
16418
16836
|
dropdownComponent: q,
|
|
16419
16837
|
onDropdownClose: H,
|
|
16420
16838
|
onDropdownOpen: ee,
|
|
16421
|
-
withinPortal:
|
|
16839
|
+
withinPortal: V,
|
|
16422
16840
|
portalProps: U,
|
|
16423
16841
|
switchDirectionOnFlip: te,
|
|
16424
16842
|
zIndex: _,
|
|
@@ -16482,7 +16900,7 @@ const defaultProps$8 = {
|
|
|
16482
16900
|
"readOnly",
|
|
16483
16901
|
"clearButtonProps",
|
|
16484
16902
|
"hoverOnSearchChange"
|
|
16485
|
-
]), { classes: be, cx: Ze, theme: Ne } = useStyles$g(), [ge, He] = useState$1(v), [ke, ve] = useState$1(-1), Ge = useRef$1(), Fe = useRef$1({}), [Je, rt] = useState$1("column"), Ce = Je === "column", { scrollIntoView: De, targetRef:
|
|
16903
|
+
]), { classes: be, cx: Ze, theme: Ne } = useStyles$g(), [ge, He] = useState$1(v), [ke, ve] = useState$1(-1), Ge = useRef$1(), Fe = useRef$1({}), [Je, rt] = useState$1("column"), Ce = Je === "column", { scrollIntoView: De, targetRef: Le, scrollableRef: nt } = useScrollIntoView({
|
|
16486
16904
|
duration: 0,
|
|
16487
16905
|
offset: 5,
|
|
16488
16906
|
cancelable: !1,
|
|
@@ -16522,8 +16940,8 @@ const defaultProps$8 = {
|
|
|
16522
16940
|
if (Ye && (Pe == null ? void 0 : Pe.value) === G.value)
|
|
16523
16941
|
Me(null), Se(!1);
|
|
16524
16942
|
else {
|
|
16525
|
-
if (G.creatable && typeof
|
|
16526
|
-
const ie =
|
|
16943
|
+
if (G.creatable && typeof z == "function") {
|
|
16944
|
+
const ie = z(G.value);
|
|
16527
16945
|
typeof ie < "u" && ie !== null && Me(typeof ie == "string" ? ie : ie.value);
|
|
16528
16946
|
} else
|
|
16529
16947
|
Me(G.value);
|
|
@@ -16549,21 +16967,21 @@ const defaultProps$8 = {
|
|
|
16549
16967
|
useDidUpdate(() => {
|
|
16550
16968
|
ve(fe && Ie ? 0 : -1);
|
|
16551
16969
|
}, [Ie, fe]);
|
|
16552
|
-
const
|
|
16970
|
+
const ze = Re ? he.findIndex((G) => G.value === Re) : 0, we = !Z && (he.length > 0 ? ge : ge && !!I), _e = () => {
|
|
16553
16971
|
ve((G) => {
|
|
16554
16972
|
var ie;
|
|
16555
16973
|
const ue = Qe(G, (de) => de - 1, (de) => de > 0);
|
|
16556
|
-
return
|
|
16974
|
+
return Le.current = Fe.current[(ie = he[ue]) == null ? void 0 : ie.value], we && De({ alignment: Ce ? "start" : "end" }), ue;
|
|
16557
16975
|
});
|
|
16558
16976
|
}, $e = () => {
|
|
16559
16977
|
ve((G) => {
|
|
16560
16978
|
var ie;
|
|
16561
16979
|
const ue = Qe(G, (de) => de + 1, (de) => de < he.length - 1);
|
|
16562
|
-
return
|
|
16980
|
+
return Le.current = Fe.current[(ie = he[ue]) == null ? void 0 : ie.value], we && De({ alignment: Ce ? "end" : "start" }), ue;
|
|
16563
16981
|
});
|
|
16564
16982
|
}, Ke = () => window.setTimeout(() => {
|
|
16565
16983
|
var G;
|
|
16566
|
-
|
|
16984
|
+
Le.current = Fe.current[(G = he[ze]) == null ? void 0 : G.value], De({ alignment: Ce ? "end" : "start" });
|
|
16567
16985
|
}, 50);
|
|
16568
16986
|
useDidUpdate(() => {
|
|
16569
16987
|
we && Ke();
|
|
@@ -16571,11 +16989,11 @@ const defaultProps$8 = {
|
|
|
16571
16989
|
const N = (G) => {
|
|
16572
16990
|
switch (typeof g == "function" && g(G), G.key) {
|
|
16573
16991
|
case "ArrowUp": {
|
|
16574
|
-
G.preventDefault(), ge ? Ce ? _e() : $e() : (ve(
|
|
16992
|
+
G.preventDefault(), ge ? Ce ? _e() : $e() : (ve(ze), Se(!0), Ke());
|
|
16575
16993
|
break;
|
|
16576
16994
|
}
|
|
16577
16995
|
case "ArrowDown": {
|
|
16578
|
-
G.preventDefault(), ge ? Ce ? $e() : _e() : (ve(
|
|
16996
|
+
G.preventDefault(), ge ? Ce ? $e() : _e() : (ve(ze), Se(!0), Ke());
|
|
16579
16997
|
break;
|
|
16580
16998
|
}
|
|
16581
16999
|
case "Home": {
|
|
@@ -16599,7 +17017,7 @@ const defaultProps$8 = {
|
|
|
16599
17017
|
break;
|
|
16600
17018
|
}
|
|
16601
17019
|
case " ": {
|
|
16602
|
-
R || (G.preventDefault(), he[ke] && ge ? je(he[ke]) : (Se(!0), ve(
|
|
17020
|
+
R || (G.preventDefault(), he[ke] && ge ? je(he[ke]) : (Se(!0), ve(ze), Ke()));
|
|
16603
17021
|
break;
|
|
16604
17022
|
}
|
|
16605
17023
|
case "Enter":
|
|
@@ -16614,7 +17032,7 @@ const defaultProps$8 = {
|
|
|
16614
17032
|
}, oe = (G) => {
|
|
16615
17033
|
Z || (Oe(G.currentTarget.value), P && G.currentTarget.value === "" && Me(null), ve(-1), Se(!0));
|
|
16616
17034
|
}, ce = () => {
|
|
16617
|
-
Z || (Se(!ge), Re && !ge && ve(
|
|
17035
|
+
Z || (Se(!ge), Re && !ge && ve(ze));
|
|
16618
17036
|
};
|
|
16619
17037
|
return /* @__PURE__ */ React__default.createElement(Input.Wrapper, __spreadProps$e(__spreadValues$h({}, i), {
|
|
16620
17038
|
__staticSelector: "Select"
|
|
@@ -16622,7 +17040,7 @@ const defaultProps$8 = {
|
|
|
16622
17040
|
opened: we,
|
|
16623
17041
|
transitionProps: x,
|
|
16624
17042
|
shadow: l,
|
|
16625
|
-
withinPortal:
|
|
17043
|
+
withinPortal: V,
|
|
16626
17044
|
portalProps: U,
|
|
16627
17045
|
__staticSelector: "Select",
|
|
16628
17046
|
onDirectionChange: rt,
|
|
@@ -16674,7 +17092,7 @@ const defaultProps$8 = {
|
|
|
16674
17092
|
}), getSelectRightSectionProps({
|
|
16675
17093
|
theme: Ne,
|
|
16676
17094
|
rightSection: M,
|
|
16677
|
-
rightSectionWidth:
|
|
17095
|
+
rightSectionWidth: L,
|
|
16678
17096
|
styles: E,
|
|
16679
17097
|
size: a.size,
|
|
16680
17098
|
shouldClear: P && !!Pe,
|
|
@@ -16832,7 +17250,7 @@ const Thumb = forwardRef$1(({
|
|
|
16832
17250
|
thumbSize: j,
|
|
16833
17251
|
variant: k
|
|
16834
17252
|
}, O) => {
|
|
16835
|
-
const { classes: T, cx: M, theme:
|
|
17253
|
+
const { classes: T, cx: M, theme: L } = useStyles$d({ color: d, disabled: P, thumbSize: j }, { name: "Slider", classNames: p, styles: m, unstyled: I, variant: k, size: g }), [D, W] = useState$1(!1), J = v || l || D || A && C;
|
|
16836
17254
|
return /* @__PURE__ */ React__default.createElement(Box, {
|
|
16837
17255
|
tabIndex: 0,
|
|
16838
17256
|
role: "slider",
|
|
@@ -16852,12 +17270,12 @@ const Thumb = forwardRef$1(({
|
|
|
16852
17270
|
onMouseDown: c,
|
|
16853
17271
|
onKeyDownCapture: u,
|
|
16854
17272
|
onClick: (F) => F.stopPropagation(),
|
|
16855
|
-
style: { [
|
|
17273
|
+
style: { [L.dir === "rtl" ? "right" : "left"]: `${a}%` }
|
|
16856
17274
|
}, R, /* @__PURE__ */ React__default.createElement(Transition, {
|
|
16857
17275
|
mounted: i != null && J,
|
|
16858
17276
|
duration: b,
|
|
16859
17277
|
transition: h,
|
|
16860
|
-
timingFunction: x ||
|
|
17278
|
+
timingFunction: x || L.transitionTimingFunction
|
|
16861
17279
|
}, (F) => /* @__PURE__ */ React__default.createElement("div", {
|
|
16862
17280
|
style: F,
|
|
16863
17281
|
className: T.label
|
|
@@ -17187,7 +17605,7 @@ const defaultProps$7 = {
|
|
|
17187
17605
|
disabled: O,
|
|
17188
17606
|
unstyled: T,
|
|
17189
17607
|
thumbSize: M,
|
|
17190
|
-
scale:
|
|
17608
|
+
scale: L,
|
|
17191
17609
|
inverted: D,
|
|
17192
17610
|
variant: W
|
|
17193
17611
|
} = o, J = __objRest$9(o, [
|
|
@@ -17220,49 +17638,49 @@ const defaultProps$7 = {
|
|
|
17220
17638
|
"scale",
|
|
17221
17639
|
"inverted",
|
|
17222
17640
|
"variant"
|
|
17223
|
-
]), F = x ?? getPrecision(b),
|
|
17641
|
+
]), F = x ?? getPrecision(b), z = useMantineTheme(), [q, H] = useState$1(!1), [ee, V] = useUncontrolled({
|
|
17224
17642
|
value: typeof c == "number" ? clamp$1(c, g, h) : c,
|
|
17225
17643
|
defaultValue: typeof v == "number" ? clamp$1(v, g, h) : v,
|
|
17226
17644
|
finalValue: clamp$1(0, g, h),
|
|
17227
17645
|
onChange: u
|
|
17228
|
-
}), U = useRef$1(ee), te = useRef$1(), _ = useRef$1(), Q = getPosition({ value: ee, min: g, max: h }), ne =
|
|
17646
|
+
}), U = useRef$1(ee), te = useRef$1(), _ = useRef$1(), Q = getPosition({ value: ee, min: g, max: h }), ne = L(ee), re = typeof E == "function" ? E(ne) : E, $ = useCallback$1(({ x: Z }) => {
|
|
17229
17647
|
if (!O) {
|
|
17230
17648
|
const le = getChangeValue({ value: Z, min: g, max: h, step: b, precision: F });
|
|
17231
|
-
|
|
17649
|
+
V(le), U.current = le;
|
|
17232
17650
|
}
|
|
17233
|
-
}, [O, g, h, b, F,
|
|
17651
|
+
}, [O, g, h, b, F, V]), { ref: ae, active: se } = useMove($, { onScrubEnd: () => d == null ? void 0 : d(U.current) }, z.dir), K = (Z) => {
|
|
17234
17652
|
if (!O)
|
|
17235
17653
|
switch (Z.key) {
|
|
17236
17654
|
case "ArrowUp": {
|
|
17237
17655
|
Z.preventDefault(), _.current.focus();
|
|
17238
17656
|
const le = getFloatingValue(Math.min(Math.max(ee + b, g), h), F);
|
|
17239
|
-
d == null || d(le),
|
|
17657
|
+
d == null || d(le), V(le);
|
|
17240
17658
|
break;
|
|
17241
17659
|
}
|
|
17242
17660
|
case "ArrowRight": {
|
|
17243
17661
|
Z.preventDefault(), _.current.focus();
|
|
17244
|
-
const le = getFloatingValue(Math.min(Math.max(
|
|
17245
|
-
d == null || d(le),
|
|
17662
|
+
const le = getFloatingValue(Math.min(Math.max(z.dir === "rtl" ? ee - b : ee + b, g), h), F);
|
|
17663
|
+
d == null || d(le), V(le);
|
|
17246
17664
|
break;
|
|
17247
17665
|
}
|
|
17248
17666
|
case "ArrowDown": {
|
|
17249
17667
|
Z.preventDefault(), _.current.focus();
|
|
17250
17668
|
const le = getFloatingValue(Math.min(Math.max(ee - b, g), h), F);
|
|
17251
|
-
d == null || d(le),
|
|
17669
|
+
d == null || d(le), V(le);
|
|
17252
17670
|
break;
|
|
17253
17671
|
}
|
|
17254
17672
|
case "ArrowLeft": {
|
|
17255
17673
|
Z.preventDefault(), _.current.focus();
|
|
17256
|
-
const le = getFloatingValue(Math.min(Math.max(
|
|
17257
|
-
d == null || d(le),
|
|
17674
|
+
const le = getFloatingValue(Math.min(Math.max(z.dir === "rtl" ? ee + b : ee - b, g), h), F);
|
|
17675
|
+
d == null || d(le), V(le);
|
|
17258
17676
|
break;
|
|
17259
17677
|
}
|
|
17260
17678
|
case "Home": {
|
|
17261
|
-
Z.preventDefault(), _.current.focus(), d == null || d(g),
|
|
17679
|
+
Z.preventDefault(), _.current.focus(), d == null || d(g), V(g);
|
|
17262
17680
|
break;
|
|
17263
17681
|
}
|
|
17264
17682
|
case "End": {
|
|
17265
|
-
Z.preventDefault(), _.current.focus(), d == null || d(h),
|
|
17683
|
+
Z.preventDefault(), _.current.focus(), d == null || d(h), V(h);
|
|
17266
17684
|
break;
|
|
17267
17685
|
}
|
|
17268
17686
|
}
|
|
@@ -17292,7 +17710,7 @@ const defaultProps$7 = {
|
|
|
17292
17710
|
min: g,
|
|
17293
17711
|
max: h,
|
|
17294
17712
|
value: ne,
|
|
17295
|
-
onChange:
|
|
17713
|
+
onChange: V,
|
|
17296
17714
|
classNames: a,
|
|
17297
17715
|
styles: i,
|
|
17298
17716
|
disabled: O,
|
|
@@ -18447,12 +18865,12 @@ function useWindowSplitterPanelGroupBehavior({
|
|
|
18447
18865
|
switch (T.key) {
|
|
18448
18866
|
case "Enter": {
|
|
18449
18867
|
T.preventDefault();
|
|
18450
|
-
const M = v.findIndex((
|
|
18868
|
+
const M = v.findIndex((L) => L.current.id === S);
|
|
18451
18869
|
if (M >= 0) {
|
|
18452
|
-
const
|
|
18870
|
+
const L = v[M], D = i[M];
|
|
18453
18871
|
if (D != null) {
|
|
18454
18872
|
let W = 0;
|
|
18455
|
-
D.toPrecision(PRECISION) <=
|
|
18873
|
+
D.toPrecision(PRECISION) <= L.current.minSize.toPrecision(PRECISION) ? W = c === "horizontal" ? m : p : W = -(c === "horizontal" ? m : p);
|
|
18456
18874
|
const J = adjustByDelta(T, u, S, w, W, i, l.current, null);
|
|
18457
18875
|
i !== J && a(J);
|
|
18458
18876
|
}
|
|
@@ -18709,8 +19127,8 @@ function PanelGroupWithForwardedRef({
|
|
|
18709
19127
|
return F;
|
|
18710
19128
|
},
|
|
18711
19129
|
setLayout: (F) => {
|
|
18712
|
-
const
|
|
18713
|
-
assert(
|
|
19130
|
+
const z = F.reduce((V, U) => V + U, 0);
|
|
19131
|
+
assert(z === 100, "Panel sizes must add up to 100%");
|
|
18714
19132
|
const {
|
|
18715
19133
|
panels: q
|
|
18716
19134
|
} = I.current, H = E.current, ee = panelsMapToSortedArray(q);
|
|
@@ -18729,34 +19147,34 @@ function PanelGroupWithForwardedRef({
|
|
|
18729
19147
|
const {
|
|
18730
19148
|
onLayout: F
|
|
18731
19149
|
} = w.current, {
|
|
18732
|
-
panels:
|
|
19150
|
+
panels: z,
|
|
18733
19151
|
sizes: q
|
|
18734
19152
|
} = I.current;
|
|
18735
19153
|
if (q.length > 0) {
|
|
18736
19154
|
F && F(q);
|
|
18737
|
-
const H = E.current, ee = panelsMapToSortedArray(
|
|
19155
|
+
const H = E.current, ee = panelsMapToSortedArray(z);
|
|
18738
19156
|
callPanelCallbacks(ee, q, H);
|
|
18739
19157
|
}
|
|
18740
19158
|
}, [A]), useIsomorphicLayoutEffect(() => {
|
|
18741
19159
|
if (I.current.sizes.length === x.size)
|
|
18742
19160
|
return;
|
|
18743
|
-
let
|
|
19161
|
+
let z = null;
|
|
18744
19162
|
if (r) {
|
|
18745
19163
|
const q = panelsMapToSortedArray(x);
|
|
18746
|
-
|
|
19164
|
+
z = loadPanelLayout(r, q, d);
|
|
18747
19165
|
}
|
|
18748
|
-
if (
|
|
18749
|
-
C(
|
|
19166
|
+
if (z != null)
|
|
19167
|
+
C(z);
|
|
18750
19168
|
else {
|
|
18751
19169
|
const q = panelsMapToSortedArray(x);
|
|
18752
|
-
let H = 0, ee = 0,
|
|
19170
|
+
let H = 0, ee = 0, V = 0;
|
|
18753
19171
|
if (q.forEach((U) => {
|
|
18754
|
-
|
|
19172
|
+
V += U.current.minSize, U.current.defaultSize === null ? H++ : ee += U.current.defaultSize;
|
|
18755
19173
|
}), ee > 100)
|
|
18756
19174
|
throw new Error("Default panel sizes cannot exceed 100%");
|
|
18757
19175
|
if (q.length > 1 && H === 0 && ee !== 100)
|
|
18758
19176
|
throw new Error("Invalid default sizes specified for panels");
|
|
18759
|
-
if (
|
|
19177
|
+
if (V > 100)
|
|
18760
19178
|
throw new Error("Minimum panel sizes cannot exceed 100%");
|
|
18761
19179
|
C(q.map((U) => U.current.defaultSize === null ? (100 - ee) / H : U.current.defaultSize));
|
|
18762
19180
|
}
|
|
@@ -18768,13 +19186,13 @@ function PanelGroupWithForwardedRef({
|
|
|
18768
19186
|
debounceMap[r] || (debounceMap[r] = debounce(savePanelGroupLayout, 100)), debounceMap[r](r, F, A, d);
|
|
18769
19187
|
}
|
|
18770
19188
|
}, [r, x, A, d]);
|
|
18771
|
-
const j = useCallback((F,
|
|
19189
|
+
const j = useCallback((F, z) => {
|
|
18772
19190
|
const {
|
|
18773
19191
|
panels: q
|
|
18774
19192
|
} = I.current;
|
|
18775
19193
|
return q.size === 0 ? {
|
|
18776
19194
|
flexBasis: 0,
|
|
18777
|
-
flexGrow:
|
|
19195
|
+
flexGrow: z ?? void 0,
|
|
18778
19196
|
flexShrink: 1,
|
|
18779
19197
|
// Without this, Panel sizes may be unintentionally overridden by their content.
|
|
18780
19198
|
overflow: "hidden"
|
|
@@ -18788,54 +19206,54 @@ function PanelGroupWithForwardedRef({
|
|
|
18788
19206
|
// This avoid edge cases like nested iframes.
|
|
18789
19207
|
pointerEvents: i && h !== null ? "none" : void 0
|
|
18790
19208
|
};
|
|
18791
|
-
}, [h, i, A]), k = useCallback((F,
|
|
19209
|
+
}, [h, i, A]), k = useCallback((F, z) => {
|
|
18792
19210
|
v((q) => {
|
|
18793
19211
|
if (q.has(F))
|
|
18794
19212
|
return q;
|
|
18795
19213
|
const H = new Map(q);
|
|
18796
|
-
return H.set(F,
|
|
19214
|
+
return H.set(F, z), H;
|
|
18797
19215
|
});
|
|
18798
19216
|
}, []), O = useCallback((F) => (q) => {
|
|
18799
19217
|
q.preventDefault();
|
|
18800
19218
|
const {
|
|
18801
19219
|
direction: H,
|
|
18802
19220
|
panels: ee,
|
|
18803
|
-
sizes:
|
|
19221
|
+
sizes: V
|
|
18804
19222
|
} = I.current, U = panelsMapToSortedArray(ee), [te, _] = getResizeHandlePanelIds(g, F, U);
|
|
18805
19223
|
if (te == null || _ == null)
|
|
18806
19224
|
return;
|
|
18807
|
-
let Q = getMovement(q, g, F, U, H,
|
|
19225
|
+
let Q = getMovement(q, g, F, U, H, V, S.current);
|
|
18808
19226
|
if (Q === 0)
|
|
18809
19227
|
return;
|
|
18810
19228
|
const re = getPanelGroup(g).getBoundingClientRect(), $ = H === "horizontal";
|
|
18811
19229
|
document.dir === "rtl" && $ && (Q = -Q);
|
|
18812
|
-
const ae = $ ? re.width : re.height, se = Q / ae * 100, K = adjustByDelta(q, ee, te, _, se,
|
|
19230
|
+
const ae = $ ? re.width : re.height, se = Q / ae * 100, K = adjustByDelta(q, ee, te, _, se, V, R.current, S.current), Z = !areEqual(V, K);
|
|
18813
19231
|
if ((isMouseEvent(q) || isTouchEvent(q)) && P.current != se && setGlobalCursorStyle(Z ? $ ? "horizontal" : "vertical" : $ ? Q < 0 ? "horizontal-min" : "horizontal-max" : Q < 0 ? "vertical-min" : "vertical-max"), Z) {
|
|
18814
19232
|
const le = E.current;
|
|
18815
19233
|
C(K), callPanelCallbacks(U, K, le);
|
|
18816
19234
|
}
|
|
18817
19235
|
P.current = se;
|
|
18818
19236
|
}, [g]), T = useCallback((F) => {
|
|
18819
|
-
v((
|
|
18820
|
-
if (!
|
|
18821
|
-
return
|
|
18822
|
-
const q = new Map(
|
|
19237
|
+
v((z) => {
|
|
19238
|
+
if (!z.has(F))
|
|
19239
|
+
return z;
|
|
19240
|
+
const q = new Map(z);
|
|
18823
19241
|
return q.delete(F), q;
|
|
18824
19242
|
});
|
|
18825
19243
|
}, []), M = useCallback((F) => {
|
|
18826
19244
|
const {
|
|
18827
|
-
panels:
|
|
19245
|
+
panels: z,
|
|
18828
19246
|
sizes: q
|
|
18829
|
-
} = I.current, H =
|
|
19247
|
+
} = I.current, H = z.get(F);
|
|
18830
19248
|
if (H == null)
|
|
18831
19249
|
return;
|
|
18832
19250
|
const {
|
|
18833
19251
|
collapsedSize: ee,
|
|
18834
|
-
collapsible:
|
|
19252
|
+
collapsible: V
|
|
18835
19253
|
} = H.current;
|
|
18836
|
-
if (!
|
|
19254
|
+
if (!V)
|
|
18837
19255
|
return;
|
|
18838
|
-
const U = panelsMapToSortedArray(
|
|
19256
|
+
const U = panelsMapToSortedArray(z), te = U.indexOf(H);
|
|
18839
19257
|
if (te < 0)
|
|
18840
19258
|
return;
|
|
18841
19259
|
const _ = q[te];
|
|
@@ -18845,36 +19263,36 @@ function PanelGroupWithForwardedRef({
|
|
|
18845
19263
|
const [Q, ne] = getBeforeAndAfterIds(F, U);
|
|
18846
19264
|
if (Q == null || ne == null)
|
|
18847
19265
|
return;
|
|
18848
|
-
const $ = te === U.length - 1 ? _ : ee - _, ae = adjustByDelta(null,
|
|
19266
|
+
const $ = te === U.length - 1 ? _ : ee - _, ae = adjustByDelta(null, z, Q, ne, $, q, R.current, null);
|
|
18849
19267
|
if (q !== ae) {
|
|
18850
19268
|
const se = E.current;
|
|
18851
19269
|
C(ae), callPanelCallbacks(U, ae, se);
|
|
18852
19270
|
}
|
|
18853
|
-
}, []),
|
|
19271
|
+
}, []), L = useCallback((F) => {
|
|
18854
19272
|
const {
|
|
18855
|
-
panels:
|
|
19273
|
+
panels: z,
|
|
18856
19274
|
sizes: q
|
|
18857
|
-
} = I.current, H =
|
|
19275
|
+
} = I.current, H = z.get(F);
|
|
18858
19276
|
if (H == null)
|
|
18859
19277
|
return;
|
|
18860
19278
|
const {
|
|
18861
19279
|
collapsedSize: ee,
|
|
18862
|
-
minSize:
|
|
18863
|
-
} = H.current, U = R.current.get(F) ||
|
|
19280
|
+
minSize: V
|
|
19281
|
+
} = H.current, U = R.current.get(F) || V;
|
|
18864
19282
|
if (!U)
|
|
18865
19283
|
return;
|
|
18866
|
-
const te = panelsMapToSortedArray(
|
|
19284
|
+
const te = panelsMapToSortedArray(z), _ = te.indexOf(H);
|
|
18867
19285
|
if (_ < 0 || q[_] !== ee)
|
|
18868
19286
|
return;
|
|
18869
19287
|
const [ne, re] = getBeforeAndAfterIds(F, te);
|
|
18870
19288
|
if (ne == null || re == null)
|
|
18871
19289
|
return;
|
|
18872
|
-
const ae = _ === te.length - 1 ? ee - U : U, se = adjustByDelta(null,
|
|
19290
|
+
const ae = _ === te.length - 1 ? ee - U : U, se = adjustByDelta(null, z, ne, re, ae, q, R.current, null);
|
|
18873
19291
|
if (q !== se) {
|
|
18874
19292
|
const K = E.current;
|
|
18875
19293
|
C(se), callPanelCallbacks(te, se, K);
|
|
18876
19294
|
}
|
|
18877
|
-
}, []), D = useCallback((F,
|
|
19295
|
+
}, []), D = useCallback((F, z) => {
|
|
18878
19296
|
const {
|
|
18879
19297
|
panels: q,
|
|
18880
19298
|
sizes: H
|
|
@@ -18882,7 +19300,7 @@ function PanelGroupWithForwardedRef({
|
|
|
18882
19300
|
if (ee == null)
|
|
18883
19301
|
return;
|
|
18884
19302
|
const {
|
|
18885
|
-
collapsedSize:
|
|
19303
|
+
collapsedSize: V,
|
|
18886
19304
|
collapsible: U,
|
|
18887
19305
|
maxSize: te,
|
|
18888
19306
|
minSize: _
|
|
@@ -18890,13 +19308,13 @@ function PanelGroupWithForwardedRef({
|
|
|
18890
19308
|
if (ne < 0)
|
|
18891
19309
|
return;
|
|
18892
19310
|
const re = H[ne];
|
|
18893
|
-
if (re ===
|
|
19311
|
+
if (re === z)
|
|
18894
19312
|
return;
|
|
18895
|
-
U &&
|
|
19313
|
+
U && z === V || (z = Math.min(te, Math.max(_, z)));
|
|
18896
19314
|
const [$, ae] = getBeforeAndAfterIds(F, Q);
|
|
18897
19315
|
if ($ == null || ae == null)
|
|
18898
19316
|
return;
|
|
18899
|
-
const K = ne === Q.length - 1 ? re -
|
|
19317
|
+
const K = ne === Q.length - 1 ? re - z : z - re, Z = adjustByDelta(null, q, $, ae, K, H, R.current, null);
|
|
18900
19318
|
if (H !== Z) {
|
|
18901
19319
|
const le = E.current;
|
|
18902
19320
|
C(Z), callPanelCallbacks(Q, Z, le);
|
|
@@ -18905,18 +19323,18 @@ function PanelGroupWithForwardedRef({
|
|
|
18905
19323
|
activeHandleId: h,
|
|
18906
19324
|
collapsePanel: M,
|
|
18907
19325
|
direction: a,
|
|
18908
|
-
expandPanel:
|
|
19326
|
+
expandPanel: L,
|
|
18909
19327
|
getPanelStyle: j,
|
|
18910
19328
|
groupId: g,
|
|
18911
19329
|
registerPanel: k,
|
|
18912
19330
|
registerResizeHandle: O,
|
|
18913
19331
|
resizePanel: D,
|
|
18914
|
-
startDragging: (F,
|
|
18915
|
-
if (b(F), isMouseEvent(
|
|
19332
|
+
startDragging: (F, z) => {
|
|
19333
|
+
if (b(F), isMouseEvent(z) || isTouchEvent(z)) {
|
|
18916
19334
|
const q = getResizeHandle(F);
|
|
18917
19335
|
S.current = {
|
|
18918
19336
|
dragHandleRect: q.getBoundingClientRect(),
|
|
18919
|
-
dragOffset: getDragOffset(
|
|
19337
|
+
dragOffset: getDragOffset(z, F, a),
|
|
18920
19338
|
sizes: I.current.sizes
|
|
18921
19339
|
};
|
|
18922
19340
|
}
|
|
@@ -18925,7 +19343,7 @@ function PanelGroupWithForwardedRef({
|
|
|
18925
19343
|
resetGlobalCursorStyle(), b(null), S.current = null;
|
|
18926
19344
|
},
|
|
18927
19345
|
unregisterPanel: T
|
|
18928
|
-
}), [h, M, a,
|
|
19346
|
+
}), [h, M, a, L, j, g, k, O, D, T]), J = {
|
|
18929
19347
|
display: "flex",
|
|
18930
19348
|
flexDirection: a === "horizontal" ? "row" : "column",
|
|
18931
19349
|
height: "100%",
|
|
@@ -22479,10 +22897,10 @@ var Prism$1 = function() {
|
|
|
22479
22897
|
C.pattern = RegExp(C.pattern.source, k + "g");
|
|
22480
22898
|
}
|
|
22481
22899
|
for (var O = C.pattern || C, T = x.next, M = v; T !== h.tail && !(S && M >= S.reach); M += T.value.length, T = T.next) {
|
|
22482
|
-
var
|
|
22900
|
+
var L = T.value;
|
|
22483
22901
|
if (h.length > g.length)
|
|
22484
22902
|
return;
|
|
22485
|
-
if (!(
|
|
22903
|
+
if (!(L instanceof i)) {
|
|
22486
22904
|
var D = 1, W;
|
|
22487
22905
|
if (I) {
|
|
22488
22906
|
if (W = l(O, M, g, P), !W || W.index >= g.length)
|
|
@@ -22492,17 +22910,17 @@ var Prism$1 = function() {
|
|
|
22492
22910
|
T = T.next, F += T.value.length;
|
|
22493
22911
|
if (F -= T.value.length, M = F, T.value instanceof i)
|
|
22494
22912
|
continue;
|
|
22495
|
-
for (var
|
|
22496
|
-
D++, F +=
|
|
22497
|
-
D--,
|
|
22498
|
-
} else if (W = l(O, 0,
|
|
22913
|
+
for (var z = T; z !== h.tail && (F < J || typeof z.value == "string"); z = z.next)
|
|
22914
|
+
D++, F += z.value.length;
|
|
22915
|
+
D--, L = g.slice(M, F), W.index -= M;
|
|
22916
|
+
} else if (W = l(O, 0, L, P), !W)
|
|
22499
22917
|
continue;
|
|
22500
|
-
var q = W.index, H = W[0], ee =
|
|
22918
|
+
var q = W.index, H = W[0], ee = L.slice(0, q), V = L.slice(q + H.length), U = M + L.length;
|
|
22501
22919
|
S && U > S.reach && (S.reach = U);
|
|
22502
22920
|
var te = T.prev;
|
|
22503
22921
|
ee && (te = d(h, te, ee), M += ee.length), p(h, te, D);
|
|
22504
22922
|
var _ = new i(w, R ? a.tokenize(H, R) : H, j, H);
|
|
22505
|
-
if (T = d(h, te, _),
|
|
22923
|
+
if (T = d(h, te, _), V && d(h, T, V), D > 1) {
|
|
22506
22924
|
var Q = {
|
|
22507
22925
|
cause: w + "," + A,
|
|
22508
22926
|
reach: U
|
|
@@ -24005,16 +24423,16 @@ prism.languages.sql = {
|
|
|
24005
24423
|
), M = T.indexOf(O);
|
|
24006
24424
|
if (M !== -1) {
|
|
24007
24425
|
++w;
|
|
24008
|
-
var
|
|
24009
|
-
if (
|
|
24426
|
+
var L = T.substring(0, M), D = p(E[O]), W = T.substring(M + O.length), J = [];
|
|
24427
|
+
if (L && J.push(L), J.push(D), W) {
|
|
24010
24428
|
var F = [W];
|
|
24011
24429
|
P(F), J.push.apply(J, F);
|
|
24012
24430
|
}
|
|
24013
24431
|
typeof k == "string" ? (I.splice.apply(I, [j, 1].concat(J)), j += J.length - 1) : k.content = J;
|
|
24014
24432
|
}
|
|
24015
24433
|
} else {
|
|
24016
|
-
var
|
|
24017
|
-
Array.isArray(
|
|
24434
|
+
var z = k.content;
|
|
24435
|
+
Array.isArray(z) ? P(z) : P([z]);
|
|
24018
24436
|
}
|
|
24019
24437
|
}
|
|
24020
24438
|
}
|
|
@@ -25547,7 +25965,7 @@ const prismDefaultProps = {
|
|
|
25547
25965
|
language: l
|
|
25548
25966
|
}), ({
|
|
25549
25967
|
className: M,
|
|
25550
|
-
style:
|
|
25968
|
+
style: L,
|
|
25551
25969
|
tokens: D,
|
|
25552
25970
|
getLineProps: W,
|
|
25553
25971
|
getTokenProps: J
|
|
@@ -25556,14 +25974,14 @@ const prismDefaultProps = {
|
|
|
25556
25974
|
dir: "ltr"
|
|
25557
25975
|
}, /* @__PURE__ */ React__default.createElement("pre", {
|
|
25558
25976
|
className: T(O.code, M),
|
|
25559
|
-
style:
|
|
25977
|
+
style: L,
|
|
25560
25978
|
dir: "ltr"
|
|
25561
|
-
}, D.map((F,
|
|
25562
|
-
var q, H, ee,
|
|
25563
|
-
if (
|
|
25979
|
+
}, D.map((F, z) => {
|
|
25980
|
+
var q, H, ee, V;
|
|
25981
|
+
if (z === D.length - 1 && F.length === 1 && F[0].content === `
|
|
25564
25982
|
`)
|
|
25565
25983
|
return null;
|
|
25566
|
-
const U =
|
|
25984
|
+
const U = z + 1, te = W({ line: F, key: z }), _ = U in h, Q = k === "dark" ? I.fn.rgba(I.fn.themeColor((q = h[U]) == null ? void 0 : q.color, 9), 0.25) : I.fn.themeColor((H = h[U]) == null ? void 0 : H.color, 0);
|
|
25567
25985
|
return /* @__PURE__ */ React__default.createElement("div", __spreadProps$2(__spreadValues$2({}, te), {
|
|
25568
25986
|
className: T(O.line, te.className),
|
|
25569
25987
|
style: __spreadValues$2({}, _ ? { backgroundColor: Q } : null)
|
|
@@ -25572,7 +25990,7 @@ const prismDefaultProps = {
|
|
|
25572
25990
|
style: {
|
|
25573
25991
|
color: _ ? I.fn.themeColor((ee = h[U]) == null ? void 0 : ee.color, k === "dark" ? 5 : 8) : void 0
|
|
25574
25992
|
}
|
|
25575
|
-
}, ((
|
|
25993
|
+
}, ((V = h[U]) == null ? void 0 : V.label) || U), /* @__PURE__ */ React__default.createElement("div", {
|
|
25576
25994
|
className: O.lineContent
|
|
25577
25995
|
}, F.map((ne, re) => {
|
|
25578
25996
|
var $, ae;
|
|
@@ -25895,17 +26313,17 @@ var diffMatchPatch = { exports: {} };
|
|
|
25895
26313
|
}
|
|
25896
26314
|
}
|
|
25897
26315
|
}
|
|
25898
|
-
for (var
|
|
25899
|
-
var T = g +
|
|
25900
|
-
|
|
25901
|
-
for (var D = M -
|
|
26316
|
+
for (var L = -P + C; L <= P - R; L += 2) {
|
|
26317
|
+
var T = g + L, M;
|
|
26318
|
+
L == -P || L != P && x[T - 1] < x[T + 1] ? M = x[T + 1] : M = x[T - 1] + 1;
|
|
26319
|
+
for (var D = M - L; M < d && D < p && l.charAt(d - M - 1) == c.charAt(p - D - 1); )
|
|
25902
26320
|
M++, D++;
|
|
25903
26321
|
if (x[T] = M, M > d)
|
|
25904
26322
|
R += 2;
|
|
25905
26323
|
else if (D > p)
|
|
25906
26324
|
C += 2;
|
|
25907
26325
|
else if (!w) {
|
|
25908
|
-
var j = g + S -
|
|
26326
|
+
var j = g + S - L;
|
|
25909
26327
|
if (j >= 0 && j < h && b[j] != -1) {
|
|
25910
26328
|
var k = b[j], O = g + k - j;
|
|
25911
26329
|
if (M = d - M, k >= M)
|
|
@@ -25978,14 +26396,14 @@ var diffMatchPatch = { exports: {} };
|
|
|
25978
26396
|
var p = this;
|
|
25979
26397
|
function m(A, C, R) {
|
|
25980
26398
|
for (var P = A.substring(R, R + Math.floor(A.length / 4)), I = -1, j = "", k, O, T, M; (I = C.indexOf(P, I + 1)) != -1; ) {
|
|
25981
|
-
var
|
|
26399
|
+
var L = p.diff_commonPrefix(
|
|
25982
26400
|
A.substring(R),
|
|
25983
26401
|
C.substring(I)
|
|
25984
26402
|
), D = p.diff_commonSuffix(
|
|
25985
26403
|
A.substring(0, R),
|
|
25986
26404
|
C.substring(0, I)
|
|
25987
26405
|
);
|
|
25988
|
-
j.length < D +
|
|
26406
|
+
j.length < D + L && (j = C.substring(I - D, I) + C.substring(I, I + L), k = A.substring(0, R - D), O = A.substring(R + L), T = C.substring(0, I - D), M = C.substring(I + L));
|
|
25989
26407
|
}
|
|
25990
26408
|
return j.length * 2 >= A.length ? [
|
|
25991
26409
|
k,
|
|
@@ -26038,8 +26456,8 @@ var diffMatchPatch = { exports: {} };
|
|
|
26038
26456
|
function c(E, A) {
|
|
26039
26457
|
if (!E || !A)
|
|
26040
26458
|
return 6;
|
|
26041
|
-
var C = E.charAt(E.length - 1), R = A.charAt(0), P = C.match(n.nonAlphaNumericRegex_), I = R.match(n.nonAlphaNumericRegex_), j = P && C.match(n.whitespaceRegex_), k = I && R.match(n.whitespaceRegex_), O = j && C.match(n.linebreakRegex_), T = k && R.match(n.linebreakRegex_), M = O && E.match(n.blanklineEndRegex_),
|
|
26042
|
-
return M ||
|
|
26459
|
+
var C = E.charAt(E.length - 1), R = A.charAt(0), P = C.match(n.nonAlphaNumericRegex_), I = R.match(n.nonAlphaNumericRegex_), j = P && C.match(n.whitespaceRegex_), k = I && R.match(n.whitespaceRegex_), O = j && C.match(n.linebreakRegex_), T = k && R.match(n.linebreakRegex_), M = O && E.match(n.blanklineEndRegex_), L = T && A.match(n.blanklineStartRegex_);
|
|
26460
|
+
return M || L ? 5 : O || T ? 4 : P && !j && k ? 3 : j || k ? 2 : P || I ? 1 : 0;
|
|
26043
26461
|
}
|
|
26044
26462
|
for (var u = 1; u < l.length - 1; ) {
|
|
26045
26463
|
if (l[u - 1][0] == i && l[u + 1][0] == i) {
|
|
@@ -28141,14 +28559,14 @@ var require_react_is_production_min = __commonJS({
|
|
|
28141
28559
|
}
|
|
28142
28560
|
}
|
|
28143
28561
|
}
|
|
28144
|
-
var P = p, I = m, j = d, k = u, O = o, T = g, M = i,
|
|
28562
|
+
var P = p, I = m, j = d, k = u, O = o, T = g, M = i, L = v, D = x, W = a, J = c, F = l, z = h, q = !1;
|
|
28145
28563
|
function H(Z) {
|
|
28146
28564
|
return q || (q = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), ee(Z) || R(Z) === p;
|
|
28147
28565
|
}
|
|
28148
28566
|
function ee(Z) {
|
|
28149
28567
|
return R(Z) === m;
|
|
28150
28568
|
}
|
|
28151
|
-
function
|
|
28569
|
+
function V(Z) {
|
|
28152
28570
|
return R(Z) === d;
|
|
28153
28571
|
}
|
|
28154
28572
|
function U(Z) {
|
|
@@ -28181,7 +28599,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
28181
28599
|
function K(Z) {
|
|
28182
28600
|
return R(Z) === h;
|
|
28183
28601
|
}
|
|
28184
|
-
r.AsyncMode = P, r.ConcurrentMode = I, r.ContextConsumer = j, r.ContextProvider = k, r.Element = O, r.ForwardRef = T, r.Fragment = M, r.Lazy =
|
|
28602
|
+
r.AsyncMode = P, r.ConcurrentMode = I, r.ContextConsumer = j, r.ContextProvider = k, r.Element = O, r.ForwardRef = T, r.Fragment = M, r.Lazy = L, r.Memo = D, r.Portal = W, r.Profiler = J, r.StrictMode = F, r.Suspense = z, r.isAsyncMode = H, r.isConcurrentMode = ee, r.isContextConsumer = V, r.isContextProvider = U, r.isElement = te, r.isForwardRef = _, r.isFragment = Q, r.isLazy = ne, r.isMemo = re, r.isPortal = $, r.isProfiler = ae, r.isStrictMode = se, r.isSuspense = K, r.isValidElementType = C, r.typeOf = R;
|
|
28185
28603
|
}();
|
|
28186
28604
|
}
|
|
28187
28605
|
}), require_react_is = __commonJS({
|
|
@@ -28307,8 +28725,8 @@ var require_react_is_production_min = __commonJS({
|
|
|
28307
28725
|
}
|
|
28308
28726
|
n.exports = function(p, m) {
|
|
28309
28727
|
var g = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
|
|
28310
|
-
function b(
|
|
28311
|
-
var U =
|
|
28728
|
+
function b(V) {
|
|
28729
|
+
var U = V && (g && V[g] || V[h]);
|
|
28312
28730
|
if (typeof U == "function")
|
|
28313
28731
|
return U;
|
|
28314
28732
|
}
|
|
@@ -28333,14 +28751,14 @@ var require_react_is_production_min = __commonJS({
|
|
|
28333
28751
|
shape: D,
|
|
28334
28752
|
exact: W
|
|
28335
28753
|
};
|
|
28336
|
-
function S(
|
|
28337
|
-
return
|
|
28754
|
+
function S(V, U) {
|
|
28755
|
+
return V === U ? V !== 0 || 1 / V === 1 / U : V !== V && U !== U;
|
|
28338
28756
|
}
|
|
28339
|
-
function w(
|
|
28340
|
-
this.message =
|
|
28757
|
+
function w(V, U) {
|
|
28758
|
+
this.message = V, this.data = U && typeof U == "object" ? U : {}, this.stack = "";
|
|
28341
28759
|
}
|
|
28342
28760
|
w.prototype = Error.prototype;
|
|
28343
|
-
function E(
|
|
28761
|
+
function E(V) {
|
|
28344
28762
|
if (process.env.NODE_ENV !== "production")
|
|
28345
28763
|
var U = {}, te = 0;
|
|
28346
28764
|
function _(ne, re, $, ae, se, K, Z) {
|
|
@@ -28358,19 +28776,19 @@ var require_react_is_production_min = __commonJS({
|
|
|
28358
28776
|
), U[fe] = !0, te++);
|
|
28359
28777
|
}
|
|
28360
28778
|
}
|
|
28361
|
-
return re[$] == null ? ne ? re[$] === null ? new w("The " + se + " `" + K + "` is marked as required " + ("in `" + ae + "`, but its value is `null`.")) : new w("The " + se + " `" + K + "` is marked as required in " + ("`" + ae + "`, but its value is `undefined`.")) : null :
|
|
28779
|
+
return re[$] == null ? ne ? re[$] === null ? new w("The " + se + " `" + K + "` is marked as required " + ("in `" + ae + "`, but its value is `null`.")) : new w("The " + se + " `" + K + "` is marked as required in " + ("`" + ae + "`, but its value is `undefined`.")) : null : V(re, $, ae, se, K);
|
|
28362
28780
|
}
|
|
28363
28781
|
var Q = _.bind(null, !1);
|
|
28364
28782
|
return Q.isRequired = _.bind(null, !0), Q;
|
|
28365
28783
|
}
|
|
28366
|
-
function A(
|
|
28784
|
+
function A(V) {
|
|
28367
28785
|
function U(te, _, Q, ne, re, $) {
|
|
28368
|
-
var ae = te[_], se =
|
|
28369
|
-
if (se !==
|
|
28786
|
+
var ae = te[_], se = z(ae);
|
|
28787
|
+
if (se !== V) {
|
|
28370
28788
|
var K = q(ae);
|
|
28371
28789
|
return new w(
|
|
28372
|
-
"Invalid " + ne + " `" + re + "` of type " + ("`" + K + "` supplied to `" + Q + "`, expected ") + ("`" +
|
|
28373
|
-
{ expectedType:
|
|
28790
|
+
"Invalid " + ne + " `" + re + "` of type " + ("`" + K + "` supplied to `" + Q + "`, expected ") + ("`" + V + "`."),
|
|
28791
|
+
{ expectedType: V }
|
|
28374
28792
|
);
|
|
28375
28793
|
}
|
|
28376
28794
|
return null;
|
|
@@ -28380,17 +28798,17 @@ var require_react_is_production_min = __commonJS({
|
|
|
28380
28798
|
function C() {
|
|
28381
28799
|
return E(d);
|
|
28382
28800
|
}
|
|
28383
|
-
function R(
|
|
28801
|
+
function R(V) {
|
|
28384
28802
|
function U(te, _, Q, ne, re) {
|
|
28385
|
-
if (typeof
|
|
28803
|
+
if (typeof V != "function")
|
|
28386
28804
|
return new w("Property `" + re + "` of component `" + Q + "` has invalid PropType notation inside arrayOf.");
|
|
28387
28805
|
var $ = te[_];
|
|
28388
28806
|
if (!Array.isArray($)) {
|
|
28389
|
-
var ae =
|
|
28807
|
+
var ae = z($);
|
|
28390
28808
|
return new w("Invalid " + ne + " `" + re + "` of type " + ("`" + ae + "` supplied to `" + Q + "`, expected an array."));
|
|
28391
28809
|
}
|
|
28392
28810
|
for (var se = 0; se < $.length; se++) {
|
|
28393
|
-
var K =
|
|
28811
|
+
var K = V($, se, Q, ne, re + "[" + se + "]", i);
|
|
28394
28812
|
if (K instanceof Error)
|
|
28395
28813
|
return K;
|
|
28396
28814
|
}
|
|
@@ -28399,47 +28817,47 @@ var require_react_is_production_min = __commonJS({
|
|
|
28399
28817
|
return E(U);
|
|
28400
28818
|
}
|
|
28401
28819
|
function P() {
|
|
28402
|
-
function
|
|
28820
|
+
function V(U, te, _, Q, ne) {
|
|
28403
28821
|
var re = U[te];
|
|
28404
28822
|
if (!p(re)) {
|
|
28405
|
-
var $ =
|
|
28823
|
+
var $ = z(re);
|
|
28406
28824
|
return new w("Invalid " + Q + " `" + ne + "` of type " + ("`" + $ + "` supplied to `" + _ + "`, expected a single ReactElement."));
|
|
28407
28825
|
}
|
|
28408
28826
|
return null;
|
|
28409
28827
|
}
|
|
28410
|
-
return E(
|
|
28828
|
+
return E(V);
|
|
28411
28829
|
}
|
|
28412
28830
|
function I() {
|
|
28413
|
-
function
|
|
28831
|
+
function V(U, te, _, Q, ne) {
|
|
28414
28832
|
var re = U[te];
|
|
28415
28833
|
if (!o.isValidElementType(re)) {
|
|
28416
|
-
var $ =
|
|
28834
|
+
var $ = z(re);
|
|
28417
28835
|
return new w("Invalid " + Q + " `" + ne + "` of type " + ("`" + $ + "` supplied to `" + _ + "`, expected a single ReactElement type."));
|
|
28418
28836
|
}
|
|
28419
28837
|
return null;
|
|
28420
28838
|
}
|
|
28421
|
-
return E(
|
|
28839
|
+
return E(V);
|
|
28422
28840
|
}
|
|
28423
|
-
function j(
|
|
28841
|
+
function j(V) {
|
|
28424
28842
|
function U(te, _, Q, ne, re) {
|
|
28425
|
-
if (!(te[_] instanceof
|
|
28426
|
-
var $ =
|
|
28843
|
+
if (!(te[_] instanceof V)) {
|
|
28844
|
+
var $ = V.name || x, ae = ee(te[_]);
|
|
28427
28845
|
return new w("Invalid " + ne + " `" + re + "` of type " + ("`" + ae + "` supplied to `" + Q + "`, expected ") + ("instance of `" + $ + "`."));
|
|
28428
28846
|
}
|
|
28429
28847
|
return null;
|
|
28430
28848
|
}
|
|
28431
28849
|
return E(U);
|
|
28432
28850
|
}
|
|
28433
|
-
function k(
|
|
28434
|
-
if (!Array.isArray(
|
|
28851
|
+
function k(V) {
|
|
28852
|
+
if (!Array.isArray(V))
|
|
28435
28853
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? u(
|
|
28436
28854
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
28437
28855
|
) : u("Invalid argument supplied to oneOf, expected an array.")), d;
|
|
28438
28856
|
function U(te, _, Q, ne, re) {
|
|
28439
|
-
for (var $ = te[_], ae = 0; ae <
|
|
28440
|
-
if (S($,
|
|
28857
|
+
for (var $ = te[_], ae = 0; ae < V.length; ae++)
|
|
28858
|
+
if (S($, V[ae]))
|
|
28441
28859
|
return null;
|
|
28442
|
-
var se = JSON.stringify(
|
|
28860
|
+
var se = JSON.stringify(V, function(Z, le) {
|
|
28443
28861
|
var fe = q(le);
|
|
28444
28862
|
return fe === "symbol" ? String(le) : le;
|
|
28445
28863
|
});
|
|
@@ -28447,16 +28865,16 @@ var require_react_is_production_min = __commonJS({
|
|
|
28447
28865
|
}
|
|
28448
28866
|
return E(U);
|
|
28449
28867
|
}
|
|
28450
|
-
function O(
|
|
28868
|
+
function O(V) {
|
|
28451
28869
|
function U(te, _, Q, ne, re) {
|
|
28452
|
-
if (typeof
|
|
28870
|
+
if (typeof V != "function")
|
|
28453
28871
|
return new w("Property `" + re + "` of component `" + Q + "` has invalid PropType notation inside objectOf.");
|
|
28454
|
-
var $ = te[_], ae =
|
|
28872
|
+
var $ = te[_], ae = z($);
|
|
28455
28873
|
if (ae !== "object")
|
|
28456
28874
|
return new w("Invalid " + ne + " `" + re + "` of type " + ("`" + ae + "` supplied to `" + Q + "`, expected an object."));
|
|
28457
28875
|
for (var se in $)
|
|
28458
28876
|
if (l($, se)) {
|
|
28459
|
-
var K =
|
|
28877
|
+
var K = V($, se, Q, ne, re + "." + se, i);
|
|
28460
28878
|
if (K instanceof Error)
|
|
28461
28879
|
return K;
|
|
28462
28880
|
}
|
|
@@ -28464,19 +28882,19 @@ var require_react_is_production_min = __commonJS({
|
|
|
28464
28882
|
}
|
|
28465
28883
|
return E(U);
|
|
28466
28884
|
}
|
|
28467
|
-
function T(
|
|
28468
|
-
if (!Array.isArray(
|
|
28885
|
+
function T(V) {
|
|
28886
|
+
if (!Array.isArray(V))
|
|
28469
28887
|
return process.env.NODE_ENV !== "production" && u("Invalid argument supplied to oneOfType, expected an instance of array."), d;
|
|
28470
|
-
for (var U = 0; U <
|
|
28471
|
-
var te =
|
|
28888
|
+
for (var U = 0; U < V.length; U++) {
|
|
28889
|
+
var te = V[U];
|
|
28472
28890
|
if (typeof te != "function")
|
|
28473
28891
|
return u(
|
|
28474
28892
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + H(te) + " at index " + U + "."
|
|
28475
28893
|
), d;
|
|
28476
28894
|
}
|
|
28477
28895
|
function _(Q, ne, re, $, ae) {
|
|
28478
|
-
for (var se = [], K = 0; K <
|
|
28479
|
-
var Z =
|
|
28896
|
+
for (var se = [], K = 0; K < V.length; K++) {
|
|
28897
|
+
var Z = V[K], le = Z(Q, ne, re, $, ae, i);
|
|
28480
28898
|
if (le == null)
|
|
28481
28899
|
return null;
|
|
28482
28900
|
le.data && l(le.data, "expectedType") && se.push(le.data.expectedType);
|
|
@@ -28487,25 +28905,25 @@ var require_react_is_production_min = __commonJS({
|
|
|
28487
28905
|
return E(_);
|
|
28488
28906
|
}
|
|
28489
28907
|
function M() {
|
|
28490
|
-
function
|
|
28908
|
+
function V(U, te, _, Q, ne) {
|
|
28491
28909
|
return J(U[te]) ? null : new w("Invalid " + Q + " `" + ne + "` supplied to " + ("`" + _ + "`, expected a ReactNode."));
|
|
28492
28910
|
}
|
|
28493
|
-
return E(
|
|
28911
|
+
return E(V);
|
|
28494
28912
|
}
|
|
28495
|
-
function
|
|
28913
|
+
function L(V, U, te, _, Q) {
|
|
28496
28914
|
return new w(
|
|
28497
|
-
(
|
|
28915
|
+
(V || "React class") + ": " + U + " type `" + te + "." + _ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + Q + "`."
|
|
28498
28916
|
);
|
|
28499
28917
|
}
|
|
28500
|
-
function D(
|
|
28918
|
+
function D(V) {
|
|
28501
28919
|
function U(te, _, Q, ne, re) {
|
|
28502
|
-
var $ = te[_], ae =
|
|
28920
|
+
var $ = te[_], ae = z($);
|
|
28503
28921
|
if (ae !== "object")
|
|
28504
28922
|
return new w("Invalid " + ne + " `" + re + "` of type `" + ae + "` " + ("supplied to `" + Q + "`, expected `object`."));
|
|
28505
|
-
for (var se in
|
|
28506
|
-
var K =
|
|
28923
|
+
for (var se in V) {
|
|
28924
|
+
var K = V[se];
|
|
28507
28925
|
if (typeof K != "function")
|
|
28508
|
-
return
|
|
28926
|
+
return L(Q, ne, re, se, q(K));
|
|
28509
28927
|
var Z = K($, se, Q, ne, re + "." + se, i);
|
|
28510
28928
|
if (Z)
|
|
28511
28929
|
return Z;
|
|
@@ -28514,20 +28932,20 @@ var require_react_is_production_min = __commonJS({
|
|
|
28514
28932
|
}
|
|
28515
28933
|
return E(U);
|
|
28516
28934
|
}
|
|
28517
|
-
function W(
|
|
28935
|
+
function W(V) {
|
|
28518
28936
|
function U(te, _, Q, ne, re) {
|
|
28519
|
-
var $ = te[_], ae =
|
|
28937
|
+
var $ = te[_], ae = z($);
|
|
28520
28938
|
if (ae !== "object")
|
|
28521
28939
|
return new w("Invalid " + ne + " `" + re + "` of type `" + ae + "` " + ("supplied to `" + Q + "`, expected `object`."));
|
|
28522
|
-
var se = a({}, te[_],
|
|
28940
|
+
var se = a({}, te[_], V);
|
|
28523
28941
|
for (var K in se) {
|
|
28524
|
-
var Z =
|
|
28525
|
-
if (l(
|
|
28526
|
-
return
|
|
28942
|
+
var Z = V[K];
|
|
28943
|
+
if (l(V, K) && typeof Z != "function")
|
|
28944
|
+
return L(Q, ne, re, K, q(Z));
|
|
28527
28945
|
if (!Z)
|
|
28528
28946
|
return new w(
|
|
28529
28947
|
"Invalid " + ne + " `" + re + "` key `" + K + "` supplied to `" + Q + "`.\nBad object: " + JSON.stringify(te[_], null, " ") + `
|
|
28530
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
28948
|
+
Valid keys: ` + JSON.stringify(Object.keys(V), null, " ")
|
|
28531
28949
|
);
|
|
28532
28950
|
var le = Z($, K, Q, ne, re + "." + K, i);
|
|
28533
28951
|
if (le)
|
|
@@ -28537,23 +28955,23 @@ Valid keys: ` + JSON.stringify(Object.keys(L), null, " ")
|
|
|
28537
28955
|
}
|
|
28538
28956
|
return E(U);
|
|
28539
28957
|
}
|
|
28540
|
-
function J(
|
|
28541
|
-
switch (typeof
|
|
28958
|
+
function J(V) {
|
|
28959
|
+
switch (typeof V) {
|
|
28542
28960
|
case "number":
|
|
28543
28961
|
case "string":
|
|
28544
28962
|
case "undefined":
|
|
28545
28963
|
return !0;
|
|
28546
28964
|
case "boolean":
|
|
28547
|
-
return !
|
|
28965
|
+
return !V;
|
|
28548
28966
|
case "object":
|
|
28549
|
-
if (Array.isArray(
|
|
28550
|
-
return
|
|
28551
|
-
if (
|
|
28967
|
+
if (Array.isArray(V))
|
|
28968
|
+
return V.every(J);
|
|
28969
|
+
if (V === null || p(V))
|
|
28552
28970
|
return !0;
|
|
28553
|
-
var U = b(
|
|
28971
|
+
var U = b(V);
|
|
28554
28972
|
if (U) {
|
|
28555
|
-
var te = U.call(
|
|
28556
|
-
if (U !==
|
|
28973
|
+
var te = U.call(V), _;
|
|
28974
|
+
if (U !== V.entries) {
|
|
28557
28975
|
for (; !(_ = te.next()).done; )
|
|
28558
28976
|
if (!J(_.value))
|
|
28559
28977
|
return !1;
|
|
@@ -28570,27 +28988,27 @@ Valid keys: ` + JSON.stringify(Object.keys(L), null, " ")
|
|
|
28570
28988
|
return !1;
|
|
28571
28989
|
}
|
|
28572
28990
|
}
|
|
28573
|
-
function F(
|
|
28574
|
-
return
|
|
28991
|
+
function F(V, U) {
|
|
28992
|
+
return V === "symbol" ? !0 : U ? U["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && U instanceof Symbol : !1;
|
|
28575
28993
|
}
|
|
28576
|
-
function V
|
|
28577
|
-
var U = typeof
|
|
28578
|
-
return Array.isArray(
|
|
28994
|
+
function z(V) {
|
|
28995
|
+
var U = typeof V;
|
|
28996
|
+
return Array.isArray(V) ? "array" : V instanceof RegExp ? "object" : F(U, V) ? "symbol" : U;
|
|
28579
28997
|
}
|
|
28580
|
-
function q(
|
|
28581
|
-
if (typeof
|
|
28582
|
-
return "" +
|
|
28583
|
-
var U = V
|
|
28998
|
+
function q(V) {
|
|
28999
|
+
if (typeof V > "u" || V === null)
|
|
29000
|
+
return "" + V;
|
|
29001
|
+
var U = z(V);
|
|
28584
29002
|
if (U === "object") {
|
|
28585
|
-
if (
|
|
29003
|
+
if (V instanceof Date)
|
|
28586
29004
|
return "date";
|
|
28587
|
-
if (
|
|
29005
|
+
if (V instanceof RegExp)
|
|
28588
29006
|
return "regexp";
|
|
28589
29007
|
}
|
|
28590
29008
|
return U;
|
|
28591
29009
|
}
|
|
28592
|
-
function H(
|
|
28593
|
-
var U = q(
|
|
29010
|
+
function H(V) {
|
|
29011
|
+
var U = q(V);
|
|
28594
29012
|
switch (U) {
|
|
28595
29013
|
case "array":
|
|
28596
29014
|
case "object":
|
|
@@ -28603,8 +29021,8 @@ Valid keys: ` + JSON.stringify(Object.keys(L), null, " ")
|
|
|
28603
29021
|
return U;
|
|
28604
29022
|
}
|
|
28605
29023
|
}
|
|
28606
|
-
function ee(
|
|
28607
|
-
return !
|
|
29024
|
+
function ee(V) {
|
|
29025
|
+
return !V.constructor || !V.constructor.name ? x : V.constructor.name;
|
|
28608
29026
|
}
|
|
28609
29027
|
return v.checkPropTypes = c, v.resetWarningCache = c.resetWarningCache, v.PropTypes = v, v;
|
|
28610
29028
|
};
|
|
@@ -29713,8 +30131,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
29713
30131
|
r.mocha = n(T);
|
|
29714
30132
|
var M = require_monokai();
|
|
29715
30133
|
r.monokai = n(M);
|
|
29716
|
-
var
|
|
29717
|
-
r.ocean = n(
|
|
30134
|
+
var L = require_ocean();
|
|
30135
|
+
r.ocean = n(L);
|
|
29718
30136
|
var D = require_paraiso();
|
|
29719
30137
|
r.paraiso = n(D);
|
|
29720
30138
|
var W = require_pop();
|
|
@@ -29723,16 +30141,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
29723
30141
|
r.railscasts = n(J);
|
|
29724
30142
|
var F = require_shapeshifter();
|
|
29725
30143
|
r.shapeshifter = n(F);
|
|
29726
|
-
var
|
|
29727
|
-
r.solarized = n(
|
|
30144
|
+
var z = require_solarized();
|
|
30145
|
+
r.solarized = n(z);
|
|
29728
30146
|
var q = require_summerfruit();
|
|
29729
30147
|
r.summerfruit = n(q);
|
|
29730
30148
|
var H = require_tomorrow();
|
|
29731
30149
|
r.tomorrow = n(H);
|
|
29732
30150
|
var ee = require_tube();
|
|
29733
30151
|
r.tube = n(ee);
|
|
29734
|
-
var
|
|
29735
|
-
r.twilight = n(
|
|
30152
|
+
var V = require_twilight();
|
|
30153
|
+
r.twilight = n(V);
|
|
29736
30154
|
}
|
|
29737
30155
|
}), require_color_name = __commonJS({
|
|
29738
30156
|
"node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(r, n) {
|
|
@@ -30767,7 +31185,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
30767
31185
|
["partial", p],
|
|
30768
31186
|
["partialRight", m],
|
|
30769
31187
|
["rearg", h]
|
|
30770
|
-
], A = "[object Function]", C = "[object GeneratorFunction]", R = "[object Symbol]", P = /[\\^$.*+?()[\]{}|]/g, I = /^\s+|\s+$/g, j = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, k = /\{\n\/\* \[wrapped with (.+)\] \*/, O = /,? & /, T = /^[-+]0x[0-9a-f]+$/i, M = /^0b[01]+$/i,
|
|
31188
|
+
], A = "[object Function]", C = "[object GeneratorFunction]", R = "[object Symbol]", P = /[\\^$.*+?()[\]{}|]/g, I = /^\s+|\s+$/g, j = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, k = /\{\n\/\* \[wrapped with (.+)\] \*/, O = /,? & /, T = /^[-+]0x[0-9a-f]+$/i, M = /^0b[01]+$/i, L = /^\[object .+?Constructor\]$/, D = /^0o[0-7]+$/i, W = /^(?:0|[1-9]\d*)$/, J = parseInt, F = typeof global == "object" && global && global.Object === Object && global, z = typeof self == "object" && self && self.Object === Object && self, q = F || z || Function("return this")();
|
|
30771
31189
|
function H(N, B, Y) {
|
|
30772
31190
|
switch (Y.length) {
|
|
30773
31191
|
case 0:
|
|
@@ -30786,7 +31204,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
30786
31204
|
;
|
|
30787
31205
|
return N;
|
|
30788
31206
|
}
|
|
30789
|
-
function
|
|
31207
|
+
function V(N, B) {
|
|
30790
31208
|
var Y = N ? N.length : 0;
|
|
30791
31209
|
return !!Y && te(N, B, 0) > -1;
|
|
30792
31210
|
}
|
|
@@ -30846,7 +31264,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
30846
31264
|
function ve(N) {
|
|
30847
31265
|
if (!je(N) || Me(N))
|
|
30848
31266
|
return !1;
|
|
30849
|
-
var B = st(N) || re(N) ? be :
|
|
31267
|
+
var B = st(N) || re(N) ? be : L;
|
|
30850
31268
|
return B.test(Ie(N));
|
|
30851
31269
|
}
|
|
30852
31270
|
function Ge(N, B, Y, oe) {
|
|
@@ -30916,7 +31334,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
30916
31334
|
return Ye(
|
|
30917
31335
|
N,
|
|
30918
31336
|
B,
|
|
30919
|
-
|
|
31337
|
+
Le,
|
|
30920
31338
|
ce.placeholder,
|
|
30921
31339
|
void 0,
|
|
30922
31340
|
ie,
|
|
@@ -30930,7 +31348,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
30930
31348
|
}
|
|
30931
31349
|
return ce;
|
|
30932
31350
|
}
|
|
30933
|
-
function
|
|
31351
|
+
function Le(N, B, Y, oe, ce, G, ie, ue, de, me) {
|
|
30934
31352
|
var pe = B & g, xe = B & i, ye = B & l, Ee = B & (u | d), it = B & b, et = ye ? void 0 : Ce(N);
|
|
30935
31353
|
function tt() {
|
|
30936
31354
|
for (var Be = arguments.length, Ae = Array(Be), lt = Be; lt--; )
|
|
@@ -30942,7 +31360,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
30942
31360
|
return Ye(
|
|
30943
31361
|
N,
|
|
30944
31362
|
B,
|
|
30945
|
-
|
|
31363
|
+
Le,
|
|
30946
31364
|
tt.placeholder,
|
|
30947
31365
|
Y,
|
|
30948
31366
|
Ae,
|
|
@@ -30998,7 +31416,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
30998
31416
|
if (N = ye[0], B = ye[1], Y = ye[2], oe = ye[3], ce = ye[4], ue = ye[9] = ye[9] == null ? de ? 0 : N.length : Ne(ye[9] - me, 0), !ue && B & (u | d) && (B &= ~(u | d)), !B || B == i)
|
|
30999
31417
|
var Ee = rt(N, B, Y);
|
|
31000
31418
|
else
|
|
31001
|
-
B == u || B == d ? Ee = De(N, B, ue) : (B == p || B == (i | p)) && !ce.length ? Ee = nt(N, B, Y, oe) : Ee =
|
|
31419
|
+
B == u || B == d ? Ee = De(N, B, ue) : (B == p || B == (i | p)) && !ce.length ? Ee = nt(N, B, Y, oe) : Ee = Le.apply(void 0, ye);
|
|
31002
31420
|
return Pe(Ee, N, B);
|
|
31003
31421
|
}
|
|
31004
31422
|
function qe(N) {
|
|
@@ -31056,7 +31474,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
31056
31474
|
function at(N, B) {
|
|
31057
31475
|
return ee(E, function(Y) {
|
|
31058
31476
|
var oe = "_." + Y[0];
|
|
31059
|
-
B & Y[1] && !
|
|
31477
|
+
B & Y[1] && !V(N, oe) && N.push(oe);
|
|
31060
31478
|
}), N.sort();
|
|
31061
31479
|
}
|
|
31062
31480
|
function Oe(N, B, Y) {
|
|
@@ -31078,7 +31496,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
31078
31496
|
function Qe(N) {
|
|
31079
31497
|
return typeof N == "symbol" || he(N) && Te.call(N) == R;
|
|
31080
31498
|
}
|
|
31081
|
-
function
|
|
31499
|
+
function ze(N) {
|
|
31082
31500
|
if (!N)
|
|
31083
31501
|
return N === 0 ? N : 0;
|
|
31084
31502
|
if (N = _e(N), N === x || N === -x) {
|
|
@@ -31088,7 +31506,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
31088
31506
|
return N === N ? N : 0;
|
|
31089
31507
|
}
|
|
31090
31508
|
function we(N) {
|
|
31091
|
-
var B =
|
|
31509
|
+
var B = ze(N), Y = B % 1;
|
|
31092
31510
|
return B === B ? Y ? B - Y : B : 0;
|
|
31093
31511
|
}
|
|
31094
31512
|
function _e(N) {
|
|
@@ -33391,255 +33809,7 @@ const FEATURE_TOGGLES = {
|
|
|
33391
33809
|
const i = first(r);
|
|
33392
33810
|
isString$1(i) && (a = [i, ...getParentNodeIds(n, i)]), o(a);
|
|
33393
33811
|
}, [r, n, o]);
|
|
33394
|
-
}
|
|
33395
|
-
function FaCircleCheck(r) {
|
|
33396
|
-
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z" }, child: [] }] })(r);
|
|
33397
|
-
}
|
|
33398
|
-
function FaFilePen(r) {
|
|
33399
|
-
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V299.6l-94.7 94.7c-8.2 8.2-14 18.5-16.8 29.7l-15 60.1c-2.3 9.4-1.8 19 1.4 27.8H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM549.8 235.7l14.4 14.4c15.6 15.6 15.6 40.9 0 56.6l-29.4 29.4-71-71 29.4-29.4c15.6-15.6 40.9-15.6 56.6 0zM311.9 417L441.1 287.8l71 71L382.9 487.9c-4.1 4.1-9.2 7-14.9 8.4l-60.1 15c-5.5 1.4-11.2-.2-15.2-4.2s-5.6-9.7-4.2-15.2l15-60.1c1.4-5.6 4.3-10.8 8.4-14.9z" }, child: [] }] })(r);
|
|
33400
|
-
}
|
|
33401
|
-
const QUICK_PROMPTS = [
|
|
33402
|
-
{
|
|
33403
|
-
name: "Improve writing",
|
|
33404
|
-
icon: FaFilePen,
|
|
33405
|
-
prompt: "Improving writing in all text elements. Replacing placeholder content with meaningful relevant content."
|
|
33406
|
-
},
|
|
33407
|
-
{
|
|
33408
|
-
name: "Replace placeholder content",
|
|
33409
|
-
icon: FaRecycle,
|
|
33410
|
-
prompt: "Discard current placeholder content and replace with meaningful relevant content."
|
|
33411
|
-
},
|
|
33412
|
-
// {
|
|
33413
|
-
// name: "Change tone",
|
|
33414
|
-
// icon: MegaphoneIcon,
|
|
33415
|
-
// subMenus: ["joyful", "serious", "angry", "sad", "excited", "relaxed", "confident", "assertive", "polite"],
|
|
33416
|
-
// prompt: "Change tone in all text elements. Rewrite all text elements in a more _TONE_ tone.",
|
|
33417
|
-
// },
|
|
33418
|
-
{
|
|
33419
|
-
name: "Fix grammar",
|
|
33420
|
-
icon: CheckIcon,
|
|
33421
|
-
prompt: "Fix grammar in all text elements. Ensuring the text is grammatically correct and free of errors."
|
|
33422
|
-
},
|
|
33423
|
-
// {
|
|
33424
|
-
// name: "Translate",
|
|
33425
|
-
// icon: GlobeIcon,
|
|
33426
|
-
// subMenus: ["English", "Spanish", "French", "German", "Italian", "Portuguese", "Chinese", "Japanese", "Korean"],
|
|
33427
|
-
// prompt: "Translate all text elements to a __LANG__ language.",
|
|
33428
|
-
// },
|
|
33429
|
-
{
|
|
33430
|
-
name: "Make longer",
|
|
33431
|
-
icon: ArrowUpIcon,
|
|
33432
|
-
prompt: "Make all text elements longer."
|
|
33433
|
-
},
|
|
33434
|
-
{
|
|
33435
|
-
name: "Make shorter",
|
|
33436
|
-
icon: ArrowDownIcon,
|
|
33437
|
-
prompt: "Make all text elements shorter."
|
|
33438
|
-
},
|
|
33439
|
-
{
|
|
33440
|
-
name: "Add emojis",
|
|
33441
|
-
icon: SmileIcon,
|
|
33442
|
-
prompt: "Add emojis to text elements if relevant."
|
|
33443
|
-
},
|
|
33444
|
-
{
|
|
33445
|
-
name: "Randomize",
|
|
33446
|
-
icon: ShuffleIcon,
|
|
33447
|
-
prompt: "Randomize all text elements."
|
|
33448
|
-
}
|
|
33449
|
-
];
|
|
33450
|
-
function QuickPrompts({ onClick: r }) {
|
|
33451
|
-
const { loading: n } = useAskAi();
|
|
33452
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: n ? "pointer-events-none opacity-50" : "", children: /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "space-y-2", children: QUICK_PROMPTS.map(
|
|
33453
|
-
({ name: o, icon: a, subMenus: i, prompt: l }) => i ? /* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenu, { children: [
|
|
33454
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuTrigger, { asChild: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "flex cursor-pointer items-center space-x-2 hover:bg-gray-100", children: [
|
|
33455
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(a, { className: "h-4 w-4" }),
|
|
33456
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: o })
|
|
33457
|
-
] }, o) }),
|
|
33458
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(DropdownMenuContent, { children: [
|
|
33459
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuLabel, { children: "My Account" }),
|
|
33460
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuSeparator, {}),
|
|
33461
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuItem, { children: "Profile" }),
|
|
33462
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuItem, { children: "Billing" }),
|
|
33463
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuItem, { children: "Team" }),
|
|
33464
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuItem, { children: "Subscription" })
|
|
33465
|
-
] })
|
|
33466
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
33467
|
-
"li",
|
|
33468
|
-
{
|
|
33469
|
-
onClick: () => r(l),
|
|
33470
|
-
className: "flex cursor-pointer items-center space-x-2 rounded p-1 pl-2 text-sm hover:bg-gray-100",
|
|
33471
|
-
children: [
|
|
33472
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(a, { className: "h-4 w-4" }),
|
|
33473
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: o })
|
|
33474
|
-
]
|
|
33475
|
-
},
|
|
33476
|
-
o
|
|
33477
|
-
)
|
|
33478
|
-
) }) });
|
|
33479
|
-
}
|
|
33480
|
-
const AskAIPrompt = ({ blockId: r }) => {
|
|
33481
|
-
const { t: n } = useTranslation(), { askAi: o, loading: a, error: i } = useAskAi(), [l, c] = useState$1(""), u = useRef$1(null);
|
|
33482
|
-
useEffect$1(() => {
|
|
33483
|
-
var p;
|
|
33484
|
-
(p = u.current) == null || p.focus();
|
|
33485
|
-
}, []);
|
|
33486
|
-
const d = () => {
|
|
33487
|
-
i || c("");
|
|
33488
|
-
};
|
|
33489
|
-
return r ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4", children: [
|
|
33490
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("h2", { className: "mb-2 text-xs font-semibold leading-none tracking-tight text-gray-500", children: [
|
|
33491
|
-
n("Ask AI"),
|
|
33492
|
-
" (GPT-4o mini)"
|
|
33493
|
-
] }),
|
|
33494
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33495
|
-
Textarea,
|
|
33496
|
-
{
|
|
33497
|
-
ref: u,
|
|
33498
|
-
value: l,
|
|
33499
|
-
onChange: (p) => c(p.target.value),
|
|
33500
|
-
placeholder: n("Ask AI to edit content"),
|
|
33501
|
-
className: "w-full border border-gray-400 focus:border-0",
|
|
33502
|
-
rows: 3,
|
|
33503
|
-
onKeyDown: (p) => {
|
|
33504
|
-
p.key === "Enter" && (p.preventDefault(), o("content", r, l, d));
|
|
33505
|
-
}
|
|
33506
|
-
}
|
|
33507
|
-
),
|
|
33508
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "my-2 flex items-center gap-2", children: [
|
|
33509
|
-
a ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33510
|
-
Button$1,
|
|
33511
|
-
{
|
|
33512
|
-
disabled: l.trim().length < 5 || a,
|
|
33513
|
-
onClick: () => o("content", r, l, d),
|
|
33514
|
-
variant: "default",
|
|
33515
|
-
className: "w-fit",
|
|
33516
|
-
size: "sm",
|
|
33517
|
-
children: a ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
33518
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Loader$1, { className: "h-5 w-5 animate-spin" }),
|
|
33519
|
-
n("Generating... Please wait")
|
|
33520
|
-
] }) : n("Edit with AI")
|
|
33521
|
-
}
|
|
33522
|
-
),
|
|
33523
|
-
a ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
33524
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Skeleton, { className: "flex w-full items-center space-x-1 px-4 py-1 pl-2", children: [
|
|
33525
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(FaSpinner, { className: "h-4 w-4 animate-spin text-gray-500" }),
|
|
33526
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs", children: n("Generating... Please wait") })
|
|
33527
|
-
] }),
|
|
33528
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { variant: "destructive", onClick: () => stop(), className: "hidden w-fit", size: "sm", children: n("Stop") })
|
|
33529
|
-
] }) : null
|
|
33530
|
-
] }),
|
|
33531
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "max-w-full", children: i && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "break-words rounded border border-red-500 bg-red-100 p-1 text-xs text-red-500", children: i.message }) }),
|
|
33532
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(QuickPrompts, { onClick: (p) => o("content", r, p, d) })
|
|
33533
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
|
|
33534
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SparklesIcon, { className: "mx-auto text-3xl" }),
|
|
33535
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { children: n("no_block_selected_for_ask_ai") })
|
|
33536
|
-
] }) });
|
|
33537
|
-
}, SetAiContext = ({ onOpen: r }) => {
|
|
33538
|
-
const { t: n } = useTranslation(), o = useBuilderProp("aiContext", ""), [a, i] = useState$1(o), l = useRef$1(null), c = useBuilderProp("saveAiContextCallback", noop$1), [u, d] = useState$1(!1), [p, m] = useState$1(null), [g, h] = useState$1(!1), { toast: b } = useToast(), x = useRef$1(null);
|
|
33539
|
-
useEffect$1(() => {
|
|
33540
|
-
o && i(o);
|
|
33541
|
-
}, [o]);
|
|
33542
|
-
const v = async () => {
|
|
33543
|
-
try {
|
|
33544
|
-
d(!0), m(null), await c(a), b({
|
|
33545
|
-
title: n("AI Context updated"),
|
|
33546
|
-
description: n("You can now ask AI to edit your content"),
|
|
33547
|
-
variant: "default"
|
|
33548
|
-
}), x.current.click();
|
|
33549
|
-
} catch (S) {
|
|
33550
|
-
m(S);
|
|
33551
|
-
} finally {
|
|
33552
|
-
d(!1);
|
|
33553
|
-
}
|
|
33554
|
-
};
|
|
33555
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33556
|
-
Accordion,
|
|
33557
|
-
{
|
|
33558
|
-
onValueChange: (S) => {
|
|
33559
|
-
r(S !== ""), h(S !== "");
|
|
33560
|
-
},
|
|
33561
|
-
type: "single",
|
|
33562
|
-
collapsible: !0,
|
|
33563
|
-
className: "rounded-md border bg-gray-100 px-2",
|
|
33564
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionItem, { value: "set-context", children: [
|
|
33565
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionTrigger, { ref: x, hideArrow: !0, className: "py-1 hover:no-underline", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex w-full items-center justify-between", children: [
|
|
33566
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-semibold", children: n("AI Context") }),
|
|
33567
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Button$1, { variant: "default", size: "sm", children: [
|
|
33568
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: n(g ? "Cancel" : "Edit") }),
|
|
33569
|
-
" ",
|
|
33570
|
-
g ? /* @__PURE__ */ jsxRuntimeExports.jsx(Cross2Icon, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, { className: "h-4 w-4" })
|
|
33571
|
-
] })
|
|
33572
|
-
] }) }),
|
|
33573
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionContent, { children: [
|
|
33574
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33575
|
-
Textarea,
|
|
33576
|
-
{
|
|
33577
|
-
ref: l,
|
|
33578
|
-
value: a,
|
|
33579
|
-
onChange: (S) => i(S.target.value),
|
|
33580
|
-
placeholder: n("Tell about this page. Eg: This page is about ..."),
|
|
33581
|
-
className: "w-full border border-gray-400 bg-background focus:border",
|
|
33582
|
-
rows: 10,
|
|
33583
|
-
onKeyDown: (S) => {
|
|
33584
|
-
S.key === "Enter" && (S.preventDefault(), v());
|
|
33585
|
-
}
|
|
33586
|
-
}
|
|
33587
|
-
),
|
|
33588
|
-
o.trim().length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-xs text-gray-500", children: n(
|
|
33589
|
-
"Eg: This page is about an AI assistant app called Chai Studio. It allows users to create beautiful webpages and edit content with AI."
|
|
33590
|
-
) }) : null,
|
|
33591
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 flex items-center", children: [
|
|
33592
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33593
|
-
Button$1,
|
|
33594
|
-
{
|
|
33595
|
-
disabled: a.trim().length < 5,
|
|
33596
|
-
onClick: () => v(),
|
|
33597
|
-
variant: "default",
|
|
33598
|
-
className: "w-fit",
|
|
33599
|
-
size: "sm",
|
|
33600
|
-
children: u ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
33601
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Loader$1, { className: "h-5 w-5 animate-spin" }),
|
|
33602
|
-
n("Generating... Please wait")
|
|
33603
|
-
] }) : n("Save")
|
|
33604
|
-
}
|
|
33605
|
-
),
|
|
33606
|
-
o.trim().length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialog, { children: [
|
|
33607
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogTrigger, { asChild: !0, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { disabled: o.trim().length === 0, variant: "ghost", className: "w-fit", size: "sm", children: u ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
33608
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Loader$1, { className: "h-5 w-5 animate-spin" }),
|
|
33609
|
-
n("Generating... Please wait")
|
|
33610
|
-
] }) : n("Delete") }) }),
|
|
33611
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogContent, { children: [
|
|
33612
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogHeader, { children: [
|
|
33613
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogTitle, { children: n("Remove context?") }),
|
|
33614
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogDescription, {})
|
|
33615
|
-
] }),
|
|
33616
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogFooter, { children: [
|
|
33617
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogCancel, { children: n("Cancel") }),
|
|
33618
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33619
|
-
AlertDialogAction,
|
|
33620
|
-
{
|
|
33621
|
-
onClick: () => {
|
|
33622
|
-
i(""), v();
|
|
33623
|
-
},
|
|
33624
|
-
children: "Yes, Delete"
|
|
33625
|
-
}
|
|
33626
|
-
)
|
|
33627
|
-
] })
|
|
33628
|
-
] })
|
|
33629
|
-
] }) : null
|
|
33630
|
-
] }),
|
|
33631
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2 max-w-full", children: p && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "break-words rounded border border-red-500 bg-red-100 p-1 text-xs text-red-500", children: p.message }) })
|
|
33632
|
-
] })
|
|
33633
|
-
] })
|
|
33634
|
-
}
|
|
33635
|
-
);
|
|
33636
|
-
}, AskAI = () => {
|
|
33637
|
-
const [r] = useSelectedBlockIds(), [n, o] = useState$1(!1);
|
|
33638
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute inset-0 z-50 h-full w-full bg-background p-2", children: [
|
|
33639
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(SetAiContext, { onOpen: (a) => o(a) }),
|
|
33640
|
-
n ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(AskAIPrompt, { blockId: first(r) })
|
|
33641
|
-
] });
|
|
33642
|
-
}, SidePanels = lazy(() => import("./SidePanels-YpRrvfiH.js")), TopBar = lazy(() => import("./Topbar-kVBx7pp4.js")), CanvasArea = lazy(() => import("./CanvasArea-kg3Rgg9t.js")), SettingsPanel = lazy(() => import("./SettingsPanel-pomLrOxB.js")), useAutoSave = () => {
|
|
33812
|
+
}, SidePanels = lazy(() => import("./SidePanels-miYmxJN0.js")), TopBar = lazy(() => import("./Topbar-J3_SbpA_.js")), CanvasArea = lazy(() => import("./CanvasArea-jo84KvNu.js")), SettingsPanel = lazy(() => import("./SettingsPanel-ukU3Ay9U.js")), useAutoSave = () => {
|
|
33643
33813
|
const { savePage: r } = useSavePage(), n = useBuilderProp("autoSaveSupport", !0), o = useBuilderProp("autoSaveInterval", 60);
|
|
33644
33814
|
useIntervalEffect(() => {
|
|
33645
33815
|
n && r();
|
|
@@ -33742,21 +33912,18 @@ function DarkMode() {
|
|
|
33742
33912
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FaMoon, { className: "size-4 ml-3 shrink-0" })
|
|
33743
33913
|
] });
|
|
33744
33914
|
}
|
|
33745
|
-
const TabletIcon = ({ landscape: r = !1 }) => /* @__PURE__ */ jsxRuntimeExports.
|
|
33915
|
+
const TabletIcon = ({ landscape: r = !1 }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33746
33916
|
"svg",
|
|
33747
33917
|
{
|
|
33748
|
-
className:
|
|
33749
|
-
|
|
33750
|
-
viewBox: "0 0 13 13",
|
|
33751
|
-
xmlSpace: "preserve",
|
|
33752
|
-
width: 13,
|
|
33918
|
+
className: r ? "rotate-90" : "",
|
|
33919
|
+
stroke: "currentColor",
|
|
33753
33920
|
fill: "currentColor",
|
|
33754
|
-
|
|
33755
|
-
|
|
33756
|
-
|
|
33757
|
-
|
|
33758
|
-
|
|
33759
|
-
|
|
33921
|
+
strokeWidth: "0",
|
|
33922
|
+
viewBox: "0 0 448 512",
|
|
33923
|
+
height: "14px",
|
|
33924
|
+
width: "14px",
|
|
33925
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
33926
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M400 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM224 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm176-108c0 6.6-5.4 12-12 12H60c-6.6 0-12-5.4-12-12V60c0-6.6 5.4-12 12-12h328c6.6 0 12 5.4 12 12v312z" })
|
|
33760
33927
|
}
|
|
33761
33928
|
), WEB_BREAKPOINTS = [
|
|
33762
33929
|
{
|
|
@@ -33861,50 +34028,53 @@ const TabletIcon = ({ landscape: r = !1 }) => /* @__PURE__ */ jsxRuntimeExports.
|
|
|
33861
34028
|
] });
|
|
33862
34029
|
};
|
|
33863
34030
|
export {
|
|
33864
|
-
|
|
33865
|
-
|
|
34031
|
+
useHiddenBlockIds as $,
|
|
34032
|
+
AISetContext as A,
|
|
33866
34033
|
Breakpoints as B,
|
|
33867
34034
|
ChaiBuilderEditor as C,
|
|
33868
34035
|
DarkMode as D,
|
|
33869
34036
|
ErrorBoundary$2 as E,
|
|
33870
34037
|
FaCircleCheck as F,
|
|
33871
|
-
|
|
33872
|
-
|
|
34038
|
+
getBlocksFromHTML as G,
|
|
34039
|
+
useBlocksStore as H,
|
|
33873
34040
|
ImportHTML$1 as I,
|
|
33874
34041
|
JsonView as J,
|
|
33875
|
-
|
|
34042
|
+
useUndoManager as K,
|
|
33876
34043
|
ListTree$1 as L,
|
|
33877
|
-
|
|
33878
|
-
|
|
33879
|
-
|
|
33880
|
-
|
|
33881
|
-
|
|
33882
|
-
|
|
34044
|
+
useBuilderReset as M,
|
|
34045
|
+
useReadOnlyMode as N,
|
|
34046
|
+
useActiveModal as O,
|
|
34047
|
+
useAddClassesToBlocks as P,
|
|
34048
|
+
useCanvasWidth as Q,
|
|
34049
|
+
useCopyBlockIds as R,
|
|
33883
34050
|
StaticCanvas$1 as S,
|
|
33884
34051
|
ThemeConfigPanel$1 as T,
|
|
33885
34052
|
UndoRedo as U,
|
|
33886
|
-
|
|
33887
|
-
|
|
33888
|
-
|
|
33889
|
-
|
|
33890
|
-
|
|
33891
|
-
|
|
34053
|
+
useCopyToClipboard as V,
|
|
34054
|
+
useCurrentPage as W,
|
|
34055
|
+
useCutBlockIds as X,
|
|
34056
|
+
useDarkMode as Y,
|
|
34057
|
+
useDuplicateBlocks as Z,
|
|
34058
|
+
useGetPageData as _,
|
|
33892
34059
|
allExpanded as a,
|
|
33893
|
-
|
|
33894
|
-
|
|
33895
|
-
|
|
33896
|
-
|
|
33897
|
-
|
|
33898
|
-
|
|
33899
|
-
|
|
33900
|
-
|
|
33901
|
-
|
|
33902
|
-
|
|
33903
|
-
|
|
33904
|
-
|
|
33905
|
-
|
|
33906
|
-
|
|
33907
|
-
|
|
34060
|
+
usePasteBlocks as a0,
|
|
34061
|
+
useBrandingOptions as a1,
|
|
34062
|
+
useRemoveBlocks as a2,
|
|
34063
|
+
useRemoveClassesFromBlocks as a3,
|
|
34064
|
+
useSelectedBlockCurrentClasses as a4,
|
|
34065
|
+
useSelectedBlockAllClasses as a5,
|
|
34066
|
+
useStylingBreakpoint as a6,
|
|
34067
|
+
useUILibraryBlocks as a7,
|
|
34068
|
+
useStylingState as a8,
|
|
34069
|
+
useSelectedBlocksDisplayChild as a9,
|
|
34070
|
+
useAllBlocks as aa,
|
|
34071
|
+
useActivePanel as ab,
|
|
34072
|
+
useAddBlockParent as ac,
|
|
34073
|
+
useSelectedBreakpoints as ad,
|
|
34074
|
+
ThemeConfigPanel$2 as ae,
|
|
34075
|
+
ListTree$2 as af,
|
|
34076
|
+
ImagesPanel$2 as ag,
|
|
34077
|
+
UILibrariesPanel$2 as ah,
|
|
33908
34078
|
builderSaveStateAtom as b,
|
|
33909
34079
|
useBuilderProp as c,
|
|
33910
34080
|
defaultStyles as d,
|
|
@@ -33926,8 +34096,8 @@ export {
|
|
|
33926
34096
|
useHighlightBlockId as t,
|
|
33927
34097
|
usePageDataProviders as u,
|
|
33928
34098
|
showPredefinedBlockCategoryAtom as v,
|
|
33929
|
-
|
|
33930
|
-
|
|
33931
|
-
|
|
33932
|
-
|
|
34099
|
+
useUpdateBlocksProps as w,
|
|
34100
|
+
useUpdateBlocksPropsRealtime as x,
|
|
34101
|
+
UILibrariesPanel$1 as y,
|
|
34102
|
+
AIUserPrompt as z
|
|
33933
34103
|
};
|