@chaibuilder/sdk 1.1.9 → 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AddBlocks-VR2XGlgQ.js → AddBlocks-Rd2EpNMr.js} +1 -1
- package/dist/{AddBlocks-Et_v-kdv.cjs → AddBlocks-YS5XlqpG.cjs} +1 -1
- package/dist/{BrandingOptions-SXbo_LEP.js → BrandingOptions-OVjd8R6I.js} +1 -1
- package/dist/{BrandingOptions-bZn4TXCB.cjs → BrandingOptions-rTaSfm0M.cjs} +1 -1
- package/dist/{CanvasArea-xBMxzh_r.cjs → CanvasArea-_eT3OREW.cjs} +3 -3
- package/dist/{CanvasArea-h4l0r7Ql.js → CanvasArea-zAT94LPr.js} +5 -5
- package/dist/{CurrentPage-YGM6tLCg.cjs → CurrentPage-J3WuljO3.cjs} +1 -1
- package/dist/{CurrentPage-2YpnE3z7.js → CurrentPage-awyWzrD1.js} +2 -2
- package/dist/{Layers-Twu9zS3g.js → Layers-Iu48BWko.js} +4 -4
- package/dist/{Layers-HZApEk-h.cjs → Layers-SkyPSf1R.cjs} +1 -1
- package/dist/{MarkAsGlobalBlock-QTujTxNj.js → MarkAsGlobalBlock--GjBOKA4.js} +1 -1
- package/dist/{MarkAsGlobalBlock-u8N_7PBX.cjs → MarkAsGlobalBlock-GV1kflbN.cjs} +1 -1
- package/dist/{PagesPanel-iRgy80Z4.js → PagesPanel-FiGBY1m8.js} +3 -3
- package/dist/{PagesPanel-W68J0fFD.cjs → PagesPanel-dzL5sq6p.cjs} +1 -1
- package/dist/{ProjectPanel-bl_zr1Zy.js → ProjectPanel-c5QlZgrp.js} +3 -3
- package/dist/{ProjectPanel-agiWUiVb.cjs → ProjectPanel-uOP0fGfw.cjs} +1 -1
- package/dist/{Settings-qw8xQXnk.js → Settings-FuvoLEbx.js} +2 -2
- package/dist/{Settings-veyss6AT.cjs → Settings-QxjYc9wt.cjs} +1 -1
- package/dist/{SidePanels-8tNhVPvi.js → SidePanels-2FjCLw9X.js} +3 -3
- package/dist/{SidePanels-BrItHT9y.cjs → SidePanels-9tKSnDxd.cjs} +1 -1
- package/dist/{Topbar-21E00R1y.cjs → Topbar-P3sqe-wG.cjs} +1 -1
- package/dist/{Topbar-pbqGE6Xy.js → Topbar-qloDpVn7.js} +1 -1
- package/dist/{UnsplashImages-J2kiowyR.cjs → UnsplashImages-8p0Vu9j_.cjs} +1 -1
- package/dist/{UnsplashImages-qm48rQ85.js → UnsplashImages-aVlfl8Rj.js} +1 -1
- package/dist/{UploadImages-0hJF9pBC.js → UploadImages-7xgCWSqx.js} +1 -1
- package/dist/{UploadImages-Hvetk6zO.cjs → UploadImages-PjW68B7L.cjs} +1 -1
- package/dist/{add-page-modal-U7Vh5_3P.cjs → add-page-modal-1ied5RTu.cjs} +1 -1
- package/dist/{add-page-modal-R2AAoK3R.js → add-page-modal-o4WyfyUe.js} +3 -3
- package/dist/{confirm-alert-wEcYtKUU.js → confirm-alert-OQrR9mLj.js} +1 -1
- package/dist/{confirm-alert-5io1ceQF.cjs → confirm-alert-Wvv7pPyF.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +2 -2
- package/dist/{delete-page-modal-6ogwTW2k.cjs → delete-page-modal-fKBafNSA.cjs} +1 -1
- package/dist/{delete-page-modal-69BK9Amt.js → delete-page-modal-pWTbYmMV.js} +2 -2
- package/dist/{form-uP2ot_6S.cjs → form-1HQKf4Lc.cjs} +1 -1
- package/dist/{form-_0bVd6F-.js → form-W_17vJvn.js} +1 -1
- package/dist/{index-wmzVWtmw.js → index-D15K4BZT.js} +2 -2
- package/dist/index-MIe2pKhn.cjs +1 -0
- package/dist/{index-ebo_5bTI.js → index-RYlMCgpN.js} +3 -3
- package/dist/{index-qLYDvpSi.cjs → index-kVugkp77.cjs} +2 -2
- package/dist/{page-viewer-L4MKYffF.js → page-viewer-CijLLu6R.js} +3 -3
- package/dist/{page-viewer-t7cGqLNI.cjs → page-viewer-_mpbB5Lr.cjs} +1 -1
- package/dist/{project-general-setting-sfh80XRT.cjs → project-general-setting-gwcHJ-ow.cjs} +1 -1
- package/dist/{project-general-setting-ixBlo6KH.js → project-general-setting-rHyDn0aW.js} +3 -3
- package/dist/{project-seo-setting-iJW4zDZz.js → project-seo-setting-bW4cNODi.js} +2 -2
- package/dist/{project-seo-setting-pOIFrso5.cjs → project-seo-setting-uEYqfVt6.cjs} +1 -1
- package/dist/{single-page-detail-OwDaEcUN.js → single-page-detail-UUVe4WYc.js} +4 -4
- package/dist/{single-page-detail-4KlhF5AH.cjs → single-page-detail-aNLmbldV.cjs} +1 -1
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/dist/{useAddBlockByDrop-3RSPGnwT.cjs → useAddBlockByDrop-8i3iNtPF.cjs} +1 -1
- package/dist/{useAddBlockByDrop-Vcz4iQCH.js → useAddBlockByDrop-wiagwec5.js} +1 -1
- package/package.json +2 -2
- package/dist/index-uu0QwUDN.cjs +0 -1
package/dist/studio.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./jsx-runtime-NV737rRe.js";
|
|
2
|
-
import { C as pi } from "./index-
|
|
2
|
+
import { C as pi } from "./index-RYlMCgpN.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "sonner";
|
|
5
5
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
6
6
|
import "i18next";
|
|
7
7
|
import "react-i18next";
|
|
8
|
-
import "./index-
|
|
8
|
+
import "./index-D15K4BZT.js";
|
|
9
9
|
import "@radix-ui/react-toggle";
|
|
10
10
|
import "class-variance-authority";
|
|
11
11
|
import "./utils-PPBbw5bk.js";
|
package/dist/ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-MIe2pKhn.cjs");require("./jsx-runtime-WUGKV8jN.cjs");require("./MODIFIERS-WFzDQfiT.cjs");require("react");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-It2K33fU.cjs");require("lodash");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");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-menubar");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-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("jotai");require("flat-to-nested");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");require("react-i18next");exports.Accordion=e.Accordion;exports.AccordionContent=e.AccordionContent;exports.AccordionItem=e.AccordionItem;exports.AccordionTrigger=e.AccordionTrigger;exports.Alert=e.Alert;exports.AlertDescription=e.AlertDescription;exports.AlertDialog=e.AlertDialog;exports.AlertDialogAction=e.AlertDialogAction;exports.AlertDialogCancel=e.AlertDialogCancel;exports.AlertDialogContent=e.AlertDialogContent;exports.AlertDialogDescription=e.AlertDialogDescription;exports.AlertDialogFooter=e.AlertDialogFooter;exports.AlertDialogHeader=e.AlertDialogHeader;exports.AlertDialogTitle=e.AlertDialogTitle;exports.AlertDialogTrigger=e.AlertDialogTrigger;exports.AlertTitle=e.AlertTitle;exports.Badge=e.Badge;exports.Button=e.Button;exports.Card=e.Card;exports.CardContent=e.CardContent;exports.CardDescription=e.CardDescription;exports.CardFooter=e.CardFooter;exports.CardHeader=e.CardHeader;exports.CardTitle=e.CardTitle;exports.Command=e.Command;exports.CommandDialog=e.CommandDialog;exports.CommandEmpty=e.CommandEmpty;exports.CommandGroup=e.CommandGroup;exports.CommandInput=e.CommandInput;exports.CommandItem=e.CommandItem;exports.CommandList=e.CommandList;exports.CommandSeparator=e.CommandSeparator;exports.CommandShortcut=e.CommandShortcut;exports.ContextMenu=e.ContextMenu;exports.ContextMenuCheckboxItem=e.ContextMenuCheckboxItem;exports.ContextMenuContent=e.ContextMenuContent;exports.ContextMenuGroup=e.ContextMenuGroup;exports.ContextMenuItem=e.ContextMenuItem;exports.ContextMenuLabel=e.ContextMenuLabel;exports.ContextMenuPortal=e.ContextMenuPortal;exports.ContextMenuRadioGroup=e.ContextMenuRadioGroup;exports.ContextMenuRadioItem=e.ContextMenuRadioItem;exports.ContextMenuSeparator=e.ContextMenuSeparator;exports.ContextMenuShortcut=e.ContextMenuShortcut;exports.ContextMenuSub=e.ContextMenuSub;exports.ContextMenuSubContent=e.ContextMenuSubContent;exports.ContextMenuSubTrigger=e.ContextMenuSubTrigger;exports.ContextMenuTrigger=e.ContextMenuTrigger;exports.Dialog=e.Dialog;exports.DialogContent=e.DialogContent;exports.DialogDescription=e.DialogDescription;exports.DialogFooter=e.DialogFooter;exports.DialogHeader=e.DialogHeader;exports.DialogTitle=e.DialogTitle;exports.DialogTrigger=e.DialogTrigger;exports.DropdownMenu=e.DropdownMenu;exports.DropdownMenuCheckboxItem=e.DropdownMenuCheckboxItem;exports.DropdownMenuContent=e.DropdownMenuContent;exports.DropdownMenuGroup=e.DropdownMenuGroup;exports.DropdownMenuItem=e.DropdownMenuItem;exports.DropdownMenuLabel=e.DropdownMenuLabel;exports.DropdownMenuPortal=e.DropdownMenuPortal;exports.DropdownMenuRadioGroup=e.DropdownMenuRadioGroup;exports.DropdownMenuRadioItem=e.DropdownMenuRadioItem;exports.DropdownMenuSeparator=e.DropdownMenuSeparator;exports.DropdownMenuShortcut=e.DropdownMenuShortcut;exports.DropdownMenuSub=e.DropdownMenuSub;exports.DropdownMenuSubContent=e.DropdownMenuSubContent;exports.DropdownMenuSubTrigger=e.DropdownMenuSubTrigger;exports.DropdownMenuTrigger=e.DropdownMenuTrigger;exports.HoverCard=e.HoverCard;exports.HoverCardContent=e.HoverCardContent;exports.HoverCardTrigger=e.HoverCardTrigger;exports.IconPickerField=e.IconPickerField;exports.ImagePickerField=e.ImagePickerField;exports.Input=e.Input;exports.Label=e.Label;exports.LinkField=e.LinkField;exports.Menubar=e.Menubar;exports.MenubarCheckboxItem=e.MenubarCheckboxItem;exports.MenubarContent=e.MenubarContent;exports.MenubarGroup=e.MenubarGroup;exports.MenubarItem=e.MenubarItem;exports.MenubarLabel=e.MenubarLabel;exports.MenubarMenu=e.MenubarMenu;exports.MenubarPortal=e.MenubarPortal;exports.MenubarRadioGroup=e.MenubarRadioGroup;exports.MenubarRadioItem=e.MenubarRadioItem;exports.MenubarSeparator=e.MenubarSeparator;exports.MenubarShortcut=e.MenubarShortcut;exports.MenubarSub=e.MenubarSub;exports.MenubarSubContent=e.MenubarSubContent;exports.MenubarSubTrigger=e.MenubarSubTrigger;exports.MenubarTrigger=e.MenubarTrigger;exports.Popover=e.Popover;exports.PopoverContent=e.PopoverContent;exports.PopoverTrigger=e.PopoverTrigger;exports.RTEField=e.RichTextEditorField;exports.ScrollArea=e.ScrollArea;exports.ScrollBar=e.ScrollBar;exports.Select=e.Select;exports.SelectContent=e.SelectContent;exports.SelectGroup=e.SelectGroup;exports.SelectItem=e.SelectItem;exports.SelectLabel=e.SelectLabel;exports.SelectSeparator=e.SelectSeparator;exports.SelectTrigger=e.SelectTrigger;exports.SelectValue=e.SelectValue;exports.Separator=e.Separator;exports.Sheet=e.Sheet;exports.SheetClose=e.SheetClose;exports.SheetContent=e.SheetContent;exports.SheetDescription=e.SheetDescription;exports.SheetFooter=e.SheetFooter;exports.SheetHeader=e.SheetHeader;exports.SheetTitle=e.SheetTitle;exports.SheetTrigger=e.SheetTrigger;exports.Skeleton=e.Skeleton;exports.Switch=e.Switch;exports.Tabs=e.Tabs;exports.TabsContent=e.TabsContent;exports.TabsList=e.TabsList;exports.TabsTrigger=e.TabsTrigger;exports.Textarea=e.Textarea;exports.Toaster=e.Toaster;exports.Toggle=e.Toggle;exports.Tooltip=e.Tooltip;exports.TooltipContent=e.TooltipContent;exports.TooltipPortal=e.TooltipPortal;exports.TooltipProvider=e.TooltipProvider;exports.TooltipTrigger=e.TooltipTrigger;exports.badgeVariants=e.badgeVariants;exports.buttonVariants=e.buttonVariants;exports.reducer=e.reducer;exports.toast=e.toast;exports.toggleVariants=e.toggleVariants;exports.useToast=e.useToast;
|
package/dist/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bh as J, bk as K, bi as j, bj as y, bw as z, bG as N, D as O, ap as Q, K as U, F as W, I as X, J as Y, G as Z, H as _, E as $, bx as aa, bH as ea, B as oa, bq as ta, bt as ra, bs as sa, bv as na, br as ia, bJ as ba, b3 as pa, ck as ua, b6 as la, b7 as ma, b4 as ca, b8 as da, b5 as Ca, cm as ga, cl as Ma, bB as Sa, cn as Da, bA as Ta, cs as xa, bz as Aa, cp as Ia, ct as ha, cx as wa, co as Pa, cq as Fa, cr as Ga, cu as ka, cv as Ha, cw as La, bC as va, ak as Ra, al as Ba, ao as Ea, b9 as Va, am as fa, an as qa, ba as Ja, aN as Ka, aS as ja, aP as ya, cb as za, c8 as Na, aQ as Oa, cc as Qa, cg as Ua, c9 as Wa, aR as Xa, ca as Ya, cd as Za, ce as _a, cf as $a, aO as ae, aK as ee, aM as oe, aL as te, be as re, bf as se, bl as ne, aI as ie, bg as be, bL as pe, bS as ue, bO as le, bY as me, bP as ce, bR as de, bM as Ce, bV as ge, bT as Me, bU as Se, bQ as De, b_ as Te, bZ as xe, bW as Ae, bX as Ie, bN as he, b0 as we, b2 as Pe, b1 as Fe, bd as Ge, bo as ke, bK as He, aq as Le, at as ve, aB as Re, au as Be, aC as Ee, b$ as Ve, ar as fe, as as qe, aH as Je, c0 as Ke, c2 as je, c3 as ye, c7 as ze, c5 as Ne, c4 as Oe, c6 as Qe, c1 as Ue, S as We, aJ as Xe, ax as Ye, aA as Ze, ay as _e, az as $e, bu as ao, C as eo, aF as oo, aD as to, aG as ro, bm as so, T as no, aE as io, bI as bo, bF as po, ch as uo, cj as lo, bE as mo, ci as co } from "./index-
|
|
1
|
+
import { bh as J, bk as K, bi as j, bj as y, bw as z, bG as N, D as O, ap as Q, K as U, F as W, I as X, J as Y, G as Z, H as _, E as $, bx as aa, bH as ea, B as oa, bq as ta, bt as ra, bs as sa, bv as na, br as ia, bJ as ba, b3 as pa, ck as ua, b6 as la, b7 as ma, b4 as ca, b8 as da, b5 as Ca, cm as ga, cl as Ma, bB as Sa, cn as Da, bA as Ta, cs as xa, bz as Aa, cp as Ia, ct as ha, cx as wa, co as Pa, cq as Fa, cr as Ga, cu as ka, cv as Ha, cw as La, bC as va, ak as Ra, al as Ba, ao as Ea, b9 as Va, am as fa, an as qa, ba as Ja, aN as Ka, aS as ja, aP as ya, cb as za, c8 as Na, aQ as Oa, cc as Qa, cg as Ua, c9 as Wa, aR as Xa, ca as Ya, cd as Za, ce as _a, cf as $a, aO as ae, aK as ee, aM as oe, aL as te, be as re, bf as se, bl as ne, aI as ie, bg as be, bL as pe, bS as ue, bO as le, bY as me, bP as ce, bR as de, bM as Ce, bV as ge, bT as Me, bU as Se, bQ as De, b_ as Te, bZ as xe, bW as Ae, bX as Ie, bN as he, b0 as we, b2 as Pe, b1 as Fe, bd as Ge, bo as ke, bK as He, aq as Le, at as ve, aB as Re, au as Be, aC as Ee, b$ as Ve, ar as fe, as as qe, aH as Je, c0 as Ke, c2 as je, c3 as ye, c7 as ze, c5 as Ne, c4 as Oe, c6 as Qe, c1 as Ue, S as We, aJ as Xe, ax as Ye, aA as Ze, ay as _e, az as $e, bu as ao, C as eo, aF as oo, aD as to, aG as ro, bm as so, T as no, aE as io, bI as bo, bF as po, ch as uo, cj as lo, bE as mo, ci as co } from "./index-D15K4BZT.js";
|
|
2
2
|
import "./jsx-runtime-NV737rRe.js";
|
|
3
3
|
import "./MODIFIERS-MLfpKQY1.js";
|
|
4
4
|
import "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("react"),u=require("lodash"),t=require("./index-
|
|
1
|
+
"use strict";const n=require("react"),u=require("lodash"),t=require("./index-MIe2pKhn.cjs"),a=()=>{const{addCoreBlock:r}=t.useAddBlock(),l=t.useBuilderProp("getExternalPredefinedBlock");return n.useCallback(async s=>{const{block:o,dropTargetId:e,relativeIndex:c}=s;if(u.has(o,"format")){const d=await l(o);return r({blocks:d},e===0?null:e,c)}return r(o,e===0?null:e,c)},[r])};exports.useAddBlockByDrop=a;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback as n } from "react";
|
|
2
2
|
import { has as s } from "lodash";
|
|
3
|
-
import { O as a, i as u } from "./index-
|
|
3
|
+
import { O as a, i as u } from "./index-D15K4BZT.js";
|
|
4
4
|
const B = () => {
|
|
5
5
|
const { addCoreBlock: r } = a(), l = u("getExternalPredefinedBlock");
|
|
6
6
|
return n(
|
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.1.
|
|
8
|
+
"version": "1.1.10",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@bobthered/tailwindcss-palette-generator": "3.1.1",
|
|
76
|
-
"@chaibuilder/runtime": "0.1.
|
|
76
|
+
"@chaibuilder/runtime": "0.1.9",
|
|
77
77
|
"@floating-ui/dom": "1.4.5",
|
|
78
78
|
"@floating-ui/react-dom": "2.0.1",
|
|
79
79
|
"@mhsdesign/jit-browser-tailwindcss": "0.4.0",
|
package/dist/index-uu0QwUDN.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("./jsx-runtime-WUGKV8jN.cjs"),w=require("react"),fn=require("@radix-ui/react-toggle"),re=require("class-variance-authority"),c=require("./utils-It2K33fU.cjs"),xn=require("@radix-ui/react-switch"),gn=require("@radix-ui/react-slot"),bn=require("@radix-ui/react-accordion"),L=require("@radix-ui/react-icons"),hn=require("@radix-ui/react-alert-dialog"),vn=require("@radix-ui/react-dialog"),yn=require("@radix-ui/react-label"),jn=require("@radix-ui/react-scroll-area"),wn=require("@radix-ui/react-tabs"),Rn=require("@radix-ui/react-tooltip"),kn=require("@radix-ui/react-popover"),Nn=require("@radix-ui/react-menubar"),An=require("@radix-ui/react-hover-card"),Sn=require("@radix-ui/react-select"),Cn=require("@radix-ui/react-dropdown-menu"),En=require("@radix-ui/react-separator"),_n=require("@radix-ui/react-toast"),U=require("cmdk"),Bn=require("@radix-ui/react-context-menu"),vt=require("react-icons-picker"),Pn=require("react-dom"),i=require("lodash"),Tn=require("react-quill"),u=require("jotai"),yt=require("flat-to-nested"),fe=require("redux-undo"),F=require("./MODIFIERS-WFzDQfiT.cjs"),In=require("@chaibuilder/runtime"),Mn=require("@react-hookz/web");require("react-i18next");function D(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const f=D(w),jt=D(fn),Oe=D(xn),ae=D(bn),V=D(hn),_=D(vn),wt=D(yn),oe=D(jn),ie=D(wn),de=D(Rn),ge=D(kn),C=D(Nn),ke=D(An),M=D(Sn),B=D(Cn),Rt=D(En),G=D(_n),P=D(Bn);var O={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let Dn=0;function K(e,t){const s=`atom${++Dn}`,o={toString:()=>s};return typeof e=="function"?o.read=e:(o.init=e,o.read=a=>a(o),o.write=(a,r,l)=>r(o,typeof l=="function"?l(a(o)):l)),t&&(o.write=t),o}const Pe=e=>"init"in e,Te=e=>!!e.write,je=new WeakMap,On=(e,t)=>{je.set(e,t),e.catch(()=>{}).finally(()=>je.delete(e))},at=(e,t)=>{const s=je.get(e);s&&(je.delete(e),s(t))},rt=(e,t)=>{e.status="fulfilled",e.value=t},it=(e,t)=>{e.status="rejected",e.reason=t},Ln=e=>typeof(e==null?void 0:e.then)=="function",pe=(e,t)=>"v"in e&&"v"in t&&Object.is(e.v,t.v),lt=(e,t)=>"e"in e&&"e"in t&&Object.is(e.e,t.e),ce=e=>"v"in e&&e.v instanceof Promise,Vn=(e,t)=>"v"in e&&"v"in t&&e.v.orig&&e.v.orig===t.v.orig,he=e=>{if("e"in e)throw e.e;return e.v},kt=()=>{const e=new WeakMap,t=new WeakMap,s=new Map;let o,a,r;(O?"production":void 0)!=="production"&&(o=new Set,a=new Set,r=new Set);const l=m=>e.get(m),p=(m,g)=>{(O?"production":void 0)!=="production"&&Object.freeze(g);const y=e.get(m);if(e.set(m,g),s.has(m)||s.set(m,y),y&&ce(y)){const b="v"in g?g.v instanceof Promise?g.v:Promise.resolve(g.v):Promise.reject(g.e);at(y.v,b)}},x=(m,g,y)=>{const b=new Map;let j=!1;y.forEach((v,k)=>{!v&&k===m&&(v=g),v?(b.set(k,v),g.d.get(k)!==v&&(j=!0)):(O?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(j||g.d.size!==b.size)&&(g.d=b)},d=(m,g,y)=>{const b=l(m),j={d:(b==null?void 0:b.d)||new Map,v:g};if(y&&x(m,j,y),b&&pe(b,j)&&b.d===j.d)return b;if(b&&ce(b)&&ce(j)&&Vn(b,j)){if(b.d===j.d)return b;j.v=b.v}return p(m,j),j},h=(m,g,y,b)=>{if(Ln(g)){let j;const v=new Promise((k,T)=>{let A=!1;g.then(E=>{if(!A){A=!0;const S=l(m),J=d(m,v,y);rt(v,E),k(E),(S==null?void 0:S.d)!==J.d&&$(m,J,S==null?void 0:S.d)}},E=>{if(!A){A=!0;const S=l(m),J=d(m,v,y);it(v,E),T(E),(S==null?void 0:S.d)!==J.d&&$(m,J,S==null?void 0:S.d)}}),j=E=>{A||(A=!0,E.then(S=>rt(v,S),S=>it(v,S)),k(E))}});return v.orig=g,v.status="pending",On(v,k=>{k&&j(k),b==null||b()}),d(m,v,y)}return d(m,g,y)},R=(m,g,y)=>{const b=l(m),j={d:(b==null?void 0:b.d)||new Map,e:g};return y&&x(m,j,y),b&<(b,j)&&b.d===j.d?b:(p(m,j),j)},N=m=>{const g=l(m);if(g&&(g.d.forEach((A,E)=>{E!==m&&!t.has(E)&&N(E)}),Array.from(g.d).every(([A,E])=>{const S=l(A);return A===m||S===E||S&&!ce(S)&&pe(S,E)})))return g;const y=new Map;let b=!0;const j=A=>{if(A===m){const S=l(A);if(S)return y.set(A,S),he(S);if(Pe(A))return y.set(A,void 0),A.init;throw new Error("no atom init")}const E=N(A);return y.set(A,E),he(E)};let v,k;const T={get signal(){return v||(v=new AbortController),v.signal},get setSelf(){return(O?"production":void 0)!=="production"&&!Te(m)&&console.warn("setSelf function cannot be used with read-only atom"),!k&&Te(m)&&(k=(...A)=>{if((O?"production":void 0)!=="production"&&b&&console.warn("setSelf function cannot be called in sync"),!b)return Q(m,...A)}),k}};try{const A=m.read(j,T);return h(m,A,y,()=>v==null?void 0:v.abort())}catch(A){return R(m,A,y)}finally{b=!1}},I=m=>he(N(m)),q=m=>{let g=t.get(m);return g||(g=Y(m)),g},z=(m,g)=>!g.l.size&&(!g.t.size||g.t.size===1&&g.t.has(m)),X=m=>{const g=t.get(m);g&&z(m,g)&&se(m)},le=m=>{const g=new Map,y=new WeakMap,b=v=>{const k=t.get(v);k==null||k.t.forEach(T=>{T!==v&&(g.set(T,(g.get(T)||new Set).add(v)),y.set(T,(y.get(T)||0)+1),b(T))})};b(m);const j=v=>{const k=t.get(v);k==null||k.t.forEach(T=>{var A;if(T!==v){let E=y.get(T);if(E&&y.set(T,--E),!E){let S=!!((A=g.get(T))!=null&&A.size);if(S){const J=l(T),pn=N(T);S=!J||!pe(J,pn)}S||g.forEach(J=>J.delete(T))}j(T)}})};j(m)},Z=(m,...g)=>{let y=!0;const b=k=>he(N(k)),j=(k,...T)=>{let A;if(k===m){if(!Pe(k))throw new Error("atom not writable");const E=l(k),S=h(k,T[0]);(!E||!pe(E,S))&&le(k)}else A=Z(k,...T);if(!y){const E=ee();(O?"production":void 0)!=="production"&&a.forEach(S=>S({type:"async-write",flushed:E}))}return A},v=m.write(b,j,...g);return y=!1,v},Q=(m,...g)=>{const y=Z(m,...g),b=ee();return(O?"production":void 0)!=="production"&&a.forEach(j=>j({type:"write",flushed:b})),y},Y=(m,g)=>{const y={t:new Set(g&&[g]),l:new Set};if(t.set(m,y),(O?"production":void 0)!=="production"&&r.add(m),N(m).d.forEach((b,j)=>{const v=t.get(j);v?v.t.add(m):j!==m&&Y(j,m)}),N(m),Te(m)&&m.onMount){const b=m.onMount((...j)=>Q(m,...j));b&&(y.u=b)}return y},se=m=>{var g;const y=(g=t.get(m))==null?void 0:g.u;y&&y(),t.delete(m),(O?"production":void 0)!=="production"&&r.delete(m);const b=l(m);b?(ce(b)&&at(b.v),b.d.forEach((j,v)=>{if(v!==m){const k=t.get(v);k&&(k.t.delete(m),z(v,k)&&se(v))}})):(O?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",m)},$=(m,g,y)=>{const b=new Set(g.d.keys());y==null||y.forEach((j,v)=>{if(b.has(v)){b.delete(v);return}const k=t.get(v);k&&(k.t.delete(m),z(v,k)&&se(v))}),b.forEach(j=>{const v=t.get(j);v?v.t.add(m):t.has(m)&&Y(j,m)})},ee=()=>{let m;for((O?"production":void 0)!=="production"&&(m=new Set);s.size;){const g=Array.from(s);s.clear(),g.forEach(([y,b])=>{const j=l(y);if(j){j.d!==(b==null?void 0:b.d)&&$(y,j,b==null?void 0:b.d);const v=t.get(y);v&&!(b&&!ce(b)&&(pe(b,j)||lt(b,j)))&&(v.l.forEach(k=>k()),(O?"production":void 0)!=="production"&&m.add(y))}else(O?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if((O?"production":void 0)!=="production")return o.forEach(g=>g("state")),m},te=(m,g)=>{const y=q(m),b=ee(),j=y.l;return j.add(g),(O?"production":void 0)!=="production"&&(o.forEach(v=>v("sub")),a.forEach(v=>v({type:"sub",flushed:b}))),()=>{j.delete(g),X(m),(O?"production":void 0)!=="production"&&(o.forEach(v=>v("unsub")),a.forEach(v=>v({type:"unsub"})))}};return(O?"production":void 0)!=="production"?{get:I,set:Q,sub:te,dev_subscribe_store:(m,g)=>g!==2?(console.warn("The current StoreListener revision is 2. The older ones are deprecated."),o.add(m),()=>{o.delete(m)}):(a.add(m),()=>{a.delete(m)}),dev_get_mounted_atoms:()=>r.values(),dev_get_atom_state:m=>e.get(m),dev_get_mounted:m=>t.get(m),dev_restore_atoms:m=>{for(const[y,b]of m)Pe(y)&&(h(y,b),le(y));const g=ee();a.forEach(y=>y({type:"restore",flushed:g}))}}:{get:I,set:Q,sub:te}};let Ie;const zn=()=>(Ie||(Ie=kt()),Ie);var Fn={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const qn=w.createContext(void 0),qe=e=>{const t=w.useContext(qn);return(e==null?void 0:e.store)||t||zn()};const Un=e=>typeof(e==null?void 0:e.then)=="function",$n=w.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function Nt(e,t){const s=qe(t),[[o,a,r],l]=w.useReducer(d=>{const h=s.get(e);return Object.is(d[0],h)&&d[1]===s&&d[2]===e?d:[h,s,e]},void 0,()=>[s.get(e),s,e]);let p=o;(a!==s||r!==e)&&(l(),p=s.get(e));const x=t==null?void 0:t.delay;return w.useEffect(()=>{const d=s.sub(e,()=>{if(typeof x=="number"){setTimeout(l,x);return}l()});return l(),d},[s,e,x]),w.useDebugValue(p),Un(p)?$n(p):p}function At(e,t){const s=qe(t);return w.useCallback((...a)=>{if((Fn?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return s.set(e,...a)},[s,e])}function Gn(e,t){return[Nt(e,t),At(e,t)]}var Ue={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const St=Symbol();function Hn(e,t){const s=K(e,(o,a,r)=>a(s,t(o(s),r)));return s}const ct=(e,t,s)=>(t.has(s)?t:t.set(s,e())).get(s),Wn=new WeakMap,Yn=(e,t,s)=>{const o=ct(()=>new WeakMap,Wn,t);return ct(e,o,s)},Kn={},dt=e=>!!e.write,Jn=e=>typeof e=="function";function Qn(e,t){return Yn(()=>{const s=new WeakMap,o=(l,p)=>{let x=s.get(l);if(x)return x;const d=p&&s.get(p),h=[],R=[];return l.forEach((N,I)=>{const q=t?t(N):I;R[I]=q;const z=d&&d.atomList[d.keyList.indexOf(q)];if(z){h[I]=z;return}const X=Z=>{const Q=Z(a),Y=Z(e),$=o(Y,Q==null?void 0:Q.arr).keyList.indexOf(q);if($<0||$>=Y.length){const ee=l[o(l).keyList.indexOf(q)];if(ee)return ee;throw new Error("splitAtom: index out of bounds for read")}return Y[$]},le=(Z,Q,Y)=>{const se=Z(a),$=Z(e),te=o($,se==null?void 0:se.arr).keyList.indexOf(q);if(te<0||te>=$.length)throw new Error("splitAtom: index out of bounds for write");const m=Jn(Y)?Y($[te]):Y;Q(e,[...$.slice(0,te),m,...$.slice(te+1)])};h[I]=dt(e)?K(X,le):K(X)}),d&&d.keyList.length===R.length&&d.keyList.every((N,I)=>N===R[I])?x=d:x={arr:l,atomList:h,keyList:R},s.set(l,x),x},a=K(l=>{const p=l(a),x=l(e);return o(x,p==null?void 0:p.arr)});(Ue?"production":void 0)!=="production"&&(a.debugPrivate=!0),a.init=void 0;const r=dt(e)?K(l=>l(a).atomList,(l,p,x)=>{switch(x.type){case"remove":{const d=l(r).indexOf(x.atom);if(d>=0){const h=l(e);p(e,[...h.slice(0,d),...h.slice(d+1)])}break}case"insert":{const d=x.before?l(r).indexOf(x.before):l(r).length;if(d>=0){const h=l(e);p(e,[...h.slice(0,d),x.value,...h.slice(d)])}break}case"move":{const d=l(r).indexOf(x.atom),h=x.before?l(r).indexOf(x.before):l(r).length;if(d>=0&&h>=0){const R=l(e);d<h?p(e,[...R.slice(0,d),...R.slice(d+1,h),R[d],...R.slice(h)]):p(e,[...R.slice(0,h),R[d],...R.slice(h,d),...R.slice(d+1)])}break}}}):K(l=>l(a).atomList);return r},e,t||Kn)}function Xn(e){const t=Symbol(),s=K(t);(Ue?"production":void 0)!=="production"&&(s.debugPrivate=!0);const o=K((a,r)=>{const l=a(s);return l!==t?l:e(a,r)},(a,r,l)=>{if(l===St)r(s,t);else if(typeof l=="function"){const p=a(o);r(s,l(p))}else r(s,l)});return o}const Zn=e=>typeof(e==null?void 0:e.then)=="function";function ea(e){let t,s;const o={getItem:(a,r)=>{var l,p;const x=h=>{if(h=h||"",t!==h){try{s=JSON.parse(h)}catch{return r}t=h}return s},d=(p=(l=e())==null?void 0:l.getItem(a))!=null?p:null;return Zn(d)?d.then(x):x(d)},setItem:(a,r)=>{var l;return(l=e())==null?void 0:l.setItem(a,JSON.stringify(r))},removeItem:a=>{var r;return(r=e())==null?void 0:r.removeItem(a)}};return typeof window<"u"&&typeof window.addEventListener=="function"&&(o.subscribe=(a,r,l)=>{if(!(e()instanceof window.Storage))return()=>{};const p=x=>{if(x.storageArea===e()&&x.key===a){let d;try{d=JSON.parse(x.newValue||"")}catch{d=l}r(d)}};return window.addEventListener("storage",p),()=>{window.removeEventListener("storage",p)}}),o}const ta=ea(()=>typeof window<"u"?window.localStorage:void 0);function ue(e,t,s=ta,o){const a=o==null?void 0:o.unstable_getOnInit,r=K(a?s.getItem(e,t):t);return(Ue?"production":void 0)!=="production"&&(r.debugPrivate=!0),r.onMount=p=>{a||p(s.getItem(e,t));let x;return s.subscribe&&(x=s.subscribe(e,p,t)),x},K(p=>p(r),(p,x,d)=>{const h=typeof d=="function"?d(p(r)):d;return h===St?(x(r,t),s.removeItem(e)):h instanceof Promise?h.then(R=>(x(r,R),s.setItem(e,R))):(x(r,h),s.setItem(e,h))})}const Ne=u.atom(null);Ne.debugLabel="chaiBuilderPropsAtom";const Ct=u.atom({});Ct.debugLabel="chaiExternalDataAtom";const sa=()=>!1,oa=e=>{const t=e.replace(F.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}};const na=new yt({children:"blockNodes"}),Et=(e,t=null)=>i.flatten(e.map(s=>{if(s=t!==null?{...s,parent:t}:s,s.children&&s.children.length){const o=[...s.children];return delete s.children,i.flatten([s,...Et(o,s._id)])}return s}));function _t(e,t,s){const o=i.filter(e,r=>r._parent===t),a=[];for(let r=0;r<o.length;r++){const l=Bt(o[r]);if(Object.keys(l).length>0&&Object.keys(l).forEach(p=>{o[r][p]=`slot:${c.generateUUID()}`}),i.filter(e,{_parent:o[r]._id}).length>0){const p=c.generateUUID();a.push({...o[r],oldId:o[r]._id,_id:p,_parent:s}),a.push(i.flatten(_t(e,o[r]._id,p)))}else a.push({...o[r],oldId:o[r]._id,_id:c.generateUUID(),_parent:s})}return i.flatten(a)}function aa(e){let t=na.convert(e.map(s=>i.omit(s,["settings"])));return t=!t.type&&t.blockNodes?t.blockNodes:i.isEmpty(t)?[]:[t],t}const Bt=e=>{const t={};return Object.keys(e).forEach(s=>{i.isString(e[s])&&e[s].startsWith("slot")&&(t[s]=e[s].replace("slot:",""))}),t},ra=(e,t,s=null)=>{let o=i.find(e,{_id:t});o={...o,oldId:o._id,_id:c.generateUUID()},s&&(o={...o,_parent:s});const a=[o];i.filter(e,{_parent:t}).length>0&&a.push(i.flatten(_t(e,t,o._id)));const r=i.flatten(a);return i.map(r,l=>{const p=l,x=Bt(p);return Object.keys(x).length>0&&Object.keys(x).forEach(d=>{const h=i.find(r,{oldId:x[d].replace("slot:","")});p[d]=`slot:${h._id}`}),i.omit(p,["global","oldId"])})};const ia=fe((e=[],t)=>{switch(t.type){case"add_new_blocks":case"add_duplicate_blocks":return[...e,...t.payload];case"create_snapshot":return[...e];case"set_blocks":case"set_page_blocks":return[...t.payload];case"update_props":case"update_props_realtime":const{payload:s}=t;return e.map(o=>(s.ids.includes(o._id)&&!i.isEmpty(t.payload.props)&&Object.keys(t.payload.props).forEach(a=>{i.set(o,a,t.payload.props[a])}),o));default:return e}},{debug:!1,ignoreInitialState:!1,limit:30,filter:fe.excludeAction(["update_props_realtime","add_duplicate_blocks","set_page_blocks"])}),Ae=Hn({past:[],present:[],future:[]},ia);Ae.debugLabel="pageBlocksAtom";const H=u.atom(e=>{var t;return(t=e(Ae))==null?void 0:t.present});H.debugLabel="presentBlocksAtom";const $e=Qn(H);$e.debugLabel="pageBlocksAtomsAtom";const Pt=u.atom(e=>aa(e(H)));Pt.debugLabel="pageBlocksTreeAtom";const la=u.atom("");la.debugLabel="builderActivePageAtom";const ca=u.atom(-1);ca.debugLabel="destinationDropIndexAtom";const Tt=u.atom(!1);Tt.debugLabel="addBlocksModalAtom";const It=u.atom([]);It.debugLabel="buildingBlocksAtom";const Mt=u.atom(e=>{const t=e(It);return i.filter(t,s=>i.has(s,"blockId"))});Mt.debugLabel="globalBlocksAtom";const W=()=>{const[,e]=u.useAtom(Ae);return e},da=()=>{const e=W(),t=u.useAtomValue(Pt),s=w.useCallback(o=>{const a=Et(o);e({type:"set_page_blocks",payload:a})},[e]);return[t,s]},ua=()=>{const e=W();return[w.useCallback(s=>{e({type:"set_page_blocks",payload:s})},[e])]},Dt=e=>["Box","Slot","Form","Link","Heading","List","ListItem","Table","TableCell"].includes(e),ma=e=>!["Slot"].includes(e),pa=e=>!["Slot"].includes(e);function Le(e,t){return e==="Slot"||t==="List"&&e!=="ListItem"||t==="Row"&&e!=="Column"||t==="Heading"&&!i.includes(["Span","Text"],e)||t==="Paragraph"&&!i.includes(["Span","Text"],e)?!1:Dt(t)}const fa=(e,{dragSource:t,dropTarget:s})=>{const o=i.get(t,"data._type",""),a=i.get(s,"data._type","");return o==="Slot"||i.get(t,"id")&&i.get(t,"id")===i.get(s,"id")?!1:i.isEmpty(a)?!0:Le(o,a)},Ge=u.atom([]);Ge.debugLabel="selectedBlockIdsAtom";const He=u.atom(e=>{const t=e(H),s=e(Ge);return i.map(i.filter(t,({_id:o})=>i.includes(s,o)),o=>({...o}))});He.debugLabel="selectedBlocksAtom";const We=u.atom(e=>{const t=e(He);return t.length===0?null:t.length===1?t[0]:{type:"Multiple",id:i.map(t,"id")}});We.debugLabel="selectedBlockAtom";const xa=e=>i.get(e,"parent",null),ga=u.atom(e=>{const t=e(He),s=i.map(t,xa);return i.filter(e(H),o=>i.includes(s,o._id))});ga.debugLabel="selectedBlocksParentsAtom";const Ot=u.atom(()=>!1);Ot.debugLabel="selectedBlockFlexChildAtom";const Lt=u.atom(()=>!1);Lt.debugLabel="selectedBlockGridChildAtom";const Ye=u.atom("");Ye.debugLabel="styleStateAtom";const Vt=ue("styleBreakpoint","xs");Vt.debugLabel="styleBreakpointAtom";const ba=()=>({flexChild:u.useAtomValue(Ot),gridChild:u.useAtomValue(Lt)}),ha=()=>u.useAtomValue(We);const me=()=>{const[e,t]=u.useAtom(Ge),s=w.useCallback(o=>{t(a=>i.includes(a,o)?i.without(a,o):[...a,o])},[t]);return[e,t,s]},Ve=e=>{switch(e.type){case"singular":return e.uiSchema;case"model":const{properties:t}=e,s={};return Object.keys(t).forEach(r=>{const l=t[r];if(i.includes(["slot","styles"],l.type))return;const p=r;s[p]=Ve(l)}),s;case"list":const{itemProperties:o}=e,a={items:{}};return Object.keys(o).forEach(r=>{const l=o[r];if(i.includes(["slot","styles"],l.type))return;const p=r;a.items[p]=Ve(l)}),a;default:return{}}},ze=e=>{switch(e.type){case"singular":return e.schema;case"model":const{properties:t,title:s}=e,o={title:s,type:"object",properties:{}};return Object.keys(t).forEach(p=>{const x=t[p];if(i.includes(["slot","styles"],x.type))return;const d=p;o.properties[d]=ze(x)}),o;case"list":const{itemProperties:a,title:r}=e,l={title:r,type:"array",items:{type:"object",properties:{}}};return Object.keys(a).forEach(p=>{const x=a[p];if(i.includes(["slot","styles"],x.type))return;const d=p;l.items.properties[d]=ze(x),i.set(l.items,"title",i.get(x,"itemTitle",`${r} item`))}),l;default:return{}}},zt=e=>{const t={};return Object.keys(e).forEach(s=>{t[s]=ya(e[s])}),t},va=e=>{if(i.isEmpty(e.default))return[];const{itemProperties:t}=e;return i.map(e.default,s=>{const o={...s};return i.forIn(s,(a,r)=>{i.has(t,r)&&i.get(t[r],"i18n",!1)&&(o[r]=F.I18N_KEY)}),o})},ya=e=>{switch(e.type){case"styles":return e.default;case"slot":return`${F.SLOT_KEY}${c.generateUUID()}`;case"singular":const{i18n:t,schema:s}=e;return t?F.I18N_KEY:i.get(s,"default","");case"model":return zt(e.properties);case"list":return va(e);default:return""}};const Ft=()=>u.useAtomValue(H);function ut(e,t,s,o,a){if(s!==null){const x=i.findIndex(e,{_parent:t}),d=(x===-1?0:x)+s;return e.splice(d,0,...o),e}if(!a){const d=i.findIndex(e,{_id:t})+1;return e.splice(d,0,...o),e}let r=i.findIndex(e,{_id:t});const l=i.filter(e,{_parent:t});i.isEmpty(l)||(r=i.findIndex(e,{_id:i.last(l)._id}));const p=r+1;return e.splice(p,0,...o),e}const ja=()=>{const e=W(),t=Ft(),[,s]=me(),o=w.useCallback((r,l,p)=>{var R;for(let N=0;N<r.length;N++){const{_id:I}=r[N];r[N]._id=c.generateUUID();const q=i.filter(r,{_parent:I});for(let z=0;z<q.length;z++)q[z]._parent=r[N]._id}const x=i.first(r);let d;l&&(d=i.find(t,{_id:l}),r[0]._parent=l);const h=d?Le(x._type,d._type):!0;return!h&&d&&(r[0]._parent=d._parent),e({type:"set_blocks",payload:ut(t,l||null,p||null,r,h)}),s([(R=i.first(r))==null?void 0:R._id]),i.first(r)},[t,e,s]);return{addCoreBlock:w.useCallback((r,l,p)=>{if(i.has(r,"blocks")){const z=r.blocks;return o(z,l,p)}const x=c.generateUUID(),d=zt(r.props),h=[];i.forIn(d,(z,X)=>{if(i.startsWith(z,F.SLOT_KEY)){const le=z.replace(F.SLOT_KEY,"");h.push({_id:le,_type:"Slot",_parent:x,_name:r.props[X].name,_styles:r.props[X].styles,_emptyStyles:r.props[X].emptyStyles})}});const R={_type:r.type,_id:x,...d};let N;l&&(N=i.find(t,{_id:l}),R._parent=l);const I=N?Le(r.type,N._type):!0;!I&&N&&(R._parent=N._parent);const q=[R,...h];return e({type:"set_blocks",payload:ut(t,l||null,p||null,q,I)}),s([R._id]),R},[o,t,e,s]),addPredefinedBlock:o}},mt={xs:420,sm:620,md:768,lg:1024,xl:1280,"2xl":1536},pt=["xs","sm","md","lg","xl","2xl"];function wa(e,t){if(t===null)return"baseClasses";const s=t.mq;if(s==="xs"||t.dark||t.mod!=="")return"classes";let o="baseClasses",a=pt.indexOf(s);for(;a>0;){const r=pt[a-1];if(i.find(e,{mq:r,property:t.property})){o="classes";break}a--}return o}const ft=[];function Ra(e="",t="",s=[]){e=e.trim().replace(/ +/g,"");let o=i.filter(i.map(e.split(" "),c.constructClassObject),d=>!i.isNull(d)),a=i.filter(i.map(t.split(" "),c.constructClassObject),d=>!i.isNull(d));a=i.filter(a,d=>!i.includes(ft,d.property));const r=[],l=[];i.each(s,d=>{const h=c.constructClassObject(d),R=i.find(o,i.pick(h,["dark","mq","mod","property"]));if(R&&(o=i.filter(o,N=>N.fullCls!==(R==null?void 0:R.fullCls))),r.push(h),h.mq==="xs"&&!h.dark&&h.mod===""&&(a=i.filter(a,N=>N.property!==h.property)),wa(o,h)==="baseClasses"&&!i.includes(ft,h.property)){const N=i.find(a,i.pick(h,["property"]));R&&(a=i.filter(a,I=>I.fullCls!==(N==null?void 0:N.fullCls))),l.push({...h,fullCls:h.cls,mq:"xs"})}});const p=i.map(i.sortBy([...o,...r],d=>mt[d.mq]),"fullCls").join(" ");return`${i.map(i.sortBy([...a,...l],d=>mt[d.mq]),"fullCls").join(" ").trim()},${p.trim()}`.trim().replace(/ +/g,"")}const be=u.atom([]);be.debugLabel="selectedStylingBlocksAtom";const Ke=()=>u.useAtom(be),ka=e=>{const t=e.replace(F.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}},Na=u.atom(null,(e,t,{blockIds:s,newClasses:o,dispatch:a})=>{const r=i.filter(e($e),p=>s.includes(e(p)._id)),l=i.first(e(be));i.each(r,p=>{const x=e(p),d=i.get(x,l.prop,`${F.STYLES_KEY},`),{baseClasses:h,classes:R}=ka(d);a({type:"update_props_realtime",payload:{ids:[x._id],props:{[l.prop]:`${F.STYLES_KEY}${Ra(R,h,o)}`}}})})}),Aa=()=>{const e=W(),t=u.useSetAtom(Na);return w.useCallback((s,o,a)=>{t({blockIds:s,newClasses:o,dispatch:e}),a&&setTimeout(()=>e({type:"create_snapshot"}),500)},[e,t])},xt=()=>{},qt=()=>{const e=In.useChaiBlocks(),t=u.useAtomValue(Mt),s=()=>{xt()},o=w.useCallback(()=>xt(),[]);return[e,t,s,o]},Sa=u.atom(!1),Ut=()=>{const[e,t]=u.useAtom(Sa);return[e,t]},Ca=u.atom(F.BRANDING_OPTIONS_DEFAULTS),$t=()=>{const[e,t]=u.useAtom(Ca);return[i.isObject(e)?{...F.BRANDING_OPTIONS_DEFAULTS,...e}:F.BRANDING_OPTIONS_DEFAULTS,t]},Ea=u.atom(null),Gt=()=>({currentPage:u.useAtomValue(Ea)}),Ht=new yt({});function _a(e){let t=Ht.convert(e);return t=!t.type&&t.children&&t.children.length?t.children:i.isEmpty(t)?[]:[t],t}const Je=(e,t)=>i.flatten(e.map(s=>{if(s=t?{...s,parent:t}:{...s},s.children){const o=[...s.children];return delete s.children,i.flatten([s,...Je(o,s._id)])}return s}));function Qe(e,t=!1){for(let s=0;s<e.length;s++){const o=e[s];o.global&&!t?e[s]={type:"GlobalBlock",blockId:o.blockId,_parent:i.get(o,"parent",null),_id:o._id}:o.children&&o.children.length&&Qe(o.children)}}function Wt(e){let t=[],s=i.filter(e,{type:"GlobalBlock"});return s.length>0&&(s=i.map(s,Yt),i.each(s,o=>{t=[...t,...Ba(o)]})),t}function Ba(e){let t=[];const s=i.get(i.first(e),"parent",null);i.set(i.first(e),"parent",null);const o=[Ht.convert(Kt(e))];Qe(o,!0);let a=Je(o,e[0]._id);return a=i.set(a,"0.parent",s),t=[...t,a,...Wt(a)],t}function Yt(e){const t=i.find(Fe,{_id:e._id});if(!t)return[];const s=[t],o=i.filter(Fe,{_parent:e._id});return o.length?i.flatten([...s,...i.flatten(i.map(o,Yt))]):i.flatten(s)}const Kt=e=>JSON.parse(JSON.stringify(e));let Fe=[];function Pa(e){Fe=e;const t=_a(Kt(e));Qe(t);const s=Je(t,null),o=Wt(s),a={};return i.each(o,r=>i.set(a,i.first(r).blockId,r)),[s,a]}const Xe=()=>{const[e]=$t(),{currentPage:t}=Gt(),s=u.useAtomValue(H);return w.useCallback(()=>{const o=i.map(s,l=>i.omit(l,["expanded","order","title","siblings","tempClasses"])),[a=[],r=[]]=Pa(o);return{currentPage:t,blocks:a,globalBlocks:r}},[e,t,s])},ne=(e,t=void 0)=>{const s=u.useAtomValue(Ne);return i.get(s,e,t)},Jt=u.atom(!1);Jt.debugLabel="readOnlyModeAtom";const Qt=u.atom(!1);Qt.debugLabel="advanceStylingOpenAtom";const Xt=u.atom("online");Xt.debugLabel="networkModeAtom";const Ta=u.atom(!1);Ta.debugLabel="codeEditorOpenAtom";const Zt=u.atom(!1);Zt.debugLabel="editLayerNameAtom";const Ia=u.atom("");Ia.debugLabel="activeLanguageAtom";const Ma=u.atom("");Ma.debugLabel="primaryLanguageAtom";const es=u.atom(null);es.debugLabel="canvasIframeAtom";const ts=u.atom("layers");ts.debugLabel="activePanelAtom";const ss=u.atom(!1);ss.debugLabel="addBlockOffCanvasAtom";const os=u.atom("");os.debugLabel="showPredefinedBlockCategoryAtom";const Se=u.atom({undoCount:0,redoCount:0});Se.debugLabel="historyStatesAtom";const ns=u.atom("");ns.debugLabel="inlineEditingActiveAtom";const as=u.atom(!1);as.debugLabel="draggingFlagAtom";const rs=u.atom("");rs.debugLabel="draggedBlockIdAtom";const Ze=u.atom([]);Ze.debugLabel="dataProvidersAtom";const is=()=>u.useAtom(Ze),Ce=u.atom("SAVED");Ce.debugLabel="pageSyncStateAtom";const Da=()=>{const[e,t]=u.useAtom(Ce),s=ne("onSaveBlocks",async()=>{}),o=ne("onSavePage",async()=>{}),a=ne("onSyncStatusChange",()=>{}),r=Xe(),l=u.useSetAtom(Se),{undoCount:p,redoCount:x}=Ee(),[d]=is();return{savePage:Mn.useThrottledCallback(async()=>{t("SAVING"),a("SAVING");const R=r();return await o({blocks:R.blocks,providers:d}),setTimeout(()=>{l({undoCount:p,redoCount:x}),t("SAVED"),a("SAVED")},100),!0},[r,t,a,s],5e3),syncState:e,setSyncState:t}},Ee=()=>{const e=u.useAtomValue(Ae),[{undoCount:t,redoCount:s}]=u.useAtom(Se),o=W(),[a]=Ut(),[,r]=me(),[,l]=Ke(),[p,x]=u.useAtom(Ce),d=ne("onSyncStatusChange",()=>{}),h=w.useCallback(()=>{o({type:"create_snapshot"})},[o]);return w.useEffect(()=>{(p==="SAVED"&&t!==(e==null?void 0:e.past.length)||s!==(e==null?void 0:e.future.length))&&(x("UNSAVED"),d("UNSAVED"))},[e==null?void 0:e.past.length,e==null?void 0:e.future.length,t,s,d,x,p]),{undoCount:e==null?void 0:e.past.length,redoCount:e==null?void 0:e.future.length,undo:w.useCallback(()=>{a||(o(fe.ActionCreators.undo()),setTimeout(()=>{l([]),r([])},200))},[o,a,r,l]),redo:w.useCallback(()=>{a||(o(fe.ActionCreators.redo()),setTimeout(()=>{l([]),r([])},200))},[a,o,l,r]),clear:()=>{o(fe.ActionCreators.clearHistory())},createSnapshot:h}},ls=()=>u.useAtom(Vt),cs=ue("canvasWidth",800),ds=u.atom(e=>{const t=e(cs);return c.getBreakpointValue(t).toLowerCase()}),Oa=()=>{const[e,t]=u.useAtom(cs),s=u.useAtomValue(ds),[o,a]=ls();return w.useEffect(()=>{o!=="xs"&&a(s)},[s,o,a]),[e,s,t]},La=ue("canvasZoom",100),Va=()=>u.useAtom(La),us=u.atom([]),ms=()=>{const[e,t]=u.useAtom(us),s=u.useSetAtom(et),o=w.useCallback(a=>{t(a),s([])},[t,s]);return[e,o]},et=u.atom([]),za=()=>{const[e,t]=u.useAtom(et),s=u.useSetAtom(us),o=w.useCallback(a=>{t(a),s([])},[t,s]);return[e,o]},ps=ue("darkMode",!1),Fa=()=>{const[e,t]=u.useAtom(ps);return[e,t]},qa=u.atom(!1),Ua=()=>{const[e,t]=u.useAtom(qa);return[e,t]},fs=()=>{const e=W(),t=u.useAtomValue(H),[,s]=me();return w.useCallback((o,a=null)=>{const r=[];i.each(o,l=>{const x=ra(t,l,a===l?null:a);r.push(i.get(x,"0._id","")),e({type:"add_duplicate_blocks",payload:x})}),s(r),e({type:"create_snapshot"})},[t,s,e])},$a=u.atom([]),Ga=()=>{const[e,t]=u.useAtom($a),s=w.useCallback(o=>{t(a=>i.includes(a,o)?i.without(a,o):[...a,o])},[t]);return[e,t,s]},Ha=u.atom(""),xs=()=>u.useAtom(Ha),Wa=()=>{const e=u.useAtomValue(H),t=W(),s=Xe(),[,,o]=qt();return w.useCallback(async(a,r)=>{const l=c.generateUUID(16),p=i.map(e,x=>(x._id===a&&(x._globalBlockId=l,x._name=r),x));t({type:"set_page_blocks",payload:p}),o()},[e,t,s,o])},Ya=()=>({}),Ka=()=>{const e=u.useAtomValue(H),t=W();return w.useCallback((s,o)=>{const a=i.map(e,r=>(i.includes(s,i.get(r,"_id"))&&i.set(r,"_parent",o),r));t({type:"set_blocks",payload:a})},[e,t])},Ja=()=>{const e=u.useAtomValue(et),[t,s]=ms(),o=fs(),a=Ka();return{canPaste:w.useMemo(()=>t.length>0||e.length>0,[e,t]),pasteBlocks:w.useCallback(l=>{i.isEmpty(e)?a(t,l):o(e,l),s(()=>[])},[t,e,o,a,s])}},Qa=u.atom(""),Xa=()=>{const e=u.useAtomValue(Qa),t=w.useCallback(()=>{},[]),s=w.useCallback(()=>{},[]),o=w.useCallback(()=>{},[]);return{currentProject:e,createProject:o,deleteProject:t,updateProject:s}},gs=(e,t)=>{const s=[],o=i.filter(e,a=>i.includes(t,a._id)||i.includes(t,a._parent)?(s.push(a._id),!1):!0);return i.isEmpty(s)?o:gs(o,s)},Za=()=>{const e=W(),t=u.useAtomValue(H),[s,o]=me();return w.useCallback(a=>{var p;const r=((p=i.find(t,{_id:a[0]}))==null?void 0:p._parent)||null,l=gs(t,a);e({type:"set_blocks",payload:l}),setTimeout(()=>o(r?[r]:[]),200)},[t,o,e,s])},er=u.atom(null,(e,t,{blockIds:s,fullClasses:o,dispatch:a})=>{const r=i.first(e(be)),l=i.filter(e($e),p=>s.includes(e(p)._id));i.each(l,p=>{const x=e(p),d=o;let{classes:h,baseClasses:R}=oa(i.get(x,r.prop,"styles:,"));i.each(d,N=>{const I=new RegExp(`(^| )${N.replace("[","\\[").replace("]","\\]")}($| )`,"g");h=h.replace(I," ").replace(/ +/g," ").trim();const q=i.first(N.split(":"));i.includes(["2xl","xl","lg","md","sm"],q)&&d.push(N.split(":").pop().trim())}),i.each(d,N=>{const I=new RegExp(`(^| )${N.replace("[","\\[").replace("]","\\]")}($| )`,"g");R=R.replace(I," ").replace(/ +/g," ").trim()}),a({type:"update_props_realtime",payload:{ids:[x._id],props:{[r.prop]:`${F.STYLES_KEY}${R},${h}`}}})})}),tr=()=>{const e=W(),t=u.useSetAtom(er);return w.useCallback((s,o)=>{t({blockIds:s,fullClasses:o,dispatch:e}),setTimeout(()=>e({type:"create_snapshot"}))},[e,t])},bs=u.atom(e=>{const t=i.first(e(be)),s=e(We);if(!t||t.blockId!==i.get(s,"_id",null))return[];const a=i.get(s,t.prop,`${F.STYLES_KEY},`).replace(F.STYLES_KEY,"").split(",").join(" ");return i.filter(i.map(a.trim().split(" "),c.constructClassObject),r=>!i.isNull(r))}),sr=()=>u.useAtomValue(bs),gt={xs:0,sm:1,md:2,lg:3,xl:4,"2xl":5},or=u.atom(e=>{const t=e(ds),s=e(Ye),o=e(ps),a=nr(t);let r=i.filter(e(bs),{mod:s});return i.startsWith(s,"_")||(r=i.filter(r,l=>a.includes(l.mq))),r=r.sort((l,p)=>gt[l.mq]-gt[p.mq]),o||(r=i.filter(r,{dark:!1})),r}),nr=e=>{let t=[];switch(e){case"xs":t=["xs"];break;case"sm":t=["xs","sm"];break;case"md":t=["xs","sm","md"];break;case"lg":t=["xs","sm","md","lg"];break;case"xl":t=["xs","sm","md","lg","xl"];break;case"2xl":t=["xs","sm","md","lg","xl","2xl"];break;default:t=["xs"];break}return t},ar=()=>u.useAtomValue(or),rr=()=>u.useAtom(Ye),hs=u.atom(null,(e,t,{blockIds:s,props:o,dispatch:a})=>{a({type:"update_props_realtime",payload:{ids:s,props:o}})}),ir=()=>{const{createSnapshot:e}=Ee(),t=W(),s=u.useSetAtom(hs);return w.useCallback((o,a)=>{s({blockIds:o,props:a,dispatch:t}),e()},[e,t,s])},lr=()=>{const e=W(),t=u.useSetAtom(hs);return w.useCallback((s,o)=>{t({blockIds:s,props:o,dispatch:e})},[e,t])},vs={name:"",props:{},modalProps:{},backdropClose:!0},cr=u.atom(vs),dr=()=>{const[e,t]=u.useAtom(cr),s=w.useCallback((a,r={},l={})=>{t({name:a,props:r,modalProps:l})},[t]),o=w.useCallback((...a)=>{i.get(e,"props.onClose",()=>{})(...a),t(vs)},[t,e]);return{activeModal:e,openModal:s,closeModal:o}},ur=()=>u.useAtomValue(Jt),mr=u.atom(""),pr=u.atom(null),fr=()=>u.useAtom(mr),xr=()=>u.useAtom(pr),gr=ue("selectedBreakpoints",["XS","MD","XL"]),br=()=>{const[e,t]=u.useAtom(gr);return[e,t]},hr=()=>{const e=u.useSetAtom(Se),{clear:t}=Ee(),[,s]=me(),[,o]=xs(),[,a]=Ke();return()=>{s([]),a([]),o(""),t(),e({undoCount:0,redoCount:0})}},vr=u.atom({en:{}}),yr=()=>{const[e,t]=u.useAtom(vr),s=w.useCallback((o,a,r)=>{i.set(e,`${o}.${a}`,r),t(e)},[e,t]);return[e,s]},jr=(e,t)=>{const[s]=u.useAtom(Ne);return i.get(s,e,t)},wr=u.atom([]),Rr=()=>{const[e,t]=w.useState(!1),[s,o]=u.useAtom(wr),a=ne("getUILibraryBlocks",()=>[]);return w.useEffect(()=>{(async()=>s.length>0||(t(!0),o(await a()),t(!1)))()},[]),{data:s,isLoading:e}},ys=re.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),js=f.forwardRef(({className:e,variant:t,size:s,...o},a)=>n.jsxRuntimeExports.jsx(jt.Root,{ref:a,className:c.cn(ys({variant:t,size:s,className:e})),...o}));js.displayName=jt.Root.displayName;const ws=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(Oe.Root,{className:c.cn("peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-800 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",e),...t,ref:s,children:n.jsxRuntimeExports.jsx(Oe.Thumb,{className:c.cn("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950")})}));ws.displayName=Oe.Root.displayName;const _e=re.cva("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Rs=f.forwardRef(({className:e,variant:t,size:s,asChild:o=!1,...a},r)=>{const l=o?gn.Slot:"button";return n.jsxRuntimeExports.jsx(l,{className:c.cn(_e({variant:t,size:s,className:e})),ref:r,...a})});Rs.displayName="Button";const kr=ae.Root,ks=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(ae.Item,{ref:s,className:c.cn("border-b",e),...t}));ks.displayName="AccordionItem";const Ns=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsx(ae.Header,{className:"flex",children:n.jsxRuntimeExports.jsxs(ae.Trigger,{ref:o,className:c.cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...s,children:[t,n.jsxRuntimeExports.jsx(L.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));Ns.displayName=ae.Trigger.displayName;const As=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsx(ae.Content,{ref:o,className:c.cn("text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...s,children:n.jsxRuntimeExports.jsx("div",{className:"pb-4 pt-0",children:t})}));As.displayName=ae.Content.displayName;const Nr=re.cva("relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Ss=f.forwardRef(({className:e,variant:t,...s},o)=>n.jsxRuntimeExports.jsx("div",{ref:o,role:"alert",className:c.cn(Nr({variant:t}),e),...s}));Ss.displayName="Alert";const Cs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("h5",{ref:s,className:c.cn("mb-1 font-medium leading-none tracking-tight",e),...t}));Cs.displayName="AlertTitle";const Es=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("text-sm [&_p]:leading-relaxed",e),...t}));Es.displayName="AlertDescription";const _s=re.cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),Ar=({className:e,variant:t,...s})=>n.jsxRuntimeExports.jsx("div",{className:c.cn(_s({variant:t}),e),...s}),Sr=V.Root,Cr=V.Trigger,Bs=({className:e,...t})=>n.jsxRuntimeExports.jsx(V.Portal,{className:c.cn(e),...t});Bs.displayName=V.Portal.displayName;const Ps=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Overlay,{className:c.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:s}));Ps.displayName=V.Overlay.displayName;const Ts=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsxs(Bs,{children:[n.jsxRuntimeExports.jsx(Ps,{}),n.jsxRuntimeExports.jsx(V.Content,{ref:s,className:c.cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...t})]}));Ts.displayName=V.Content.displayName;const Is=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});Is.displayName="AlertDialogHeader";const Ms=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ms.displayName="AlertDialogFooter";const Ds=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Title,{ref:s,className:c.cn("text-lg font-semibold",e),...t}));Ds.displayName=V.Title.displayName;const Os=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Description,{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));Os.displayName=V.Description.displayName;const Ls=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Action,{ref:s,className:c.cn(_e(),e),...t}));Ls.displayName=V.Action.displayName;const Vs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Cancel,{ref:s,className:c.cn(_e({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Vs.displayName=V.Cancel.displayName;const tt=_.Root,zs=_.Trigger,Fs=({className:e,...t})=>n.jsxRuntimeExports.jsx(_.Portal,{className:c.cn(e),...t});Fs.displayName=_.Portal.displayName;const qs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Overlay,{ref:s,className:c.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));qs.displayName=_.Overlay.displayName;const Be=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(Fs,{children:[n.jsxRuntimeExports.jsx(qs,{}),n.jsxRuntimeExports.jsxs(_.Content,{ref:o,className:c.cn("fixed left-[50%] top-[50%] z-[999] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...s,children:[t,n.jsxRuntimeExports.jsxs(_.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[n.jsxRuntimeExports.jsx(L.Cross2Icon,{className:"h-4 w-4"}),n.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Be.displayName=_.Content.displayName;const Us=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Us.displayName="DialogHeader";const $s=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$s.displayName="DialogFooter";const Gs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Title,{ref:s,className:c.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));Gs.displayName=_.Title.displayName;const Hs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Description,{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));Hs.displayName=_.Description.displayName;const Ws=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Ws.displayName="Card";const Ys=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("flex flex-col space-y-1.5 p-6",e),...t}));Ys.displayName="CardHeader";const Ks=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("h3",{ref:s,className:c.cn("font-semibold leading-none tracking-tight",e),...t}));Ks.displayName="CardTitle";const Js=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("p",{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));Js.displayName="CardDescription";const Qs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("p-6 pt-0",e),...t}));Qs.displayName="CardContent";const Xs=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn(" flex items-center p-6 pt-0",e),...t}));Xs.displayName="CardFooter";const Zs=f.forwardRef(({className:e,type:t,...s},o)=>n.jsxRuntimeExports.jsx("input",{type:t,className:c.cn("flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...s}));Zs.displayName="Input";const Er=re.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),eo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(wt.Root,{ref:s,className:c.cn(Er(),e),...t}));eo.displayName=wt.Root.displayName;const to=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("textarea",{className:c.cn("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...t}));to.displayName="Textarea";const so=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(oe.Root,{ref:o,className:c.cn("relative overflow-hidden",e),...s,children:[n.jsxRuntimeExports.jsx(oe.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),n.jsxRuntimeExports.jsx(st,{}),n.jsxRuntimeExports.jsx(oe.Corner,{})]}));so.displayName=oe.Root.displayName;const st=f.forwardRef(({className:e,orientation:t="vertical",...s},o)=>n.jsxRuntimeExports.jsx(oe.ScrollAreaScrollbar,{ref:o,orientation:t,className:c.cn("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 border-t border-t-transparent p-[1px]",e),...s,children:n.jsxRuntimeExports.jsx(oe.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));st.displayName=oe.ScrollAreaScrollbar.displayName;const oo=ie.Root,ot=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(ie.List,{ref:s,className:c.cn("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));ot.displayName=ie.List.displayName;const we=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(ie.Trigger,{ref:s,className:c.cn("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));we.displayName=ie.Trigger.displayName;const Re=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(ie.Content,{ref:s,className:c.cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Re.displayName=ie.Content.displayName;const _r=de.Portal,Br=de.Provider,Pr=de.Root,Tr=de.Trigger,no=f.forwardRef(({className:e,sideOffset:t=4,...s},o)=>n.jsxRuntimeExports.jsx(de.Content,{ref:o,sideOffset:t,className:c.cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s}));no.displayName=de.Content.displayName;const Ir=ge.Root,Mr=ge.Trigger,ao=f.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},a)=>n.jsxRuntimeExports.jsx(ge.Portal,{children:n.jsxRuntimeExports.jsx(ge.Content,{ref:a,align:t,sideOffset:s,className:c.cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));ao.displayName=ge.Content.displayName;const Dr=C.Menu,Or=C.Group,Lr=C.Portal,Vr=C.Sub,zr=C.RadioGroup,ro=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(C.Root,{ref:s,className:c.cn("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",e),...t}));ro.displayName=C.Root.displayName;const io=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(C.Trigger,{ref:s,className:c.cn("flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),...t}));io.displayName=C.Trigger.displayName;const lo=f.forwardRef(({className:e,inset:t,children:s,...o},a)=>n.jsxRuntimeExports.jsxs(C.SubTrigger,{ref:a,className:c.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...o,children:[s,n.jsxRuntimeExports.jsx(L.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));lo.displayName=C.SubTrigger.displayName;const co=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(C.SubContent,{ref:s,className:c.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));co.displayName=C.SubContent.displayName;const uo=f.forwardRef(({className:e,align:t="start",alignOffset:s=-4,sideOffset:o=8,...a},r)=>n.jsxRuntimeExports.jsx(C.Portal,{children:n.jsxRuntimeExports.jsx(C.Content,{ref:r,align:t,alignOffset:s,sideOffset:o,className:c.cn("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));uo.displayName=C.Content.displayName;const mo=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(C.Item,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...s}));mo.displayName=C.Item.displayName;const po=f.forwardRef(({className:e,children:t,checked:s,...o},a)=>n.jsxRuntimeExports.jsxs(C.CheckboxItem,{ref:a,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(C.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.CheckIcon,{className:"h-4 w-4"})})}),t]}));po.displayName=C.CheckboxItem.displayName;const fo=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(C.RadioItem,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(C.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));fo.displayName=C.RadioItem.displayName;const xo=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(C.Label,{ref:o,className:c.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s}));xo.displayName=C.Label.displayName;const go=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(C.Separator,{ref:s,className:c.cn("-mx-1 my-1 h-px bg-muted",e),...t}));go.displayName=C.Separator.displayName;const bo=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});bo.displayname="MenubarShortcut";const Fr=ke.Root,qr=ke.Trigger,ho=f.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},a)=>n.jsxRuntimeExports.jsx(ke.Content,{ref:a,align:t,sideOffset:s,className:c.cn("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}));ho.displayName=ke.Content.displayName;const Ur=M.Root,$r=M.Group,Gr=M.Value,vo=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(M.Trigger,{ref:o,className:c.cn("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...s,children:[t,n.jsxRuntimeExports.jsx(M.Icon,{asChild:!0,children:n.jsxRuntimeExports.jsx(L.CaretSortIcon,{className:"h-4 w-4 opacity-50"})})]}));vo.displayName=M.Trigger.displayName;const yo=f.forwardRef(({className:e,children:t,position:s="popper",...o},a)=>n.jsxRuntimeExports.jsx(M.Portal,{children:n.jsxRuntimeExports.jsx(M.Content,{ref:a,className:c.cn("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,...o,children:n.jsxRuntimeExports.jsx(M.Viewport,{className:c.cn("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));yo.displayName=M.Content.displayName;const jo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(M.Label,{ref:s,className:c.cn("px-2 py-1.5 text-sm font-semibold",e),...t}));jo.displayName=M.Label.displayName;const wo=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(M.Item,{ref:o,className:c.cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(M.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.CheckIcon,{className:"h-4 w-4"})})}),n.jsxRuntimeExports.jsx(M.ItemText,{children:t})]}));wo.displayName=M.Item.displayName;const Ro=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(M.Separator,{ref:s,className:c.cn("-mx-1 my-1 h-px bg-muted",e),...t}));Ro.displayName=M.Separator.displayName;const Hr=_.Root,Wr=_.Trigger,Yr=_.Close,ko=({className:e,...t})=>n.jsxRuntimeExports.jsx(_.Portal,{className:c.cn(e),...t});ko.displayName=_.Portal.displayName;const No=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Overlay,{className:c.cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:s}));No.displayName=_.Overlay.displayName;const Kr=re.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Ao=f.forwardRef(({side:e="right",className:t,children:s,...o},a)=>n.jsxRuntimeExports.jsxs(ko,{children:[n.jsxRuntimeExports.jsx(No,{}),n.jsxRuntimeExports.jsxs(_.Content,{ref:a,className:c.cn(Kr({side:e}),t),...o,children:[s,n.jsxRuntimeExports.jsxs(_.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[n.jsxRuntimeExports.jsx(L.Cross2Icon,{className:"h-4 w-4"}),n.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ao.displayName=_.Content.displayName;const So=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});So.displayName="SheetHeader";const Co=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Co.displayName="SheetFooter";const Eo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Title,{ref:s,className:c.cn("text-lg font-semibold text-foreground",e),...t}));Eo.displayName=_.Title.displayName;const _o=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Description,{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));_o.displayName=_.Description.displayName;const Jr=B.Root,Qr=B.Trigger,Xr=B.Group,Zr=B.Portal,ei=B.Sub,ti=B.RadioGroup,Bo=f.forwardRef(({className:e,inset:t,children:s,...o},a)=>n.jsxRuntimeExports.jsxs(B.SubTrigger,{ref:a,className:c.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...o,children:[s,n.jsxRuntimeExports.jsx(L.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Bo.displayName=B.SubTrigger.displayName;const Po=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(B.SubContent,{ref:s,className:c.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Po.displayName=B.SubContent.displayName;const To=f.forwardRef(({className:e,sideOffset:t=4,...s},o)=>n.jsxRuntimeExports.jsx(B.Portal,{children:n.jsxRuntimeExports.jsx(B.Content,{ref:o,sideOffset:t,className:c.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));To.displayName=B.Content.displayName;const Io=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(B.Item,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...s}));Io.displayName=B.Item.displayName;const Mo=f.forwardRef(({className:e,children:t,checked:s,...o},a)=>n.jsxRuntimeExports.jsxs(B.CheckboxItem,{ref:a,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(B.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.CheckIcon,{className:"h-4 w-4"})})}),t]}));Mo.displayName=B.CheckboxItem.displayName;const Do=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(B.RadioItem,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(B.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Do.displayName=B.RadioItem.displayName;const Oo=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(B.Label,{ref:o,className:c.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s}));Oo.displayName=B.Label.displayName;const Lo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(B.Separator,{ref:s,className:c.cn("-mx-1 my-1 h-px bg-muted",e),...t}));Lo.displayName=B.Separator.displayName;const Vo=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest opacity-60",e),...t});Vo.displayName="DropdownMenuShortcut";const zo=f.forwardRef(({className:e,orientation:t="horizontal",decorative:s=!0,...o},a)=>n.jsxRuntimeExports.jsx(Rt.Root,{ref:a,decorative:s,orientation:t,className:c.cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));zo.displayName=Rt.Root.displayName;const si=1,oi=1e6;let Me=0;function ni(){return Me=(Me+1)%Number.MAX_VALUE,Me.toString()}const De=new Map,bt=e=>{if(De.has(e))return;const t=setTimeout(()=>{De.delete(e),xe({type:"REMOVE_TOAST",toastId:e})},oi);De.set(e,t)},Fo=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,si)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case"DISMISS_TOAST":{const{toastId:s}=t;return s?bt(s):e.toasts.forEach(o=>{bt(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)}}},ve=[];let ye={toasts:[]};function xe(e){ye=Fo(ye,e),ve.forEach(t=>{t(ye)})}function qo({...e}){const t=ni(),s=a=>xe({type:"UPDATE_TOAST",toast:{...a,id:t}}),o=()=>xe({type:"DISMISS_TOAST",toastId:t});return xe({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||o()}}}),{id:t,dismiss:o,update:s}}function Uo(){const[e,t]=f.useState(ye);return f.useEffect(()=>(ve.push(t),()=>{const s=ve.indexOf(t);s>-1&&ve.splice(s,1)}),[e]),{...e,toast:qo,dismiss:s=>xe({type:"DISMISS_TOAST",toastId:s})}}const ai=G.Provider,$o=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Viewport,{ref:s,className:c.cn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));$o.displayName=G.Viewport.displayName;const ri=re.cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Go=f.forwardRef(({className:e,variant:t,...s},o)=>n.jsxRuntimeExports.jsx(G.Root,{ref:o,className:c.cn(ri({variant:t}),e),...s}));Go.displayName=G.Root.displayName;const ii=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Action,{ref:s,className:c.cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));ii.displayName=G.Action.displayName;const Ho=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Close,{ref:s,className:c.cn("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:n.jsxRuntimeExports.jsx(L.Cross2Icon,{className:"h-4 w-4"})}));Ho.displayName=G.Close.displayName;const Wo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Title,{ref:s,className:c.cn("text-sm font-semibold [&+div]:text-xs",e),...t}));Wo.displayName=G.Title.displayName;const Yo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(G.Description,{ref:s,className:c.cn("text-sm opacity-90",e),...t}));Yo.displayName=G.Description.displayName;function li(){const{toasts:e}=Uo();return n.jsxRuntimeExports.jsxs(ai,{children:[e.map(({id:t,title:s,description:o,action:a,...r})=>n.jsxRuntimeExports.jsxs(Go,{...r,children:[n.jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[s&&n.jsxRuntimeExports.jsx(Wo,{children:s}),o&&n.jsxRuntimeExports.jsx(Yo,{children:o})]}),a,n.jsxRuntimeExports.jsx(Ho,{})]},t)),n.jsxRuntimeExports.jsx($o,{})]})}const ci=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("animate-pulse rounded-md bg-primary/10",e),...t}),nt=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command,{ref:s,className:c.cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));nt.displayName=U.Command.displayName;const di=({children:e,...t})=>n.jsxRuntimeExports.jsx(tt,{...t,children:n.jsxRuntimeExports.jsx(Be,{className:"overflow-hidden p-0",children:n.jsxRuntimeExports.jsx(nt,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Ko=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[n.jsxRuntimeExports.jsx(L.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),n.jsxRuntimeExports.jsx(U.Command.Input,{ref:s,className:c.cn("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Ko.displayName=U.Command.Input.displayName;const Jo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command.List,{ref:s,className:c.cn("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Jo.displayName=U.Command.List.displayName;const Qo=f.forwardRef((e,t)=>n.jsxRuntimeExports.jsx(U.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Qo.displayName=U.Command.Empty.displayName;const Xo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command.Group,{ref:s,className:c.cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Xo.displayName=U.Command.Group.displayName;const Zo=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command.Separator,{ref:s,className:c.cn("-mx-1 h-px bg-border",e),...t}));Zo.displayName=U.Command.Separator.displayName;const en=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Command.Item,{ref:s,className:c.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));en.displayName=U.Command.Item.displayName;const tn=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});tn.displayName="CommandShortcut";const ui=P.Root,mi=P.Trigger,pi=P.Group,fi=P.Portal,xi=P.Sub,gi=P.RadioGroup,sn=f.forwardRef(({className:e,inset:t,children:s,...o},a)=>n.jsxRuntimeExports.jsxs(P.SubTrigger,{ref:a,className:c.cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...o,children:[s,n.jsxRuntimeExports.jsx(L.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));sn.displayName=P.SubTrigger.displayName;const on=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(P.SubContent,{ref:s,className:c.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));on.displayName=P.SubContent.displayName;const nn=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(P.Portal,{children:n.jsxRuntimeExports.jsx(P.Content,{ref:s,className:c.cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));nn.displayName=P.Content.displayName;const an=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(P.Item,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...s}));an.displayName=P.Item.displayName;const rn=f.forwardRef(({className:e,children:t,checked:s,...o},a)=>n.jsxRuntimeExports.jsxs(P.CheckboxItem,{ref:a,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...o,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(P.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.CheckIcon,{className:"h-4 w-4"})})}),t]}));rn.displayName=P.CheckboxItem.displayName;const ln=f.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(P.RadioItem,{ref:o,className:c.cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[n.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsxRuntimeExports.jsx(P.ItemIndicator,{children:n.jsxRuntimeExports.jsx(L.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));ln.displayName=P.RadioItem.displayName;const cn=f.forwardRef(({className:e,inset:t,...s},o)=>n.jsxRuntimeExports.jsx(P.Label,{ref:o,className:c.cn("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...s}));cn.displayName=P.Label.displayName;const dn=f.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(P.Separator,{ref:s,className:c.cn("-mx-1 my-1 h-px bg-border",e),...t}));dn.displayName=P.Separator.displayName;const un=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});un.displayName="ContextMenuShortcut";const bi=e=>{try{const t=document.getElementById("icon-picker-field"),s=document.createElement("div");Pn.render(n.jsxRuntimeExports.jsx(vt.IconPickerItem,{value:e}),s),t.appendChild(s),s.hidden=!0;let o=s.innerHTML;setTimeout(()=>t.removeChild(s),1e3);const r=new DOMParser().parseFromString(o,"image/svg+xml"),l=r.querySelector("svg");return l&&(l.removeAttribute("width"),l.removeAttribute("height")),new XMLSerializer().serializeToString(r)}catch{return""}},hi=({value:e,onChange:t,onBlur:s,id:o})=>{const a=r=>{t("<svg />");const l=bi(r);t(l),s(o,l)};return n.jsxRuntimeExports.jsxs("div",{className:"mt-1 flex h-20 items-center gap-x-2",id:"icon-picker-field",children:[n.jsxRuntimeExports.jsxs("div",{className:"relative h-12 w-12 group",children:[n.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:e==null?void 0:e.replace("<svg",'<svg class="h-5 w-5"')},className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform cursor-pointer bg-white z-0"}),n.jsxRuntimeExports.jsx(vt,{value:e?"BiSolidGrid":null,onChange:a,pickButtonStyle:{position:"relative",height:"48px",width:"48px",border:"1px solid #BBBBBB",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",backgroundColor:"transparent",zIndex:1},searchInputStyle:{backgroundColor:"transparent",width:"100%",border:"1px solid #BBBBBB",margin:"0px 10px",padding:"10px"}})]}),n.jsxRuntimeExports.jsx("textarea",{value:e,onChange:r=>t(r.target.value),className:"h-full border w-full rounded-sm border-foreground/20 px-2 py-1 text-xs shadow-sm focus:border-gray-500/80 focus:outline-none focus:ring-0",placeholder:"Choose icon or enter svg"})]})},vi=w.lazy(()=>Promise.resolve().then(()=>require("./UnsplashImages-J2kiowyR.cjs"))),yi=w.lazy(()=>Promise.resolve().then(()=>require("./UploadImages-Hvetk6zO.cjs"))),mn=({isModalView:e=!1,onSelect:t=()=>{}})=>{const[s,o]=w.useState("upload");return n.jsxRuntimeExports.jsxs("div",{className:"flex h-full flex-col",children:[n.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between rounded-md bg-background/30 p-1",children:n.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:e?"Select or upload images":"Images"})}),n.jsxRuntimeExports.jsxs(oo,{value:s,onValueChange:a=>o(a),className:"flex h-full w-full flex-col py-2",children:[n.jsxRuntimeExports.jsxs(ot,{className:"w-full",children:[n.jsxRuntimeExports.jsx(we,{value:"upload",className:"w-1/2",children:"Upload"}),n.jsxRuntimeExports.jsx(we,{value:"unsplash",className:"w-1/2",children:"Unsplash"})]}),s==="unsplash"?n.jsxRuntimeExports.jsx(Re,{value:"unsplash",className:"flex h-full flex-col overflow-hidden",children:n.jsxRuntimeExports.jsx(w.Suspense,{fallback:n.jsxRuntimeExports.jsx("div",{className:"h-64 w-full animate-pulse bg-gray-100"}),children:n.jsxRuntimeExports.jsx(vi,{isModalView:e,onSelect:t})})}):n.jsxRuntimeExports.jsx(Re,{value:"upload",className:"flex h-full flex-col overflow-hidden",children:n.jsxRuntimeExports.jsx(w.Suspense,{fallback:n.jsxRuntimeExports.jsx("div",{className:"h-64 w-full animate-pulse bg-gray-100"}),children:n.jsxRuntimeExports.jsx(yi,{isModalView:e,onSelect:t})})})]})]})},ji=Object.freeze(Object.defineProperty({__proto__:null,default:mn},Symbol.toStringTag,{value:"Module"})),ht=({children:e,onSelect:t})=>{const[s,o]=w.useState(!1),a=(...r)=>{t.call(void 0,...r),o(!1)};return n.jsxRuntimeExports.jsxs(tt,{open:s,onOpenChange:r=>o(r),children:[n.jsxRuntimeExports.jsx(zs,{asChild:!0,children:e}),n.jsxRuntimeExports.jsx(Be,{className:"flex h-3/4 max-w-5xl",children:n.jsxRuntimeExports.jsx("div",{className:"h-full w-full",children:n.jsxRuntimeExports.jsx(mn,{isModalView:!0,onSelect:a})})})]})},wi=({value:e,onChange:t,id:s,onBlur:o})=>n.jsxRuntimeExports.jsxs("div",{className:"mt-1.5 flex items-center gap-x-3",children:[e?n.jsxRuntimeExports.jsx("img",{src:e,className:"h-20 w-20 overflow-hidden rounded-md border object-cover",alt:""}):n.jsxRuntimeExports.jsx(ht,{onSelect:t,children:n.jsxRuntimeExports.jsx("div",{className:"h-20 w-20 cursor-pointer rounded-md border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px] hover:border-gray-400"})}),n.jsxRuntimeExports.jsxs("div",{className:"flex w-3/5 flex-col",children:[n.jsxRuntimeExports.jsx(ht,{onSelect:t,children:n.jsxRuntimeExports.jsx("small",{className:"cursor-pointer rounded-full bg-gray-600 px-2 py-1 text-center text-xs text-white hover:bg-gray-500 dark:bg-gray-700",children:e||!i.isEmpty(e)?"Replace Image":"Choose Image"})}),n.jsxRuntimeExports.jsx("small",{className:"-pl-4 pt-2 text-center text-xs text-gray-600",children:"OR"}),n.jsxRuntimeExports.jsx("input",{type:"url",className:"text-xs",placeholder:"Enter image URL",value:e,onBlur:({target:{value:a}})=>o(s,a),onChange:a=>t(a.target.value)})]})]}),Ri=({id:e,placeholder:t,value:s,onChange:o,onBlur:a})=>{const r={toolbar:[["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]},{align:[]}],["link","clean"]]},l=["header","font","list","bold","italic","underline","strike","blockquote","color","background","align","link","image"];return typeof window>"u"?null:n.jsxRuntimeExports.jsx(Tn,{id:e,value:s,onBlur:p=>a(e,p),onChange:p=>o(p),modules:r,formats:l,placeholder:t,className:"mt-1 rounded-md"})},ki=({schema:e,formData:t,onChange:s})=>{const[o,a]=w.useState([]),r=ne("getPages",()=>[]),{type:l="page",href:p="",target:x="self"}=t;return w.useEffect(()=>{(async()=>{const d=await r();a(d||[])})()},[]),n.jsxRuntimeExports.jsxs("div",{children:[n.jsxRuntimeExports.jsx("span",{className:"text-xs font-medium",children:(e==null?void 0:e.title)??"Link"}),n.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-y-1.5",children:[n.jsxRuntimeExports.jsx("select",{name:"type",value:l,onChange:d=>s({...t,type:d.target.value}),children:[{const:"page",title:"Open Page"},{const:"url",title:"Open URL"},{const:"email",title:"Compose Email"},{const:"telephone",title:"Call Phone"},{const:"scroll",title:"Scroll to element"}].map(d=>n.jsxRuntimeExports.jsx("option",{value:d.const,children:d.title},d.const))}),l==="page"?n.jsxRuntimeExports.jsxs("select",{name:"href",placeholder:"Choose Page",value:p,onChange:d=>s({...t,href:d.target.value}),children:[n.jsxRuntimeExports.jsx("option",{value:"",children:"Choose page"}),i.map(o,d=>n.jsxRuntimeExports.jsx("option",{value:d.slug,children:d.name},d.uuid))]}):n.jsxRuntimeExports.jsx("input",{name:"href",type:"text",value:p,onChange:d=>s({...t,href:d.target.value}),placeholder:l==="page"||l==="url"?"Enter URL":l==="scroll"?"#ElementID":"Enter detail"}),(l==="page"||l==="url")&&n.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-2",children:[n.jsxRuntimeExports.jsx("input",{type:"checkbox",defaultChecked:x==="_blank",className:"cursor-pointer rounded-md border border-border",onChange:()=>s({...t,target:x==="_blank"?"_self":"_blank"})}),n.jsxRuntimeExports.jsx("span",{className:"pt-1 text-xs",children:"Open in new tab"})]})]})]})};exports.Accordion=kr;exports.AccordionContent=As;exports.AccordionItem=ks;exports.AccordionTrigger=Ns;exports.Alert=Ss;exports.AlertDescription=Es;exports.AlertDialog=Sr;exports.AlertDialogAction=Ls;exports.AlertDialogCancel=Vs;exports.AlertDialogContent=Ts;exports.AlertDialogDescription=Os;exports.AlertDialogFooter=Ms;exports.AlertDialogHeader=Is;exports.AlertDialogTitle=Ds;exports.AlertDialogTrigger=Cr;exports.AlertTitle=Cs;exports.Badge=Ar;exports.Button=Rs;exports.Card=Ws;exports.CardContent=Qs;exports.CardDescription=Js;exports.CardFooter=Xs;exports.CardHeader=Ys;exports.CardTitle=Ks;exports.Command=nt;exports.CommandDialog=di;exports.CommandEmpty=Qo;exports.CommandGroup=Xo;exports.CommandInput=Ko;exports.CommandItem=en;exports.CommandList=Jo;exports.CommandSeparator=Zo;exports.CommandShortcut=tn;exports.ContextMenu=ui;exports.ContextMenuCheckboxItem=rn;exports.ContextMenuContent=nn;exports.ContextMenuGroup=pi;exports.ContextMenuItem=an;exports.ContextMenuLabel=cn;exports.ContextMenuPortal=fi;exports.ContextMenuRadioGroup=gi;exports.ContextMenuRadioItem=ln;exports.ContextMenuSeparator=dn;exports.ContextMenuShortcut=un;exports.ContextMenuSub=xi;exports.ContextMenuSubContent=on;exports.ContextMenuSubTrigger=sn;exports.ContextMenuTrigger=mi;exports.Dialog=tt;exports.DialogContent=Be;exports.DialogDescription=Hs;exports.DialogFooter=$s;exports.DialogHeader=Us;exports.DialogTitle=Gs;exports.DialogTrigger=zs;exports.DropdownMenu=Jr;exports.DropdownMenuCheckboxItem=Mo;exports.DropdownMenuContent=To;exports.DropdownMenuGroup=Xr;exports.DropdownMenuItem=Io;exports.DropdownMenuLabel=Oo;exports.DropdownMenuPortal=Zr;exports.DropdownMenuRadioGroup=ti;exports.DropdownMenuRadioItem=Do;exports.DropdownMenuSeparator=Lo;exports.DropdownMenuShortcut=Vo;exports.DropdownMenuSub=ei;exports.DropdownMenuSubContent=Po;exports.DropdownMenuSubTrigger=Bo;exports.DropdownMenuTrigger=Qr;exports.HoverCard=Fr;exports.HoverCardContent=ho;exports.HoverCardTrigger=qr;exports.IconPickerField=hi;exports.ImagePickerField=wi;exports.ImagesPanel=ji;exports.Input=Zs;exports.Label=eo;exports.LinkField=ki;exports.Menubar=ro;exports.MenubarCheckboxItem=po;exports.MenubarContent=uo;exports.MenubarGroup=Or;exports.MenubarItem=mo;exports.MenubarLabel=xo;exports.MenubarMenu=Dr;exports.MenubarPortal=Lr;exports.MenubarRadioGroup=zr;exports.MenubarRadioItem=fo;exports.MenubarSeparator=go;exports.MenubarShortcut=bo;exports.MenubarSub=Vr;exports.MenubarSubContent=co;exports.MenubarSubTrigger=lo;exports.MenubarTrigger=io;exports.Popover=Ir;exports.PopoverContent=ao;exports.PopoverTrigger=Mr;exports.RichTextEditorField=Ri;exports.ScrollArea=so;exports.ScrollBar=st;exports.Select=Ur;exports.SelectContent=yo;exports.SelectGroup=$r;exports.SelectItem=wo;exports.SelectLabel=jo;exports.SelectSeparator=Ro;exports.SelectTrigger=vo;exports.SelectValue=Gr;exports.Separator=zo;exports.Sheet=Hr;exports.SheetClose=Yr;exports.SheetContent=Ao;exports.SheetDescription=_o;exports.SheetFooter=Co;exports.SheetHeader=So;exports.SheetTitle=Eo;exports.SheetTrigger=Wr;exports.Skeleton=ci;exports.Switch=ws;exports.Tabs=oo;exports.TabsContent=Re;exports.TabsList=ot;exports.TabsTrigger=we;exports.Textarea=to;exports.Toaster=li;exports.Toggle=js;exports.Tooltip=Pr;exports.TooltipContent=no;exports.TooltipPortal=_r;exports.TooltipProvider=Br;exports.TooltipTrigger=Tr;exports.activePanelAtom=ts;exports.addBlockOffCanvasAtom=ss;exports.addBlocksModalAtom=Tt;exports.advanceStylingOpenAtom=Qt;exports.atom=K;exports.atomWithDefault=Xn;exports.atomWithStorage=ue;exports.badgeVariants=_s;exports.buttonVariants=_e;exports.canAddChildBlock=Dt;exports.canDeleteBlock=pa;exports.canDropBlock=fa;exports.canDuplicateBlock=ma;exports.canvasIframeAtom=es;exports.chaiBuilderPropsAtom=Ne;exports.chaiExternalDataAtom=Ct;exports.createStore=kt;exports.dataProvidersAtom=Ze;exports.draggedBlockIdAtom=rs;exports.draggingFlagAtom=as;exports.editLayerNameAtom=Zt;exports.getBlockJSONFromSchemas=ze;exports.getBlockJSONFromUISchemas=Ve;exports.inlineEditingActiveAtom=ns;exports.isDevelopment=sa;exports.networkModeAtom=Xt;exports.pageSyncStateAtom=Ce;exports.presentBlocksAtom=H;exports.reducer=Fo;exports.showPredefinedBlockCategoryAtom=os;exports.toast=qo;exports.toggleVariants=ys;exports.useActiveModal=dr;exports.useActivePanel=fr;exports.useAddBlock=ja;exports.useAddBlockParent=xr;exports.useAddClassesToBlocks=Aa;exports.useAllBlocks=Ft;exports.useAtom=Gn;exports.useAtomValue=Nt;exports.useBrandingOptions=$t;exports.useBuilderProp=ne;exports.useBuilderReset=hr;exports.useBuildingBlocks=qt;exports.useCanvasHistory=Ee;exports.useCanvasWidth=Oa;exports.useCanvasZoom=Va;exports.useCopyBlockIds=za;exports.useCurrentPage=Gt;exports.useCutBlockIds=ms;exports.useDarkMode=Fa;exports.useDeveloperPreviewMode=Ua;exports.useDuplicateBlocks=fs;exports.useFeatureSupport=jr;exports.useGetPageData=Xe;exports.useHiddenBlockIds=Ga;exports.useHighlightBlockId=xs;exports.useMarkAsGlobalBlock=Wa;exports.useMoveBlocks=Ya;exports.usePageDataProviders=is;exports.usePasteBlocks=Ja;exports.usePreviewMode=Ut;exports.useProject=Xa;exports.useReadOnlyMode=ur;exports.useRemoveBlocks=Za;exports.useRemoveClassesFromBlocks=tr;exports.useSavePage=Da;exports.useSelectedBlock=ha;exports.useSelectedBlockAllClasses=sr;exports.useSelectedBlockCurrentClasses=ar;exports.useSelectedBlockIds=me;exports.useSelectedBlocksDisplayChild=ba;exports.useSelectedBreakpoints=br;exports.useSelectedStylingBlocks=Ke;exports.useSetAllBlocks=ua;exports.useSetAtom=At;exports.useStore=qe;exports.useStylingBreakpoint=ls;exports.useStylingState=rr;exports.useToast=Uo;exports.useTranslations=yr;exports.useTreeData=da;exports.useUILibraryBlocks=Rr;exports.useUpdateBlocksProps=ir;exports.useUpdateBlocksPropsRealtime=lr;
|