@chaibuilder/sdk 1.0.13 → 1.0.15
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-H7BZYHUC.js → AddBlocks-eoo1CzaK.js} +114 -111
- package/dist/AddBlocks-jU0NwP_s.cjs +3 -0
- package/dist/BrandingOptions-WSCFnWAf.cjs +1 -0
- package/dist/{BrandingOptions-PAgY-kvj.js → BrandingOptions-_Og7VUHA.js} +57 -41
- package/dist/{CanvasArea-zn2ox-5h.js → CanvasArea-cky_d2Lu.js} +517 -519
- package/dist/CanvasArea-hT9uHhkz.cjs +46 -0
- package/dist/Class-RZuPYbUS.cjs +1 -0
- package/dist/{Class-l7qYbuoN.js → Class-nQk08vqd.js} +204 -124
- package/dist/{CurrentPage-6Jp4xAWK.js → CurrentPage--OlBwyNE.js} +58 -40
- package/dist/CurrentPage-x6Ez11gP.cjs +1 -0
- package/dist/Layers-gEA0qWYP.cjs +1 -0
- package/dist/{Layers-WkZ48AUm.js → Layers-uzA3QA-4.js} +158 -141
- package/dist/MarkAsGlobalBlock-lYL8cO9x.cjs +1 -0
- package/dist/MarkAsGlobalBlock-ySc-D4SB.js +84 -0
- package/dist/PagesPanel-5t0bV9T2.cjs +1 -0
- package/dist/PagesPanel-tH6c9Mnv.js +70 -0
- package/dist/ProjectPanel-NdrR6a8t.cjs +1 -0
- package/dist/ProjectPanel-Q2-15-In.js +91 -0
- package/dist/Settings-DBiwm1hY.cjs +1 -0
- package/dist/{Settings-fH8fZKpm.js → Settings-LOqpvQ_1.js} +411 -408
- package/dist/SidePanels-8JWYXGqN.cjs +1 -0
- package/dist/{SidePanels-w8ZHKJaR.js → SidePanels-F7ccs2Xf.js} +106 -88
- package/dist/{Topbar-hm1D_5sb.js → Topbar-lX9OMPwj.js} +47 -45
- package/dist/Topbar-qi5ab8rR.cjs +1 -0
- package/dist/UnsplashImages-a2r7b3kB.cjs +1 -0
- package/dist/{UnsplashImages-gPcBLjgB.js → UnsplashImages-u_QTABzi.js} +56 -44
- package/dist/{UploadImages-_ZyUU66E.js → UploadImages-gV5xDHIu.js} +55 -34
- package/dist/UploadImages-jLQgLujd.cjs +1 -0
- package/dist/add-page-modal-U5ramelz.js +110 -0
- package/dist/add-page-modal-tIt3N8jH.cjs +1 -0
- package/dist/confirm-alert-ZQ-sxX0X.js +58 -0
- package/dist/confirm-alert-z74-fGOT.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +99 -124
- package/dist/delete-page-modal-5XuSfQT0.cjs +1 -0
- package/dist/delete-page-modal-_E87bVUZ.js +89 -0
- package/dist/form-Osm1AmO5.cjs +1 -0
- package/dist/{form-dVpOAyRl.js → form-zZJyZuNH.js} +12 -12
- package/dist/index-2EHcmZqL.js +2947 -0
- package/dist/index-RVm8Txnj.js +1149 -0
- package/dist/index-_jFEo7h5.cjs +206 -0
- package/dist/index-c8zW_D2V.cjs +1 -0
- package/dist/index-cU5eyVRU.js +40872 -0
- package/dist/index-fwo4wa7u.cjs +1 -0
- package/dist/index-gmZcUXyn.js +25 -0
- package/dist/index-m2muA80V.cjs +9 -0
- package/dist/{jsx-runtime-JYMCiFoE.cjs → jsx-runtime-WKRPbKtm.cjs} +7 -7
- package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-qAwJ85SY.js} +109 -106
- package/dist/lib.cjs +2 -1
- package/dist/lib.js +1333 -71
- package/dist/page-viewer-BSc-5M4B.cjs +1 -0
- package/dist/{page-viewer-Y4YiaZ_m.js → page-viewer-nLqIs_9w.js} +62 -44
- package/dist/project-general-setting-14MA_cX5.cjs +1 -0
- package/dist/{project-general-setting-U4S_KlhU.js → project-general-setting-kXh5myAr.js} +46 -36
- package/dist/project-seo-setting-POGPEJZ8.cjs +1 -0
- package/dist/project-seo-setting-nT1qo1Bb.js +89 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +23 -19
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/dist/single-page-detail-EgQd9TSA.cjs +1 -0
- package/dist/{single-page-detail-pAxCy_Pe.js → single-page-detail-fV-A6vJR.js} +90 -80
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +45 -25
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +156 -357
- package/package.json +1 -1
- package/dist/AddBlocks-7ACJv8LW.cjs +0 -3
- package/dist/BrandingOptions-5j-XszLM.cjs +0 -1
- package/dist/CanvasArea-Dnm-yeus.cjs +0 -46
- package/dist/ChaiBuilderEditor-BoE-sArB.cjs +0 -163
- package/dist/ChaiBuilderEditor-hEuUONQ3.js +0 -27094
- package/dist/Class-_uCzl5v1.cjs +0 -1
- package/dist/CurrentPage-YMpqOqx7.cjs +0 -1
- package/dist/ImagesPanel-6us7hiLN.cjs +0 -1
- package/dist/ImagesPanel-oaHOD-Ex.js +0 -27
- package/dist/Layers-EzOZdWvd.cjs +0 -1
- package/dist/MODIFIERS-DsEzQ3aH.js +0 -73
- package/dist/MODIFIERS-Fx6WAZcw.cjs +0 -1
- package/dist/MarkAsGlobalBlock-0HubcRkY.js +0 -77
- package/dist/MarkAsGlobalBlock-HmeIyLCP.cjs +0 -1
- package/dist/PagesPanel-6JuwBLFQ.js +0 -50
- package/dist/PagesPanel-zJq8p1ja.cjs +0 -1
- package/dist/ProjectPanel-Zml2F8b9.cjs +0 -1
- package/dist/ProjectPanel-cu2QSDW9.js +0 -73
- package/dist/Settings-lc9PfnmG.cjs +0 -1
- package/dist/SidePanels-VH72zFE2.cjs +0 -1
- package/dist/Topbar-vQPo9xSY.cjs +0 -1
- package/dist/UnsplashImages-BoBBSi1a.cjs +0 -1
- package/dist/UploadImages-T6kW0s3G.cjs +0 -1
- package/dist/accordion-oPUeqPCZ.js +0 -42
- package/dist/accordion-ynvFtV_p.cjs +0 -1
- package/dist/add-page-modal--qZSwJuB.cjs +0 -1
- package/dist/add-page-modal-bj7qbZuK.js +0 -99
- package/dist/alert-dialog-GNfnpqFB.js +0 -64
- package/dist/alert-dialog-Mv0-wAvS.cjs +0 -1
- package/dist/command-ThdTuUxt.cjs +0 -1
- package/dist/command-VHca6CcN.js +0 -97
- package/dist/confirm-alert-8EHe0OOd.cjs +0 -1
- package/dist/confirm-alert-b0e_BLhF.js +0 -36
- package/dist/context-menu-8dC9uGXj.js +0 -122
- package/dist/context-menu-IgLbIuth.cjs +0 -1
- package/dist/controls-Ni5kEzLz.js +0 -103
- package/dist/controls-W97-POR_.cjs +0 -1
- package/dist/controls-enQY7NI8.js +0 -118
- package/dist/controls-xUKa23ic.cjs +0 -1
- package/dist/delete-page-modal-2LuDLEiP.cjs +0 -1
- package/dist/delete-page-modal-cnrR8tWH.js +0 -69
- package/dist/dialog-S_QbL1iq.cjs +0 -1
- package/dist/dialog-jrw9DF1f.js +0 -65
- package/dist/dropdown-menu-S03K_fNs.js +0 -164
- package/dist/dropdown-menu-sMXR59cB.cjs +0 -1
- package/dist/form-nRAvKPQj.cjs +0 -1
- package/dist/functions-nNTuSTsR.js +0 -1106
- package/dist/functions-pcUZhFJM.js +0 -12
- package/dist/functions-sCuB7nvZ.cjs +0 -2
- package/dist/functions-uw7QP2kT.cjs +0 -1
- package/dist/html-to-json-P6GpbcQX.cjs +0 -1
- package/dist/html-to-json-pdHQfRkN.js +0 -178
- package/dist/index-HAue58ea.cjs +0 -1
- package/dist/index-T4_wfKl5.js +0 -2256
- package/dist/index-X9ZgD09V.cjs +0 -1
- package/dist/index-ehKdBRUK.js +0 -18
- package/dist/label-KaP7MRrs.js +0 -10
- package/dist/label-tFm8HZdb.cjs +0 -1
- package/dist/link-6o6n2Tnd.js +0 -204
- package/dist/link-ece8dZGH.cjs +0 -1
- package/dist/page-viewer-IARz6OSp.cjs +0 -1
- package/dist/popover-a84pbVhQ.js +0 -23
- package/dist/popover-fKjgcRUx.cjs +0 -1
- package/dist/project-general-setting-eSl3t-VH.cjs +0 -1
- package/dist/project-seo-setting-Ga9v_ECU.js +0 -67
- package/dist/project-seo-setting-rankm1z3.cjs +0 -1
- package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
- package/dist/scroll-area-ewXbxc3n.js +0 -30
- package/dist/select-7bjg-rr9.cjs +0 -1
- package/dist/select-POGdEDHT.js +0 -75
- package/dist/separator-3Civ-6hb.cjs +0 -1
- package/dist/separator-SctTn0Qi.js +0 -18
- package/dist/single-page-detail-yPgnu2AI.cjs +0 -1
- package/dist/skeleton-CU_FIbg3.js +0 -239
- package/dist/skeleton-JHP9zwL2.cjs +0 -1
- package/dist/tabs-Gb9v5dVb.js +0 -46
- package/dist/tabs-iWeaaVrg.cjs +0 -1
- package/dist/textarea-1kZEh7ki.cjs +0 -1
- package/dist/textarea-b2QvVhrK.js +0 -73
- package/dist/toggle-ASJRAaGP.js +0 -30
- package/dist/toggle-ehNIPmme.cjs +0 -1
- package/dist/useAddBlock-WJc3OgG8.js +0 -86
- package/dist/useAddBlock-dCKRFPRU.cjs +0 -1
- package/dist/useAllBlocks-6hvuNuyw.cjs +0 -1
- package/dist/useAllBlocks-PQKYvs-e.js +0 -20
- package/dist/useChaiExternalData-4K9WxANa.js +0 -6
- package/dist/useChaiExternalData-DkyBJ81C.cjs +0 -1
- package/dist/useDarkMode-ZKCO_gkt.js +0 -23
- package/dist/useDarkMode-dV6FM6l-.cjs +0 -1
- package/dist/useFeatureSupport-OLwNgEZb.js +0 -16
- package/dist/useFeatureSupport-c9IgPW2t.cjs +0 -1
- package/dist/useHiddenBlocks-3MsGOJ1s.js +0 -15
- package/dist/useHiddenBlocks-oJuQDmTy.cjs +0 -1
- package/dist/useLanguage-NKKKaxVM.cjs +0 -1
- package/dist/useLanguage-gVC5rxO5.js +0 -216
- package/dist/useMarkAsGlobalBlock-X73Vny8u.js +0 -25
- package/dist/useMarkAsGlobalBlock-ebBVGHg4.cjs +0 -1
- package/dist/useUiLibraries-4hPOi8DI.js +0 -12
- package/dist/useUiLibraries-9FhQCpKo.cjs +0 -1
- package/dist/utils-dze1SGvB.js +0 -6
- package/dist/utils-qK_SjzzV.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./jsx-runtime-WKRPbKtm.cjs"),w=require("react"),un=require("@radix-ui/react-toggle"),ae=require("class-variance-authority"),c=require("./Class-RZuPYbUS.cjs"),mn=require("@radix-ui/react-switch"),pn=require("@radix-ui/react-slot"),fn=require("@radix-ui/react-accordion"),O=require("@radix-ui/react-icons"),xn=require("@radix-ui/react-alert-dialog"),gn=require("@radix-ui/react-dialog"),bn=require("@radix-ui/react-label"),hn=require("@radix-ui/react-scroll-area"),vn=require("@radix-ui/react-tabs"),yn=require("@radix-ui/react-tooltip"),jn=require("@radix-ui/react-popover"),wn=require("@radix-ui/react-menubar"),Rn=require("@radix-ui/react-hover-card"),kn=require("@radix-ui/react-select"),An=require("@radix-ui/react-dropdown-menu"),Nn=require("@radix-ui/react-separator"),Sn=require("@radix-ui/react-toast"),$=require("cmdk"),Cn=require("@radix-ui/react-context-menu"),ht=require("react-icons-picker"),En=require("react-dom"),i=require("lodash"),_n=require("react-quill"),d=require("jotai"),vt=require("flat-to-nested"),pe=require("redux-undo"),Bn=require("./index-fwo4wa7u.cjs"),Pn=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 x=D(w),yt=D(un),De=D(mn),ne=D(fn),V=D(xn),_=D(gn),jt=D(bn),se=D(hn),re=D(vn),ce=D(yn),xe=D(jn),C=D(wn),Re=D(Rn),M=D(kn),B=D(An),wt=D(Nn),U=D(Sn),P=D(Cn);var L={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let Tn=0;function Y(e,t){const s=`atom${++Tn}`,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 Be=e=>"init"in e,Pe=e=>!!e.write,ye=new WeakMap,In=(e,t)=>{ye.set(e,t),e.catch(()=>{}).finally(()=>ye.delete(e))},nt=(e,t)=>{const s=ye.get(e);s&&(ye.delete(e),s(t))},at=(e,t)=>{e.status="fulfilled",e.value=t},rt=(e,t)=>{e.status="rejected",e.reason=t},Mn=e=>typeof(e==null?void 0:e.then)=="function",me=(e,t)=>"v"in e&&"v"in t&&Object.is(e.v,t.v),it=(e,t)=>"e"in e&&"e"in t&&Object.is(e.e,t.e),le=e=>"v"in e&&e.v instanceof Promise,Dn=(e,t)=>"v"in e&&"v"in t&&e.v.orig&&e.v.orig===t.v.orig,be=e=>{if("e"in e)throw e.e;return e.v},Rt=()=>{const e=new WeakMap,t=new WeakMap,s=new Map;let o,a,r;(L?"production":void 0)!=="production"&&(o=new Set,a=new Set,r=new Set);const l=m=>e.get(m),p=(m,b)=>{(L?"production":void 0)!=="production"&&Object.freeze(b);const y=e.get(m);if(e.set(m,b),s.has(m)||s.set(m,y),y&&le(y)){const h="v"in b?b.v instanceof Promise?b.v:Promise.resolve(b.v):Promise.reject(b.e);nt(y.v,h)}},f=(m,b,y)=>{const h=new Map;let j=!1;y.forEach((v,k)=>{!v&&k===m&&(v=b),v?(h.set(k,v),b.d.get(k)!==v&&(j=!0)):(L?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(j||b.d.size!==h.size)&&(b.d=h)},u=(m,b,y)=>{const h=l(m),j={d:(h==null?void 0:h.d)||new Map,v:b};if(y&&f(m,j,y),h&&me(h,j)&&h.d===j.d)return h;if(h&&le(h)&&le(j)&&Dn(h,j)){if(h.d===j.d)return h;j.v=h.v}return p(m,j),j},g=(m,b,y,h)=>{if(Mn(b)){let j;const v=new Promise((k,T)=>{let N=!1;b.then(E=>{if(!N){N=!0;const S=l(m),K=u(m,v,y);at(v,E),k(E),(S==null?void 0:S.d)!==K.d&&F(m,K,S==null?void 0:S.d)}},E=>{if(!N){N=!0;const S=l(m),K=u(m,v,y);rt(v,E),T(E),(S==null?void 0:S.d)!==K.d&&F(m,K,S==null?void 0:S.d)}}),j=E=>{N||(N=!0,E.then(S=>at(v,S),S=>rt(v,S)),k(E))}});return v.orig=b,v.status="pending",In(v,k=>{k&&j(k),h==null||h()}),u(m,v,y)}return u(m,b,y)},R=(m,b,y)=>{const h=l(m),j={d:(h==null?void 0:h.d)||new Map,e:b};return y&&f(m,j,y),h&&it(h,j)&&h.d===j.d?h:(p(m,j),j)},A=m=>{const b=l(m);if(b&&(b.d.forEach((N,E)=>{E!==m&&!t.has(E)&&A(E)}),Array.from(b.d).every(([N,E])=>{const S=l(N);return N===m||S===E||S&&!le(S)&&me(S,E)})))return b;const y=new Map;let h=!0;const j=N=>{if(N===m){const S=l(N);if(S)return y.set(N,S),be(S);if(Be(N))return y.set(N,void 0),N.init;throw new Error("no atom init")}const E=A(N);return y.set(N,E),be(E)};let v,k;const T={get signal(){return v||(v=new AbortController),v.signal},get setSelf(){return(L?"production":void 0)!=="production"&&!Pe(m)&&console.warn("setSelf function cannot be used with read-only atom"),!k&&Pe(m)&&(k=(...N)=>{if((L?"production":void 0)!=="production"&&h&&console.warn("setSelf function cannot be called in sync"),!h)return J(m,...N)}),k}};try{const N=m.read(j,T);return g(m,N,y,()=>v==null?void 0:v.abort())}catch(N){return R(m,N,y)}finally{h=!1}},I=m=>be(A(m)),z=m=>{let b=t.get(m);return b||(b=W(m)),b},H=(m,b)=>!b.l.size&&(!b.t.size||b.t.size===1&&b.t.has(m)),Q=m=>{const b=t.get(m);b&&H(m,b)&&te(m)},ie=m=>{const b=new Map,y=new WeakMap,h=v=>{const k=t.get(v);k==null||k.t.forEach(T=>{T!==v&&(b.set(T,(b.get(T)||new Set).add(v)),y.set(T,(y.get(T)||0)+1),h(T))})};h(m);const j=v=>{const k=t.get(v);k==null||k.t.forEach(T=>{var N;if(T!==v){let E=y.get(T);if(E&&y.set(T,--E),!E){let S=!!((N=b.get(T))!=null&&N.size);if(S){const K=l(T),dn=A(T);S=!K||!me(K,dn)}S||b.forEach(K=>K.delete(T))}j(T)}})};j(m)},X=(m,...b)=>{let y=!0;const h=k=>be(A(k)),j=(k,...T)=>{let N;if(k===m){if(!Be(k))throw new Error("atom not writable");const E=l(k),S=g(k,T[0]);(!E||!me(E,S))&&ie(k)}else N=X(k,...T);if(!y){const E=Z();(L?"production":void 0)!=="production"&&a.forEach(S=>S({type:"async-write",flushed:E}))}return N},v=m.write(h,j,...b);return y=!1,v},J=(m,...b)=>{const y=X(m,...b),h=Z();return(L?"production":void 0)!=="production"&&a.forEach(j=>j({type:"write",flushed:h})),y},W=(m,b)=>{const y={t:new Set(b&&[b]),l:new Set};if(t.set(m,y),(L?"production":void 0)!=="production"&&r.add(m),A(m).d.forEach((h,j)=>{const v=t.get(j);v?v.t.add(m):j!==m&&W(j,m)}),A(m),Pe(m)&&m.onMount){const h=m.onMount((...j)=>J(m,...j));h&&(y.u=h)}return y},te=m=>{var b;const y=(b=t.get(m))==null?void 0:b.u;y&&y(),t.delete(m),(L?"production":void 0)!=="production"&&r.delete(m);const h=l(m);h?(le(h)&&nt(h.v),h.d.forEach((j,v)=>{if(v!==m){const k=t.get(v);k&&(k.t.delete(m),H(v,k)&&te(v))}})):(L?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",m)},F=(m,b,y)=>{const h=new Set(b.d.keys());y==null||y.forEach((j,v)=>{if(h.has(v)){h.delete(v);return}const k=t.get(v);k&&(k.t.delete(m),H(v,k)&&te(v))}),h.forEach(j=>{const v=t.get(j);v?v.t.add(m):t.has(m)&&W(j,m)})},Z=()=>{let m;for((L?"production":void 0)!=="production"&&(m=new Set);s.size;){const b=Array.from(s);s.clear(),b.forEach(([y,h])=>{const j=l(y);if(j){j.d!==(h==null?void 0:h.d)&&F(y,j,h==null?void 0:h.d);const v=t.get(y);v&&!(h&&!le(h)&&(me(h,j)||it(h,j)))&&(v.l.forEach(k=>k()),(L?"production":void 0)!=="production"&&m.add(y))}else(L?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if((L?"production":void 0)!=="production")return o.forEach(b=>b("state")),m},ee=(m,b)=>{const y=z(m),h=Z(),j=y.l;return j.add(b),(L?"production":void 0)!=="production"&&(o.forEach(v=>v("sub")),a.forEach(v=>v({type:"sub",flushed:h}))),()=>{j.delete(b),Q(m),(L?"production":void 0)!=="production"&&(o.forEach(v=>v("unsub")),a.forEach(v=>v({type:"unsub"})))}};return(L?"production":void 0)!=="production"?{get:I,set:J,sub:ee,dev_subscribe_store:(m,b)=>b!==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,h]of m)Be(y)&&(g(y,h),ie(y));const b=Z();a.forEach(y=>y({type:"restore",flushed:b}))}}:{get:I,set:J,sub:ee}};let Te;const Ln=()=>(Te||(Te=Rt()),Te);var On={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Vn=w.createContext(void 0),$e=e=>{const t=w.useContext(Vn);return(e==null?void 0:e.store)||t||Ln()};const zn=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 kt(e,t){const s=$e(t),[[o,a,r],l]=w.useReducer(u=>{const g=s.get(e);return Object.is(u[0],g)&&u[1]===s&&u[2]===e?u:[g,s,e]},void 0,()=>[s.get(e),s,e]);let p=o;(a!==s||r!==e)&&(l(),p=s.get(e));const f=t==null?void 0:t.delay;return w.useEffect(()=>{const u=s.sub(e,()=>{if(typeof f=="number"){setTimeout(l,f);return}l()});return l(),u},[s,e,f]),w.useDebugValue(p),zn(p)?$n(p):p}function At(e,t){const s=$e(t);return w.useCallback((...a)=>{if((On?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return s.set(e,...a)},[s,e])}function Fn(e,t){return[kt(e,t),At(e,t)]}var Fe={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Nt=Symbol();function Un(e,t){const s=Y(e,(o,a,r)=>a(s,t(o(s),r)));return s}const lt=(e,t,s)=>(t.has(s)?t:t.set(s,e())).get(s),qn=new WeakMap,Gn=(e,t,s)=>{const o=lt(()=>new WeakMap,qn,t);return lt(e,o,s)},Hn={},ct=e=>!!e.write,Wn=e=>typeof e=="function";function Yn(e,t){return Gn(()=>{const s=new WeakMap,o=(l,p)=>{let f=s.get(l);if(f)return f;const u=p&&s.get(p),g=[],R=[];return l.forEach((A,I)=>{const z=t?t(A):I;R[I]=z;const H=u&&u.atomList[u.keyList.indexOf(z)];if(H){g[I]=H;return}const Q=X=>{const J=X(a),W=X(e),F=o(W,J==null?void 0:J.arr).keyList.indexOf(z);if(F<0||F>=W.length){const Z=l[o(l).keyList.indexOf(z)];if(Z)return Z;throw new Error("splitAtom: index out of bounds for read")}return W[F]},ie=(X,J,W)=>{const te=X(a),F=X(e),ee=o(F,te==null?void 0:te.arr).keyList.indexOf(z);if(ee<0||ee>=F.length)throw new Error("splitAtom: index out of bounds for write");const m=Wn(W)?W(F[ee]):W;J(e,[...F.slice(0,ee),m,...F.slice(ee+1)])};g[I]=ct(e)?Y(Q,ie):Y(Q)}),u&&u.keyList.length===R.length&&u.keyList.every((A,I)=>A===R[I])?f=u:f={arr:l,atomList:g,keyList:R},s.set(l,f),f},a=Y(l=>{const p=l(a),f=l(e);return o(f,p==null?void 0:p.arr)});(Fe?"production":void 0)!=="production"&&(a.debugPrivate=!0),a.init=void 0;const r=ct(e)?Y(l=>l(a).atomList,(l,p,f)=>{switch(f.type){case"remove":{const u=l(r).indexOf(f.atom);if(u>=0){const g=l(e);p(e,[...g.slice(0,u),...g.slice(u+1)])}break}case"insert":{const u=f.before?l(r).indexOf(f.before):l(r).length;if(u>=0){const g=l(e);p(e,[...g.slice(0,u),f.value,...g.slice(u)])}break}case"move":{const u=l(r).indexOf(f.atom),g=f.before?l(r).indexOf(f.before):l(r).length;if(u>=0&&g>=0){const R=l(e);u<g?p(e,[...R.slice(0,u),...R.slice(u+1,g),R[u],...R.slice(g)]):p(e,[...R.slice(0,g),R[u],...R.slice(g,u),...R.slice(u+1)])}break}}}):Y(l=>l(a).atomList);return r},e,t||Hn)}function Kn(e){const t=Symbol(),s=Y(t);(Fe?"production":void 0)!=="production"&&(s.debugPrivate=!0);const o=Y((a,r)=>{const l=a(s);return l!==t?l:e(a,r)},(a,r,l)=>{if(l===Nt)r(s,t);else if(typeof l=="function"){const p=a(o);r(s,l(p))}else r(s,l)});return o}const Jn=e=>typeof(e==null?void 0:e.then)=="function";function Qn(e){let t,s;const o={getItem:(a,r)=>{var l,p;const f=g=>{if(g=g||"",t!==g){try{s=JSON.parse(g)}catch{return r}t=g}return s},u=(p=(l=e())==null?void 0:l.getItem(a))!=null?p:null;return Jn(u)?u.then(f):f(u)},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=f=>{if(f.storageArea===e()&&f.key===a){let u;try{u=JSON.parse(f.newValue||"")}catch{u=l}r(u)}};return window.addEventListener("storage",p),()=>{window.removeEventListener("storage",p)}}),o}const Xn=Qn(()=>typeof window<"u"?window.localStorage:void 0);function de(e,t,s=Xn,o){const a=o==null?void 0:o.unstable_getOnInit,r=Y(a?s.getItem(e,t):t);return(Fe?"production":void 0)!=="production"&&(r.debugPrivate=!0),r.onMount=p=>{a||p(s.getItem(e,t));let f;return s.subscribe&&(f=s.subscribe(e,p,t)),f},Y(p=>p(r),(p,f,u)=>{const g=typeof u=="function"?u(p(r)):u;return g===Nt?(f(r,t),s.removeItem(e)):g instanceof Promise?g.then(R=>(f(r,R),s.setItem(e,R))):(f(r,g),s.setItem(e,g))})}const ke=d.atom(null);ke.debugLabel="chaiBuilderPropsAtom";const St=d.atom({});St.debugLabel="chaiExternalDataAtom";const Zn=()=>!1,ea=e=>{const t=e.replace(c.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}};const ta=new vt({children:"blockNodes"}),Ct=(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,...Ct(o,s._id)])}return s}));function Et(e,t,s){const o=i.filter(e,r=>r._parent===t),a=[];for(let r=0;r<o.length;r++){const l=_t(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(Et(e,o[r]._id,p)))}else a.push({...o[r],oldId:o[r]._id,_id:c.generateUUID(),_parent:s})}return i.flatten(a)}function sa(e){let t=ta.convert(e.map(s=>i.omit(s,["settings"])));return t=!t.type&&t.blockNodes?t.blockNodes:i.isEmpty(t)?[]:[t],t}const _t=e=>{const t={};return Object.keys(e).forEach(s=>{i.isString(e[s])&&e[s].startsWith("slot")&&(t[s]=e[s].replace("slot:",""))}),t},oa=(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(Et(e,t,o._id)));const r=i.flatten(a);return i.map(r,l=>{const p=l,f=_t(p);return Object.keys(f).length>0&&Object.keys(f).forEach(u=>{const g=i.find(r,{oldId:f[u].replace("slot:","")});p[u]=`slot:${g._id}`}),i.omit(p,["global","oldId"])})};const na=pe((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:pe.excludeAction(["update_props_realtime","add_duplicate_blocks","set_page_blocks"])}),Ae=Un({past:[],present:[],future:[]},na);Ae.debugLabel="pageBlocksAtom";const q=d.atom(e=>{var t;return(t=e(Ae))==null?void 0:t.present});q.debugLabel="presentBlocksAtom";const Ue=Yn(q);Ue.debugLabel="pageBlocksAtomsAtom";const Bt=d.atom(e=>sa(e(q)));Bt.debugLabel="pageBlocksTreeAtom";const aa=d.atom("");aa.debugLabel="builderActivePageAtom";const ra=d.atom(-1);ra.debugLabel="destinationDropIndexAtom";const Pt=d.atom(!1);Pt.debugLabel="addBlocksModalAtom";const Tt=d.atom([]);Tt.debugLabel="buildingBlocksAtom";const It=d.atom(e=>{const t=e(Tt);return i.filter(t,s=>i.has(s,"blockId"))});It.debugLabel="globalBlocksAtom";const G=()=>{const[,e]=d.useAtom(Ae);return e},ia=()=>{const e=G(),t=d.useAtomValue(Bt),s=w.useCallback(o=>{const a=Ct(o);e({type:"set_page_blocks",payload:a})},[e]);return[t,s]},la=()=>{const e=G();return[w.useCallback(s=>{e({type:"set_page_blocks",payload:s})},[e])]},Le=e=>["Box","Slot","Form","DataProvider","Link","List","ListItem","Row","Column","Table","TableCell"].includes(e),ca=e=>!["Slot"].includes(e),da=e=>!["Slot"].includes(e);function ua(e,t){return e==="Slot"||t==="List"&&e!=="ListItem"||t==="Row"&&e!=="Column"?!1:Le(t)}const ma=(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:ua(o,a)},qe=d.atom([]);qe.debugLabel="selectedBlockIdsAtom";const Ge=d.atom(e=>{const t=e(q),s=e(qe);return i.map(i.filter(t,({_id:o})=>i.includes(s,o)),o=>({...o}))});Ge.debugLabel="selectedBlocksAtom";const He=d.atom(e=>{const t=e(Ge);return t.length===0?null:t.length===1?t[0]:{type:"Multiple",id:i.map(t,"id")}});He.debugLabel="selectedBlockAtom";const pa=e=>i.get(e,"parent",null),fa=d.atom(e=>{const t=e(Ge),s=i.map(t,pa);return i.filter(e(q),o=>i.includes(s,o._id))});fa.debugLabel="selectedBlocksParentsAtom";const Mt=d.atom(()=>!1);Mt.debugLabel="selectedBlockFlexChildAtom";const Dt=d.atom(()=>!1);Dt.debugLabel="selectedBlockGridChildAtom";const We=d.atom("");We.debugLabel="styleStateAtom";const Lt=de("styleBreakpoint","xs");Lt.debugLabel="styleBreakpointAtom";const xa=()=>({flexChild:d.useAtomValue(Mt),gridChild:d.useAtomValue(Dt)}),ga=()=>d.useAtomValue(He);const ue=()=>{const[e,t]=d.useAtom(qe),s=w.useCallback(o=>{t(a=>i.includes(a,o)?i.without(a,o):[...a,o])},[t]);return[e,t,s]},Oe=(e,t="")=>{switch(e.type){case"singular":return e.uiSchema;case"model":const{properties:s}=e,o={};return Object.keys(s).forEach(l=>{const p=s[l];if(i.includes(["slot","styles"],p.type))return;const f=i.get(p,"i18n",!1)?`${l}-${t}`:l;o[f]=Oe(p,t)}),o;case"list":const{itemProperties:a}=e,r={items:{}};return Object.keys(a).forEach(l=>{const p=a[l];if(i.includes(["slot","styles"],p.type))return;const f=i.get(p,"i18n",!1)?`${l}-${t}`:l;r.items[f]=Oe(p,t)}),r;default:return{}}},Ve=(e,t="")=>{switch(e.type){case"singular":return e.schema;case"model":const{properties:s,title:o}=e,a={title:o,type:"object",properties:{}};return Object.keys(s).forEach(f=>{const u=s[f];if(i.includes(["slot","styles"],u.type))return;const g=i.get(u,"i18n",!1)?`${f}-${t}`:f;a.properties[g]=Ve(u,t)}),a;case"list":const{itemProperties:r,title:l}=e,p={title:l,type:"array",items:{type:"object",properties:{}}};return Object.keys(r).forEach(f=>{const u=r[f];if(i.includes(["slot","styles"],u.type))return;const g=i.get(u,"i18n",!1)?`${f}-${t}`:f;p.items.properties[g]=Ve(u,t),i.set(p.items,"title",i.get(u,"itemTitle",`${l} item`))}),p;default:return{}}},Ot=e=>{const t={};return Object.keys(e).forEach(s=>{t[s]=ha(e[s])}),t},ba=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]=c.I18N_KEY)}),o})},ha=e=>{switch(e.type){case"styles":return e.default;case"slot":return`${c.SLOT_KEY}${c.generateUUID()}`;case"singular":const{i18n:t,schema:s}=e;return t?c.I18N_KEY:i.get(s,"default","");case"model":return Ot(e.properties);case"list":return ba(e);default:return""}};const Vt=()=>d.useAtomValue(q);function dt(e,t,s,o,a){if(t===null)return[...e,...o];if(s!==null){const f=i.findIndex(e,{_parent:t}),u=(f===-1?0:f)+s;return e.splice(u,0,...o),e}if(!a){const u=i.findIndex(e,{_id:t})+1;return e.splice(u,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 va=()=>{const e=G(),t=Vt(),[,s]=ue(),o=w.useCallback((r,l,p)=>{var g;for(let R=0;R<r.length;R++){const{_id:A}=r[R];r[R]._id=c.generateUUID();const I=i.filter(r,{_parent:A});for(let z=0;z<I.length;z++)I[z]._parent=r[R]._id}let f;l&&(f=i.find(t,{_id:l}),r[0]._parent=l);const u=f?Le(f._type):!0;return!u&&f&&(r[0]._parent=f._parent),e({type:"set_blocks",payload:dt(t,l||null,p||null,r,u)}),s([(g=i.first(r))==null?void 0:g._id]),i.first(r)},[t,e,s]);return{addCoreBlock:w.useCallback((r,l,p)=>{if(i.has(r,"blocks")){const H=r.blocks;return o(H,l,p)}const f=c.generateUUID(),u=Ot(r.props),g=[];i.forIn(u,(H,Q)=>{if(i.startsWith(H,c.SLOT_KEY)){const ie=H.replace(c.SLOT_KEY,"");g.push({_id:ie,_type:"Slot",_parent:f,_name:r.props[Q].name,_styles:r.props[Q].styles,_emptyStyles:r.props[Q].emptyStyles})}});const R={_type:r.type,_id:f,...u};let A;l&&(A=i.find(t,{_id:l}),R._parent=l);const I=A?Le(A._type):!0;!I&&A&&(R._parent=A._parent);const z=[R,...g];return e({type:"set_blocks",payload:dt(t,l||null,p||null,z,I)}),s([R._id]),R},[o,t,e,s]),addPredefinedBlock:o}},ut={xs:420,sm:620,md:768,lg:1024,xl:1280,"2xl":1536},mt=["xs","sm","md","lg","xl","2xl"];function ya(e,t){if(t===null)return"baseClasses";const s=t.mq;if(s==="xs"||t.dark||t.mod!=="")return"classes";let o="baseClasses",a=mt.indexOf(s);for(;a>0;){const r=mt[a-1];if(i.find(e,{mq:r,property:t.property})){o="classes";break}a--}return o}const pt=[];function ja(e="",t="",s=[]){e=e.trim().replace(/ +/g,"");let o=i.filter(i.map(e.split(" "),c.constructClassObject),u=>!i.isNull(u)),a=i.filter(i.map(t.split(" "),c.constructClassObject),u=>!i.isNull(u));a=i.filter(a,u=>!i.includes(pt,u.property));const r=[],l=[];i.each(s,u=>{const g=c.constructClassObject(u),R=i.find(o,i.pick(g,["dark","mq","mod","property"]));if(R&&(o=i.filter(o,A=>A.fullCls!==(R==null?void 0:R.fullCls))),r.push(g),g.mq==="xs"&&!g.dark&&g.mod===""&&(a=i.filter(a,A=>A.property!==g.property)),ya(o,g)==="baseClasses"&&!i.includes(pt,g.property)){const A=i.find(a,i.pick(g,["property"]));R&&(a=i.filter(a,I=>I.fullCls!==(A==null?void 0:A.fullCls))),l.push({...g,fullCls:g.cls,mq:"xs"})}});const p=i.map(i.sortBy([...o,...r],u=>ut[u.mq]),"fullCls").join(" ");return`${i.map(i.sortBy([...a,...l],u=>ut[u.mq]),"fullCls").join(" ").trim()},${p.trim()}`.trim().replace(/ +/g,"")}const ge=d.atom([]);ge.debugLabel="selectedStylingBlocksAtom";const Ye=()=>d.useAtom(ge),wa=e=>{const t=e.replace(c.STYLES_KEY,"").split(",");return{baseClasses:t[0],classes:t[1]}},Ra=d.atom(null,(e,t,{blockIds:s,newClasses:o,dispatch:a})=>{const r=i.filter(e(Ue),p=>s.includes(e(p)._id)),l=i.first(e(ge));i.each(r,p=>{const f=e(p),u=i.get(f,l.prop,`${c.STYLES_KEY},`),{baseClasses:g,classes:R}=wa(u);a({type:"update_props_realtime",payload:{ids:[f._id],props:{[l.prop]:`${c.STYLES_KEY}${ja(R,g,o)}`}}})})}),ka=()=>{const e=G(),t=d.useSetAtom(Ra);return w.useCallback((s,o,a)=>{t({blockIds:s,newClasses:o,dispatch:e}),a&&setTimeout(()=>e({type:"create_snapshot"}),500)},[e,t])},ft=()=>{},zt=()=>{const e=Bn.C(),t=d.useAtomValue(It),s=()=>{ft()},o=w.useCallback(()=>ft(),[]);return[e,t,s,o]},Aa=d.atom(!1),$t=()=>{const[e,t]=d.useAtom(Aa);return[e,t]},Na=d.atom(c.BRANDING_OPTIONS_DEFAULTS),Ft=()=>{const[e,t]=d.useAtom(Na);return[i.isObject(e)?{...c.BRANDING_OPTIONS_DEFAULTS,...e}:c.BRANDING_OPTIONS_DEFAULTS,t]},Sa=d.atom(null),Ut=()=>({currentPage:d.useAtomValue(Sa)}),qt=new vt({});function Ca(e){let t=qt.convert(e);return t=!t.type&&t.children&&t.children.length?t.children:i.isEmpty(t)?[]:[t],t}const Ke=(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,...Ke(o,s._id)])}return s}));function Je(e,t=!1){for(let s=0;s<e.length;s++){const o=e[s];o.global&&!t?e[s]={type:"GlobalBlock",_parent:i.get(o,"parent",null),blockId:o.blockId,_id:o._id}:o.children&&o.children.length&&Je(o.children)}}function Gt(e){let t=[],s=i.filter(e,{type:"GlobalBlock"});return s.length>0&&(s=i.map(s,Ht),i.each(s,o=>{t=[...t,...Ea(o)]})),t}function Ea(e){let t=[];const s=i.get(i.first(e),"parent",null);i.set(i.first(e),"parent",null);const o=[qt.convert(Wt(e))];Je(o,!0);let a=Ke(o,e[0]._id);return a=i.set(a,"0.parent",s),t=[...t,a,...Gt(a)],t}function Ht(e){const t=i.find(ze,{_id:e._id});if(!t)return[];const s=[t],o=i.filter(ze,{_parent:e._id});return o.length?i.flatten([...s,...i.flatten(i.map(o,Ht))]):i.flatten(s)}const Wt=e=>JSON.parse(JSON.stringify(e));let ze=[];function _a(e){ze=e;const t=Ca(Wt(e));Je(t);const s=Ke(t,null),o=Gt(s),a={};return i.each(o,r=>i.set(a,i.first(r).blockId,r)),[s,a]}const Qe=()=>{const[e]=Ft(),{currentPage:t}=Ut(),s=d.useAtomValue(q);return w.useCallback(()=>{const o=i.map(s,l=>i.omit(l,["expanded","order","title","siblings","tempClasses"])),[a=[],r=[]]=_a(o);return{currentPage:t,blocks:a,globalBlocks:r}},[e,t,s])},oe=(e,t=void 0)=>{const s=d.useAtomValue(ke);return i.get(s,e,t)},Yt=d.atom(!1);Yt.debugLabel="readOnlyModeAtom";const Kt=d.atom(!1);Kt.debugLabel="inlineEditingActiveAtom";const Jt=d.atom(!1);Jt.debugLabel="advanceStylingOpenAtom";const Qt=d.atom("online");Qt.debugLabel="networkModeAtom";const Ba=d.atom(!1);Ba.debugLabel="codeEditorOpenAtom";const Xt=d.atom(!1);Xt.debugLabel="editLayerNameAtom";const Pa=d.atom("");Pa.debugLabel="activeLanguageAtom";const Ta=d.atom("");Ta.debugLabel="primaryLanguageAtom";const Zt=d.atom(null);Zt.debugLabel="canvasIframeAtom";const es=d.atom("layers");es.debugLabel="activePanelAtom";const ts=d.atom(!1);ts.debugLabel="addBlockOffCanvasAtom";const ss=d.atom("");ss.debugLabel="showPredefinedBlockCategoryAtom";const Ne=d.atom({undoCount:0,redoCount:0});Ne.debugLabel="historyStatesAtom";const Xe=d.atom([]);Xe.debugLabel="dataProvidersAtom";const os=()=>d.useAtom(Xe),Se=d.atom("SAVED");Se.debugLabel="pageSyncStateAtom";const Ia=()=>{const[e,t]=d.useAtom(Se),s=oe("onSaveBlocks",async()=>{}),o=oe("onSavePage",async()=>{}),a=oe("onSyncStatusChange",()=>{}),r=Qe(),l=d.useSetAtom(Ne),{undoCount:p,redoCount:f}=Ce(),[u]=os();return{savePage:Pn.useThrottledCallback(async()=>{t("SAVING"),a("SAVING");const R=r();return await o({blocks:R.blocks,providers:u}),setTimeout(()=>{l({undoCount:p,redoCount:f}),t("SAVED"),a("SAVED")},100),!0},[r,t,a,s],5e3),syncState:e,setSyncState:t}},Ce=()=>{const e=d.useAtomValue(Ae),[{undoCount:t,redoCount:s}]=d.useAtom(Ne),o=G(),[a]=$t(),[,r]=ue(),[,l]=Ye(),[p,f]=d.useAtom(Se),u=oe("onSyncStatusChange",()=>{}),g=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))&&(f("UNSAVED"),u("UNSAVED"))},[e==null?void 0:e.past.length,e==null?void 0:e.future.length,t,s,u,f,p]),{undoCount:e==null?void 0:e.past.length,redoCount:e==null?void 0:e.future.length,undo:w.useCallback(()=>{a||(o(pe.ActionCreators.undo()),setTimeout(()=>{l([]),r([])},200))},[o,a,r,l]),redo:w.useCallback(()=>{a||(o(pe.ActionCreators.redo()),setTimeout(()=>{l([]),r([])},200))},[a,o,l,r]),clear:()=>{o(pe.ActionCreators.clearHistory())},createSnapshot:g}},ns=()=>d.useAtom(Lt),as=de("canvasWidth",800),rs=d.atom(e=>{const t=e(as);return c.getBreakpointValue(t).toLowerCase()}),Ma=()=>{const[e,t]=d.useAtom(as),s=d.useAtomValue(rs),[o,a]=ns();return w.useEffect(()=>{o!=="xs"&&a(s)},[s,o,a]),[e,s,t]},Da=de("canvasZoom",100),La=()=>d.useAtom(Da),is=d.atom([]),ls=()=>{const[e,t]=d.useAtom(is),s=d.useSetAtom(Ze),o=w.useCallback(a=>{t(a),s([])},[t,s]);return[e,o]},Ze=d.atom([]),Oa=()=>{const[e,t]=d.useAtom(Ze),s=d.useSetAtom(is),o=w.useCallback(a=>{t(a),s([])},[t,s]);return[e,o]},cs=de("darkMode",!1),Va=()=>{const[e,t]=d.useAtom(cs);return[e,t]},za=d.atom(!1),$a=()=>{const[e,t]=d.useAtom(za);return[e,t]},ds=()=>{const e=G(),t=d.useAtomValue(q),[,s]=ue();return w.useCallback((o,a=null)=>{const r=[];i.each(o,l=>{const f=oa(t,l,a===l?null:a);r.push(i.get(f,"0._id","")),e({type:"add_duplicate_blocks",payload:f})}),s(r),e({type:"create_snapshot"})},[t,s,e])},Fa=d.atom([]),Ua=()=>{const[e,t]=d.useAtom(Fa),s=w.useCallback(o=>{t(a=>i.includes(a,o)?i.without(a,o):[...a,o])},[t]);return[e,t,s]},qa=d.atom(""),us=()=>d.useAtom(qa),Ga=()=>{const e=d.useAtomValue(q),t=G(),s=Qe(),[,,o]=zt();return w.useCallback(async(a,r)=>{const l=c.generateUUID(16),p=i.map(e,f=>(f._id===a&&(f._globalBlockId=l,f._name=r),f));t({type:"set_page_blocks",payload:p}),o()},[e,t,s,o])},Ha=()=>({}),Wa=()=>{const e=d.useAtomValue(q),t=G();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])},Ya=()=>{const e=d.useAtomValue(Ze),[t,s]=ls(),o=ds(),a=Wa();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])}},Ka=d.atom(""),Ja=()=>{const e=d.useAtomValue(Ka),t=w.useCallback(()=>{},[]),s=w.useCallback(()=>{},[]),o=w.useCallback(()=>{},[]);return{currentProject:e,createProject:o,deleteProject:t,updateProject:s}},ms=(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:ms(o,s)},Qa=()=>{const e=G(),t=d.useAtomValue(q),[s,o]=ue();return w.useCallback(a=>{var p;const r=((p=i.find(t,{_id:a[0]}))==null?void 0:p._parent)||null,l=ms(t,a);e({type:"set_blocks",payload:l}),o(r?[r]:[])},[t,o,e,s])},Xa=d.atom(null,(e,t,{blockIds:s,fullClasses:o,dispatch:a})=>{const r=i.first(e(ge)),l=i.filter(e(Ue),p=>s.includes(e(p)._id));i.each(l,p=>{const f=e(p),u=o;let{classes:g,baseClasses:R}=ea(i.get(f,r.prop,"styles:,"));i.each(u,A=>{const I=new RegExp(`(^| )${A.replace("[","\\[").replace("]","\\]")}($| )`,"g");g=g.replace(I," ").replace(/ +/g," ").trim();const z=i.first(A.split(":"));i.includes(["2xl","xl","lg","md","sm"],z)&&u.push(A.split(":").pop().trim())}),i.each(u,A=>{const I=new RegExp(`(^| )${A.replace("[","\\[").replace("]","\\]")}($| )`,"g");R=R.replace(I," ").replace(/ +/g," ").trim()}),a({type:"update_props_realtime",payload:{ids:[f._id],props:{[r.prop]:`${c.STYLES_KEY}${R},${g}`}}})})}),Za=()=>{const e=G(),t=d.useSetAtom(Xa);return w.useCallback((s,o)=>{t({blockIds:s,fullClasses:o,dispatch:e}),setTimeout(()=>e({type:"create_snapshot"}))},[e,t])},ps=d.atom(e=>{const t=i.first(e(ge)),s=e(He);if(!t||t.blockId!==i.get(s,"_id",null))return[];const a=i.get(s,t.prop,`${c.STYLES_KEY},`).replace(c.STYLES_KEY,"").split(",").join(" ");return i.filter(i.map(a.trim().split(" "),c.constructClassObject),r=>!i.isNull(r))}),er=()=>d.useAtomValue(ps),xt={xs:0,sm:1,md:2,lg:3,xl:4,"2xl":5},tr=d.atom(e=>{const t=e(rs),s=e(We),o=e(cs),a=sr(t);let r=i.filter(e(ps),{mod:s});return i.startsWith(s,"_")||(r=i.filter(r,l=>a.includes(l.mq))),r=r.sort((l,p)=>xt[l.mq]-xt[p.mq]),o||(r=i.filter(r,{dark:!1})),r}),sr=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},or=()=>d.useAtomValue(tr),nr=()=>d.useAtom(We),fs=d.atom(null,(e,t,{blockIds:s,props:o,dispatch:a})=>{a({type:"update_props_realtime",payload:{ids:s,props:o}})}),ar=()=>{const{createSnapshot:e}=Ce(),t=G(),s=d.useSetAtom(fs);return w.useCallback((o,a)=>{s({blockIds:o,props:a,dispatch:t}),e()},[e,t,s])},rr=()=>{const e=G(),t=d.useSetAtom(fs);return w.useCallback((s,o)=>{t({blockIds:s,props:o,dispatch:e})},[e,t])},xs={name:"",props:{},modalProps:{},backdropClose:!0},ir=d.atom(xs),lr=()=>{const[e,t]=d.useAtom(ir),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(xs)},[t,e]);return{activeModal:e,openModal:s,closeModal:o}},cr=()=>d.useAtomValue(Yt),dr=d.atom(""),ur=d.atom(null),mr=()=>d.useAtom(dr),pr=()=>d.useAtom(ur),fr=de("selectedBreakpoints",["XS","MD","XL"]),xr=()=>{const[e,t]=d.useAtom(fr);return[e,t]},gr=()=>{const e=d.useSetAtom(Ne),{clear:t}=Ce(),[,s]=ue(),[,o]=us(),[,a]=Ye();return()=>{s([]),a([]),o(""),t(),e({undoCount:0,redoCount:0})}},br=d.atom({en:{}}),hr=()=>{const[e,t]=d.useAtom(br),s=w.useCallback((o,a,r)=>{i.set(e,`${o}.${a}`,r),t(e)},[e,t]);return[e,s]},vr=(e,t)=>{const[s]=d.useAtom(ke);return i.get(s,e,t)},yr=d.atom([]),jr=()=>{const[e,t]=w.useState(!1),[s,o]=d.useAtom(yr),a=oe("getUILibraryBlocks",()=>[]);return w.useEffect(()=>{(async()=>s.length>0||(t(!0),o(await a()),t(!1)))()},[]),{data:s,isLoading:e}},wr=d.atom("en"),Rr=d.atom("en"),kr=d.atom(["en"]),gs=()=>d.useAtom(wr),Ar=()=>d.useAtom(Rr),Nr=()=>d.useAtom(kr),Sr=(e,t)=>{const[s]=gs(),o=`${e}${s?`-${s}`:""}`;return{content:i.get(t,o,i.get(t,e,"")),propKey:e}},bs=ae.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"}}),hs=x.forwardRef(({className:e,variant:t,size:s,...o},a)=>n.jsxRuntimeExports.jsx(yt.Root,{ref:a,className:c.cn(bs({variant:t,size:s,className:e})),...o}));hs.displayName=yt.Root.displayName;const vs=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(De.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(De.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")})}));vs.displayName=De.Root.displayName;const Ee=ae.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"}}),ys=x.forwardRef(({className:e,variant:t,size:s,asChild:o=!1,...a},r)=>{const l=o?pn.Slot:"button";return n.jsxRuntimeExports.jsx(l,{className:c.cn(Ee({variant:t,size:s,className:e})),ref:r,...a})});ys.displayName="Button";const Cr=ne.Root,js=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(ne.Item,{ref:s,className:c.cn("border-b",e),...t}));js.displayName="AccordionItem";const ws=x.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsx(ne.Header,{className:"flex",children:n.jsxRuntimeExports.jsxs(ne.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(O.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));ws.displayName=ne.Trigger.displayName;const Rs=x.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsx(ne.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})}));Rs.displayName=ne.Content.displayName;const Er=ae.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"}}),ks=x.forwardRef(({className:e,variant:t,...s},o)=>n.jsxRuntimeExports.jsx("div",{ref:o,role:"alert",className:c.cn(Er({variant:t}),e),...s}));ks.displayName="Alert";const As=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("h5",{ref:s,className:c.cn("mb-1 font-medium leading-none tracking-tight",e),...t}));As.displayName="AlertTitle";const Ns=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("text-sm [&_p]:leading-relaxed",e),...t}));Ns.displayName="AlertDescription";const Ss=ae.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"}}),_r=({className:e,variant:t,...s})=>n.jsxRuntimeExports.jsx("div",{className:c.cn(Ss({variant:t}),e),...s}),Br=V.Root,Pr=V.Trigger,Cs=({className:e,...t})=>n.jsxRuntimeExports.jsx(V.Portal,{className:c.cn(e),...t});Cs.displayName=V.Portal.displayName;const Es=x.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}));Es.displayName=V.Overlay.displayName;const _s=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsxs(Cs,{children:[n.jsxRuntimeExports.jsx(Es,{}),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})]}));_s.displayName=V.Content.displayName;const Bs=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});Bs.displayName="AlertDialogHeader";const Ps=({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});Ps.displayName="AlertDialogFooter";const Ts=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Title,{ref:s,className:c.cn("text-lg font-semibold",e),...t}));Ts.displayName=V.Title.displayName;const Is=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Description,{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));Is.displayName=V.Description.displayName;const Ms=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Action,{ref:s,className:c.cn(Ee(),e),...t}));Ms.displayName=V.Action.displayName;const Ds=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(V.Cancel,{ref:s,className:c.cn(Ee({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Ds.displayName=V.Cancel.displayName;const et=_.Root,Ls=_.Trigger,Os=({className:e,...t})=>n.jsxRuntimeExports.jsx(_.Portal,{className:c.cn(e),...t});Os.displayName=_.Portal.displayName;const Vs=x.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}));Vs.displayName=_.Overlay.displayName;const _e=x.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(Os,{children:[n.jsxRuntimeExports.jsx(Vs,{}),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(O.Cross2Icon,{className:"h-4 w-4"}),n.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));_e.displayName=_.Content.displayName;const zs=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});zs.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 Fs=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Title,{ref:s,className:c.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));Fs.displayName=_.Title.displayName;const Us=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Description,{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));Us.displayName=_.Description.displayName;const qs=x.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}));qs.displayName="Card";const Gs=x.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}));Gs.displayName="CardHeader";const Hs=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("h3",{ref:s,className:c.cn("font-semibold leading-none tracking-tight",e),...t}));Hs.displayName="CardTitle";const Ws=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("p",{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));Ws.displayName="CardDescription";const Ys=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn("p-6 pt-0",e),...t}));Ys.displayName="CardContent";const Ks=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx("div",{ref:s,className:c.cn(" flex items-center p-6 pt-0",e),...t}));Ks.displayName="CardFooter";const Js=x.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}));Js.displayName="Input";const Tr=ae.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Qs=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(jt.Root,{ref:s,className:c.cn(Tr(),e),...t}));Qs.displayName=jt.Root.displayName;const Xs=x.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}));Xs.displayName="Textarea";const Zs=x.forwardRef(({className:e,children:t,...s},o)=>n.jsxRuntimeExports.jsxs(se.Root,{ref:o,className:c.cn("relative overflow-hidden",e),...s,children:[n.jsxRuntimeExports.jsx(se.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),n.jsxRuntimeExports.jsx(tt,{}),n.jsxRuntimeExports.jsx(se.Corner,{})]}));Zs.displayName=se.Root.displayName;const tt=x.forwardRef(({className:e,orientation:t="vertical",...s},o)=>n.jsxRuntimeExports.jsx(se.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(se.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));tt.displayName=se.ScrollAreaScrollbar.displayName;const eo=re.Root,st=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(re.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}));st.displayName=re.List.displayName;const je=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(re.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}));je.displayName=re.Trigger.displayName;const we=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(re.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}));we.displayName=re.Content.displayName;const Ir=ce.Portal,Mr=ce.Provider,Dr=ce.Root,Lr=ce.Trigger,to=x.forwardRef(({className:e,sideOffset:t=4,...s},o)=>n.jsxRuntimeExports.jsx(ce.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}));to.displayName=ce.Content.displayName;const Or=xe.Root,Vr=xe.Trigger,so=x.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},a)=>n.jsxRuntimeExports.jsx(xe.Portal,{children:n.jsxRuntimeExports.jsx(xe.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})}));so.displayName=xe.Content.displayName;const zr=C.Menu,$r=C.Group,Fr=C.Portal,Ur=C.Sub,qr=C.RadioGroup,oo=x.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}));oo.displayName=C.Root.displayName;const no=x.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}));no.displayName=C.Trigger.displayName;const ao=x.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(O.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));ao.displayName=C.SubTrigger.displayName;const ro=x.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}));ro.displayName=C.SubContent.displayName;const io=x.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})}));io.displayName=C.Content.displayName;const lo=x.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}));lo.displayName=C.Item.displayName;const co=x.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(O.CheckIcon,{className:"h-4 w-4"})})}),t]}));co.displayName=C.CheckboxItem.displayName;const uo=x.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(O.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));uo.displayName=C.RadioItem.displayName;const mo=x.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}));mo.displayName=C.Label.displayName;const po=x.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}));po.displayName=C.Separator.displayName;const fo=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});fo.displayname="MenubarShortcut";const Gr=Re.Root,Hr=Re.Trigger,xo=x.forwardRef(({className:e,align:t="center",sideOffset:s=4,...o},a)=>n.jsxRuntimeExports.jsx(Re.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}));xo.displayName=Re.Content.displayName;const Wr=M.Root,Yr=M.Group,Kr=M.Value,go=x.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(O.CaretSortIcon,{className:"h-4 w-4 opacity-50"})})]}));go.displayName=M.Trigger.displayName;const bo=x.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})})}));bo.displayName=M.Content.displayName;const ho=x.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}));ho.displayName=M.Label.displayName;const vo=x.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(O.CheckIcon,{className:"h-4 w-4"})})}),n.jsxRuntimeExports.jsx(M.ItemText,{children:t})]}));vo.displayName=M.Item.displayName;const yo=x.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}));yo.displayName=M.Separator.displayName;const Jr=_.Root,Qr=_.Trigger,Xr=_.Close,jo=({className:e,...t})=>n.jsxRuntimeExports.jsx(_.Portal,{className:c.cn(e),...t});jo.displayName=_.Portal.displayName;const wo=x.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}));wo.displayName=_.Overlay.displayName;const Zr=ae.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"}}),Ro=x.forwardRef(({side:e="right",className:t,children:s,...o},a)=>n.jsxRuntimeExports.jsxs(jo,{children:[n.jsxRuntimeExports.jsx(wo,{}),n.jsxRuntimeExports.jsxs(_.Content,{ref:a,className:c.cn(Zr({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(O.Cross2Icon,{className:"h-4 w-4"}),n.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ro.displayName=_.Content.displayName;const ko=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});ko.displayName="SheetHeader";const Ao=({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});Ao.displayName="SheetFooter";const No=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Title,{ref:s,className:c.cn("text-lg font-semibold text-foreground",e),...t}));No.displayName=_.Title.displayName;const So=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(_.Description,{ref:s,className:c.cn("text-sm text-muted-foreground",e),...t}));So.displayName=_.Description.displayName;const ei=B.Root,ti=B.Trigger,si=B.Group,oi=B.Portal,ni=B.Sub,ai=B.RadioGroup,Co=x.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(O.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Co.displayName=B.SubTrigger.displayName;const Eo=x.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}));Eo.displayName=B.SubContent.displayName;const _o=x.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})}));_o.displayName=B.Content.displayName;const Bo=x.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}));Bo.displayName=B.Item.displayName;const Po=x.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(O.CheckIcon,{className:"h-4 w-4"})})}),t]}));Po.displayName=B.CheckboxItem.displayName;const To=x.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(O.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));To.displayName=B.RadioItem.displayName;const Io=x.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}));Io.displayName=B.Label.displayName;const Mo=x.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}));Mo.displayName=B.Separator.displayName;const Do=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest opacity-60",e),...t});Do.displayName="DropdownMenuShortcut";const Lo=x.forwardRef(({className:e,orientation:t="horizontal",decorative:s=!0,...o},a)=>n.jsxRuntimeExports.jsx(wt.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}));Lo.displayName=wt.Root.displayName;const ri=1,ii=1e6;let Ie=0;function li(){return Ie=(Ie+1)%Number.MAX_VALUE,Ie.toString()}const Me=new Map,gt=e=>{if(Me.has(e))return;const t=setTimeout(()=>{Me.delete(e),fe({type:"REMOVE_TOAST",toastId:e})},ii);Me.set(e,t)},Oo=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ri)};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?gt(s):e.toasts.forEach(o=>{gt(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)}}},he=[];let ve={toasts:[]};function fe(e){ve=Oo(ve,e),he.forEach(t=>{t(ve)})}function Vo({...e}){const t=li(),s=a=>fe({type:"UPDATE_TOAST",toast:{...a,id:t}}),o=()=>fe({type:"DISMISS_TOAST",toastId:t});return fe({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||o()}}}),{id:t,dismiss:o,update:s}}function zo(){const[e,t]=x.useState(ve);return x.useEffect(()=>(he.push(t),()=>{const s=he.indexOf(t);s>-1&&he.splice(s,1)}),[e]),{...e,toast:Vo,dismiss:s=>fe({type:"DISMISS_TOAST",toastId:s})}}const ci=U.Provider,$o=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.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=U.Viewport.displayName;const di=ae.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"}}),Fo=x.forwardRef(({className:e,variant:t,...s},o)=>n.jsxRuntimeExports.jsx(U.Root,{ref:o,className:c.cn(di({variant:t}),e),...s}));Fo.displayName=U.Root.displayName;const ui=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.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}));ui.displayName=U.Action.displayName;const Uo=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.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(O.Cross2Icon,{className:"h-4 w-4"})}));Uo.displayName=U.Close.displayName;const qo=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Title,{ref:s,className:c.cn("text-sm font-semibold [&+div]:text-xs",e),...t}));qo.displayName=U.Title.displayName;const Go=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx(U.Description,{ref:s,className:c.cn("text-sm opacity-90",e),...t}));Go.displayName=U.Description.displayName;function mi(){const{toasts:e}=zo();return n.jsxRuntimeExports.jsxs(ci,{children:[e.map(({id:t,title:s,description:o,action:a,...r})=>n.jsxRuntimeExports.jsxs(Fo,{...r,children:[n.jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[s&&n.jsxRuntimeExports.jsx(qo,{children:s}),o&&n.jsxRuntimeExports.jsx(Go,{children:o})]}),a,n.jsxRuntimeExports.jsx(Uo,{})]},t)),n.jsxRuntimeExports.jsx($o,{})]})}const pi=({className:e,...t})=>n.jsxRuntimeExports.jsx("div",{className:c.cn("animate-pulse rounded-md bg-primary/10",e),...t}),ot=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx($.Command,{ref:s,className:c.cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ot.displayName=$.Command.displayName;const fi=({children:e,...t})=>n.jsxRuntimeExports.jsx(et,{...t,children:n.jsxRuntimeExports.jsx(_e,{className:"overflow-hidden p-0",children:n.jsxRuntimeExports.jsx(ot,{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})})}),Ho=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[n.jsxRuntimeExports.jsx(O.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),n.jsxRuntimeExports.jsx($.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})]}));Ho.displayName=$.Command.Input.displayName;const Wo=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx($.Command.List,{ref:s,className:c.cn("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Wo.displayName=$.Command.List.displayName;const Yo=x.forwardRef((e,t)=>n.jsxRuntimeExports.jsx($.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Yo.displayName=$.Command.Empty.displayName;const Ko=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx($.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}));Ko.displayName=$.Command.Group.displayName;const Jo=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx($.Command.Separator,{ref:s,className:c.cn("-mx-1 h-px bg-border",e),...t}));Jo.displayName=$.Command.Separator.displayName;const Qo=x.forwardRef(({className:e,...t},s)=>n.jsxRuntimeExports.jsx($.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}));Qo.displayName=$.Command.Item.displayName;const Xo=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Xo.displayName="CommandShortcut";const xi=P.Root,gi=P.Trigger,bi=P.Group,hi=P.Portal,vi=P.Sub,yi=P.RadioGroup,Zo=x.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(O.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Zo.displayName=P.SubTrigger.displayName;const en=x.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}));en.displayName=P.SubContent.displayName;const tn=x.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})}));tn.displayName=P.Content.displayName;const sn=x.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}));sn.displayName=P.Item.displayName;const on=x.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(O.CheckIcon,{className:"h-4 w-4"})})}),t]}));on.displayName=P.CheckboxItem.displayName;const nn=x.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(O.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));nn.displayName=P.RadioItem.displayName;const an=x.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}));an.displayName=P.Label.displayName;const rn=x.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}));rn.displayName=P.Separator.displayName;const ln=({className:e,...t})=>n.jsxRuntimeExports.jsx("span",{className:c.cn("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ln.displayName="ContextMenuShortcut";const ji=e=>{try{const t=document.getElementById("icon-picker-field"),s=document.createElement("div");En.render(n.jsxRuntimeExports.jsx(ht.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""}},wi=({value:e,onChange:t,onBlur:s,id:o})=>{const a=r=>{t("<svg />");const l=ji(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(ht,{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"})]})},Ri=w.lazy(()=>Promise.resolve().then(()=>require("./UnsplashImages-a2r7b3kB.cjs"))),ki=w.lazy(()=>Promise.resolve().then(()=>require("./UploadImages-jLQgLujd.cjs"))),cn=({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(eo,{value:s,onValueChange:a=>o(a),className:"flex h-full w-full flex-col py-2",children:[n.jsxRuntimeExports.jsxs(st,{className:"w-full",children:[n.jsxRuntimeExports.jsx(je,{value:"upload",className:"w-1/2",children:"Upload"}),n.jsxRuntimeExports.jsx(je,{value:"unsplash",className:"w-1/2",children:"Unsplash"})]}),s==="unsplash"?n.jsxRuntimeExports.jsx(we,{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(Ri,{isModalView:e,onSelect:t})})}):n.jsxRuntimeExports.jsx(we,{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(ki,{isModalView:e,onSelect:t})})})]})]})},Ai=Object.freeze(Object.defineProperty({__proto__:null,default:cn},Symbol.toStringTag,{value:"Module"})),bt=({children:e,onSelect:t})=>{const[s,o]=w.useState(!1),a=(...r)=>{t.call(void 0,...r),o(!1)};return n.jsxRuntimeExports.jsxs(et,{open:s,onOpenChange:r=>o(r),children:[n.jsxRuntimeExports.jsx(Ls,{asChild:!0,children:e}),n.jsxRuntimeExports.jsx(_e,{className:"flex h-3/4 max-w-5xl",children:n.jsxRuntimeExports.jsx("div",{className:"h-full w-full",children:n.jsxRuntimeExports.jsx(cn,{isModalView:!0,onSelect:a})})})]})},Ni=({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(bt,{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(bt,{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)})]})]}),Si=({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(_n,{id:e,value:s,onBlur:p=>a(e,p),onChange:p=>o(p),modules:r,formats:l,placeholder:t,className:"mt-1 rounded-md"})},Ci=({schema:e,formData:t,onChange:s})=>{const[o,a]=w.useState([]),r=oe("getPages",()=>[]),{type:l="page",href:p="",target:f="self"}=t;return w.useEffect(()=>{(async()=>{const u=await r();a(u||[])})()},[r]),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",defaultValue:"page",value:l,onChange:u=>s({...t,type:u.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(u=>n.jsxRuntimeExports.jsx("option",{value:u.const,children:u.title},u.const))}),l==="page"?n.jsxRuntimeExports.jsxs("select",{name:"href",defaultValue:"",placeholder:"Choose Page",value:p,onChange:u=>s({...t,href:u.target.value}),children:[n.jsxRuntimeExports.jsx("option",{value:"",children:"Choose page"}),i.map(o,u=>n.jsxRuntimeExports.jsx("option",{value:u.slug,children:u.name},u.uuid))]}):n.jsxRuntimeExports.jsx("input",{name:"href",type:"text",value:p,onChange:u=>s({...t,href:u.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:f==="_blank",className:"cursor-pointer rounded-md border border-border",onChange:()=>s({...t,target:f==="_blank"?"_self":"_blank"})}),n.jsxRuntimeExports.jsx("span",{className:"pt-1 text-xs",children:"Open in new tab"})]})]})]})};exports.Accordion=Cr;exports.AccordionContent=Rs;exports.AccordionItem=js;exports.AccordionTrigger=ws;exports.Alert=ks;exports.AlertDescription=Ns;exports.AlertDialog=Br;exports.AlertDialogAction=Ms;exports.AlertDialogCancel=Ds;exports.AlertDialogContent=_s;exports.AlertDialogDescription=Is;exports.AlertDialogFooter=Ps;exports.AlertDialogHeader=Bs;exports.AlertDialogTitle=Ts;exports.AlertDialogTrigger=Pr;exports.AlertTitle=As;exports.Badge=_r;exports.Button=ys;exports.Card=qs;exports.CardContent=Ys;exports.CardDescription=Ws;exports.CardFooter=Ks;exports.CardHeader=Gs;exports.CardTitle=Hs;exports.Command=ot;exports.CommandDialog=fi;exports.CommandEmpty=Yo;exports.CommandGroup=Ko;exports.CommandInput=Ho;exports.CommandItem=Qo;exports.CommandList=Wo;exports.CommandSeparator=Jo;exports.CommandShortcut=Xo;exports.ContextMenu=xi;exports.ContextMenuCheckboxItem=on;exports.ContextMenuContent=tn;exports.ContextMenuGroup=bi;exports.ContextMenuItem=sn;exports.ContextMenuLabel=an;exports.ContextMenuPortal=hi;exports.ContextMenuRadioGroup=yi;exports.ContextMenuRadioItem=nn;exports.ContextMenuSeparator=rn;exports.ContextMenuShortcut=ln;exports.ContextMenuSub=vi;exports.ContextMenuSubContent=en;exports.ContextMenuSubTrigger=Zo;exports.ContextMenuTrigger=gi;exports.Dialog=et;exports.DialogContent=_e;exports.DialogDescription=Us;exports.DialogFooter=$s;exports.DialogHeader=zs;exports.DialogTitle=Fs;exports.DialogTrigger=Ls;exports.DropdownMenu=ei;exports.DropdownMenuCheckboxItem=Po;exports.DropdownMenuContent=_o;exports.DropdownMenuGroup=si;exports.DropdownMenuItem=Bo;exports.DropdownMenuLabel=Io;exports.DropdownMenuPortal=oi;exports.DropdownMenuRadioGroup=ai;exports.DropdownMenuRadioItem=To;exports.DropdownMenuSeparator=Mo;exports.DropdownMenuShortcut=Do;exports.DropdownMenuSub=ni;exports.DropdownMenuSubContent=Eo;exports.DropdownMenuSubTrigger=Co;exports.DropdownMenuTrigger=ti;exports.HoverCard=Gr;exports.HoverCardContent=xo;exports.HoverCardTrigger=Hr;exports.IconPickerField=wi;exports.ImagePickerField=Ni;exports.ImagesPanel=Ai;exports.Input=Js;exports.Label=Qs;exports.LinkField=Ci;exports.Menubar=oo;exports.MenubarCheckboxItem=co;exports.MenubarContent=io;exports.MenubarGroup=$r;exports.MenubarItem=lo;exports.MenubarLabel=mo;exports.MenubarMenu=zr;exports.MenubarPortal=Fr;exports.MenubarRadioGroup=qr;exports.MenubarRadioItem=uo;exports.MenubarSeparator=po;exports.MenubarShortcut=fo;exports.MenubarSub=Ur;exports.MenubarSubContent=ro;exports.MenubarSubTrigger=ao;exports.MenubarTrigger=no;exports.Popover=Or;exports.PopoverContent=so;exports.PopoverTrigger=Vr;exports.RichTextEditorField=Si;exports.ScrollArea=Zs;exports.ScrollBar=tt;exports.Select=Wr;exports.SelectContent=bo;exports.SelectGroup=Yr;exports.SelectItem=vo;exports.SelectLabel=ho;exports.SelectSeparator=yo;exports.SelectTrigger=go;exports.SelectValue=Kr;exports.Separator=Lo;exports.Sheet=Jr;exports.SheetClose=Xr;exports.SheetContent=Ro;exports.SheetDescription=So;exports.SheetFooter=Ao;exports.SheetHeader=ko;exports.SheetTitle=No;exports.SheetTrigger=Qr;exports.Skeleton=pi;exports.Switch=vs;exports.Tabs=eo;exports.TabsContent=we;exports.TabsList=st;exports.TabsTrigger=je;exports.Textarea=Xs;exports.Toaster=mi;exports.Toggle=hs;exports.Tooltip=Dr;exports.TooltipContent=to;exports.TooltipPortal=Ir;exports.TooltipProvider=Mr;exports.TooltipTrigger=Lr;exports.activePanelAtom=es;exports.addBlockOffCanvasAtom=ts;exports.addBlocksModalAtom=Pt;exports.advanceStylingOpenAtom=Jt;exports.atom=Y;exports.atomWithDefault=Kn;exports.atomWithStorage=de;exports.badgeVariants=Ss;exports.buttonVariants=Ee;exports.canDeleteBlock=da;exports.canDropBlock=ma;exports.canDuplicateBlock=ca;exports.canvasIframeAtom=Zt;exports.chaiBuilderPropsAtom=ke;exports.chaiExternalDataAtom=St;exports.createStore=Rt;exports.dataProvidersAtom=Xe;exports.editLayerNameAtom=Xt;exports.getBlockJSONFromSchemas=Ve;exports.getBlockJSONFromUISchemas=Oe;exports.inlineEditingActiveAtom=Kt;exports.isDevelopment=Zn;exports.networkModeAtom=Qt;exports.pageSyncStateAtom=Se;exports.presentBlocksAtom=q;exports.reducer=Oo;exports.showPredefinedBlockCategoryAtom=ss;exports.toast=Vo;exports.toggleVariants=bs;exports.useActiveLanguage=gs;exports.useActiveModal=lr;exports.useActivePanel=mr;exports.useAddBlock=va;exports.useAddBlockParent=pr;exports.useAddClassesToBlocks=ka;exports.useAllBlocks=Vt;exports.useAtom=Fn;exports.useAtomValue=kt;exports.useBlockContentByLanguage=Sr;exports.useBrandingOptions=Ft;exports.useBuilderProp=oe;exports.useBuilderReset=gr;exports.useBuildingBlocks=zt;exports.useCanvasHistory=Ce;exports.useCanvasWidth=Ma;exports.useCanvasZoom=La;exports.useCopyBlockIds=Oa;exports.useCurrentPage=Ut;exports.useCutBlockIds=ls;exports.useDarkMode=Va;exports.useDeveloperPreviewMode=$a;exports.useDuplicateBlocks=ds;exports.useFeatureSupport=vr;exports.useGetPageData=Qe;exports.useHiddenBlockIds=Ua;exports.useHighlightBlockId=us;exports.useLanguages=Nr;exports.useMarkAsGlobalBlock=Ga;exports.useMoveBlocks=Ha;exports.usePageDataProviders=os;exports.usePasteBlocks=Ya;exports.usePreviewMode=$t;exports.usePrimaryLanguage=Ar;exports.useProject=Ja;exports.useReadOnlyMode=cr;exports.useRemoveBlocks=Qa;exports.useRemoveClassesFromBlocks=Za;exports.useSavePage=Ia;exports.useSelectedBlock=ga;exports.useSelectedBlockAllClasses=er;exports.useSelectedBlockCurrentClasses=or;exports.useSelectedBlockIds=ue;exports.useSelectedBlocksDisplayChild=xa;exports.useSelectedBreakpoints=xr;exports.useSelectedStylingBlocks=Ye;exports.useSetAllBlocks=la;exports.useSetAtom=At;exports.useStore=$e;exports.useStylingBreakpoint=ns;exports.useStylingState=nr;exports.useToast=zo;exports.useTranslations=hr;exports.useTreeData=ia;exports.useUILibraryBlocks=jr;exports.useUpdateBlocksProps=ar;exports.useUpdateBlocksPropsRealtime=rr;
|