@chaibuilder/sdk 1.2.99 → 1.2.100
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/{CodeEditor-v7zBTMpR.js → CodeEditor-4u3Q97EK.js} +7 -6
- package/dist/CodeEditor-arptm_-Q.cjs +1 -0
- package/dist/{STRINGS-TDN5UhWi.js → STRINGS-Xxstm-7I.js} +2 -2
- package/dist/{Topbar-ULSrUjT1.js → Topbar-i55trLGw.js} +17 -16
- package/dist/Topbar-ziTrNsmI.cjs +1 -0
- package/dist/UnsplashImages-9-OD1Sje.cjs +1 -0
- package/dist/{UnsplashImages-LYK9w6rM.js → UnsplashImages-y0LQATX2.js} +16 -15
- package/dist/UploadImages--tvMDTKi.cjs +1 -0
- package/dist/{UploadImages-D5RhqXgu.js → UploadImages-Nbpt6WL2.js} +12 -11
- package/dist/{context-menu-9cWJcKdh.js → context-menu-YGd09SE1.js} +91 -91
- package/dist/controls-lEwMTdPQ.js +234 -0
- package/dist/controls-p9IwFnPx.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +74 -73
- package/dist/iconBase-Ief2hJUZ.js +130 -0
- package/dist/iconBase-aZzpqff_.cjs +1 -0
- package/dist/{index-zg1mFs4g.cjs → index-EyRQyWtP.cjs} +2 -2
- package/dist/{index-ypVXAZEr.js → index-jfezM1fH.js} +9 -8
- package/dist/render.js +1 -1
- package/dist/runtime.cjs +1 -0
- package/dist/runtime.d.ts +5 -0
- package/dist/runtime.js +21 -0
- package/dist/ui.js +2 -2
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +16 -15
- package/package.json +6 -1
- package/dist/CodeEditor-Q8Qp8-DO.cjs +0 -1
- package/dist/Topbar-Mh3drPuW.cjs +0 -1
- package/dist/UnsplashImages-pwoxxEVG.cjs +0 -1
- package/dist/UploadImages-YTGwaLiS.cjs +0 -1
- package/dist/iconBase-5hdsfZ0z.cjs +0 -1
- package/dist/iconBase-RFUjwZUN.js +0 -339
|
@@ -4,17 +4,17 @@ var U = (o, n, r) => (W(o, typeof n != "symbol" ? n + "" : n, r), r);
|
|
|
4
4
|
import { j as jsxRuntimeExports } from "./jsx-runtime-Sp0orL4X.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import React__default, { createContext, useReducer, useEffect, useDebugValue, useCallback, useContext, useState, useMemo, Component, Children, Suspense, useRef, memo, createElement, lazy } from "react";
|
|
7
|
-
import {
|
|
7
|
+
import { a as Skeleton, B as Button, aA as ContextMenu, aB as ContextMenuTrigger, aC as ContextMenuContent, aD as ContextMenuItem, P as Tooltip, Q as TooltipTrigger, R as TooltipContent, C as Card, z as CardHeader, G as CardDescription, H as CardContent, L as Label, T as Textarea, E as CardFooter, D as Dialog, t as DialogTrigger, u as DialogContent, v as DialogHeader, x as DialogTitle, y as DialogDescription, w as DialogFooter, W as Popover, X as PopoverTrigger, Y as PopoverContent, ar as Command, at as CommandInput, au as CommandList, av as CommandEmpty, aw as CommandGroup, ax as CommandItem, K as Tabs, M as TabsList, N as TabsTrigger, O as TabsContent, d as Switch, A as Accordion, f as AccordionItem, g as AccordionTrigger, h as AccordionContent, ao as useToast, I as Input$1, V as TooltipPortal, a8 as DropdownMenu, a9 as DropdownMenuTrigger, aa as DropdownMenuContent, S as ScrollArea, ae as DropdownMenuLabel, af as DropdownMenuSeparator, ah as DropdownMenuGroup, ab as DropdownMenuItem, ag as DropdownMenuShortcut, k as AlertDialog, m as AlertDialogContent, n as AlertDialogHeader, p as AlertDialogTitle, l as AlertDialogTrigger, q as AlertDialogDescription, o as AlertDialogFooter, s as AlertDialogCancel, r as AlertDialogAction, ac as DropdownMenuCheckboxItem, Z as HoverCard, _ as HoverCardTrigger, $ as HoverCardContent, b as Separator, i as Badge, a0 as Select, a3 as SelectTrigger, a2 as SelectValue, a4 as SelectContent, a6 as SelectItem, U as TooltipProvider, aq as Toaster } from "./context-menu-YGd09SE1.js";
|
|
8
8
|
import { has, find, filter, flatten, map, omit, isString as isString$1, includes, without, get, compact, set, isEmpty, forIn, isObject as isObject$1, each, first, noop, keys, startsWith, range, values, flattenDeep, isNull, pick, sortBy, chunk, forEach, throttle, memoize, reverse, debounce, flatMapDeep, capitalize, last, startCase, truncate, isArray as isArray$1, split, toLower, cloneDeep, reject, nth, isNumber as isNumber$1, parseInt as parseInt$1, isNaN as isNaN$1, findLast, intersection, groupBy, isFunction as isFunction$1, uniq, toUpper, round } from "lodash-es";
|
|
9
9
|
import { atom as atom$1, useAtomValue as useAtomValue$1, useAtom as useAtom$1, useSetAtom as useSetAtom$1, getDefaultStore as getDefaultStore$1 } from "jotai";
|
|
10
|
-
import { g as generateUUID, a as getBreakpointValue,
|
|
10
|
+
import { g as generateUUID, a as getBreakpointValue, c as cn, G as GenIcon } from "./iconBase-Ief2hJUZ.js";
|
|
11
11
|
import { getBlockComponent, useChaiBlocks, getChaiDataProviders, useGlobalStylingPresets, syncBlocksWithDefaults } from "@chaibuilder/runtime";
|
|
12
12
|
import { useTranslation, initReactI18next } from "react-i18next";
|
|
13
13
|
import { g as getDefaultExportFromCjs, p as plugin } from "./plugin-ooqqxWRQ.js";
|
|
14
14
|
import { useThrottledCallback, useResizeObserver, useDebouncedCallback, useIntervalEffect } from "@react-hookz/web";
|
|
15
15
|
import TreeModel from "tree-model";
|
|
16
16
|
import ReactQuill, { Quill } from "react-quill";
|
|
17
|
-
import {
|
|
17
|
+
import { a as SLOT_KEY, I as I18N_KEY, S as STYLES_KEY, R as ROOT_TEMP_KEY } from "./STRINGS-Xxstm-7I.js";
|
|
18
18
|
import { useFeature, FlagsProvider } from "flagged";
|
|
19
19
|
import { useHotkeys } from "react-hotkeys-hook";
|
|
20
20
|
import { flip } from "@floating-ui/dom";
|
|
@@ -34,6 +34,7 @@ import { Resizable } from "re-resizable";
|
|
|
34
34
|
import { DatabaseIcon, GlobeIcon, ChevronRight, PlusIcon as PlusIcon$1, EyeOff, EditIcon, TrashIcon as TrashIcon$1, Check, Loader, SparklesIcon, SmileIcon, ShuffleIcon, ChevronDown, Edit2, X, LayoutTemplate, Layers, PaintBucketIcon } from "lucide-react";
|
|
35
35
|
import validator from "@rjsf/validator-ajv8";
|
|
36
36
|
import Form from "@rjsf/core";
|
|
37
|
+
import { y, s, h } from "./controls-lEwMTdPQ.js";
|
|
37
38
|
import { Tree } from "react-arborist";
|
|
38
39
|
import { parse, stringify } from "himalaya";
|
|
39
40
|
import IconPicker, { IconPickerItem } from "react-icons-picker";
|
|
@@ -3713,7 +3714,7 @@ const useAllDataProviders = () => useMemo(() => getChaiDataProviders(), []), Blo
|
|
|
3713
3714
|
l !== o.length - 1 && /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "rtl:rotate-180", size: 16 })
|
|
3714
3715
|
] }, l))
|
|
3715
3716
|
] }) });
|
|
3716
|
-
}, CodeEditor$1 = React__default.lazy(() => import("./CodeEditor-
|
|
3717
|
+
}, CodeEditor$1 = React__default.lazy(() => import("./CodeEditor-4u3Q97EK.js")), CanvasArea = () => {
|
|
3717
3718
|
const [o] = useCodeEditor(), n = useBuilderProp("onError", noop);
|
|
3718
3719
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-full max-h-full w-full flex-1 flex-col", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative flex h-full max-h-full flex-col overflow-hidden bg-gray-100/40 px-2", children: [
|
|
3719
3720
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-full" }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(FallbackError, {}), onError: n, children: /* @__PURE__ */ jsxRuntimeExports.jsx(StaticCanvas$1, {}) }) }),
|
|
@@ -5098,7 +5099,7 @@ const ViewData = ({ data: o, fullView: n }) => {
|
|
|
5098
5099
|
}
|
|
5099
5100
|
)
|
|
5100
5101
|
] });
|
|
5101
|
-
}, UnsplashImages = React__default.lazy(() => import("./UnsplashImages-
|
|
5102
|
+
}, UnsplashImages = React__default.lazy(() => import("./UnsplashImages-y0LQATX2.js")), UploadImages = React__default.lazy(() => import("./UploadImages-Nbpt6WL2.js")), ImagesPanel = ({
|
|
5102
5103
|
isModalView: o = !1,
|
|
5103
5104
|
onSelect: n = () => {
|
|
5104
5105
|
}
|
|
@@ -8476,7 +8477,7 @@ const PageDataProviders = () => {
|
|
|
8476
8477
|
function AiFillDatabase(o) {
|
|
8477
8478
|
return GenIcon({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M832 64H192c-17.7 0-32 14.3-32 32v224h704V96c0-17.7-14.3-32-32-32zM288 232c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zM160 928c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V704H160v224zm128-136c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zM160 640h704V384H160v256zm128-168c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40z" }, child: [] }] })(o);
|
|
8478
8479
|
}
|
|
8479
|
-
const TopBar = lazy(() => import("./Topbar-
|
|
8480
|
+
const TopBar = lazy(() => import("./Topbar-i55trLGw.js"));
|
|
8480
8481
|
function useSidebarMenuItems(o) {
|
|
8481
8482
|
const n = o === "SINGLE_SIDE_PANEL", { t: r } = useTranslation(), a = useBuilderProp("dataBindingSupport", !1), l = useBuilderProp("askAiCallBack", null);
|
|
8482
8483
|
return useMemo(() => {
|
|
@@ -8700,8 +8701,8 @@ export {
|
|
|
8700
8701
|
useBlocksStoreUndoableActions as a8,
|
|
8701
8702
|
useUpdateBlocksProps as b,
|
|
8702
8703
|
useUpdateBlocksPropsRealtime as c,
|
|
8703
|
-
|
|
8704
|
-
|
|
8704
|
+
useBuilderProp as d,
|
|
8705
|
+
useSavePage as e,
|
|
8705
8706
|
usePreviewMode as f,
|
|
8706
8707
|
CanvasArea$1 as g,
|
|
8707
8708
|
BlockStyling as h,
|
package/dist/render.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { last as T, flattenDeep as A, memoize as N, filter as h, isEmpty as S, omit as P, isString as _, get as u, each as R, has as $, keys as J, includes as j, replace as W, startsWith as I } from "lodash-es";
|
|
2
|
-
import {
|
|
2
|
+
import { S as c, a as C } from "./STRINGS-Xxstm-7I.js";
|
|
3
3
|
import { j as p } from "./jsx-runtime-Sp0orL4X.js";
|
|
4
4
|
import y from "react";
|
|
5
5
|
import { twMerge as K } from "tailwind-merge";
|
package/dist/runtime.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@chaibuilder/runtime"),e=require("./controls-p9IwFnPx.cjs");require("lodash-es");exports.Checkbox=e.c;exports.Code=e.l;exports.Color=e.h;exports.Icon=e.q;exports.Image=e.x;exports.InfoField=e.u;exports.Link=e.w;exports.List=e.S;exports.Model=e.b;exports.MultilineText=e.f;exports.Numeric=e.s;exports.RichText=e.m;exports.SelectOption=e.y;exports.SingleLineText=e.g;exports.Slot=e.r;exports.Styles=e.T;Object.keys(r).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>r[t]})});
|
package/dist/runtime.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from "@chaibuilder/runtime";
|
|
2
|
+
import { c as t, l as i, h as l, q as r, x as n, u as x, w as c, S as m, b as S, f, s as p, m as T, y as d, g, r as h, T as u } from "./controls-lEwMTdPQ.js";
|
|
3
|
+
import "lodash-es";
|
|
4
|
+
export {
|
|
5
|
+
t as Checkbox,
|
|
6
|
+
i as Code,
|
|
7
|
+
l as Color,
|
|
8
|
+
r as Icon,
|
|
9
|
+
n as Image,
|
|
10
|
+
x as InfoField,
|
|
11
|
+
c as Link,
|
|
12
|
+
m as List,
|
|
13
|
+
S as Model,
|
|
14
|
+
f as MultilineText,
|
|
15
|
+
p as Numeric,
|
|
16
|
+
T as RichText,
|
|
17
|
+
d as SelectOption,
|
|
18
|
+
g as SingleLineText,
|
|
19
|
+
h as Slot,
|
|
20
|
+
u as Styles
|
|
21
|
+
};
|
package/dist/ui.js
CHANGED
|
@@ -2,8 +2,8 @@ import { j as o } from "./jsx-runtime-Sp0orL4X.js";
|
|
|
2
2
|
import * as n from "react";
|
|
3
3
|
import * as m from "@radix-ui/react-toggle";
|
|
4
4
|
import { cva as c } from "class-variance-authority";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { c as r } from "./context-menu-YGd09SE1.js";
|
|
6
|
+
import { A as ye, h as Ne, f as ve, g as we, k as Se, r as Me, s as je, m as De, q as Te, o as Re, n as Ie, p as Ae, l as ke, i as Pe, B as ze, C as Ge, H as Le, G as He, E as Ve, z as Fe, F as Be, ar as Oe, as as Ee, av as qe, aw as Je, at as Ke, ax as _e, au as Qe, az as Ue, ay as We, aA as Xe, aE as Ye, aC as Ze, aJ as $e, aD as ea, aG as aa, aK as ta, aO as oa, aF as sa, aH as ra, aI as na, aL as ia, aM as da, aN as la, aB as ca, D as ma, u as pa, y as ua, w as fa, v as ga, x as xa, t as ba, a8 as ha, ac as Ca, aa as ya, ah as Na, ab as va, ae as wa, ai as Sa, am as Ma, ad as ja, af as Da, ag as Ta, aj as Ra, ak as Ia, al as Aa, a9 as ka, Z as Pa, $ as za, _ as Ga, I as La, L as Ha, W as Va, Y as Fa, X as Ba, S as Oa, J as Ea, a0 as qa, a4 as Ja, a1 as Ka, a6 as _a, a5 as Qa, a7 as Ua, a3 as Wa, a2 as Xa, b as Ya, a as Za, d as $a, K as et, O as at, M as tt, N as ot, T as st, aq as rt, P as nt, R as it, V as dt, U as lt, Q as ct, j as mt, e as pt, an as ut, ap as ft, ao as gt } from "./context-menu-YGd09SE1.js";
|
|
7
7
|
import { ChevronRightIcon as g, CheckIcon as x, DotFilledIcon as b, Cross2Icon as h } from "@radix-ui/react-icons";
|
|
8
8
|
import * as s from "@radix-ui/react-menubar";
|
|
9
9
|
import * as d from "@radix-ui/react-dialog";
|
package/dist/web-blocks.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("@chaibuilder/runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("@chaibuilder/runtime"),n=require("./jsx-runtime-JYMCiFoE.cjs"),E=require("react"),t=require("./controls-p9IwFnPx.cjs"),y=require("./iconBase-aZzpqff_.cjs"),g=require("@radix-ui/react-icons"),h=require("lodash-es"),C=require("lucide-react");require("clsx");require("tailwind-merge");function I(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const s=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(o,l,s.get?s:{enumerable:!0,get:()=>e[l]})}}return o.default=e,Object.freeze(o)}const m=I(E),R=({className:e="",inBuilder:o})=>o?n.jsxRuntimeExports.jsx("div",{className:y.cn("pointer-events-none flex h-20 flex-col items-center justify-center p-2",e),children:n.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800",children:n.jsxRuntimeExports.jsx("div",{className:"flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700"})})}):null,k=R,L=e=>{const{blockProps:o,inBuilder:l,backgroundImage:s,children:r,tag:i="div",styles:a}=e;let u=r;r||(u=n.jsxRuntimeExports.jsx(k,{inBuilder:l}));let c={};return s&&(c={backgroundImage:`url(${s})`}),m.createElement(i,{...o,...a,style:c},u)},T={type:"Box",label:"web_blocks.box",category:"core",group:"basic",props:{styles:t.T({default:""}),tag:t.y({title:"web_blocks.tag",default:"div",options:[{value:"div",title:"web_blocks.div"},{value:"header",title:"web_blocks.header"},{value:"footer",title:"web_blocks.footer"},{value:"section",title:"web_blocks.section"},{value:"article",title:"web_blocks.article"},{value:"aside",title:"web_blocks.aside"},{value:"main",title:"web_blocks.main"},{value:"nav",title:"web_blocks.nav"},{value:"figure",title:"web_blocks.figure"},{value:"details",title:"web_blocks.details"},{value:"summary",title:"web_blocks.summary"},{value:"dialog",title:"web_blocks.dialog"},{value:"strike",title:"web_blocks.strike"},{value:"caption",title:"web_blocks.caption"},{value:"legend",title:"web_blocks.legend"},{value:"figcaption",title:"web_blocks.figcaption"},{value:"mark",title:"web_blocks.mark"}]}),backgroundImage:t.x({title:"web_blocks.background_image"})},canAcceptBlock:()=>!0},S=e=>{const{blockProps:o,iconSize:l,icon:s,content:r,iconPos:i,styles:a,children:u}=e,c=s,d=u||n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx("span",{"data-ai-key":"content",children:r}),c&&n.jsxRuntimeExports.jsx("div",{style:{width:l+"px"},className:i+" "+(i==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:c}})]});return m.createElement("button",{...o,...a,type:"button"},d)},M={type:"Button",label:"web_blocks.button",category:"core",icon:g.ButtonIcon,group:"basic",props:{content:t.g({title:"web_blocks.label",default:"Button",ai:!0,i18n:!0}),styles:t.T({default:"text-white bg-primary px-4 py-2 rounded-global flex items-center"}),icon:t.q({title:"web_blocks.icon",default:""}),iconSize:t.s({title:"web_blocks.icon_size",default:24}),iconPos:t.y({title:"web_blocks.icon_position",default:"order-last",options:[{title:"web_blocks.start",value:"order-first"},{title:"web_blocks.end",value:"order-last"}]})}},P=e=>{const{blockProps:o,styles:l,htmlCode:s,inBuilder:r}=e;return r?n.jsxRuntimeExports.jsxs("div",{className:"relative",children:[r?n.jsxRuntimeExports.jsx("div",{...o,...l,className:"absolute z-20 h-full w-full"}):null,m.createElement("div",{...l,dangerouslySetInnerHTML:{__html:s.replace(/<script.*?>.*?<\/script>/g,"")}})]}):m.createElement("div",{...o,...l,dangerouslySetInnerHTML:{__html:s}})},N={type:"CustomHTML",label:"web_blocks.custom_html",category:"core",icon:g.CodeIcon,group:"advanced",props:{styles:t.T({default:""}),htmlCode:t.l({title:"web_blocks.html_code",default:"<div><p>Enter your HTML code here...</p></div>",placeholder:"web_blocks.placeholder"})}},$=m.memo(e=>{const{blockProps:o,styles:l}=e;return m.createElement("div",{...o,...l})}),q={type:"EmptyBox",label:"web_blocks.empty_box",category:"core",group:"basic",props:{styles:t.T({default:""}),backgroundImage:t.x({title:"web_blocks.background_image"})}},H=e=>{const{blockProps:o,styles:l,content:s,level:r="h1",children:i=null}=e;return i?m.createElement(r,{...l,...o},i):m.createElement(r,{...l,...o,"data-ai-key":"content","data-ai-type":"html",dangerouslySetInnerHTML:{__html:s}})},z={type:"Heading",label:"web_blocks.heading",category:"core",icon:g.HeadingIcon,group:"typography",props:{level:t.y({title:"web_blocks.level",default:"h2",binding:!1,options:[{value:"h1",title:"h1"},{value:"h2",title:"h2"},{value:"h3",title:"h3"},{value:"h4",title:"h4"},{value:"h5",title:"h5"},{value:"h6",title:"h6"}]}),styles:t.T({default:"text-3xl"}),content:t.f({title:"Content",default:"Heading goes here",ai:!0,i18n:!0})},canAcceptBlock:e=>e==="Span"||e==="Text"},D=e=>{const{blockProps:o,styles:l,content:s}=e;return h.isNull(e.children)?m.createElement("p",{...l,...o,"data-ai-key":"content","data-ai-type":"html",dangerouslySetInnerHTML:{__html:s}}):m.createElement("p",{...l,...o},e.children)},A={type:"Paragraph",label:"Paragraph",category:"core",icon:g.TextIcon,group:"typography",props:{styles:t.T({default:""}),content:t.f({title:"Content",default:`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
|
|
2
2
|
Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus
|
|
3
|
-
nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.`,ai:!0,i18n:!0})},canAcceptBlock:t=>t==="Span"||t==="Link"||t==="Text"},A=t=>{const{blockProps:o,styles:l,content:s,children:r=null,tag:n}=t;return r?m.createElement("span",{...l,...o},r):m.createElement(n||"span",{...l,...o,"data-ai-key":"content",dangerouslySetInnerHTML:{__html:s||""}})},U={type:"Span",label:"Span",category:"core",group:"typography",props:{styles:e.T({default:""}),content:e.f({title:"Content",default:"",ai:!0,i18n:!0})},canAcceptBlock:()=>!0},F=t=>{const{blockProps:o,content:l,styles:s}=t;return i.jsxRuntimeExports.jsx("div",{className:"max-w-full",children:i.jsxRuntimeExports.jsx("div",{"data-ai-key":"content","data-ai-type":"richtext",...o,...s,dangerouslySetInnerHTML:{__html:l}})})},O={type:"RichText",label:"Rich Text",category:"core",icon:g.CursorTextIcon,group:"typography",props:{styles:e.T({default:""}),content:e.m({title:"Content",ai:!0,i18n:!0,default:"<p>This is a rich text block. You can add text, and other content here.</p>"})}},V=t=>{const{blockProps:o,link:l,children:s,styles:r,inBuilder:n,content:a}=t;return!s&&h.isEmpty(r==null?void 0:r.className)&&h.isEmpty(a)?i.jsxRuntimeExports.jsx(x,{inBuilder:n}):n?s?i.jsxRuntimeExports.jsx("span",{...o,...r,children:s}):m.createElement("span",{...o,...r,dangerouslySetInnerHTML:{__html:a}}):s?i.jsxRuntimeExports.jsx("a",{href:(l==null?void 0:l.href)||"#/",target:l==null?void 0:l.target,...o,...r,children:s}):m.createElement("a",{...o,...r,"data-ai-key":"content",href:(l==null?void 0:l.href)||"#",target:(l==null?void 0:l.target)||"_self",dangerouslySetInnerHTML:{__html:a}})},G={type:"Link",label:"Link",category:"core",icon:g.Link1Icon,group:"basic",props:{styles:e.T({default:""}),content:e.g({title:"Content",default:"",ai:!0,i18n:!0}),link:e.w({title:"Link",default:{type:"page",target:"_self",href:"#"}})},canAcceptBlock:t=>t!=="Link"},j=(t,...o)=>({...t,className:e.cn(t.className,...o)}),W=t=>{const{blockProps:o,children:l,styles:s,inBuilder:r,content:n,href:a}=t,{hrefType:u,autoplay:c,maxWidth:d,backdropColor:f,galleryName:b}=t,y=j(s,"cb-lightbox");if(!l&&h.isEmpty(s==null?void 0:s.className)&&h.isEmpty(n))return i.jsxRuntimeExports.jsx(x,{inBuilder:r});if(r)return l?i.jsxRuntimeExports.jsx("span",{...o,...y,children:l}):m.createElement("span",{...o,...y,dangerouslySetInnerHTML:{__html:n}});const k={};return k["data-vbtype"]=u,c&&(k["data-autoplay"]="true"),d&&(k["data-maxwidth"]=d+"px"),f&&(k["data-overlay"]=f),b&&(k["data-gall"]=b),l?i.jsxRuntimeExports.jsx("a",{...k,href:a||"#/",...o,...y,children:l}):m.createElement("a",{...o,...y,...k,href:a||"#",dangerouslySetInnerHTML:{__html:n}})},X={type:"LightBoxLink",label:"Lightbox Link",category:"core",icon:g.ImageIcon,group:"basic",props:{styles:e.T({default:""}),content:e.g({title:"Content",default:"Link text or drop blocks inside",ai:!0,i18n:!0}),href:e.g({title:"Href",default:""}),hrefType:e.y({title:"Type",default:"video",options:[{value:"video",title:"Video"},{value:"iframe",title:"Iframe"},{value:"inline",title:"Inline"},{value:"ajax",title:"Ajax"}]}),autoplay:e.c({title:"Autoplay",default:!1}),maxWidth:e.s({title:"Max Width",default:""}),backdropColor:e.g({title:"Backdrop Color",default:""}),galleryName:e.g({title:"Gallery Name",default:""})},canAcceptBlock:t=>t!=="Link"&&t!=="LightBoxLink"},Y=t=>{const{blockProps:o,children:l,listType:s,styles:r,tag:n,inBuilder:a}=t,u=e.cn(h.get(r,"className",""),s);return!l&&h.isEmpty(r==null?void 0:r.className)?i.jsxRuntimeExports.jsx(x,{inBuilder:a}):m.createElement(n||(s==="list-decimal"?"ol":"ul"),{...o,...r,className:u},l)},Z={type:"List",label:"web_blocks.list",icon:g.RowsIcon,category:"core",group:"basic",props:{styles:e.T({default:""}),listType:e.y({title:"web_blocks.list_type",default:"list-none",options:[{value:"list-none",title:"web_blocks.none"},{value:"list-disc",title:"web_blocks.disc"},{value:"list-decimal",title:"web_blocks.number"}]})},canAcceptBlock:t=>t==="ListItem",blocks:[{_type:"List",_id:"a",listType:"list-none",styles:"#styles:,"},{_type:"ListItem",_id:"b",_parent:"a",styles:"#styles:,",content:"Item 1"},{_type:"ListItem",_id:"c",_parent:"a",styles:"#styles:,",content:"Item 2"},{_type:"ListItem",_id:"d",_parent:"a",styles:"#styles:,",content:"Item 3"}]},J=t=>{const{blockProps:o,content:l,styles:s,children:r,tag:n}=t;return r?m.createElement(n||"li",{...s,...o},r):m.createElement(n||"li",{...s,...o,"data-ai-key":"content",dangerouslySetInnerHTML:{__html:l}})},K={type:"ListItem",label:"List Item",icon:g.ColumnsIcon,category:"core",group:"basic",props:{styles:e.T({default:""}),content:e.f({title:"Content",default:"List item",ai:!0,i18n:!0})},canAcceptBlock:t=>t!=="ListItem",canBeNested:t=>t==="List"},Q=t=>{const{blockProps:o,icon:l,styles:s,width:r,inBuilder:n,height:a}=t,u=j(s,e.cn(r?`w-[${r}px]`:"",a?`h-[${a}px]`:""));if(h.isEmpty(l))return i.jsxRuntimeExports.jsx(x,{inBuilder:n,className:"h-8 w-14"});const c=l.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return m.createElement("span",{...o,...u,dangerouslySetInnerHTML:{__html:c}})},ee={type:"Icon",label:"web_blocks.icon",category:"core",icon:g.SketchLogoIcon,group:"media",props:{styles:e.T({default:"text-black"}),icon:e.q({title:"web_blocks.icon",default:'<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'}),width:e.s({title:"web_blocks.width",default:""}),height:e.s({title:"web_blocks.height",default:""})}},te=t=>{const{blockProps:o,image:l,styles:s,alt:r,height:n,width:a,lazyLoading:u}=t;return h.isEmpty(l)?i.jsxRuntimeExports.jsx(x,{className:"h-36"}):m.createElement("img",{...o,...s,src:l,alt:r,loading:u?"lazy":"eager",height:n,width:a})},le={type:"Image",label:"Image",category:"core",icon:g.ImageIcon,group:"media",props:{styles:e.T({default:""}),image:e.x({title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas"}),alt:e.g({title:"Alt text",default:"",ai:!0,i18n:!0}),width:e.g({title:"Width",default:""}),height:e.g({title:"Height",default:""}),lazyLoading:e.c({title:"Lazy Load",default:!0})}},w=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,v=/^(https?:\/\/)?(www\.)?player.vimeo\.com/,_=/^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/,oe=t=>{if(w.test(t)){const o=t.match(w);return o?`https://www.youtube.com/embed/${o[4]}`:t}if(v.test(t)){const o=t.match(v);return o?`https://player.vimeo.com/video/${o[3]}`:t}if(_.test(t)){const o=t.match(_);return o?`https://www.dailymotion.com/embed/video/${o[4]}`:t}return null},se=m.memo(t=>{const{blockProps:o,inBuilder:l,styles:s,url:r,controls:n}=t,a=h.get(n,"autoPlay",!1),u=h.get(n,"controls",!1),c=a||h.get(n,"muted",!0),d=h.get(n,"loop",!1);if(h.isEmpty(r))return i.jsxRuntimeExports.jsx(x,{inBuilder:l,className:"h-36"});let f=oe(r),b=null;if(f){if(!h.isEmpty(f)){const y=[];y.push(`autoplay=${a?1:0}`),y.push(`controls=${n?1:0}`),y.push(`mute=${c?1:0}&muted=${c?1:0}`),y.push(`loop=${d?1:0}`),f=`${f}?${y.join("&")}`}b=m.createElement("iframe",{...o,className:"absolute inset-0 w-full h-full",src:f,allow:l?"":"autoplay *; fullscreen *",allowFullScreen:!0,frameBorder:0})}else b=m.createElement("video",{...o,className:"absolute inset-0 w-full h-full",src:r,controls:u,muted:c,autoPlay:l?!1:a,loop:d});return i.jsxRuntimeExports.jsx("div",{...h.pick(s,["className"]),children:i.jsxRuntimeExports.jsxs("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[l?i.jsxRuntimeExports.jsx("div",{...o,...h.omit(s,["className"]),className:"absolute inset-0 z-20 h-full w-full"}):null,b]})})}),re={type:"Video",label:"Video",category:"core",icon:g.VideoIcon,group:"media",props:{styles:e.T({default:""}),url:e.g({title:"Video URL",default:"https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann",i18n:!0}),controls:e.b({title:"Controls",properties:{autoPlay:e.c({title:"Autoplay",default:!0}),controls:e.c({title:"Controls",default:!1}),loop:e.c({title:"Loop",default:!1}),muted:e.c({title:"Muted",default:!0})}})}};function ie(t){return e.GenIcon({tag:"svg",attr:{version:"1.1",viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z"},child:[]}]})(t)}const ne=t=>{const{scripts:o,inBuilder:l,blockProps:s}=t;return l?i.jsxRuntimeExports.jsx("div",{...s,children:i.jsxRuntimeExports.jsx("div",{className:e.cn("pointer-events-none flex flex-col items-center justify-center p-2",""),children:i.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800",children:i.jsxRuntimeExports.jsx("p",{className:"text-left text-xs text-gray-400",children:"Scripts will be only executed in preview and live mode. Place your script at the bottom of the"})})})}):i.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:o}})},ae={type:"CustomScript",label:"web_blocks.custom_script",category:"core",icon:ie,group:"advanced",props:{scripts:e.l({title:"Script",default:"",placeholder:"<script>console.log('Hello, world!');<\/script>"})}},ce=t=>{const{blockProps:o,styles:l}=t;return m.createElement("hr",{...l,...o})},ue={type:"Divider",label:"web_blocks.divider",category:"core",icon:g.DividerHorizontalIcon,group:"basic",props:{styles:e.T({default:"bg-gray-900 h-0.5 py-2 my-1"})}},de=()=>null,pe={type:"Dark Mode",label:"web_blocks.dark_mode",category:"core",icon:g.MoonIcon,group:"advanced",props:{},blocks:()=>[{_id:"ultqCh",_type:"Span",tag:"span",styles:"#styles:,",_name:"Dark Mode Switcher"},{_id:"vroabi",_parent:"ultqCh",_type:"Button",styles_attrs:{type:"button","x-on:click":"darkMode = 'dark'","x-show":"darkMode === 'light'"},styles:"#styles:,bg-white dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",_name:"Dark Mode Btn"},{_id:"eweibk",_parent:"vroabi",_type:"Span",tag:"span",styles:"#styles:,group inline-flex shrink-0 justify-center items-center size-9"},{_id:"nltBrv",_parent:"eweibk",_type:"Icon",styles:"#styles:, shrink-0 size-4",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'></path></svg>"},{_id:"gesydi",_parent:"ultqCh",_type:"Button",styles_attrs:{type:"button","x-on:click":"darkMode = 'light'","x-show":"darkMode === 'dark'"},styles:"#styles:,bg-white dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",_name:"Light Mode Btn"},{_id:"sgbhDo",_parent:"gesydi",_type:"Span",tag:"span",styles:"#styles:,group inline-flex shrink-0 justify-center items-center size-9"},{_id:"AdDwBC",_parent:"sgbhDo",_type:"Icon",styles:"#styles:, shrink-0 size-4",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='4'></circle><path d='M12 2v2'></path><path d='M12 20v2'></path><path d='m4.93 4.93 1.41 1.41'></path><path d='m17.66 17.66 1.41 1.41'></path><path d='M2 12h2'></path><path d='M20 12h2'></path><path d='m6.34 17.66-1.41 1.41'></path><path d='m19.07 4.93-1.41 1.41'></path></svg>"}]},me=t=>{const{blockProps:o,inBuilder:l,children:s,globalBlock:r}=t;return l&&!r?i.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",...o,children:[i.jsxRuntimeExports.jsxs("h1",{children:["Global Block - ",r]}),i.jsxRuntimeExports.jsx("p",{children:"Choose a block from the sidebar to add it to this page."})]}):m.createElement("div",{...o},s)},ge={type:"GlobalBlock",label:"Global Block",icon:E.GlobeIcon,category:"core",group:"advanced",props:{globalBlock:e.g({title:"global block",default:"",hidden:!0})}},be=t=>t.inBuilder||t.forceWrapper?i.jsxRuntimeExports.jsx("span",{"data-ai-key":"content",...t.blockProps,children:t.content}):`${t.content}`,he={type:"Text",label:"Text",hidden:!0,category:"core",group:"typography",icon:g.SpaceBetweenVerticallyIcon,props:{content:e.f({title:"Content",default:"",ai:!0,i18n:!0})}},fe=t=>{const{blockProps:o,backgroundImage:l,children:s,styles:r}=t;let n={};return l&&(n={backgroundImage:`url(${l})`}),m.createElement("div",{...o,...r,style:n},s)},ye={type:"Body",label:"Body",category:"core",group:"basic",hidden:!0,props:{styles:e.T({default:"font-body antialiased"}),backgroundImage:e.x({title:"Background Image"})},canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},xe=t=>{const{blockProps:o,styles:l}=t;return m.createElement("br",{...o,...l})},ke={type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,icon:g.SpaceBetweenVerticallyIcon,props:{styles:e.T({default:""})}},we=t=>{const{blockProps:o,errorMessage:l,name:s,_type:r,successMessage:n,action:a,styles:u,children:c}=t;let d=c;c||(d=i.jsxRuntimeExports.jsx(x,{}));const f={"x-data":"{}","x-on:submit.prevent":"post"},b={"x-html":"",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return i.jsxRuntimeExports.jsxs("form",{...f,"data-error":l,"data-success":n,method:"post",action:a,...o,...u,children:[i.jsxRuntimeExports.jsx("div",{...b}),i.jsxRuntimeExports.jsx("input",{name:"formname",type:"hidden",value:s||r}),d]})},ve={type:"Form",label:"Form",category:"core",icon:g.GroupIcon,group:"form",props:{styles:e.T({default:""}),action:e.g({title:"Submit URL",default:"/api/form/submit"}),errorMessage:e.m({title:"Error Message",default:"Something went wrong. Please try again"}),successMessage:e.m({title:"Success Message",default:"Thank you for your submission."})},canAcceptBlock:()=>!0},_e=t=>{const{blockProps:o,inBuilder:l,label:s,styles:r,inputStyles:n,icon:a,iconPos:u}=t,c=e.generateUUID(),d={"x-bind:disabled":"formLoading"};return i.jsxRuntimeExports.jsxs("button",{id:c,...d,...n,...r,...o||{},type:l?"button":"submit",children:[s,a&&i.jsxRuntimeExports.jsx("span",{className:u,dangerouslySetInnerHTML:{__html:a}})]})},je={type:"FormButton",label:"Submit Button",category:"core",icon:g.ButtonIcon,group:"form",props:{label:e.g({title:"Label",default:"Submit",ai:!0,i18n:!0}),styles:e.T({default:"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"}),icon:e.q({title:"Icon",default:""}),iconPos:e.y({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}},Be=t=>{const{blockProps:o,label:l,placeholder:s,styles:r,inputStyles:n,showLabel:a,required:u,inputType:c="text",inBuilder:d,fieldName:f}=t,b=e.generateUUID();return!a||c==="submit"?(c==="submit"&&(o.value=l),i.jsxRuntimeExports.jsx("input",{id:b,name:f,readOnly:d,...o,...n,...r,type:c,placeholder:s,required:u})):i.jsxRuntimeExports.jsxs("div",{...r,...o,children:[a&&i.jsxRuntimeExports.jsx("label",{htmlFor:b,children:l}),i.jsxRuntimeExports.jsx("input",{name:f,readOnly:d,...n,id:b,type:c,placeholder:s,required:u})]})},Ee={type:"Input",label:"Input",category:"core",icon:g.InputIcon,group:"form",props:{styles:e.T({default:""}),fieldName:e.g({title:"Field Name",default:"input"}),inputType:e.y({title:"Type",options:h.map(["text","email","password","number","tel","file","hidden","range","submit","color","date","time"],t=>({value:t,title:t})),default:"text"}),value:e.g({title:"Value",default:"",ai:!0,i18n:!0}),showLabel:e.c({title:"Show Label",default:!0}),inputStyles:e.T({default:"w-full p-1"}),label:e.g({title:"Label",default:"Label",ai:!0,i18n:!0}),placeholder:e.g({title:"Placeholder",default:"Placeholder"}),required:e.c({title:"Required",default:!1})}},Ce=t=>{const{blockProps:o,fieldName:l,label:s,styles:r,inputStyles:n,checked:a,required:u,showLabel:c=!0}=t,d=e.generateUUID();return c?i.jsxRuntimeExports.jsxs("div",{...r,...o,children:[i.jsxRuntimeExports.jsx("input",{...n,name:l,id:d,type:"radio",required:u,defaultChecked:a}),s&&i.jsxRuntimeExports.jsx("label",{htmlFor:d,children:s})]}):i.jsxRuntimeExports.jsx("input",{id:d,...o,...n,...r,type:"radio",required:u,checked:a,name:l})},Ie={type:"Radio",label:"web_blocks.radio",category:"core",icon:g.RadiobuttonIcon,group:"form",props:{styles:e.T({default:"flex items-center w-max gap-x-2"}),fieldName:e.g({title:"web_blocks.field_name",default:"radio"}),label:e.g({title:"web_blocks.label",default:"Label"}),checked:e.c({title:"web_blocks.checked",default:!1}),required:e.c({title:"web_blocks.required",default:!1})}},Re=t=>{const{blockProps:o,fieldName:l,label:s,placeholder:r,styles:n,inputStyles:a,required:u,showLabel:c,_multiple:d=!1}=t,f=e.generateUUID();return c?i.jsxRuntimeExports.jsxs("div",{...n,children:[c&&i.jsxRuntimeExports.jsx("label",{htmlFor:f,children:s}),i.jsxRuntimeExports.jsxs("select",{...a,id:f,required:u,multiple:d,name:l,children:[i.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:r}),h.map(t.options,b=>i.jsxRuntimeExports.jsx("option",{selected:h.get(b,"selected",!1),value:b.value,dangerouslySetInnerHTML:{__html:b.label}},b.value))]})]}):i.jsxRuntimeExports.jsxs("select",{id:f,...n,...o,required:u,multiple:d,name:l,children:[i.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:r}),h.map(t.options,b=>i.jsxRuntimeExports.jsx("option",{selected:h.get(b,"selected",!1),value:b.value,dangerouslySetInnerHTML:{__html:b.label}},b.value))]})},Le={type:"Select",label:"web_blocks.select",category:"core",icon:g.DropdownMenuIcon,group:"form",props:{styles:e.T({default:""}),fieldName:e.g({title:"Field Name",default:"select"}),showLabel:e.c({title:"Show Label",default:!0}),inputStyles:e.T({default:"w-full p-1"}),label:e.g({title:"Label",default:"Label",ai:!0,i18n:!0}),placeholder:e.g({title:"Placeholder",default:"Placeholder"}),required:e.c({title:"Required",default:!1}),_multiple:e.c({title:"Multiple",default:!1}),options:e.S({title:"Options",itemProperties:{label:e.g({title:"Label",default:"",ai:!0,i18n:!0}),value:e.g({title:"Value",default:""})}})}},Te=t=>{const{blockProps:o,fieldName:l,label:s,placeholder:r,styles:n,inputStyles:a,_rows:u,showLabel:c}=t,d=e.generateUUID();return c?i.jsxRuntimeExports.jsxs("div",{...n,...o,children:[c&&i.jsxRuntimeExports.jsx("label",{htmlFor:d,children:s}),i.jsxRuntimeExports.jsx("textarea",{name:l,...a,id:d,placeholder:r,rows:u})]}):i.jsxRuntimeExports.jsx("textarea",{id:d,name:l,...o,...a,...n,placeholder:r,rows:u})},Se={type:"TextArea",label:"web_blocks.textarea",category:"core",icon:g.InputIcon,group:"form",props:{fieldName:e.g({title:"Field Name",default:"textarea"}),showLabel:e.c({title:"Show Label",default:!0}),styles:e.T({default:""}),inputStyles:e.T({default:"w-full p-1"}),label:e.g({title:"Label",default:"Label",ai:!0,i18n:!0}),placeholder:e.g({title:"Placeholder",default:"Placeholder"}),_rows:e.s({title:"Rows",default:3})}},Me=t=>{const{blockProps:o,fieldName:l,label:s,styles:r,inputStyles:n,required:a,checked:u,showLabel:c=!0}=t,d=e.generateUUID();return c?i.jsxRuntimeExports.jsxs("div",{...r,...o,children:[i.jsxRuntimeExports.jsx("input",{...n,name:l,id:d,type:"checkbox",required:a,defaultChecked:u}),s&&s!=="Label"&&i.jsxRuntimeExports.jsx("label",{htmlFor:d,children:s})]}):i.jsxRuntimeExports.jsx("input",{id:d,...o,...n,...r,type:"checkbox",required:a,name:l})},Pe={type:"Checkbox",label:"web_blocks.checkbox",category:"core",icon:g.CheckboxIcon,group:"form",props:{fieldName:e.g({title:"Field Name",default:"checkbox"}),styles:e.T({default:"flex items-center gap-x-2"}),label:e.g({title:"web_blocks.label",default:"Label"}),checked:e.c({title:"web_blocks.checked",default:!1}),required:e.c({title:"web_blocks.required",default:!1})}},Ne=()=>{p.registerChaiBlock(R,L),p.registerChaiBlock(N,$),p.registerChaiBlock(T,S),p.registerChaiBlock(q,H),p.registerChaiBlock(z,D),p.registerChaiBlock(A,U),p.registerChaiBlock(F,O),p.registerChaiBlock(V,G),p.registerChaiBlock(W,X),p.registerChaiBlock(Y,Z),p.registerChaiBlock(J,K),p.registerChaiBlock(Q,ee),p.registerChaiBlock(te,le),p.registerChaiBlock(se,re),p.registerChaiBlock(M,P),p.registerChaiBlock(be,he),p.registerChaiBlock(we,ve),p.registerChaiBlock(_e,je),p.registerChaiBlock(Be,Ee),p.registerChaiBlock(Me,Pe),p.registerChaiBlock(Ce,Ie),p.registerChaiBlock(Re,Le),p.registerChaiBlock(Te,Se),p.registerChaiBlock(xe,ke),p.registerChaiBlock(fe,ye),p.registerChaiBlock(ne,ae),p.registerChaiBlock(ce,ue),p.registerChaiBlock(de,pe),p.registerChaiBlock(me,ge)};exports.loadWebBlocks=Ne;
|
|
3
|
+
nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.`,ai:!0,i18n:!0})},canAcceptBlock:e=>e==="Span"||e==="Link"||e==="Text"},U=e=>{const{blockProps:o,styles:l,content:s,children:r=null,tag:i}=e;return r?m.createElement("span",{...l,...o},r):m.createElement(i||"span",{...l,...o,"data-ai-key":"content",dangerouslySetInnerHTML:{__html:s||""}})},F={type:"Span",label:"Span",category:"core",group:"typography",props:{styles:t.T({default:""}),content:t.f({title:"Content",default:"",ai:!0,i18n:!0})},canAcceptBlock:()=>!0},O=e=>{const{blockProps:o,content:l,styles:s}=e;return n.jsxRuntimeExports.jsx("div",{className:"max-w-full",children:n.jsxRuntimeExports.jsx("div",{"data-ai-key":"content","data-ai-type":"richtext",...o,...s,dangerouslySetInnerHTML:{__html:l}})})},V={type:"RichText",label:"Rich Text",category:"core",icon:g.CursorTextIcon,group:"typography",props:{styles:t.T({default:""}),content:t.m({title:"Content",ai:!0,i18n:!0,default:"<p>This is a rich text block. You can add text, and other content here.</p>"})}},G=e=>{const{blockProps:o,link:l,children:s,styles:r,inBuilder:i,content:a}=e;return!s&&h.isEmpty(r==null?void 0:r.className)&&h.isEmpty(a)?n.jsxRuntimeExports.jsx(k,{inBuilder:i}):i?s?n.jsxRuntimeExports.jsx("span",{...o,...r,children:s}):m.createElement("span",{...o,...r,dangerouslySetInnerHTML:{__html:a}}):s?n.jsxRuntimeExports.jsx("a",{href:(l==null?void 0:l.href)||"#/",target:l==null?void 0:l.target,...o,...r,children:s}):m.createElement("a",{...o,...r,"data-ai-key":"content",href:(l==null?void 0:l.href)||"#",target:(l==null?void 0:l.target)||"_self",dangerouslySetInnerHTML:{__html:a}})},W={type:"Link",label:"Link",category:"core",icon:g.Link1Icon,group:"basic",props:{styles:t.T({default:""}),content:t.g({title:"Content",default:"",ai:!0,i18n:!0}),link:t.w({title:"Link",default:{type:"page",target:"_self",href:"#"}})},canAcceptBlock:e=>e!=="Link"},B=(e,...o)=>({...e,className:y.cn(e.className,...o)}),X=e=>{const{blockProps:o,children:l,styles:s,inBuilder:r,content:i,href:a}=e,{hrefType:u,autoplay:c,maxWidth:d,backdropColor:f,galleryName:b}=e,x=B(s,"cb-lightbox");if(!l&&h.isEmpty(s==null?void 0:s.className)&&h.isEmpty(i))return n.jsxRuntimeExports.jsx(k,{inBuilder:r});if(r)return l?n.jsxRuntimeExports.jsx("span",{...o,...x,children:l}):m.createElement("span",{...o,...x,dangerouslySetInnerHTML:{__html:i}});const w={};return w["data-vbtype"]=u,c&&(w["data-autoplay"]="true"),d&&(w["data-maxwidth"]=d+"px"),f&&(w["data-overlay"]=f),b&&(w["data-gall"]=b),l?n.jsxRuntimeExports.jsx("a",{...w,href:a||"#/",...o,...x,children:l}):m.createElement("a",{...o,...x,...w,href:a||"#",dangerouslySetInnerHTML:{__html:i}})},Y={type:"LightBoxLink",label:"Lightbox Link",category:"core",icon:g.ImageIcon,group:"basic",props:{styles:t.T({default:""}),content:t.g({title:"Content",default:"Link text or drop blocks inside",ai:!0,i18n:!0}),href:t.g({title:"Href",default:""}),hrefType:t.y({title:"Type",default:"video",options:[{value:"video",title:"Video"},{value:"iframe",title:"Iframe"},{value:"inline",title:"Inline"},{value:"ajax",title:"Ajax"}]}),autoplay:t.c({title:"Autoplay",default:!1}),maxWidth:t.s({title:"Max Width",default:""}),backdropColor:t.g({title:"Backdrop Color",default:""}),galleryName:t.g({title:"Gallery Name",default:""})},canAcceptBlock:e=>e!=="Link"&&e!=="LightBoxLink"},Z=e=>{const{blockProps:o,children:l,listType:s,styles:r,tag:i,inBuilder:a}=e,u=y.cn(h.get(r,"className",""),s);return!l&&h.isEmpty(r==null?void 0:r.className)?n.jsxRuntimeExports.jsx(k,{inBuilder:a}):m.createElement(i||(s==="list-decimal"?"ol":"ul"),{...o,...r,className:u},l)},J={type:"List",label:"web_blocks.list",icon:g.RowsIcon,category:"core",group:"basic",props:{styles:t.T({default:""}),listType:t.y({title:"web_blocks.list_type",default:"list-none",options:[{value:"list-none",title:"web_blocks.none"},{value:"list-disc",title:"web_blocks.disc"},{value:"list-decimal",title:"web_blocks.number"}]})},canAcceptBlock:e=>e==="ListItem",blocks:[{_type:"List",_id:"a",listType:"list-none",styles:"#styles:,"},{_type:"ListItem",_id:"b",_parent:"a",styles:"#styles:,",content:"Item 1"},{_type:"ListItem",_id:"c",_parent:"a",styles:"#styles:,",content:"Item 2"},{_type:"ListItem",_id:"d",_parent:"a",styles:"#styles:,",content:"Item 3"}]},K=e=>{const{blockProps:o,content:l,styles:s,children:r,tag:i}=e;return r?m.createElement(i||"li",{...s,...o},r):m.createElement(i||"li",{...s,...o,"data-ai-key":"content",dangerouslySetInnerHTML:{__html:l}})},Q={type:"ListItem",label:"List Item",icon:g.ColumnsIcon,category:"core",group:"basic",props:{styles:t.T({default:""}),content:t.f({title:"Content",default:"List item",ai:!0,i18n:!0})},canAcceptBlock:e=>e!=="ListItem",canBeNested:e=>e==="List"},ee=e=>{const{blockProps:o,icon:l,styles:s,width:r,inBuilder:i,height:a}=e,u=B(s,y.cn(r?`w-[${r}px]`:"",a?`h-[${a}px]`:""));if(h.isEmpty(l))return n.jsxRuntimeExports.jsx(k,{inBuilder:i,className:"h-8 w-14"});const c=l.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return m.createElement("span",{...o,...u,dangerouslySetInnerHTML:{__html:c}})},te={type:"Icon",label:"web_blocks.icon",category:"core",icon:g.SketchLogoIcon,group:"media",props:{styles:t.T({default:"text-black"}),icon:t.q({title:"web_blocks.icon",default:'<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'}),width:t.s({title:"web_blocks.width",default:""}),height:t.s({title:"web_blocks.height",default:""})}},le=e=>{const{blockProps:o,image:l,styles:s,alt:r,height:i,width:a,lazyLoading:u}=e;return h.isEmpty(l)?n.jsxRuntimeExports.jsx(k,{className:"h-36"}):m.createElement("img",{...o,...s,src:l,alt:r,loading:u?"lazy":"eager",height:i,width:a})},oe={type:"Image",label:"Image",category:"core",icon:g.ImageIcon,group:"media",props:{styles:t.T({default:""}),image:t.x({title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas"}),alt:t.g({title:"Alt text",default:"",ai:!0,i18n:!0}),width:t.g({title:"Width",default:""}),height:t.g({title:"Height",default:""}),lazyLoading:t.c({title:"Lazy Load",default:!0})}},v=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,_=/^(https?:\/\/)?(www\.)?player.vimeo\.com/,j=/^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/,se=e=>{if(v.test(e)){const o=e.match(v);return o?`https://www.youtube.com/embed/${o[4]}`:e}if(_.test(e)){const o=e.match(_);return o?`https://player.vimeo.com/video/${o[3]}`:e}if(j.test(e)){const o=e.match(j);return o?`https://www.dailymotion.com/embed/video/${o[4]}`:e}return null},re=m.memo(e=>{const{blockProps:o,inBuilder:l,styles:s,url:r,controls:i}=e,a=h.get(i,"autoPlay",!1),u=h.get(i,"controls",!1),c=a||h.get(i,"muted",!0),d=h.get(i,"loop",!1);if(h.isEmpty(r))return n.jsxRuntimeExports.jsx(k,{inBuilder:l,className:"h-36"});let f=se(r),b=null;if(f){if(!h.isEmpty(f)){const x=[];x.push(`autoplay=${a?1:0}`),x.push(`controls=${i?1:0}`),x.push(`mute=${c?1:0}&muted=${c?1:0}`),x.push(`loop=${d?1:0}`),f=`${f}?${x.join("&")}`}b=m.createElement("iframe",{...o,className:"absolute inset-0 w-full h-full",src:f,allow:l?"":"autoplay *; fullscreen *",allowFullScreen:!0,frameBorder:0})}else b=m.createElement("video",{...o,className:"absolute inset-0 w-full h-full",src:r,controls:u,muted:c,autoPlay:l?!1:a,loop:d});return n.jsxRuntimeExports.jsx("div",{...h.pick(s,["className"]),children:n.jsxRuntimeExports.jsxs("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[l?n.jsxRuntimeExports.jsx("div",{...o,...h.omit(s,["className"]),className:"absolute inset-0 z-20 h-full w-full"}):null,b]})})}),ne={type:"Video",label:"Video",category:"core",icon:g.VideoIcon,group:"media",props:{styles:t.T({default:""}),url:t.g({title:"Video URL",default:"https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann",i18n:!0}),controls:t.b({title:"Controls",properties:{autoPlay:t.c({title:"Autoplay",default:!0}),controls:t.c({title:"Controls",default:!1}),loop:t.c({title:"Loop",default:!1}),muted:t.c({title:"Muted",default:!0})}})}};function ie(e){return y.GenIcon({tag:"svg",attr:{version:"1.1",viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z"},child:[]}]})(e)}const ae=e=>{const{scripts:o,inBuilder:l,blockProps:s}=e;return l?n.jsxRuntimeExports.jsx("div",{...s,children:n.jsxRuntimeExports.jsx("div",{className:y.cn("pointer-events-none flex flex-col items-center justify-center p-2",""),children:n.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800",children:n.jsxRuntimeExports.jsx("p",{className:"text-left text-xs text-gray-400",children:"Scripts will be only executed in preview and live mode. Place your script at the bottom of the"})})})}):n.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:o}})},ce={type:"CustomScript",label:"web_blocks.custom_script",category:"core",icon:ie,group:"advanced",props:{scripts:t.l({title:"Script",default:"",placeholder:"<script>console.log('Hello, world!');<\/script>"})}},ue=e=>{const{blockProps:o,styles:l}=e;return m.createElement("hr",{...l,...o})},de={type:"Divider",label:"web_blocks.divider",category:"core",icon:g.DividerHorizontalIcon,group:"basic",props:{styles:t.T({default:"bg-gray-900 h-0.5 py-2 my-1"})}},pe=()=>null,me={type:"Dark Mode",label:"web_blocks.dark_mode",category:"core",icon:g.MoonIcon,group:"advanced",props:{},blocks:()=>[{_id:"ultqCh",_type:"Span",tag:"span",styles:"#styles:,",_name:"Dark Mode Switcher"},{_id:"vroabi",_parent:"ultqCh",_type:"Button",styles_attrs:{type:"button","x-on:click":"darkMode = 'dark'","x-show":"darkMode === 'light'"},styles:"#styles:,bg-white dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",_name:"Dark Mode Btn"},{_id:"eweibk",_parent:"vroabi",_type:"Span",tag:"span",styles:"#styles:,group inline-flex shrink-0 justify-center items-center size-9"},{_id:"nltBrv",_parent:"eweibk",_type:"Icon",styles:"#styles:, shrink-0 size-4",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'></path></svg>"},{_id:"gesydi",_parent:"ultqCh",_type:"Button",styles_attrs:{type:"button","x-on:click":"darkMode = 'light'","x-show":"darkMode === 'dark'"},styles:"#styles:,bg-white dark:bg-black font-medium text-gray-800 rounded-full hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:text-neutral-200 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",_name:"Light Mode Btn"},{_id:"sgbhDo",_parent:"gesydi",_type:"Span",tag:"span",styles:"#styles:,group inline-flex shrink-0 justify-center items-center size-9"},{_id:"AdDwBC",_parent:"sgbhDo",_type:"Icon",styles:"#styles:, shrink-0 size-4",icon:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='4'></circle><path d='M12 2v2'></path><path d='M12 20v2'></path><path d='m4.93 4.93 1.41 1.41'></path><path d='m17.66 17.66 1.41 1.41'></path><path d='M2 12h2'></path><path d='M20 12h2'></path><path d='m6.34 17.66-1.41 1.41'></path><path d='m19.07 4.93-1.41 1.41'></path></svg>"}]},ge=e=>{const{blockProps:o,inBuilder:l,children:s,globalBlock:r}=e;return l&&!r?n.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",...o,children:[n.jsxRuntimeExports.jsxs("h1",{children:["Global Block - ",r]}),n.jsxRuntimeExports.jsx("p",{children:"Choose a block from the sidebar to add it to this page."})]}):m.createElement("div",{...o},s)},be={type:"GlobalBlock",label:"Global Block",icon:C.GlobeIcon,category:"core",group:"advanced",props:{globalBlock:t.g({title:"global block",default:"",hidden:!0})}},he=e=>e.inBuilder||e.forceWrapper?n.jsxRuntimeExports.jsx("span",{"data-ai-key":"content",...e.blockProps,children:e.content}):`${e.content}`,fe={type:"Text",label:"Text",hidden:!0,category:"core",group:"typography",icon:g.SpaceBetweenVerticallyIcon,props:{content:t.f({title:"Content",default:"",ai:!0,i18n:!0})}},ye=e=>{const{blockProps:o,backgroundImage:l,children:s,styles:r}=e;let i={};return l&&(i={backgroundImage:`url(${l})`}),m.createElement("div",{...o,...r,style:i},s)},xe={type:"Body",label:"Body",category:"core",group:"basic",hidden:!0,props:{styles:t.T({default:"font-body antialiased"}),backgroundImage:t.x({title:"Background Image"})},canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},ke=e=>{const{blockProps:o,styles:l}=e;return m.createElement("br",{...o,...l})},we={type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,icon:g.SpaceBetweenVerticallyIcon,props:{styles:t.T({default:""})}},ve=e=>{const{blockProps:o,errorMessage:l,name:s,_type:r,successMessage:i,action:a,styles:u,children:c}=e;let d=c;c||(d=n.jsxRuntimeExports.jsx(k,{}));const f={"x-data":"{}","x-on:submit.prevent":"post"},b={"x-html":"",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return n.jsxRuntimeExports.jsxs("form",{...f,"data-error":l,"data-success":i,method:"post",action:a,...o,...u,children:[n.jsxRuntimeExports.jsx("div",{...b}),n.jsxRuntimeExports.jsx("input",{name:"formname",type:"hidden",value:s||r}),d]})},_e={type:"Form",label:"Form",category:"core",icon:g.GroupIcon,group:"form",props:{styles:t.T({default:""}),action:t.g({title:"Submit URL",default:"/api/form/submit"}),errorMessage:t.m({title:"Error Message",default:"Something went wrong. Please try again"}),successMessage:t.m({title:"Success Message",default:"Thank you for your submission."})},canAcceptBlock:()=>!0},je=e=>{const{blockProps:o,inBuilder:l,label:s,styles:r,inputStyles:i,icon:a,iconPos:u}=e,c=y.generateUUID(),d={"x-bind:disabled":"formLoading"};return n.jsxRuntimeExports.jsxs("button",{id:c,...d,...i,...r,...o||{},type:l?"button":"submit",children:[s,a&&n.jsxRuntimeExports.jsx("span",{className:u,dangerouslySetInnerHTML:{__html:a}})]})},Be={type:"FormButton",label:"Submit Button",category:"core",icon:g.ButtonIcon,group:"form",props:{label:t.g({title:"Label",default:"Submit",ai:!0,i18n:!0}),styles:t.T({default:"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"}),icon:t.q({title:"Icon",default:""}),iconPos:t.y({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}},Ee=e=>{const{blockProps:o,label:l,placeholder:s,styles:r,inputStyles:i,showLabel:a,required:u,inputType:c="text",inBuilder:d,fieldName:f}=e,b=y.generateUUID();return!a||c==="submit"?(c==="submit"&&(o.value=l),n.jsxRuntimeExports.jsx("input",{id:b,name:f,readOnly:d,...o,...i,...r,type:c,placeholder:s,required:u})):n.jsxRuntimeExports.jsxs("div",{...r,...o,children:[a&&n.jsxRuntimeExports.jsx("label",{htmlFor:b,children:l}),n.jsxRuntimeExports.jsx("input",{name:f,readOnly:d,...i,id:b,type:c,placeholder:s,required:u})]})},Ce={type:"Input",label:"Input",category:"core",icon:g.InputIcon,group:"form",props:{styles:t.T({default:""}),fieldName:t.g({title:"Field Name",default:"input"}),inputType:t.y({title:"Type",options:h.map(["text","email","password","number","tel","file","hidden","range","submit","color","date","time"],e=>({value:e,title:e})),default:"text"}),value:t.g({title:"Value",default:"",ai:!0,i18n:!0}),showLabel:t.c({title:"Show Label",default:!0}),inputStyles:t.T({default:"w-full p-1"}),label:t.g({title:"Label",default:"Label",ai:!0,i18n:!0}),placeholder:t.g({title:"Placeholder",default:"Placeholder"}),required:t.c({title:"Required",default:!1})}},Ie=e=>{const{blockProps:o,fieldName:l,label:s,styles:r,inputStyles:i,checked:a,required:u,showLabel:c=!0}=e,d=y.generateUUID();return c?n.jsxRuntimeExports.jsxs("div",{...r,...o,children:[n.jsxRuntimeExports.jsx("input",{...i,name:l,id:d,type:"radio",required:u,defaultChecked:a}),s&&n.jsxRuntimeExports.jsx("label",{htmlFor:d,children:s})]}):n.jsxRuntimeExports.jsx("input",{id:d,...o,...i,...r,type:"radio",required:u,checked:a,name:l})},Re={type:"Radio",label:"web_blocks.radio",category:"core",icon:g.RadiobuttonIcon,group:"form",props:{styles:t.T({default:"flex items-center w-max gap-x-2"}),fieldName:t.g({title:"web_blocks.field_name",default:"radio"}),label:t.g({title:"web_blocks.label",default:"Label"}),checked:t.c({title:"web_blocks.checked",default:!1}),required:t.c({title:"web_blocks.required",default:!1})}},Le=e=>{const{blockProps:o,fieldName:l,label:s,placeholder:r,styles:i,inputStyles:a,required:u,showLabel:c,_multiple:d=!1}=e,f=y.generateUUID();return c?n.jsxRuntimeExports.jsxs("div",{...i,children:[c&&n.jsxRuntimeExports.jsx("label",{htmlFor:f,children:s}),n.jsxRuntimeExports.jsxs("select",{...a,id:f,required:u,multiple:d,name:l,children:[n.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:r}),h.map(e.options,b=>n.jsxRuntimeExports.jsx("option",{selected:h.get(b,"selected",!1),value:b.value,dangerouslySetInnerHTML:{__html:b.label}},b.value))]})]}):n.jsxRuntimeExports.jsxs("select",{id:f,...i,...o,required:u,multiple:d,name:l,children:[n.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:r}),h.map(e.options,b=>n.jsxRuntimeExports.jsx("option",{selected:h.get(b,"selected",!1),value:b.value,dangerouslySetInnerHTML:{__html:b.label}},b.value))]})},Te={type:"Select",label:"web_blocks.select",category:"core",icon:g.DropdownMenuIcon,group:"form",props:{styles:t.T({default:""}),fieldName:t.g({title:"Field Name",default:"select"}),showLabel:t.c({title:"Show Label",default:!0}),inputStyles:t.T({default:"w-full p-1"}),label:t.g({title:"Label",default:"Label",ai:!0,i18n:!0}),placeholder:t.g({title:"Placeholder",default:"Placeholder"}),required:t.c({title:"Required",default:!1}),_multiple:t.c({title:"Multiple",default:!1}),options:t.S({title:"Options",itemProperties:{label:t.g({title:"Label",default:"",ai:!0,i18n:!0}),value:t.g({title:"Value",default:""})}})}},Se=e=>{const{blockProps:o,fieldName:l,label:s,placeholder:r,styles:i,inputStyles:a,_rows:u,showLabel:c}=e,d=y.generateUUID();return c?n.jsxRuntimeExports.jsxs("div",{...i,...o,children:[c&&n.jsxRuntimeExports.jsx("label",{htmlFor:d,children:s}),n.jsxRuntimeExports.jsx("textarea",{name:l,...a,id:d,placeholder:r,rows:u})]}):n.jsxRuntimeExports.jsx("textarea",{id:d,name:l,...o,...a,...i,placeholder:r,rows:u})},Me={type:"TextArea",label:"web_blocks.textarea",category:"core",icon:g.InputIcon,group:"form",props:{fieldName:t.g({title:"Field Name",default:"textarea"}),showLabel:t.c({title:"Show Label",default:!0}),styles:t.T({default:""}),inputStyles:t.T({default:"w-full p-1"}),label:t.g({title:"Label",default:"Label",ai:!0,i18n:!0}),placeholder:t.g({title:"Placeholder",default:"Placeholder"}),_rows:t.s({title:"Rows",default:3})}},Pe=e=>{const{blockProps:o,fieldName:l,label:s,styles:r,inputStyles:i,required:a,checked:u,showLabel:c=!0}=e,d=y.generateUUID();return c?n.jsxRuntimeExports.jsxs("div",{...r,...o,children:[n.jsxRuntimeExports.jsx("input",{...i,name:l,id:d,type:"checkbox",required:a,defaultChecked:u}),s&&s!=="Label"&&n.jsxRuntimeExports.jsx("label",{htmlFor:d,children:s})]}):n.jsxRuntimeExports.jsx("input",{id:d,...o,...i,...r,type:"checkbox",required:a,name:l})},Ne={type:"Checkbox",label:"web_blocks.checkbox",category:"core",icon:g.CheckboxIcon,group:"form",props:{fieldName:t.g({title:"Field Name",default:"checkbox"}),styles:t.T({default:"flex items-center gap-x-2"}),label:t.g({title:"web_blocks.label",default:"Label"}),checked:t.c({title:"web_blocks.checked",default:!1}),required:t.c({title:"web_blocks.required",default:!1})}},$e=()=>{p.registerChaiBlock(L,T),p.registerChaiBlock($,q),p.registerChaiBlock(S,M),p.registerChaiBlock(H,z),p.registerChaiBlock(D,A),p.registerChaiBlock(U,F),p.registerChaiBlock(O,V),p.registerChaiBlock(G,W),p.registerChaiBlock(X,Y),p.registerChaiBlock(Z,J),p.registerChaiBlock(K,Q),p.registerChaiBlock(ee,te),p.registerChaiBlock(le,oe),p.registerChaiBlock(re,ne),p.registerChaiBlock(P,N),p.registerChaiBlock(he,fe),p.registerChaiBlock(ve,_e),p.registerChaiBlock(je,Be),p.registerChaiBlock(Ee,Ce),p.registerChaiBlock(Pe,Ne),p.registerChaiBlock(Ie,Re),p.registerChaiBlock(Le,Te),p.registerChaiBlock(Se,Me),p.registerChaiBlock(ke,we),p.registerChaiBlock(ye,xe),p.registerChaiBlock(ae,ce),p.registerChaiBlock(ue,de),p.registerChaiBlock(pe,me),p.registerChaiBlock(ge,be)};exports.loadWebBlocks=$e;
|
package/dist/web-blocks.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { registerChaiBlock as u } from "@chaibuilder/runtime";
|
|
2
2
|
import { j as a } from "./jsx-runtime-Sp0orL4X.js";
|
|
3
3
|
import * as b from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { T as m, y as _, x as C, g as p, q as N, s as L, l as $, f as B, m as S, w as D, c as g, b as F, S as G } from "./controls-lEwMTdPQ.js";
|
|
5
|
+
import { c as j, G as V, g as I } from "./iconBase-Ief2hJUZ.js";
|
|
5
6
|
import { ButtonIcon as H, CodeIcon as U, HeadingIcon as O, TextIcon as W, CursorTextIcon as X, Link1Icon as Y, ImageIcon as z, RowsIcon as Z, ColumnsIcon as J, SketchLogoIcon as K, VideoIcon as Q, DividerHorizontalIcon as ee, MoonIcon as te, SpaceBetweenVerticallyIcon as A, GroupIcon as le, InputIcon as R, RadiobuttonIcon as oe, DropdownMenuIcon as ae, CheckboxIcon as se } from "@radix-ui/react-icons";
|
|
6
7
|
import { isNull as re, isEmpty as k, get as v, pick as ne, omit as ie, map as M } from "lodash-es";
|
|
7
8
|
import { GlobeIcon as ce } from "lucide-react";
|
|
8
9
|
import "clsx";
|
|
9
10
|
import "tailwind-merge";
|
|
10
|
-
const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("div", { className:
|
|
11
|
+
const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("div", { className: j("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ a.jsx("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, x = de, ue = (e) => {
|
|
11
12
|
const { blockProps: l, inBuilder: t, backgroundImage: s, children: o, tag: r = "div", styles: n } = e;
|
|
12
13
|
let c = o;
|
|
13
14
|
o || (c = /* @__PURE__ */ a.jsx(x, { inBuilder: t }));
|
|
@@ -158,7 +159,7 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
|
|
|
158
159
|
]
|
|
159
160
|
}),
|
|
160
161
|
styles: m({ default: "text-3xl" }),
|
|
161
|
-
content:
|
|
162
|
+
content: B({ title: "Content", default: "Heading goes here", ai: !0, i18n: !0 })
|
|
162
163
|
},
|
|
163
164
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
164
165
|
}, we = (e) => {
|
|
@@ -178,7 +179,7 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
|
|
|
178
179
|
group: "typography",
|
|
179
180
|
props: {
|
|
180
181
|
styles: m({ default: "" }),
|
|
181
|
-
content:
|
|
182
|
+
content: B({
|
|
182
183
|
title: "Content",
|
|
183
184
|
default: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
|
|
184
185
|
Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus
|
|
@@ -203,7 +204,7 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
|
|
|
203
204
|
group: "typography",
|
|
204
205
|
props: {
|
|
205
206
|
styles: m({ default: "" }),
|
|
206
|
-
content:
|
|
207
|
+
content: B({ title: "Content", default: "", ai: !0, i18n: !0 })
|
|
207
208
|
},
|
|
208
209
|
canAcceptBlock: () => !0
|
|
209
210
|
}, Le = (e) => {
|
|
@@ -264,7 +265,7 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
|
|
|
264
265
|
canAcceptBlock: (e) => e !== "Link"
|
|
265
266
|
}, q = (e, ...l) => ({
|
|
266
267
|
...e,
|
|
267
|
-
className:
|
|
268
|
+
className: j(e.className, ...l)
|
|
268
269
|
}), Se = (e) => {
|
|
269
270
|
const { blockProps: l, children: t, styles: s, inBuilder: o, content: r, href: n } = e, { hrefType: c, autoplay: i, maxWidth: d, backdropColor: h, galleryName: f } = e, y = q(s, "cb-lightbox");
|
|
270
271
|
if (!t && k(s == null ? void 0 : s.className) && k(r))
|
|
@@ -310,7 +311,7 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
|
|
|
310
311
|
},
|
|
311
312
|
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
312
313
|
}, Ne = (e) => {
|
|
313
|
-
const { blockProps: l, children: t, listType: s, styles: o, tag: r, inBuilder: n } = e, c =
|
|
314
|
+
const { blockProps: l, children: t, listType: s, styles: o, tag: r, inBuilder: n } = e, c = j(v(o, "className", ""), s);
|
|
314
315
|
return !t && k(o == null ? void 0 : o.className) ? /* @__PURE__ */ a.jsx(x, { inBuilder: n }) : b.createElement(
|
|
315
316
|
r || (s === "list-decimal" ? "ol" : "ul"),
|
|
316
317
|
{ ...l, ...o, className: c },
|
|
@@ -375,12 +376,12 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
|
|
|
375
376
|
group: "basic",
|
|
376
377
|
props: {
|
|
377
378
|
styles: m({ default: "" }),
|
|
378
|
-
content:
|
|
379
|
+
content: B({ title: "Content", default: "List item", ai: !0, i18n: !0 })
|
|
379
380
|
},
|
|
380
381
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
381
382
|
canBeNested: (e) => e === "List"
|
|
382
383
|
}, $e = (e) => {
|
|
383
|
-
const { blockProps: l, icon: t, styles: s, width: o, inBuilder: r, height: n } = e, c = q(s,
|
|
384
|
+
const { blockProps: l, icon: t, styles: s, width: o, inBuilder: r, height: n } = e, c = q(s, j(o ? `w-[${o}px]` : "", n ? `h-[${n}px]` : ""));
|
|
384
385
|
if (k(t))
|
|
385
386
|
return /* @__PURE__ */ a.jsx(x, { inBuilder: r, className: "h-8 w-14" });
|
|
386
387
|
const i = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
@@ -505,11 +506,11 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
|
|
|
505
506
|
}
|
|
506
507
|
};
|
|
507
508
|
function Fe(e) {
|
|
508
|
-
return
|
|
509
|
+
return V({ tag: "svg", attr: { version: "1.1", viewBox: "0 0 32 32" }, child: [{ tag: "path", attr: { d: "M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z" }, child: [] }] })(e);
|
|
509
510
|
}
|
|
510
511
|
const Ge = (e) => {
|
|
511
512
|
const { scripts: l, inBuilder: t, blockProps: s } = e;
|
|
512
|
-
return t ? /* @__PURE__ */ a.jsx("div", { ...s, children: /* @__PURE__ */ a.jsx("div", { className:
|
|
513
|
+
return t ? /* @__PURE__ */ a.jsx("div", { ...s, children: /* @__PURE__ */ a.jsx("div", { className: j("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ a.jsx("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ a.jsx("div", { dangerouslySetInnerHTML: { __html: l } });
|
|
513
514
|
}, Ve = {
|
|
514
515
|
type: "CustomScript",
|
|
515
516
|
label: "web_blocks.custom_script",
|
|
@@ -624,7 +625,7 @@ const Ge = (e) => {
|
|
|
624
625
|
group: "typography",
|
|
625
626
|
icon: A,
|
|
626
627
|
props: {
|
|
627
|
-
content:
|
|
628
|
+
content: B({ title: "Content", default: "", ai: !0, i18n: !0 })
|
|
628
629
|
}
|
|
629
630
|
}, Qe = (e) => {
|
|
630
631
|
const { blockProps: l, backgroundImage: t, children: s, styles: o } = e;
|
|
@@ -916,7 +917,7 @@ const Ge = (e) => {
|
|
|
916
917
|
}),
|
|
917
918
|
required: g({ title: "Required", default: !1 }),
|
|
918
919
|
_multiple: g({ title: "Multiple", default: !1 }),
|
|
919
|
-
options:
|
|
920
|
+
options: G({
|
|
920
921
|
title: "Options",
|
|
921
922
|
itemProperties: {
|
|
922
923
|
label: p({ title: "Label", default: "", ai: !0, i18n: !0 }),
|
|
@@ -999,9 +1000,9 @@ const Ge = (e) => {
|
|
|
999
1000
|
checked: g({ title: "web_blocks.checked", default: !1 }),
|
|
1000
1001
|
required: g({ title: "web_blocks.required", default: !1 })
|
|
1001
1002
|
}
|
|
1002
|
-
},
|
|
1003
|
+
}, Bt = () => {
|
|
1003
1004
|
u(ue, pe), u(ge, ye), u(be, me), u(ke, xe), u(we, ve), u(_e, Ie), u(Le, Be), u(je, Ce), u(Se, Me), u(Ne, Pe), u(Ee, Te), u($e, He), u(ze, Ae), u(qe, De), u(fe, he), u(Je, Ke), u(ot, at), u(st, rt), u(nt, it), u(ft, ht), u(ct, dt), u(ut, pt), u(bt, mt), u(tt, lt), u(Qe, et), u(Ge, Ve), u(Ue, Oe), u(We, Xe), u(Ye, Ze);
|
|
1004
1005
|
};
|
|
1005
1006
|
export {
|
|
1006
|
-
|
|
1007
|
+
Bt as loadWebBlocks
|
|
1007
1008
|
};
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"author": "Suraj Air",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"homepage": "https://chaibuilder.com",
|
|
8
|
-
"version": "1.2.
|
|
8
|
+
"version": "1.2.100",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -59,6 +59,11 @@
|
|
|
59
59
|
"import": "./dist/web-blocks.js",
|
|
60
60
|
"require": "./dist/web-blocks.cjs",
|
|
61
61
|
"types": "./dist/web-blocks.d.ts"
|
|
62
|
+
},
|
|
63
|
+
"./runtime": {
|
|
64
|
+
"import": "./dist/runtime.js",
|
|
65
|
+
"require": "./dist/runtime.cjs",
|
|
66
|
+
"types": "./dist/runtime.d.ts"
|
|
62
67
|
}
|
|
63
68
|
},
|
|
64
69
|
"dependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),b=require("@monaco-editor/react"),k=require("./context-menu-sQn7ryJ6.cjs"),C=require("react-i18next"),u=require("react"),n=require("./index-zg1mFs4g.cjs"),E=require("@radix-ui/react-icons"),R=require("@react-hookz/web");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("class-variance-authority");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-dialog");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("lodash-es");require("jotai");require("./iconBase-5hdsfZ0z.cjs");require("@chaibuilder/runtime");require("./plugin-KIpT3NWi.cjs");require("tree-model");require("react-quill");require("./STRINGS-Yl7cSWDc.cjs");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("react-event-hook");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("lucide-react");require("@rjsf/validator-ajv8");require("@rjsf/core");require("react-arborist");require("himalaya");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("i18next");require("framer-motion");const a=s=>{const i=document.createElement("div");return i.innerHTML=s,i.innerHTML};function g(){const{t:s}=C.useTranslation(),[i,d]=u.useState(!1),[l,q]=u.useState(""),[r,o]=n.useCodeEditor(),[c]=n.useSelectedBlockIds(),x=n.useUpdateBlocksProps(),m=n.useUpdateBlocksPropsRealtime(),p=R.useThrottledCallback(t=>{const h=a(t);m([r.blockId],{[r.blockProp]:h})},[],300),j=u.useCallback(()=>{if(i){const t=a(l);x([r.blockId],{[r.blockProp]:t})}},[i,l]);u.useEffect(()=>{c.includes(r==null?void 0:r.blockId)||(j(),o(null))},[c]);const f=()=>{o(null)};return e.jsxRuntimeExports.jsxs("div",{className:"h-full rounded-t-lg border-t-4 border-black bg-black text-white",children:[e.jsxRuntimeExports.jsx("button",{onClick:f,className:"fixed inset-0 z-[100000] cursor-default bg-gray-400/20"}),e.jsxRuntimeExports.jsxs("div",{className:"relative z-[100001] h-full w-full flex-col gap-y-1",children:[e.jsxRuntimeExports.jsxs("div",{className:"-mt-1 flex items-center justify-between px-2 py-2",children:[e.jsxRuntimeExports.jsxs("h3",{className:"space-x-3 text-sm font-semibold",children:[e.jsxRuntimeExports.jsx("span",{children:s("HTML Code Editor |")}),e.jsxRuntimeExports.jsx("span",{className:"text-xs text-gray-400",children:s("Scripts will be only executed in preview and live mode.")})]}),e.jsxRuntimeExports.jsx("div",{className:"flex gap-x-2",children:e.jsxRuntimeExports.jsx(k.Button,{onClick:()=>o(null),size:"sm",variant:"destructive",className:"h-6 w-fit",children:e.jsxRuntimeExports.jsx(E.Cross2Icon,{})})})]}),e.jsxRuntimeExports.jsx(b,{onMount:t=>{t.setValue(r.initialCode)},onChange:t=>{d(!0),q(t),p(t)},height:"100%",defaultLanguage:"html",theme:"vs-dark",defaultValue:"",options:{minimap:{enabled:!1}}})]})]})}exports.default=g;
|
package/dist/Topbar-Mh3drPuW.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),n=require("react"),u=require("./context-menu-sQn7ryJ6.cjs"),s=require("./index-zg1mFs4g.cjs"),x=require("react-i18next"),c=require("./iconBase-5hdsfZ0z.cjs"),l=require("@radix-ui/react-icons");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("class-variance-authority");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-dialog");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("lodash-es");require("jotai");require("@chaibuilder/runtime");require("./plugin-KIpT3NWi.cjs");require("@react-hookz/web");require("tree-model");require("react-quill");require("./STRINGS-Yl7cSWDc.cjs");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("react-event-hook");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("lucide-react");require("@rjsf/validator-ajv8");require("@rjsf/core");require("react-arborist");require("himalaya");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("i18next");require("framer-motion");const p=()=>{const{savePage:a,saveState:r}=s.useSavePage(),{t:i}=x.useTranslation(),o=e.jsxRuntimeExports.jsxs(u.Button,{disabled:r==="SAVING",onClick:t=>{t.preventDefault(),a()},className:c.cn("flex h-auto w-fit items-center gap-x-2 p-1 px-2","bg-gray-200 text-gray-500 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-400",{"animate-pulse bg-gray-300 text-gray-900":r==="SAVING","bg-green-500 text-white hover:bg-green-600 hover:text-white dark:bg-green-600 dark:text-white":r==="SAVED"}),size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx(s.FaCheck,{className:"text-sm text-white"}),e.jsxRuntimeExports.jsx("span",{className:"text-sm",children:i(r==="SAVING"?"saving":r==="SAVED"?"saved":"unsaved")})]});return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:o})},m=function(){const r=s.useBuilderProp("previewComponent"),[,i]=s.usePreviewMode(),{t:o}=x.useTranslation();return r?e.jsxRuntimeExports.jsxs(u.Button,{onClick:t=>{t.preventDefault(),i(!0)},className:"flex h-auto w-fit items-center gap-x-2 p-1 px-2",size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx(l.EyeOpenIcon,{className:"text-xs"}),e.jsxRuntimeExports.jsx("span",{className:"text-sm",children:o("preview")})]}):null},q=()=>{const a=s.useBuilderProp("topBarComponents.left",[]),r=s.useBuilderProp("topBarComponents.center",[]),i=s.useBuilderProp("topBarComponents.right",[]),o=s.useBuilderProp("editable",!0);return e.jsxRuntimeExports.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2 font-bold",children:n.Children.toArray(a.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(u.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))})}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:n.Children.toArray(r.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(u.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxRuntimeExports.jsx(m,{}),e.jsxRuntimeExports.jsx(u.Separator,{orientation:"vertical"}),o?e.jsxRuntimeExports.jsx(p,{}):null,n.Children.toArray(i.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(u.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))]})]})};exports.default=q;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),n=require("react"),p=require("lodash-es"),A=require("unsplash-js"),f=require("./context-menu-sQn7ryJ6.cjs"),_=require("react-i18next"),g=require("./index-zg1mFs4g.cjs"),T=require("@react-hookz/web"),B=require("lucide-react");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("class-variance-authority");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-dialog");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("jotai");require("./iconBase-5hdsfZ0z.cjs");require("@chaibuilder/runtime");require("./plugin-KIpT3NWi.cjs");require("tree-model");require("react-quill");require("./STRINGS-Yl7cSWDc.cjs");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("react-event-hook");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("@rjsf/validator-ajv8");require("@rjsf/core");require("react-arborist");require("himalaya");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("i18next");require("framer-motion");const v=async(h,j)=>new Promise((i,a)=>{A.createApi({accessKey:j}).search.getPhotos(h).then(l=>{i(l)}).catch(l=>a(l))}),D=({isModalView:h,onSelect:j})=>{const i=g.useBuilderProp("unsplashAccessKey",""),[a,q]=n.useState([]),[l,b]=n.useState(0),[o,w]=n.useState(),[u,k]=n.useState(),[C,y]=n.useState(0),[d,P]=T.useDebouncedState("",1e3),[m,c]=n.useState(!1),{t:E}=_.useTranslation(),I=async r=>{if(p.isEmpty(d))return;let t=l+1;r&&(r.preventDefault(),t=1),c(!0),b(t);const x={query:d,page:t};o&&(x.orientation=o),u&&(x.color=u),v(x,i).then(s=>{var R,N,S;q(t===1?((R=s==null?void 0:s.response)==null?void 0:R.results)||[]:[...a,...((N=s==null?void 0:s.response)==null?void 0:N.results)||[]]),y((S=s==null?void 0:s.response)==null?void 0:S.total_pages),c(!1)}).catch(()=>{c(!1)})};return n.useEffect(()=>{if(!p.isEmpty(d)&&i){c(!0);const r={query:d,page:1};o&&(r.orientation=o),u&&(r.color=u),b(1),v(r,i).then(t=>{var x,s;q(((x=t==null?void 0:t.response)==null?void 0:x.results)||[]),y((s=t==null?void 0:t.response)==null?void 0:s.total_pages),c(!1)}).catch(()=>{c(!1)})}},[o,u,d,i]),p.isEmpty(i)?e.jsxRuntimeExports.jsx("div",{className:"flex h-full flex-col items-center justify-center",children:e.jsxRuntimeExports.jsxs("p",{className:"max-w-3xl text-center text-gray-500",children:["To enable Unsplash, kindly provide your",e.jsxRuntimeExports.jsx("a",{href:"https://unsplash.com/documentation#public-authentication",className:"px-1 underline hover:text-blue-400",target:"_blank",rel:"noopener noreferrer",children:"Unsplash Access Key"})]})}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("form",{className:"flex items-center gap-x-2 rounded-md border border-border bg-background p-px",children:[e.jsxRuntimeExports.jsx(f.Input,{type:"text",name:"query",className:"text-foreground",placeholder:'Try "dog" or "apple"',onChange:r=>P(r.target.value)}),e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(g.ChaiSelect,{className:"w-40",placeholder:E("Orientation"),options:[{value:"",label:"All"},{value:"landscape",label:"Landscape"},{value:"portrait",label:"Portrait"},{value:"squarish",label:"Square"}],defaultValue:o,onValueChange:r=>w(r)})}),e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(g.ChaiSelect,{placeholder:E("Color"),options:[{value:"",label:"All"},{value:"black_and_white",label:"Black and White"},{value:"black",label:"Black"},{value:"white",label:"White"},{value:"night",label:"Night"},{value:"warm",label:"Warm"},{value:"cool",label:"Cool"},{value:"sepia",label:"Sepia"}],defaultValue:u,onValueChange:r=>k(r)})})]}),e.jsxRuntimeExports.jsxs(f.ScrollArea,{className:`h-full ${h&&!p.isEmpty(a)?"-mx-2 flex flex-wrap px-2":"-mx-2 flex flex-col pb-8 pt-2"}`,children:[p.isEmpty(a)&&!m&&e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center py-6",children:[e.jsxRuntimeExports.jsx("div",{className:"font-medium",children:"No Data"}),e.jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-500",children:"Enter query and press enter"})]}),h?e.jsxRuntimeExports.jsx("div",{className:"h-full columns-5 py-2",children:a.map(r=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>j(r.urls.regular),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:r.alt_description,src:r.urls.small})})},r.id))}):a.map(r=>e.jsxRuntimeExports.jsx("div",{className:"w-full px-2 py-1",children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:r.alt_description,src:r.urls.small})})},r.id)),m&&e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsxRuntimeExports.jsx(B.Loader,{className:"h-6 w-6 animate-spin"})," Loading..."]}),!p.isEmpty(a)&&l<C&&!m&&e.jsxRuntimeExports.jsx(f.Button,{size:"sm",variant:"link",className:"w-full",onClick:()=>I(void 0),disabled:m,children:m?"":"Load More"})]})]})};exports.default=D;exports.fetchImage=v;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),i=require("react"),n=require("lodash-es"),E=require("jotai"),I=require("./context-menu-sQn7ryJ6.cjs"),w=require("react-i18next"),g=require("./index-zg1mFs4g.cjs"),b=require("lucide-react");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("class-variance-authority");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-dialog");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("./iconBase-5hdsfZ0z.cjs");require("@chaibuilder/runtime");require("./plugin-KIpT3NWi.cjs");require("@react-hookz/web");require("tree-model");require("react-quill");require("./STRINGS-Yl7cSWDc.cjs");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("react-event-hook");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("@rjsf/validator-ajv8");require("@rjsf/core");require("react-arborist");require("himalaya");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("i18next");require("framer-motion");const k=E.atom([]),S=({isModalView:a,onSelect:o})=>{const{t:s}=w.useTranslation(),d=g.useBuilderProp("uploadMediaCallback"),x=g.useBuilderProp("fetchMediaCallback"),[u,c]=E.useAtom(k),[R,p]=i.useState(!1),[j,q]=i.useState(!1),[,y]=i.useState(),[h,m]=i.useState("");i.useEffect(()=>{(async()=>{if(!x)return;q(!0);const r=await x();c(r||[]),q(!1)})()},[]);const N=r=>{var t,l;if(m(""),r&&((l=(t=r==null?void 0:r.target)==null?void 0:t.files)==null?void 0:l.length)>0){const f=r.target.files[0];f.type.startsWith("image")?v(f):m(s("Please select an image"))}},v=async r=>{if(d){p(!0);try{const{url:t}=await d(r);o(t),y(void 0);const l=await x();c(l)}catch(t){c([]),m((t==null?void 0:t.message)||"Something went wrong.")}p(!1)}};return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsxs("label",{htmlFor:a?"upload-in-modal":"upload-in-panel",children:[e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center rounded-lg",children:e.jsxRuntimeExports.jsxs("label",{htmlFor:"image-upload",className:"flex w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed border-border",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:[e.jsxRuntimeExports.jsx(b.Upload,{className:"mb-3 h-10 w-10 text-gray-400"}),e.jsxRuntimeExports.jsx("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:e.jsxRuntimeExports.jsx("span",{className:"font-semibold",children:s("Click to upload")})}),e.jsxRuntimeExports.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:s("SVG, PNG, JPG or GIF (Max. 2mb)")})]}),R?e.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-full items-center justify-center",children:[e.jsxRuntimeExports.jsx(b.Loader,{className:"h-6 w-6 animate-spin"}),e.jsxRuntimeExports.jsx("span",{className:"ml-2 text-sm text-gray-500",children:s("Uploading...")})]}):null,h&&e.jsxRuntimeExports.jsx("p",{className:"pb-2 text-xs text-red-500",children:h||s("Something went wrong")})]})}),e.jsxRuntimeExports.jsx("input",{type:"file",id:"image-upload",accept:"image/*",hidden:!0,onChange:N})]}),e.jsxRuntimeExports.jsxs(I.ScrollArea,{className:`-mx-2 flex h-full flex-col pb-8 pt-2 ${a?"px-2":""} pt-2`,children:[n.isEmpty(u)&&j&&e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:e.jsxRuntimeExports.jsx("div",{className:"animate-pulse font-medium",children:s("Fetching...")})}),n.isEmpty(u)&&!j&&e.jsxRuntimeExports.jsxs("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[e.jsxRuntimeExports.jsx("div",{className:"mb-4 h-12 rounded-full p-6"}),e.jsxRuntimeExports.jsx("h3",{className:"mb-2 text-sm font-semibold",children:s("No images found")}),e.jsxRuntimeExports.jsx("p",{className:"mb-4 max-w-sm text-muted-foreground",children:s("It looks like you haven't uploaded any images yet. Start by clicking the upload button above.")})]}),a?e.jsxRuntimeExports.jsx("div",{className:"h-full columns-5 py-2",children:n.map(u,r=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>o(r.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:r.name,src:r.thumbUrl})})},r.id))}):n.map(u,r=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"px-2 py-1",onClick:()=>o(r.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto w-full cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:r.name,src:r.url})})},r.id))]})]})};exports.default=S;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("lodash-es"),b=require("clsx"),h=require("tailwind-merge"),u=require("react");function v(e=6,t="abcdefghijklmnopqrstuvwxyzABCD"){let i="";for(let n=e;n>0;--n)i+=t[Math.floor(Math.random()*t.length)];return i}const O=e=>e>=1536?"2XL":e>=1280?"XL":e>=1024?"LG":e>=768?"MD":e>=640?"SM":"XS",w=(...e)=>h.twMerge(b.clsx(e)),j="#styles:",q=e=>({type:"singular",default:e.default||"",binding:r.get(e,"binding",!0),dataType:"string",schema:{type:"string",...r.omit(e,["i18n","ai","required"])},uiSchema:{"ui:widget":"code"}}),P=e=>({type:"singular",default:e.default||"",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),dataType:"string",required:e.required||!1,ai:e.ai||!1,i18n:e.i18n||!1,schema:{type:"string",...r.omit(e,["ai","required"])},uiSchema:{"ui:placeholder":e.placeholder||"Enter here"}}),S=e=>({type:"singular",default:e.default||"",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),dataType:"string",required:e.required||!1,ai:e.ai||!1,i18n:e.i18n||!1,schema:{type:"string",...r.omit(e,["i18n","ai","required","rows"])},uiSchema:{"ui:widget":"textarea","ui:placeholder":e.placeholder||"Enter here","ui:options":{rows:e.rows||4}}}),T=e=>({type:"singular",i18n:e.i18n||!1,default:e.default||!1,dataType:"boolean",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),ai:e.ai||!1,schema:{type:"boolean",...r.omit(e,["i18n","ai","required"])},uiSchema:{"ui:title":e.title||"Select Item","ui:description":""}}),x=e=>({type:"singular",default:e.default||"",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),dataType:"number",required:e.required||!1,ai:e.ai||!1,i18n:e.i18n||!1,schema:{type:"number",...r.omit(e,["i18n","ai","required"])},uiSchema:{}}),E=e=>({type:"singular",default:e.default||"",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),required:e.required||!1,dataType:"string",ai:e.ai||!1,i18n:e.i18n||!1,schema:{type:"string",...r.omit(e,["i18n","ai","required","options","binding"]),oneOf:e.options.map(t=>({const:t.value,title:t.title}))},uiSchema:{"ui:widget":"select"}}),I=e=>({type:"singular",default:e.default||"",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),dataType:"string",ai:e.ai||!1,i18n:e.i18n||!1,schema:{type:"string",...r.omit(e,["i18n","ai","required"])},uiSchema:{"ui:widget":"color"}}),D=e=>({type:"singular",default:e.default||"",binding:r.get(e,"binding",!0),dataType:"string",ai:e.ai||!1,i18n:e.i18n||!1,schema:{type:"string",...r.omit(e,["i18n","ai","required"])},uiSchema:{"ui:widget":"richtext"}}),C=e=>({type:"model",title:e.title,dataType:"object",default:e.default||{},binding:r.get(e,"binding",!0),properties:e.properties}),N=e=>({type:"list",itemProperties:e.itemProperties,binding:r.get(e,"binding",!0),title:e.title,ai:e.ai||!1,i18n:e.i18n||!1,dataType:"array",default:e.default||[],itemTitle:e.getItemLabel?e.getItemLabel({}):()=>""}),_=e=>({type:"styles",binding:!1,default:`${j},${e.default||""}`,presets:e.presets||{}}),z=e=>({default:e.default||"",binding:r.get(e,"binding",!0),type:"singular",dataType:"string",ai:e.ai||!1,i18n:e.i18n||!1,schema:{type:"string",title:"Icon",default:e.default||""},uiSchema:{"ui:widget":"icon"}}),L=e=>({default:e.default,type:"singular",binding:r.get(e,"binding",!0),dataType:"object",ai:e.ai||!1,i18n:e.i18n||!1,schema:{type:"object",...e||{},properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}}},uiSchema:{"ui:field":"link"}}),M=e=>({type:"singular",default:e.default||"",hidden:r.get(e,"hidden",!1),binding:r.get(e,"binding",!0),dataType:"string",ai:e.ai||!1,i18n:e.i18n||!1,schema:{type:"string",...r.omit(e,["i18n","ai","required"])},uiSchema:{"ui:widget":"image"}});var f={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},c=u.createContext&&u.createContext(f),B=["attr","size","title"];function U(e,t){if(e==null)return{};var i=G(e,t),n,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function G(e,t){if(e==null)return{};var i={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;i[n]=e[n]}return i}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o.apply(this,arguments)}function p(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),i.push.apply(i,n)}return i}function s(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?p(Object(i),!0).forEach(function(n){W(e,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):p(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}function W(e,t,i){return t=X(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function X(e){var t=V(e,"string");return typeof t=="symbol"?t:t+""}function V(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var n=i.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function m(e){return e&&e.map((t,i)=>u.createElement(t.tag,s({key:i},t.attr),m(t.child)))}function $(e){return t=>u.createElement(A,o({attr:s({},e.attr)},t),m(e.child))}function A(e){var t=i=>{var{attr:n,size:a,title:l}=e,y=U(e,B),g=a||i.size||"1em",d;return i.className&&(d=i.className),e.className&&(d=(d?d+" ":"")+e.className),u.createElement("svg",o({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},i.attr,n,y,{className:d,style:s(s({color:e.color||i.color},i.style),e.style),height:g,width:g,xmlns:"http://www.w3.org/2000/svg"}),l&&u.createElement("title",null,l),e.children)};return c!==void 0?u.createElement(c.Consumer,null,i=>t(i)):t(f)}exports.GenIcon=$;exports.S=N;exports.T=_;exports.b=C;exports.c=T;exports.cn=w;exports.f=S;exports.g=P;exports.generateUUID=v;exports.getBreakpointValue=O;exports.h=I;exports.l=q;exports.m=D;exports.q=z;exports.s=x;exports.w=L;exports.x=M;exports.y=E;
|