@chaibuilder/sdk 3.0.12 → 3.0.13

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@chaibuilder/runtime"),s=require("react/jsx-runtime"),C=require("./common-functions-BZmyleS1.cjs"),x=require("react"),d=require("@radix-ui/react-icons"),u=require("lodash-es");function j(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const g=j(x),k=({className:e="",inBuilder:o})=>o?s.jsx("div",{className:C.cn("pointer-events-none flex h-20 flex-col items-center justify-center p-2",e),children:s.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800",children:s.jsx("div",{className:"flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700"})})}):null,L=e=>{const{blockProps:o,inBuilder:t,backgroundImage:r,children:i,tag:a="div",styles:n}=e;let c=i;i||(c=s.jsx(k,{inBuilder:t}));let p={};return r&&(p={backgroundImage:`url(${r})`}),g.createElement(a,{...o,...n,style:p},c)},N={type:"Box",description:"Similar to a div or section elements in HTML",label:"Box",category:"core",group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),tag:{type:"string",default:"div",title:"Tag",oneOf:[{const:"div",title:"div"},{const:"header",title:"header"},{const:"footer",title:"footer"},{const:"section",title:"section"},{const:"article",title:"article"},{const:"aside",title:"aside"},{const:"main",title:"main"},{const:"nav",title:"nav"},{const:"figure",title:"figure"},{const:"details",title:"details"},{const:"summary",title:"summary"},{const:"dialog",title:"dialog"},{const:"strike",title:"strike"},{const:"caption",title:"caption"},{const:"legend",title:"legend"},{const:"figcaption",title:"figcaption"},{const:"mark",title:"mark"}]},backgroundImage:{type:"string",default:"",title:"Background Image",ui:{"ui:widget":"image"}}}}),canAcceptBlock:()=>!0},_=e=>{const{blockProps:o,iconSize:t,icon:r,content:i,styles:a,children:n,iconPos:c,link:p,inBuilder:m}=e,b=r,y=n||s.jsxs(s.Fragment,{children:[i&&s.jsx("span",{children:i}),b&&s.jsx("div",{style:{width:t+"px"},className:c+" "+(i?c==="order-first"?"mr-2":"ml-2":"")||"",dangerouslySetInnerHTML:{__html:b}})]}),f=x.createElement("button",{...o,...a,type:"button","aria-label":i},y);return u.isEmpty(u.get(p,"href"))?f:m?s.jsx("span",{children:f}):s.jsx("a",{"aria-label":i,href:u.get(p,"href")||"/",target:u.get(p,"target","_self"),children:f})},T={type:"Button",description:"similar to a button element in HTML",label:"Button",category:"core",icon:d.ButtonIcon,group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),content:{type:"string",title:"Button label",default:"Button"},icon:{type:"string",title:"Icon",default:"",ui:{"ui:widget":"icon"}},iconSize:{type:"number",title:"Icon size",default:16},iconPos:{type:"string",title:"Icon position",default:"order-last",enum:["order-first","order-last"]},link:{type:"object",properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}},default:{type:"url",href:"",target:"_self"},ui:{"ui:field":"link"}},prefetchLink:{type:"boolean",default:!0,title:"Prefetch Link"}}}),i18nProps:["content","link"],aiProps:["content"]},E=e=>{const{blockProps:o,styles:t,htmlCode:r,inBuilder:i}=e;return i?s.jsxs("div",{className:"relative",children:[i?s.jsx("div",{...o,...t,className:"absolute z-20 h-full w-full"}):null,g.createElement("div",{...t,dangerouslySetInnerHTML:{__html:r.replace(/<script.*?>.*?<\/script>/g,"")}})]}):g.createElement("div",{...o,...t,dangerouslySetInnerHTML:{__html:r}})},R={type:"CustomHTML",description:"similar to a div or section elements in HTML",label:"Custom HTML",category:"core",icon:d.CodeIcon,group:"advanced",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),htmlCode:{type:"string",default:"<div><p>Enter your HTML code here...</p></div>",ui:{"ui:widget":"code"}}}}),i18nProps:["htmlCode"]},M=e=>{const{scripts:o,inBuilder:t,blockProps:r}=e;return t?s.jsx("div",{...r,children:s.jsx("div",{className:C.cn("pointer-events-none flex flex-col items-center justify-center p-2",""),children:s.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800",children:s.jsx("p",{className:"text-left text-xs text-gray-400",children:"Scripts will be only executed in preview and live mode. Place your script at the bottom of the"})})})}):s.jsx("div",{dangerouslySetInnerHTML:{__html:o}})},A={type:"CustomScript",description:"similar to a script element in HTML",label:"Custom Script",category:"core",icon:d.CodeIcon,group:"advanced",...l.registerChaiBlockSchema({properties:{scripts:{type:"string",title:"Script",default:"",format:"code",placeholder:"<script>console.log('Hello, world!');<\/script>"}}}),hidden:!0},H=e=>{const{blockProps:o,styles:t}=e;return x.createElement("hr",{...t,...o})},$={type:"Divider",description:"A horizontal line component",label:"Divider",category:"core",icon:d.DividerHorizontalIcon,group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("bg-gray-900 h-0.5 py-2 my-1")}})},D=e=>{const{blockProps:o,styles:t,backgroundImage:r}=e;let i={};return r&&(i={backgroundImage:`url(${r})`}),g.createElement("div",{...o,...t,style:i})},z={type:"EmptyBox",description:"A box component with no children",label:"Empty Box",category:"core",group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),backgroundImage:{type:"string",title:"Background Image",default:"",ui:{"ui:widget":"image"}}}})},V=e=>{const{blockProps:o,fieldName:t,label:r,styles:i,inputStyles:a,required:n,checked:c,showLabel:p=!0}=e;return p?s.jsxs("div",{...i,...o,children:[s.jsx("input",{...a,name:t,type:"checkbox",required:n,defaultChecked:c}),r&&s.jsx("label",{htmlFor:t,children:r})]}):s.jsx("input",{name:t,...o,...a,...i,type:"checkbox",required:n,defaultChecked:c})},U={type:"Checkbox",label:"web_blocks.checkbox",category:"core",icon:d.CheckboxIcon,group:"form",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("flex items-center gap-x-2"),inputStyles:l.StylesProp(""),fieldName:{type:"string",title:"Field Name",default:"fieldName"},label:{type:"string",title:"Label",default:"Label"},checked:{type:"boolean",title:"Checked",default:!1},required:{type:"boolean",title:"Required",default:!1},showLabel:{type:"boolean",title:"Show Label",default:!0}}}),aiProps:["label"],i18nProps:["label"]},F=e=>{const{children:o,blockProps:t,errorMessage:r,successMessage:i,action:a,styles:n,inBuilder:c}=e;let p=o;o||(p=s.jsx(k,{inBuilder:c}));const m={"x-data":"{}","x-on:submit.prevent":"post"},b={"x-html":"",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return s.jsxs("form",{...m,"data-error":r,"data-success":i,method:"post",action:a,...t,...n,children:[s.jsx("div",{...b}),p]})},q={type:"Form",label:"Form",category:"core",icon:d.FileTextIcon,group:"form",blocks:()=>[{_type:"Form",_id:"form",styles:"#styles:p-1 space-y-2,"},{_type:"Input",_id:"form_input",_parent:"form",styles:"#styles:,"},{_type:"FormButton",_id:"form_submit_btn",_parent:"form",styles:"#styles:bg-black text-white rounded px-3 py-1,"}],...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),action:{type:"string",title:"Submit URL",default:"/api/form"},errorMessage:{type:"string",title:"Error Message",default:"Something went wrong. Please try again",ui:{"ui:widget":"richtext"}},successMessage:{type:"string",title:"Success Message",default:"Thank you for your submission.",ui:{"ui:widget":"richtext"}}}}),i18nProps:["errorMessage","successMessage"],aiProps:["errorMessage","successMessage"],canAcceptBlock:()=>!0},O=e=>{const{blockProps:o,inBuilder:t,label:r,styles:i,icon:a,iconSize:n,iconPos:c}=e;return s.jsxs("button",{...i,...o||{},type:t?"button":"submit","aria-label":r,children:[r,a&&s.jsx("div",{style:{width:n+"px"},className:c+" "+(c==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:a}})]})},Z={type:"FormButton",label:"Submit Button",category:"core",icon:d.ButtonIcon,group:"form",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"),label:{type:"string",title:"Label",default:"Submit",ai:!0,i18n:!0},icon:{type:"string",title:"Icon",default:"",ui:{"ui:widget":"icon"}},iconSize:{type:"number",title:"Icon size",default:24},iconPos:{type:"string",title:"Icon Position",default:"order-last",enum:["order-first","order-last"]}}}),i18nProps:["label"],aiProps:["label"]},G=e=>{const o={type:"text",autocomplete:"on"};return e?["text","password","number","hidden","range","color","date","time"].includes(e)?{type:e,autocomplete:"on"}:e==="email"?{type:"email",autocomplete:"email"}:e==="tel"?{type:"tel",autocomplete:"tel"}:e==="url"?{type:"url",autocomplete:"url"}:{off:{type:"text",autocomplete:"off"},on:{type:"text",autocomplete:"on"},name:{type:"text",autocomplete:"name"},"honorific-prefix":{type:"text",autocomplete:"honorific-prefix"},"given-name":{type:"text",autocomplete:"given-name"},"additional-name":{type:"text",autocomplete:"additional-name"},"family-name":{type:"text",autocomplete:"family-name"},"honorific-suffix":{type:"text",autocomplete:"honorific-suffix"},nickname:{type:"text",autocomplete:"nickname"},firstName:{type:"text",autocomplete:"given-name"},lastName:{type:"text",autocomplete:"family-name"},email:{type:"email",autocomplete:"email"},tel:{type:"tel",autocomplete:"tel"},"tel-country-code":{type:"tel",autocomplete:"tel-country-code"},"tel-national":{type:"tel",autocomplete:"tel-national"},"tel-area-code":{type:"tel",autocomplete:"tel-area-code"},"tel-local":{type:"tel",autocomplete:"tel-local"},"tel-extension":{type:"tel",autocomplete:"tel-extension"},"street-address":{type:"text",autocomplete:"street-address"},"address-line1":{type:"text",autocomplete:"address-line1"},"address-line2":{type:"text",autocomplete:"address-line2"},"address-line3":{type:"text",autocomplete:"address-line3"},"address-level1":{type:"text",autocomplete:"address-level1"},"address-level2":{type:"text",autocomplete:"address-level2"},"address-level3":{type:"text",autocomplete:"address-level3"},"address-level4":{type:"text",autocomplete:"address-level4"},country:{type:"text",autocomplete:"country"},"country-name":{type:"text",autocomplete:"country-name"},"postal-code":{type:"text",autocomplete:"postal-code"},"cc-name":{type:"text",autocomplete:"cc-name"},"cc-given-name":{type:"text",autocomplete:"cc-given-name"},"cc-additional-name":{type:"text",autocomplete:"cc-additional-name"},"cc-family-name":{type:"text",autocomplete:"cc-family-name"},"cc-number":{type:"text",autocomplete:"cc-number"},"cc-exp":{type:"text",autocomplete:"cc-exp"},"cc-exp-month":{type:"number",autocomplete:"cc-exp-month"},"cc-exp-year":{type:"number",autocomplete:"cc-exp-year"},"cc-csc":{type:"text",autocomplete:"cc-csc"},"cc-type":{type:"text",autocomplete:"cc-type"},bday:{type:"date",autocomplete:"bday"},"bday-day":{type:"number",autocomplete:"bday-day"},"bday-month":{type:"number",autocomplete:"bday-month"},"bday-year":{type:"number",autocomplete:"bday-year"},username:{type:"text",autocomplete:"username"},"new-password":{type:"password",autocomplete:"new-password"},"current-password":{type:"password",autocomplete:"current-password"},"one-time-code":{type:"text",autocomplete:"one-time-code"},"transaction-currency":{type:"text",autocomplete:"transaction-currency"},"transaction-amount":{type:"number",autocomplete:"transaction-amount"},url:{type:"url",autocomplete:"url"},photo:{type:"url",autocomplete:"photo"},sex:{type:"text",autocomplete:"sex"},"organization-title":{type:"text",autocomplete:"organization-title"},organization:{type:"text",autocomplete:"organization"},language:{type:"text",autocomplete:"language"}}[e]||o:o},W=e=>{const{blockProps:o,fieldName:t,label:r,placeholder:i,styles:a,inputStyles:n,showLabel:c,required:p,inputType:m,defaultValue:b}=e,{type:y,autocomplete:f}=G(m);return c?s.jsxs("div",{...a,...o,children:[c&&s.jsx("label",{htmlFor:t,children:r}),s.jsx("input",{name:t,defaultValue:b,...n,type:y,placeholder:i,required:p,autoComplete:f})]}):s.jsx("input",{name:t,...o,...n,...a,type:y,placeholder:i,required:p,autoComplete:f,defaultValue:b})},Y={type:"Input",label:"web_blocks.input",category:"core",icon:d.InputIcon,group:"form",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),inputStyles:l.StylesProp("w-full p-1"),fieldName:{type:"string",title:"Field Name",default:"fieldName"},inputType:{type:"string",title:"Type",default:"email",oneOf:[{const:"text",title:"Text"},{const:"email",title:"Email"},{const:"password",title:"Password"},{const:"number",title:"Number"},{const:"tel",title:"Telephone"},{const:"hidden",title:"Hidden"},{const:"range",title:"Range"},{const:"color",title:"Color"},{const:"date",title:"Date"},{const:"time",title:"Time"},{const:"url",title:"URL"},{const:"name",title:"Name"},{const:"firstName",title:"First Name"},{const:"lastName",title:"Last Name"},{const:"tel-country-code",title:"Telephone Country Code"},{const:"tel-national",title:"Telephone National"},{const:"tel-area-code",title:"Telephone Area Code"},{const:"tel-local",title:"Telephone Local"},{const:"tel-extension",title:"Telephone Extension"},{const:"street-address",title:"Street Address"},{const:"address-line1",title:"Address Line 1"},{const:"address-line2",title:"Address Line 2"},{const:"address-line3",title:"Address Line 3"},{const:"address-level1",title:"Address Level 1"},{const:"address-level2",title:"Address Level 2"},{const:"address-level3",title:"Address Level 3"},{const:"address-level4",title:"Address Level 4"},{const:"country",title:"Country"},{const:"country-name",title:"Country Name"},{const:"postal-code",title:"Postal Code"},{const:"cc-name",title:"Credit Card Name"},{const:"cc-number",title:"Credit Card Number"},{const:"cc-exp",title:"Credit Card Expiry"},{const:"cc-exp-month",title:"Credit Card Expiry Month"},{const:"cc-exp-year",title:"Credit Card Expiry Year"},{const:"cc-csc",title:"Credit Card CSC"},{const:"cc-type",title:"Credit Card Type"},{const:"bday",title:"Birthday"},{const:"bday-day",title:"Birthday Day"},{const:"bday-month",title:"Birthday Month"},{const:"bday-year",title:"Birthday Year"},{const:"username",title:"Username"},{const:"new-password",title:"New Password"},{const:"current-password",title:"Current Password"},{const:"one-time-code",title:"One Time Code"},{const:"transaction-currency",title:"Transaction Currency"},{const:"transaction-amount",title:"Transaction Amount"},{const:"url",title:"URL"},{const:"photo",title:"Photo"},{const:"sex",title:"Sex"},{const:"organization-title",title:"Organization Title"},{const:"organization",title:"Organization"},{const:"language",title:"Language"}]},showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label",ai:!0,i18n:!0},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},required:{type:"boolean",title:"Required",default:!1},defaultValue:{type:"string",title:"Default Value",default:""}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]},Q=e=>{const{blockProps:o,content:t,styles:r,children:i}=e,a={...r,...o};return i?g.createElement("label",a,i):g.createElement("label",{...a,dangerouslySetInnerHTML:{__html:t}})},J={type:"Label",label:"Label",category:"core",icon:d.LetterCaseToggleIcon,group:"form",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(),content:{type:"string",title:"Content",default:""}}}),aiProps:["content"],i18nProps:["content"]},X=e=>{const{blockProps:o,fieldName:t,label:r,styles:i,inputStyles:a,required:n,checked:c,showLabel:p=!0}=e;return p?s.jsxs("div",{...i,...o,children:[s.jsx("input",{...a,name:t,type:"radio",required:n,defaultChecked:c}),r&&s.jsx("label",{htmlFor:t,children:r})]}):s.jsx("input",{name:t,...o,...a,...i,type:"radio",required:n,checked:c})},K={type:"Radio",label:"web_blocks.radio",category:"core",icon:d.RadiobuttonIcon,group:"form",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("flex items-center gap-x-2"),inputStyles:l.StylesProp(""),fieldName:{type:"string",title:"Field Name",default:"fieldName"},label:{type:"string",title:"Label",default:"Label"},checked:{type:"boolean",title:"Checked",default:!1},required:{type:"boolean",title:"Required",default:!1},showLabel:{type:"boolean",title:"Show Label",default:!0}}}),aiProps:["label"],i18nProps:["label"]},ee=e=>{const{blockProps:o,fieldName:t,label:r,placeholder:i,styles:a,inputStyles:n,required:c,showLabel:p,_multiple:m,options:b,defaultValue:y}=e,f=m&&y?y.split(",").map(h=>h.trim()):y||"";return p?s.jsxs("div",{...a,...o,children:[p&&s.jsx("label",{htmlFor:t,children:r}),s.jsxs("select",{...n,required:c,multiple:m,name:t,defaultValue:f,children:[s.jsx("option",{value:"",disabled:!0,hidden:!0,children:i}),u.map(b,h=>s.jsx("option",{value:h==null?void 0:h.value,children:h==null?void 0:h.label},h==null?void 0:h.value))]})]}):s.jsxs("select",{...a,...o,required:c,multiple:m,name:t,defaultValue:f,children:[s.jsx("option",{value:"",disabled:!0,hidden:!0,children:i}),u.map(b,h=>s.jsx("option",{value:h==null?void 0:h.value,children:h==null?void 0:h.label},h==null?void 0:h.value))]})},te={type:"Select",label:"web_blocks.select",category:"core",icon:d.DropdownMenuIcon,group:"form",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),inputStyles:l.StylesProp("w-full p-1"),fieldName:{type:"string",title:"Field Name",default:"fieldName"},showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label"},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},required:{type:"boolean",title:"Required",default:!1},defaultValue:{type:"string",title:"Default Value",default:""},_multiple:{type:"boolean",title:"Multiple",default:!1},options:{title:"Options",type:"array",default:[],items:{type:"object",properties:{label:{type:"string",title:"Label",default:""},value:{type:"string",title:"Value",default:""}}}}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]},oe=e=>{const{blockProps:o,fieldName:t,label:r,placeholder:i,styles:a,inputStyles:n,rows:c,showLabel:p,required:m,defaultValue:b}=e;return p?s.jsxs("div",{...a,...o,children:[p&&s.jsx("label",{htmlFor:t,children:r}),s.jsx("textarea",{name:t,...n,placeholder:i,rows:c,required:m,defaultValue:b})]}):s.jsx("textarea",{name:t,...o,...n,...a,placeholder:i,rows:c,required:m,defaultValue:b})},le={type:"TextArea",label:"web_blocks.textarea",category:"core",icon:d.InputIcon,group:"form",...l.registerChaiBlockSchema({properties:{fieldName:{type:"string",title:"Field Name",default:"fieldName"},styles:l.StylesProp(""),inputStyles:l.StylesProp("w-full p-1"),showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},rows:{type:"number",title:"Rows",default:3},required:{type:"boolean",title:"Required",default:!1},defaultValue:{type:"string",title:"Default Value",default:"",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]},re=e=>{const{blockProps:o,inBuilder:t,children:r,globalBlock:i}=e;return t&&!i?s.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",...o,children:[s.jsxs("h1",{children:["Global Block - ",i]}),s.jsx("p",{children:"Choose a block from the sidebar to add it to this page."})]}):g.createElement("span",{...o},r)},se={type:"GlobalBlock",description:"A global block component",label:"Global Block",icon:d.FrameIcon,category:"core",group:"basic",hidden:!0,...l.registerChaiBlockSchema({properties:{globalBlock:{type:"string",title:"Global Block",default:"",ui:{"ui:widget":"hidden"}}}})},ie=e=>{const{blockProps:o,styles:t,content:r,tag:i="h1",children:a=null}=e;return a?g.createElement(i,{...t,...o},a):g.createElement(i,{...t,...o,dangerouslySetInnerHTML:{__html:r}})},ae={type:"Heading",description:"A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",label:"Heading",category:"core",icon:d.HeadingIcon,group:"typography",...l.registerChaiBlockSchema({properties:{tag:{type:"string",default:"h2",title:"Level",enum:["h1","h2","h3","h4","h5","h6"]},styles:l.StylesProp("text-3xl"),content:{type:"string",default:"Heading goes here",title:"Content",ui:{"ui:widget":"textarea"}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:e=>e==="Span"||e==="Text"},ne=e=>{const{blockProps:o,styles:t}=e;return x.createElement("br",{...o,...t})},ce={type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("")}}),canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},pe=e=>{const{blockProps:o,children:t,styles:r}=e;return t?x.createElement("table",{...o,...r},t):s.jsx(k,{})},de=e=>{const{blockProps:o,children:t,styles:r}=e;return t?x.createElement("thead",{...o,...r},t):s.jsx(k,{})},ue=e=>{const{blockProps:o,children:t,styles:r}=e;return t?x.createElement("tbody",{...o,...r},t):s.jsx(k,{})},me=e=>{const{blockProps:o,children:t,styles:r}=e;return t?x.createElement("tr",{...o,...r},t):s.jsx(k,{})},ye=e=>{const{blockProps:o,children:t,content:r,styles:i}=e;return!t&&u.isEmpty(r)?s.jsx(k,{}):t?x.createElement("td",{...o,...i},t):x.createElement("td",{...o,...i,dangerouslySetInnerHTML:{__html:r}})};l.registerChaiBlock(pe,{type:"Table",label:"Table",category:"core",group:"table",hidden:!0,icon:d.TableIcon,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("")}}),blocks:B("Table")});l.registerChaiBlock(de,{type:"TableHead",label:"Table Head",category:"core",group:"table",hidden:!0,icon:d.BorderTopIcon,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("")}}),blocks:B("TableHead")});l.registerChaiBlock(ue,{type:"TableBody",label:"Table Body",category:"core",group:"table",hidden:!0,icon:d.BorderAllIcon,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("")}}),blocks:B("TableBody")});l.registerChaiBlock(me,{type:"TableRow",label:"Table Row",category:"core",group:"table",hidden:!0,icon:d.ViewHorizontalIcon,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("")}}),blocks:B("TableRow")});l.registerChaiBlock(ye,{type:"TableCell",label:"Table Cell",category:"core",group:"table",hidden:!0,icon:d.DragHandleHorizontalIcon,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),content:{type:"string",default:"Heading goes here",title:"Content",ui:{"ui:widget":"textarea"}}}}),blocks:B("TableCell"),i18nProps:["content"],aiProps:["content"]});function B(e){const o=(a,n)=>({_id:C.generateUUID(),_parent:a,_type:"TableCell",styles:"#styles:,",content:`${e==="TableHead"?"Table Head":"Table Cell "+n}`}),t=a=>{const n=C.generateUUID(),c={_type:"TableRow",_id:n,styles:"#styles:,border-b"};return a&&(c._parent=a),[c,o(n,"1"),o(n,"2"),o(n,"3")]},r=a=>{const n=C.generateUUID(),c={_id:n,_type:"TableHead",styles:"#styles:,font-medium"};return a&&(c._parent=a),[c,...t(n)]},i=a=>{const n=C.generateUUID(),c={_id:n,_type:"TableBody",styles:"#styles:,"};return a&&(c._parent=a),[c,...t(n),...t(n)]};if(e==="Table"){const a=C.generateUUID();return[{_id:a,_type:"Table",styles:"#styles:,w-full text-left text-gray-500 dark:text-gray-400"},...r(a),...i(a)]}return e==="TableRow"?t():e==="TableHead"?r():e==="TableBody"?i():[]}const I=(e,...o)=>({...e,className:C.cn(e.className,...o)}),ge=e=>{const{blockProps:o,icon:t,styles:r,width:i,inBuilder:a,height:n}=e,c=I(r,"");if(u.isEmpty(t))return s.jsx(k,{inBuilder:a,className:"h-8 w-14"});const p=t.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return g.createElement("span",{...o,...c,style:{width:i?`${i}px`:"auto",height:n?`${n}px`:"auto"},dangerouslySetInnerHTML:{__html:p}})},he={type:"Icon",label:"web_blocks.icon",category:"core",icon:d.SketchLogoIcon,group:"media",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),icon:{type:"string",title:"Icon",default:'<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>',ui:{"ui:widget":"icon"}},width:{type:"number",default:16,title:"Width"},height:{type:"number",default:16,title:"Height"}}})},be="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==",fe=e=>{const{blockProps:o,image:t,mobileImage:r,styles:i,alt:a,height:n,width:c,lazyLoading:p,mobileWidth:m,mobileHeight:b}=e;return u.isEmpty(t)?s.jsx(k,{className:"h-36"}):s.jsxs("picture",{children:[r&&s.jsx("source",{srcSet:r,media:"(max-width: 480px)",width:m,height:b}),s.jsx("img",{...o,...i,src:t,alt:a,loading:p?"lazy":"eager",width:c,height:n})]})},xe={type:"Image",description:"A image component",label:"Image",category:"core",icon:d.ImageIcon,group:"media",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),image:{type:"string",title:"Image",default:be,ui:{"ui:widget":"image"}},width:{type:"string",title:"Width",default:"",ui:{"ui:placeholder":"Enter width"}},height:{type:"string",title:"Height",default:"",ui:{"ui:placeholder":"Enter height"}},mobileImage:{type:"string",title:"Mobile Image",default:"",ui:{"ui:widget":"image"}},mobileWidth:{type:"string",title:"Mobile Width",default:"",ui:{"ui:placeholder":"Enter width"}},mobileHeight:{type:"string",title:"Mobile Height",default:"",ui:{"ui:placeholder":"Enter height"}},alt:{type:"string",title:"Alt text",default:"",ui:{"ui:placeholder":"Enter alt text"}},lazyLoading:{type:"boolean",title:"Lazy Load",default:!0}}}),aiProps:["alt"],i18nProps:["alt","image","_imageId","mobileImage","_mobileImageId"]},ke=e=>{const{blockProps:o,link:t,children:r,styles:i,inBuilder:a,content:n}=e;let c={};return!r&&u.isEmpty(n)&&(c={minHeight:"50px",display:"flex",alignItems:"center",justifyContent:"center"}),a?r?s.jsx("span",{role:"link",...o,style:c,...i,children:r}):x.createElement("span",{...o,...i,style:c,role:"link"},n):r?s.jsx("a",{"aria-label":n,href:(t==null?void 0:t.href)||"#/",target:t==null?void 0:t.target,...o,...i,children:r}):x.createElement("a",{...o,...i,href:(t==null?void 0:t.href)||"#",target:(t==null?void 0:t.target)||"_self","aria-label":n},n)},Ce={type:"Link",description:"A link component",label:"Link",category:"core",icon:d.Link1Icon,group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),content:{type:"string",default:"Link goes here",title:"Content"},link:{type:"object",properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}},default:{type:"url",href:"",target:"_self"},ui:{"ui:field":"link"}},prefetchLink:{type:"boolean",default:!1,title:"Prefetch Link"}}}),aiProps:["content"],i18nProps:["content","link"],canAcceptBlock:e=>e!=="Link"},Be=e=>{const{blockProps:o,children:t,styles:r,tag:i,inBuilder:a}=e;return!t&&u.isEmpty(r==null?void 0:r.className)?s.jsx(k,{inBuilder:a}):g.createElement(i||"ul",{...o,...r},t)},Se={type:"List",description:"A list component",label:"List",icon:d.RowsIcon,category:"core",group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("")}}),canAcceptBlock:e=>e==="ListItem",blocks:[{_type:"List",_id:"a",styles:"#styles:,"},{_type:"ListItem",_id:"b",_parent:"a",styles:"#styles:,",content:"Item 1"},{_type:"ListItem",_id:"c",_parent:"a",styles:"#styles:,",content:"Item 2"},{_type:"ListItem",_id:"d",_parent:"a",styles:"#styles:,",content:"Item 3"}]},we=e=>{const{blockProps:o,content:t,styles:r,children:i,tag:a}=e;return i?g.createElement(a||"li",{...r,...o},i):g.createElement(a||"li",{...r,...o,dangerouslySetInnerHTML:{__html:t}})},Pe={type:"ListItem",description:"A list item component",label:"List Item",icon:d.ColumnsIcon,category:"core",group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),content:{type:"string",default:"List item",title:"Content",ui:{"ui:widget":"textarea"}}}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e!=="ListItem",canBeNested:e=>e==="List"||e==="Repeater"},ve=e=>{const{blockProps:o,styles:t,content:r}=e;return u.isNull(e.children)?g.createElement("p",{...t,...o,dangerouslySetInnerHTML:{__html:r}}):g.createElement("p",{...t,...o},e.children)},Ie={type:"Paragraph",description:"A paragraph component",label:"Paragraph",category:"core",icon:d.TextIcon,group:"typography",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),content:{type:"string",title:"Content",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":5}}}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e==="Span"||e==="Link"||e==="Text"},je=e=>{const{blockProps:o,inBuilder:t,children:r,partialBlockId:i}=e;return t&&!i?s.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",...o,children:[s.jsxs("h1",{children:["Partial Block - ",i]}),s.jsx("p",{children:"Choose a block from the sidebar to add it to this page."})]}):g.createElement("span",{...o},r)},Le={type:"PartialBlock",description:"A partial block component",label:"Partial Block",icon:d.FrameIcon,category:"core",group:"basic",hidden:!0,...l.registerChaiBlockSchema({properties:{partialBlockId:{type:"string",title:"Partial Block",default:"",ui:{"ui:widget":"hidden"}}}})},S={SMALL:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},MEDIUM:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},LARGE:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},Ne=e=>{const{blockProps:o,children:t,styles:r,colSpan:i,tabletColSpan:a,desktopColSpan:n}=e,p={className:[u.get(r,"className",""),u.get(S,["SMALL",isNaN(i)||!i?6:i],""),a?u.get(S,["MEDIUM",a||i],""):"",n?u.get(S,["LARGE",a||i],""):""].join(" ")};return s.jsx("div",{...o,...r,...p,children:t||s.jsx("div",{className:"h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900"})})},_e={type:"Column",description:"A column component",label:"Column",group:"basic",category:"core",icon:d.LayoutIcon,wrapper:!0,canDelete:()=>!0,canAcceptBlock:()=>!0,canBeNested:e=>e==="Row",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),colSpan:{type:"number",title:"Column Span",default:6,enum:[1,2,3,4,5,6,7,8,9,10,11,12]},tabletColSpan:{type:"number",title:"Column Span (Tablet)",default:null,enumNames:["Default",1,2,3,4,5,6,7,8,9,10,11,12],enum:[null,1,2,3,4,5,6,7,8,9,10,11,12]},desktopColSpan:{type:"number",title:"Column Span (Desktop)",default:null,enumNames:["Default",1,2,3,4,5,6,7,8,9,10,11,12],enum:[null,1,2,3,4,5,6,7,8,9,10,11,12]}}})},Te=e=>{const{blockProps:o,children:t,styles:r,gutter:i}=e,n={className:[u.get(r,"className","")," grid grid-cols-12"].join()};return typeof(r==null?void 0:r.style)=="object"?r.style.gap=`${i}px`:n.style={gap:`${i}px`},s.jsx("div",{...o,...r,...n,children:t})},Ee={type:"Row",description:"A row component",label:"Row",group:"basic",icon:d.RowsIcon,blocks:()=>[{_type:"Row",_id:"row",styles:"#styles:,p-1"},{_type:"Column",id:"column",_parent:"row",styles:"#styles:,"},{_type:"Column",id:"column",_parent:"row",styles:"#styles:,"}],category:"core",wrapper:!0,canAcceptBlock:e=>e==="Column",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),colCount:{type:"number",default:2,minimum:0,ui:{"ui:widget":"colCount"}},gutter:{type:"number",title:"Gutter (in px)",default:16,minimum:0}}})},Re=e=>{const{blockProps:o,content:t,styles:r}=e,i=I(r,"prose dark:prose-invert prose-p:m-0 prose-p:min-h-[1rem] prose-blockquote:m-2 prose-blockquote:ml-4 prose-ul:m-0 prose-ol:m-0 prose-li:m-0","max-w-full");return s.jsx("div",{...o,...i,dangerouslySetInnerHTML:{__html:t}})},Me={type:"RichText",description:"A rich text block",label:"Rich Text",category:"core",icon:d.CursorTextIcon,group:"typography",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),content:{type:"string",title:"Content",default:"<p>This is a rich text block. You can add text, and other content here.</p>",ui:{"ui:widget":"richtext"}}}}),aiProps:["content"],i18nProps:["content"]},Ae=e=>{const{blockProps:o,styles:t,content:r,children:i=null,tag:a}=e;return i?g.createElement("span",{...t,...o},i):g.createElement(a||"span",{...t,...o,dangerouslySetInnerHTML:{__html:r||""}})},He={type:"Span",description:"A span component",label:"Span",category:"core",group:"typography",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),content:{type:"string",title:"Content",default:"",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:()=>!0},$e=e=>e.inBuilder||e.forceWrapper?s.jsx("span",{...e.blockProps,children:e.content}):`${e.content}`,De={type:"Text",description:"A text component with no styling",label:"Text",hidden:!0,category:"core",group:"typography",icon:d.SpaceBetweenVerticallyIcon,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("text-black"),content:{title:"Content",type:"string",default:""}}}),aiProps:["content"],i18nProps:["content"]},w={type:"object",title:"Controls",default:{autoplay:!0,controls:!1,loop:!0,muted:!0},properties:{autoplay:{type:"boolean",title:"Autoplay",default:!1},controls:{type:"boolean",title:"Show Controls",default:!0},loop:{type:"boolean",title:"Loop Video",default:!1},muted:{type:"boolean",title:"Muted",default:!1}}},P=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,v=/(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/,ze=(e,o)=>{const t=u.get(o,"autoplay",!1),r=u.get(o,"controls",!1),i=u.get(o,"loop",!1),a=t||u.get(o,"muted",!0);if(P.test(e)){const n=e.match(P);if(n){const c=n[4];let p=`https://www.youtube.com/embed/${c}`,m=t?"autoplay=1":"";return m+=i?`&loop=1&playlist=${c}`:"",m+=a?"&mute=1&muted=1":"",m+=r?"&controls=1":"&controls=0",`${p}?${m}`}}if(v.test(e)){const n=e.match(v);if(n){const c=n[1];let p="";return p+=t?"autoplay=1":"",p+=r?"&controls=1":"&controls=0",p+=a?"&muted=1":"",p+=i?"&loop=1":"",`https://player.vimeo.com/video/${c}?${p}`}}return null},Ve=e=>{const{url:o,blockProps:t,styles:r,controls:i,videoSource:a,inBuilder:n}=e,c=ze(o,i);return s.jsxs("div",{...u.omit(r,"className"),className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[!c&&n?s.jsx("div",{className:"absolute flex h-full w-full items-center justify-center bg-gray-300 text-center",children:u.isEmpty(o)?`Provided ${a} video link in settings Video URL.`:`Provided ${a} video link is invalid.`}):s.jsx("iframe",{width:"100%",src:c,...u.pick(r,"className")}),n&&s.jsx("div",{...t,className:"absolute top-0 h-full w-full"})]})},Ue=e=>{const{url:o,styles:t,controls:r,sources:i,poster:a,blockProps:n}=e;let c=a;const p=[...u.get(i,"srcsets",[])||[]];o&&typeof o=="string"&&p.push({url:o,width:"9999"});const m=p.sort((y,f)=>parseInt(y.width)-parseInt(f.width)).filter(y=>!u.isEmpty(y.url)&&!u.isEmpty(y.width));m.length===0&&!c&&(c="https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");const b=u.get(r,"autoplay",!1)||u.get(r,"muted",!0);return(c||!u.isEmpty(m))&&s.jsx("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:x.createElement("video",{...t,...n,key:JSON.stringify(m),controls:u.get(r,"controls",!1),autoPlay:u.get(r,"autoplay",!1),loop:u.get(r,"loop",!1),poster:c,...b?{muted:!0}:{}},m.map(y=>{if(!y.url||y.url.length<4||isNaN(y.width))return null;const f=`(max-width: ${y.width}px)`;return s.jsx("source",{src:y.url,media:f,type:y.type},y.url)}),"Your browser does not support the video tag.")})},Fe=e=>{const{videoSource:o}=e;return o==="Custom"?s.jsx(Ue,{...e}):o==="Youtube"||o==="Vimeo"?s.jsx(Ve,{...e}):s.jsxs("div",{children:["Invalid video source : ",o]})},qe={type:"Video",label:"Video",category:"core",icon:d.VideoIcon,group:"media",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("absolute h-full w-full object-cover"),videoSource:{type:"string",default:"Custom",enum:["Custom","Youtube","Vimeo"],title:"Video source"}},allOf:[{if:{properties:{videoSource:{const:"Custom"}}},then:{properties:{url:{type:"string",title:"Video URL",default:""},poster:{type:"string",title:"Poster URL",default:""},sources:{type:"object",default:{srcsets:[]}},controls:{...w}}}},{if:{properties:{videoSource:{const:"Youtube"}}},then:{properties:{url:{type:"string",title:"Youtube Video URL",default:""},controls:{...w}}}},{if:{properties:{videoSource:{const:"Vimeo"}}},then:{properties:{url:{type:"string",title:"Vimeo Video URL",default:""},controls:{...w}}}}],ui:{url:{"ui:placeholder":"Enter Video URL"},sources:{"ui:field":"sources"},poster:{"ui:placeholder":"Enter poster URL"}}}),i18nProps:["url"]},Oe=({styles:e})=>{const o=l.getRegisteredChaiBlock("Pagination");return s.jsx("div",{...e,children:o?g.createElement(o.component):s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",disabled:!0,children:s.jsx(d.ChevronLeftIcon,{className:"h-4 w-4"})}),s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-blue-500 bg-blue-500 font-medium text-white",children:"1"}),s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50",children:"2"}),s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50",children:"3"}),s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50",children:"4"}),s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50",children:"5"}),s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white hover:bg-gray-50",children:s.jsx(d.ChevronRightIcon,{className:"h-4 w-4"})})]})})},Ze=e=>{const{children:o,tag:t,styles:r,blockProps:i,$loading:a,paginationStyles:n}=e,{pagination:c,inBuilder:p}=e;let m=o;return u.isEmpty(m)&&p&&(m=s.jsx("div",{className:"col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground",children:"Choose a collection to display items"})),t==="none"?a&&p?Array.from({length:2}).map((b,y)=>s.jsxs("div",{className:"animate-pulse rounded-md bg-primary/10 p-5",children:[s.jsx("div",{className:"h-6 w-1/2 rounded-md bg-primary/10"}),s.jsx("div",{className:"mt-2 h-4 w-1/2 rounded-md bg-primary/10"})]},y)):m:s.jsxs(s.Fragment,{children:[g.createElement(t,{...i,...r},a&&p?Array.from({length:2}).map((b,y)=>s.jsxs("div",{className:"animate-pulse rounded-md bg-primary/10 p-5",children:[s.jsx("div",{className:"h-6 w-1/2 rounded-md bg-primary/10"}),s.jsx("div",{className:"mt-2 h-4 w-1/2 rounded-md bg-primary/10"})]},y)):m),c&&s.jsx(Oe,{styles:n})]})},Ge={type:"Repeater",label:"Repeater",icon:d.LoopIcon,group:"basic",dataProviderMode:"live",dataProviderDependencies:["filter","sort","limit","repeaterItems"],blocks:()=>[{_id:"A",_type:"Repeater",tag:"ul"},{_id:"B",_name:"Repeater Item",_type:"RepeaterItem",parentTag:"ul",_parent:"A"}],...l.registerChaiBlockSchema({properties:{styles:l.stylesProp("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),paginationStyles:l.stylesProp("flex items-center justify-center gap-2 p-4"),repeaterItems:{title:"Collection",type:"string",binding:"array",default:"",ui:{"ui:widget":"repeaterBinding","ui:readonly":!0}},tag:{title:"Tag",type:"string",default:"ul",enum:["none","div","ul","ol"]},filter:{title:"Filter by",type:"string",default:"",ui:{"ui:widget":"collectionSelect"}},sort:{title:"Sort by",type:"string",default:"",ui:{"ui:widget":"collectionSelect"}},pagination:{title:"Pagination",type:"boolean",default:!1}},allOf:[{if:{properties:{pagination:{const:!0}}},then:{properties:{paginationStrategy:{type:"string",title:"Pagination Strategy",default:"segment",enum:["query","segment"],enumNames:["Query(/items?page=1)","Segment(/items/1)"]},limit:{type:"number",title:"Items Per Page",default:10,minimum:1}}}},{if:{properties:{pagination:{const:!1}}},then:{properties:{limit:{type:"number",title:"Max items",default:10,minimum:1}}}}]}),canAcceptBlock:e=>e==="Pagination"},We=({children:e,blockProps:o,styles:t,parentTag:r,inBuilder:i})=>{let a="li";switch(r){case"ul":a="li";break;case"ol":a="li";break;default:a="div"}return!e&&i?g.createElement(a,{...o,...t},s.jsx("div",{className:"col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground",children:"Add children to repeater item"})):g.createElement(a,{...o,...t},e)},Ye={type:"RepeaterItem",label:"Repeater Item",icon:d.LoopIcon,hidden:!0,group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.stylesProp(""),parentTag:l.closestBlockProp("Repeater","tag")}}),canAcceptBlock:e=>e!=="RepeaterItem",canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},Qe=({children:e,blockProps:o,styles:t})=>g.createElement("div",{...o,...t},e),Je={type:"RepeaterEmptyState",label:"Empty State",hidden:!0,group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.stylesProp("p-5 flex items-center justify-center")}}),canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},Xe=()=>{l.registerChaiBlock(L,N),l.registerChaiBlock(D,z),l.registerChaiBlock(_,T),l.registerChaiBlock(ie,ae),l.registerChaiBlock(ve,Ie),l.registerChaiBlock(Ae,He),l.registerChaiBlock(Re,Me),l.registerChaiBlock(ke,Ce),l.registerChaiBlock(Be,Se),l.registerChaiBlock(we,Pe),l.registerChaiBlock(ge,he),l.registerChaiBlock(fe,xe),l.registerChaiBlock(Fe,qe),l.registerChaiBlock(E,R),l.registerChaiBlock(M,A),l.registerChaiBlock($e,De),l.registerChaiBlock(F,q),l.registerChaiBlock(O,Z),l.registerChaiBlock(W,Y),l.registerChaiBlock(V,U),l.registerChaiBlock(X,K),l.registerChaiBlock(ee,te),l.registerChaiBlock(oe,le),l.registerChaiBlock(Q,J),l.registerChaiBlock(ne,ce),l.registerChaiBlock(H,$),l.registerChaiBlock(re,se),l.registerChaiBlock(je,Le),l.registerChaiBlock(Te,Ee),l.registerChaiBlock(Ne,_e),l.registerChaiBlock(Ze,Ge),l.registerChaiBlock(We,Ye),l.registerChaiBlock(Qe,Je)};exports.loadWebBlocks=Xe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@chaibuilder/runtime"),s=require("react/jsx-runtime"),C=require("./common-functions-BZmyleS1.cjs"),x=require("react"),u=require("@radix-ui/react-icons"),d=require("lodash-es");function j(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const y=j(x),k=({className:e="",inBuilder:o})=>o?s.jsx("div",{className:C.cn("pointer-events-none flex h-20 flex-col items-center justify-center p-2",e),children:s.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800",children:s.jsx("div",{className:"flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700"})})}):null,L=e=>{const{blockProps:o,inBuilder:t,backgroundImage:r,children:i,tag:a="div",styles:n}=e;let c=i;i||(c=s.jsx(k,{inBuilder:t}));let p={};return r&&(p={backgroundImage:`url(${r})`}),y.createElement(a,{...o,...n,style:p},c)},N={type:"Box",description:"Similar to a div or section elements in HTML",label:"Box",category:"core",group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),tag:{type:"string",default:"div",title:"Tag",oneOf:[{const:"div",title:"div"},{const:"header",title:"header"},{const:"footer",title:"footer"},{const:"section",title:"section"},{const:"article",title:"article"},{const:"aside",title:"aside"},{const:"main",title:"main"},{const:"nav",title:"nav"},{const:"figure",title:"figure"},{const:"details",title:"details"},{const:"summary",title:"summary"},{const:"dialog",title:"dialog"},{const:"strike",title:"strike"},{const:"caption",title:"caption"},{const:"legend",title:"legend"},{const:"figcaption",title:"figcaption"},{const:"mark",title:"mark"}]},backgroundImage:{type:"string",default:"",title:"Background Image",ui:{"ui:widget":"image"}}}}),canAcceptBlock:()=>!0},_=e=>{const{blockProps:o,iconSize:t,icon:r,content:i,styles:a,children:n,iconPos:c,link:p,inBuilder:m}=e,g=r,h=n||s.jsxs(s.Fragment,{children:[i&&s.jsx("span",{children:i}),g&&s.jsx("div",{style:{width:t+"px"},className:c+" "+(i?c==="order-first"?"mr-2":"ml-2":"")||"",dangerouslySetInnerHTML:{__html:g}})]}),f=x.createElement("button",{...o,...a,type:"button","aria-label":i},h);return d.isEmpty(d.get(p,"href"))?f:m?s.jsx("span",{children:f}):s.jsx("a",{"aria-label":i,href:d.get(p,"href")||"/",target:d.get(p,"target","_self"),children:f})},T={type:"Button",description:"similar to a button element in HTML",label:"Button",category:"core",icon:u.ButtonIcon,group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),content:{type:"string",title:"Button label",default:"Button"},icon:{type:"string",title:"Icon",default:"",ui:{"ui:widget":"icon"}},iconSize:{type:"number",title:"Icon size",default:16},iconPos:{type:"string",title:"Icon position",default:"order-last",enum:["order-first","order-last"]},link:{type:"object",properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}},default:{type:"url",href:"",target:"_self"},ui:{"ui:field":"link"}},prefetchLink:{type:"boolean",default:!0,title:"Prefetch Link"}}}),i18nProps:["content","link"],aiProps:["content"]},E=e=>{const{blockProps:o,styles:t,htmlCode:r,inBuilder:i}=e;return i?s.jsxs("div",{className:"relative",children:[i?s.jsx("div",{...o,...t,className:"absolute z-20 h-full w-full"}):null,y.createElement("div",{...t,dangerouslySetInnerHTML:{__html:r.replace(/<script.*?>.*?<\/script>/g,"")}})]}):y.createElement("div",{...o,...t,dangerouslySetInnerHTML:{__html:r}})},R={type:"CustomHTML",description:"similar to a div or section elements in HTML",label:"Custom HTML",category:"core",icon:u.CodeIcon,group:"advanced",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),htmlCode:{type:"string",default:"<div><p>Enter your HTML code here...</p></div>",ui:{"ui:widget":"code"}}}}),i18nProps:["htmlCode"]},M=e=>{const{scripts:o,inBuilder:t,blockProps:r}=e;return t?s.jsx("div",{...r,children:s.jsx("div",{className:C.cn("pointer-events-none flex flex-col items-center justify-center p-2",""),children:s.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800",children:s.jsx("p",{className:"text-left text-xs text-gray-400",children:"Scripts will be only executed in preview and live mode. Place your script at the bottom of the"})})})}):s.jsx("div",{dangerouslySetInnerHTML:{__html:o}})},A={type:"CustomScript",description:"similar to a script element in HTML",label:"Custom Script",category:"core",icon:u.CodeIcon,group:"advanced",...l.registerChaiBlockSchema({properties:{scripts:{type:"string",title:"Script",default:"",format:"code",placeholder:"<script>console.log('Hello, world!');<\/script>"}}}),hidden:!0},H=e=>{const{blockProps:o,styles:t}=e;return x.createElement("hr",{...t,...o})},$={type:"Divider",description:"A horizontal line component",label:"Divider",category:"core",icon:u.DividerHorizontalIcon,group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("bg-gray-900 h-0.5 py-2 my-1")}})},D=e=>{const{blockProps:o,styles:t,backgroundImage:r}=e;let i={};return r&&(i={backgroundImage:`url(${r})`}),y.createElement("div",{...o,...t,style:i})},z={type:"EmptyBox",description:"A box component with no children",label:"Empty Box",category:"core",group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),backgroundImage:{type:"string",title:"Background Image",default:"",ui:{"ui:widget":"image"}}}})},V=e=>{const{blockProps:o,fieldName:t,label:r,styles:i,inputStyles:a,required:n,checked:c,showLabel:p=!0}=e;return p?s.jsxs("div",{...i,...o,children:[s.jsx("input",{...a,name:t,type:"checkbox",required:n,defaultChecked:c}),r&&s.jsx("label",{htmlFor:t,children:r})]}):s.jsx("input",{name:t,...o,...a,...i,type:"checkbox",required:n,defaultChecked:c})},U={type:"Checkbox",label:"web_blocks.checkbox",category:"core",icon:u.CheckboxIcon,group:"form",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("flex items-center gap-x-2"),inputStyles:l.StylesProp(""),fieldName:{type:"string",title:"Field Name",default:"fieldName"},label:{type:"string",title:"Label",default:"Label"},checked:{type:"boolean",title:"Checked",default:!1},required:{type:"boolean",title:"Required",default:!1},showLabel:{type:"boolean",title:"Show Label",default:!0}}}),aiProps:["label"],i18nProps:["label"]},F=e=>{const{children:o,blockProps:t,errorMessage:r,successMessage:i,action:a,styles:n,inBuilder:c}=e;let p=o;o||(p=s.jsx(k,{inBuilder:c}));const m={"x-data":"{}","x-on:submit.prevent":"post"},g={"x-html":"",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return s.jsxs("form",{...m,"data-error":r,"data-success":i,method:"post",action:a,...t,...n,children:[s.jsx("div",{...g}),p]})},q={type:"Form",label:"Form",category:"core",icon:u.FileTextIcon,group:"form",blocks:()=>[{_type:"Form",_id:"form",styles:"#styles:p-1 space-y-2,"},{_type:"Input",_id:"form_input",_parent:"form",styles:"#styles:,"},{_type:"FormButton",_id:"form_submit_btn",_parent:"form",styles:"#styles:bg-black text-white rounded px-3 py-1,"}],...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),action:{type:"string",title:"Submit URL",default:"/api/form"},errorMessage:{type:"string",title:"Error Message",default:"Something went wrong. Please try again",ui:{"ui:widget":"richtext"}},successMessage:{type:"string",title:"Success Message",default:"Thank you for your submission.",ui:{"ui:widget":"richtext"}}}}),i18nProps:["errorMessage","successMessage"],aiProps:["errorMessage","successMessage"],canAcceptBlock:()=>!0},O=e=>{const{blockProps:o,inBuilder:t,label:r,styles:i,icon:a,iconSize:n,iconPos:c}=e;return s.jsxs("button",{...i,...o||{},type:t?"button":"submit","aria-label":r,children:[r,a&&s.jsx("div",{style:{width:n+"px"},className:c+" "+(c==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:a}})]})},Z={type:"FormButton",label:"Submit Button",category:"core",icon:u.ButtonIcon,group:"form",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"),label:{type:"string",title:"Label",default:"Submit",ai:!0,i18n:!0},icon:{type:"string",title:"Icon",default:"",ui:{"ui:widget":"icon"}},iconSize:{type:"number",title:"Icon size",default:24},iconPos:{type:"string",title:"Icon Position",default:"order-last",enum:["order-first","order-last"]}}}),i18nProps:["label"],aiProps:["label"]},G=e=>{const o={type:"text",autocomplete:"on"};return e?["text","password","number","hidden","range","color","date","time"].includes(e)?{type:e,autocomplete:"on"}:e==="email"?{type:"email",autocomplete:"email"}:e==="tel"?{type:"tel",autocomplete:"tel"}:e==="url"?{type:"url",autocomplete:"url"}:{off:{type:"text",autocomplete:"off"},on:{type:"text",autocomplete:"on"},name:{type:"text",autocomplete:"name"},"honorific-prefix":{type:"text",autocomplete:"honorific-prefix"},"given-name":{type:"text",autocomplete:"given-name"},"additional-name":{type:"text",autocomplete:"additional-name"},"family-name":{type:"text",autocomplete:"family-name"},"honorific-suffix":{type:"text",autocomplete:"honorific-suffix"},nickname:{type:"text",autocomplete:"nickname"},firstName:{type:"text",autocomplete:"given-name"},lastName:{type:"text",autocomplete:"family-name"},email:{type:"email",autocomplete:"email"},tel:{type:"tel",autocomplete:"tel"},"tel-country-code":{type:"tel",autocomplete:"tel-country-code"},"tel-national":{type:"tel",autocomplete:"tel-national"},"tel-area-code":{type:"tel",autocomplete:"tel-area-code"},"tel-local":{type:"tel",autocomplete:"tel-local"},"tel-extension":{type:"tel",autocomplete:"tel-extension"},"street-address":{type:"text",autocomplete:"street-address"},"address-line1":{type:"text",autocomplete:"address-line1"},"address-line2":{type:"text",autocomplete:"address-line2"},"address-line3":{type:"text",autocomplete:"address-line3"},"address-level1":{type:"text",autocomplete:"address-level1"},"address-level2":{type:"text",autocomplete:"address-level2"},"address-level3":{type:"text",autocomplete:"address-level3"},"address-level4":{type:"text",autocomplete:"address-level4"},country:{type:"text",autocomplete:"country"},"country-name":{type:"text",autocomplete:"country-name"},"postal-code":{type:"text",autocomplete:"postal-code"},"cc-name":{type:"text",autocomplete:"cc-name"},"cc-given-name":{type:"text",autocomplete:"cc-given-name"},"cc-additional-name":{type:"text",autocomplete:"cc-additional-name"},"cc-family-name":{type:"text",autocomplete:"cc-family-name"},"cc-number":{type:"text",autocomplete:"cc-number"},"cc-exp":{type:"text",autocomplete:"cc-exp"},"cc-exp-month":{type:"number",autocomplete:"cc-exp-month"},"cc-exp-year":{type:"number",autocomplete:"cc-exp-year"},"cc-csc":{type:"text",autocomplete:"cc-csc"},"cc-type":{type:"text",autocomplete:"cc-type"},bday:{type:"date",autocomplete:"bday"},"bday-day":{type:"number",autocomplete:"bday-day"},"bday-month":{type:"number",autocomplete:"bday-month"},"bday-year":{type:"number",autocomplete:"bday-year"},username:{type:"text",autocomplete:"username"},"new-password":{type:"password",autocomplete:"new-password"},"current-password":{type:"password",autocomplete:"current-password"},"one-time-code":{type:"text",autocomplete:"one-time-code"},"transaction-currency":{type:"text",autocomplete:"transaction-currency"},"transaction-amount":{type:"number",autocomplete:"transaction-amount"},url:{type:"url",autocomplete:"url"},photo:{type:"url",autocomplete:"photo"},sex:{type:"text",autocomplete:"sex"},"organization-title":{type:"text",autocomplete:"organization-title"},organization:{type:"text",autocomplete:"organization"},language:{type:"text",autocomplete:"language"}}[e]||o:o},W=e=>{const{blockProps:o,fieldName:t,label:r,placeholder:i,styles:a,inputStyles:n,showLabel:c,required:p,inputType:m,defaultValue:g}=e,{type:h,autocomplete:f}=G(m);return c?s.jsxs("div",{...a,...o,children:[c&&s.jsx("label",{htmlFor:t,children:r}),s.jsx("input",{name:t,defaultValue:g,...n,type:h,placeholder:i,required:p,autoComplete:f})]}):s.jsx("input",{name:t,...o,...n,...a,type:h,placeholder:i,required:p,autoComplete:f,defaultValue:g})},Y={type:"Input",label:"web_blocks.input",category:"core",icon:u.InputIcon,group:"form",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),inputStyles:l.StylesProp("w-full p-1"),fieldName:{type:"string",title:"Field Name",default:"fieldName"},inputType:{type:"string",title:"Type",default:"email",oneOf:[{const:"text",title:"Text"},{const:"email",title:"Email"},{const:"password",title:"Password"},{const:"number",title:"Number"},{const:"tel",title:"Telephone"},{const:"hidden",title:"Hidden"},{const:"range",title:"Range"},{const:"color",title:"Color"},{const:"date",title:"Date"},{const:"time",title:"Time"},{const:"url",title:"URL"},{const:"name",title:"Name"},{const:"firstName",title:"First Name"},{const:"lastName",title:"Last Name"},{const:"tel-country-code",title:"Telephone Country Code"},{const:"tel-national",title:"Telephone National"},{const:"tel-area-code",title:"Telephone Area Code"},{const:"tel-local",title:"Telephone Local"},{const:"tel-extension",title:"Telephone Extension"},{const:"street-address",title:"Street Address"},{const:"address-line1",title:"Address Line 1"},{const:"address-line2",title:"Address Line 2"},{const:"address-line3",title:"Address Line 3"},{const:"address-level1",title:"Address Level 1"},{const:"address-level2",title:"Address Level 2"},{const:"address-level3",title:"Address Level 3"},{const:"address-level4",title:"Address Level 4"},{const:"country",title:"Country"},{const:"country-name",title:"Country Name"},{const:"postal-code",title:"Postal Code"},{const:"cc-name",title:"Credit Card Name"},{const:"cc-number",title:"Credit Card Number"},{const:"cc-exp",title:"Credit Card Expiry"},{const:"cc-exp-month",title:"Credit Card Expiry Month"},{const:"cc-exp-year",title:"Credit Card Expiry Year"},{const:"cc-csc",title:"Credit Card CSC"},{const:"cc-type",title:"Credit Card Type"},{const:"bday",title:"Birthday"},{const:"bday-day",title:"Birthday Day"},{const:"bday-month",title:"Birthday Month"},{const:"bday-year",title:"Birthday Year"},{const:"username",title:"Username"},{const:"new-password",title:"New Password"},{const:"current-password",title:"Current Password"},{const:"one-time-code",title:"One Time Code"},{const:"transaction-currency",title:"Transaction Currency"},{const:"transaction-amount",title:"Transaction Amount"},{const:"url",title:"URL"},{const:"photo",title:"Photo"},{const:"sex",title:"Sex"},{const:"organization-title",title:"Organization Title"},{const:"organization",title:"Organization"},{const:"language",title:"Language"}]},showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label",ai:!0,i18n:!0},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},required:{type:"boolean",title:"Required",default:!1},defaultValue:{type:"string",title:"Default Value",default:""}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]},Q=e=>{const{blockProps:o,content:t,styles:r,children:i}=e,a={...r,...o};return i?y.createElement("label",a,i):y.createElement("label",{...a,dangerouslySetInnerHTML:{__html:t}})},J={type:"Label",label:"Label",category:"core",icon:u.LetterCaseToggleIcon,group:"form",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(),content:{type:"string",title:"Content",default:""}}}),aiProps:["content"],i18nProps:["content"]},X=e=>{const{blockProps:o,fieldName:t,label:r,styles:i,inputStyles:a,required:n,checked:c,showLabel:p=!0}=e;return p?s.jsxs("div",{...i,...o,children:[s.jsx("input",{...a,name:t,type:"radio",required:n,defaultChecked:c}),r&&s.jsx("label",{htmlFor:t,children:r})]}):s.jsx("input",{name:t,...o,...a,...i,type:"radio",required:n,checked:c})},K={type:"Radio",label:"web_blocks.radio",category:"core",icon:u.RadiobuttonIcon,group:"form",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("flex items-center gap-x-2"),inputStyles:l.StylesProp(""),fieldName:{type:"string",title:"Field Name",default:"fieldName"},label:{type:"string",title:"Label",default:"Label"},checked:{type:"boolean",title:"Checked",default:!1},required:{type:"boolean",title:"Required",default:!1},showLabel:{type:"boolean",title:"Show Label",default:!0}}}),aiProps:["label"],i18nProps:["label"]},ee=e=>{const{blockProps:o,fieldName:t,label:r,placeholder:i,styles:a,inputStyles:n,required:c,showLabel:p,_multiple:m,options:g,defaultValue:h}=e,f=m&&h?h.split(",").map(b=>b.trim()):h||"";return p?s.jsxs("div",{...a,...o,children:[p&&s.jsx("label",{htmlFor:t,children:r}),s.jsxs("select",{...n,required:c,multiple:m,name:t,defaultValue:f,children:[s.jsx("option",{value:"",disabled:!0,hidden:!0,children:i}),d.map(g,b=>s.jsx("option",{value:b==null?void 0:b.value,children:b==null?void 0:b.label},b==null?void 0:b.value))]})]}):s.jsxs("select",{...a,...o,required:c,multiple:m,name:t,defaultValue:f,children:[s.jsx("option",{value:"",disabled:!0,hidden:!0,children:i}),d.map(g,b=>s.jsx("option",{value:b==null?void 0:b.value,children:b==null?void 0:b.label},b==null?void 0:b.value))]})},te={type:"Select",label:"web_blocks.select",category:"core",icon:u.DropdownMenuIcon,group:"form",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),inputStyles:l.StylesProp("w-full p-1"),fieldName:{type:"string",title:"Field Name",default:"fieldName"},showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label"},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},required:{type:"boolean",title:"Required",default:!1},defaultValue:{type:"string",title:"Default Value",default:""},_multiple:{type:"boolean",title:"Multiple",default:!1},options:{title:"Options",type:"array",default:[],items:{type:"object",properties:{label:{type:"string",title:"Label",default:""},value:{type:"string",title:"Value",default:""}}}}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]},oe=e=>{const{blockProps:o,fieldName:t,label:r,placeholder:i,styles:a,inputStyles:n,rows:c,showLabel:p,required:m,defaultValue:g}=e;return p?s.jsxs("div",{...a,...o,children:[p&&s.jsx("label",{htmlFor:t,children:r}),s.jsx("textarea",{name:t,...n,placeholder:i,rows:c,required:m,defaultValue:g})]}):s.jsx("textarea",{name:t,...o,...n,...a,placeholder:i,rows:c,required:m,defaultValue:g})},le={type:"TextArea",label:"web_blocks.textarea",category:"core",icon:u.InputIcon,group:"form",...l.registerChaiBlockSchema({properties:{fieldName:{type:"string",title:"Field Name",default:"fieldName"},styles:l.StylesProp(""),inputStyles:l.StylesProp("w-full p-1"),showLabel:{type:"boolean",title:"Show Label",default:!0},label:{type:"string",title:"Label",default:"Label",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}},placeholder:{type:"string",title:"Placeholder",default:"Placeholder"},rows:{type:"number",title:"Rows",default:3},required:{type:"boolean",title:"Required",default:!1},defaultValue:{type:"string",title:"Default Value",default:"",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}}}}),aiProps:["label","placeholder"],i18nProps:["label","placeholder"]},re=e=>{const{blockProps:o,inBuilder:t,children:r,globalBlock:i}=e;return t&&!i?s.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",...o,children:[s.jsxs("h1",{children:["Global Block - ",i]}),s.jsx("p",{children:"Choose a block from the sidebar to add it to this page."})]}):y.createElement("span",{...o},r)},se={type:"GlobalBlock",description:"A global block component",label:"Global Block",icon:u.FrameIcon,category:"core",group:"basic",hidden:!0,...l.registerChaiBlockSchema({properties:{globalBlock:{type:"string",title:"Global Block",default:"",ui:{"ui:widget":"hidden"}}}})},ie=e=>{const{blockProps:o,styles:t,content:r,tag:i="h1",children:a=null}=e;return a?y.createElement(i,{...t,...o},a):y.createElement(i,{...t,...o,dangerouslySetInnerHTML:{__html:r}})},ae={type:"Heading",description:"A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",label:"Heading",category:"core",icon:u.HeadingIcon,group:"typography",...l.registerChaiBlockSchema({properties:{tag:{type:"string",default:"h2",title:"Level",enum:["h1","h2","h3","h4","h5","h6"]},styles:l.StylesProp("text-3xl"),content:{type:"string",default:"Heading goes here",title:"Content",ui:{"ui:widget":"textarea"}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:e=>e==="Span"||e==="Text"},ne=e=>{const{blockProps:o,styles:t}=e;return x.createElement("br",{...o,...t})},ce={type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("")}}),canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},pe=e=>{const{blockProps:o,children:t,styles:r}=e;return t?x.createElement("table",{...o,...r},t):s.jsx(k,{})},de=e=>{const{blockProps:o,children:t,styles:r}=e;return t?x.createElement("thead",{...o,...r},t):s.jsx(k,{})},ue=e=>{const{blockProps:o,children:t,styles:r}=e;return t?x.createElement("tbody",{...o,...r},t):s.jsx(k,{})},me=e=>{const{blockProps:o,children:t,styles:r}=e;return t?x.createElement("tr",{...o,...r},t):s.jsx(k,{})},ye=e=>{const{blockProps:o,children:t,content:r,styles:i}=e;return!t&&d.isEmpty(r)?s.jsx(k,{}):t?x.createElement("td",{...o,...i},t):x.createElement("td",{...o,...i,dangerouslySetInnerHTML:{__html:r}})};l.registerChaiBlock(pe,{type:"Table",label:"Table",category:"core",group:"table",hidden:!0,icon:u.TableIcon,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("")}}),blocks:B("Table")});l.registerChaiBlock(de,{type:"TableHead",label:"Table Head",category:"core",group:"table",hidden:!0,icon:u.BorderTopIcon,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("")}}),blocks:B("TableHead")});l.registerChaiBlock(ue,{type:"TableBody",label:"Table Body",category:"core",group:"table",hidden:!0,icon:u.BorderAllIcon,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("")}}),blocks:B("TableBody")});l.registerChaiBlock(me,{type:"TableRow",label:"Table Row",category:"core",group:"table",hidden:!0,icon:u.ViewHorizontalIcon,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("")}}),blocks:B("TableRow")});l.registerChaiBlock(ye,{type:"TableCell",label:"Table Cell",category:"core",group:"table",hidden:!0,icon:u.DragHandleHorizontalIcon,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),content:{type:"string",default:"Heading goes here",title:"Content",ui:{"ui:widget":"textarea"}}}}),blocks:B("TableCell"),i18nProps:["content"],aiProps:["content"]});function B(e){const o=(a,n)=>({_id:C.generateUUID(),_parent:a,_type:"TableCell",styles:"#styles:,",content:`${e==="TableHead"?"Table Head":"Table Cell "+n}`}),t=a=>{const n=C.generateUUID(),c={_type:"TableRow",_id:n,styles:"#styles:,border-b"};return a&&(c._parent=a),[c,o(n,"1"),o(n,"2"),o(n,"3")]},r=a=>{const n=C.generateUUID(),c={_id:n,_type:"TableHead",styles:"#styles:,font-medium"};return a&&(c._parent=a),[c,...t(n)]},i=a=>{const n=C.generateUUID(),c={_id:n,_type:"TableBody",styles:"#styles:,"};return a&&(c._parent=a),[c,...t(n),...t(n)]};if(e==="Table"){const a=C.generateUUID();return[{_id:a,_type:"Table",styles:"#styles:,w-full text-left text-gray-500 dark:text-gray-400"},...r(a),...i(a)]}return e==="TableRow"?t():e==="TableHead"?r():e==="TableBody"?i():[]}const I=(e,...o)=>({...e,className:C.cn(e.className,...o)}),ge=e=>{const{blockProps:o,icon:t,styles:r,width:i,inBuilder:a,height:n}=e,c=I(r,"");if(d.isEmpty(t))return s.jsx(k,{inBuilder:a,className:"h-8 w-14"});const p=t.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return y.createElement("span",{...o,...c,style:{width:i?`${i}px`:"auto",height:n?`${n}px`:"auto"},dangerouslySetInnerHTML:{__html:p}})},he={type:"Icon",label:"web_blocks.icon",category:"core",icon:u.SketchLogoIcon,group:"media",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),icon:{type:"string",title:"Icon",default:'<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>',ui:{"ui:widget":"icon"}},width:{type:"number",default:16,title:"Width"},height:{type:"number",default:16,title:"Height"}}})},be="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==",fe=e=>{const{blockProps:o,image:t,mobileImage:r,styles:i,alt:a,height:n,width:c,lazyLoading:p,mobileWidth:m,mobileHeight:g}=e;return d.isEmpty(t)?s.jsx(k,{className:"h-36"}):s.jsxs("picture",{children:[r&&s.jsx("source",{srcSet:r,media:"(max-width: 480px)",width:m,height:g}),s.jsx("img",{...o,...i,src:t,alt:a,loading:p?"lazy":"eager",width:c,height:n})]})},xe={type:"Image",description:"A image component",label:"Image",category:"core",icon:u.ImageIcon,group:"media",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),image:{type:"string",title:"Image",default:be,ui:{"ui:widget":"image"}},width:{type:"string",title:"Width",default:"",ui:{"ui:placeholder":"Enter width"}},height:{type:"string",title:"Height",default:"",ui:{"ui:placeholder":"Enter height"}},mobileImage:{type:"string",title:"Mobile Image",default:"",ui:{"ui:widget":"image"}},mobileWidth:{type:"string",title:"Mobile Width",default:"",ui:{"ui:placeholder":"Enter width"}},mobileHeight:{type:"string",title:"Mobile Height",default:"",ui:{"ui:placeholder":"Enter height"}},alt:{type:"string",title:"Alt text",default:"",ui:{"ui:placeholder":"Enter alt text"}},lazyLoading:{type:"boolean",title:"Lazy Load",default:!0}}}),aiProps:["alt"],i18nProps:["alt","image","_imageId","mobileImage","_mobileImageId"]},ke=e=>{const{blockProps:o,link:t,children:r,styles:i,inBuilder:a,content:n}=e;let c={};return!r&&d.isEmpty(n)&&(c={minHeight:"50px",display:"flex",alignItems:"center",justifyContent:"center"}),a?r?s.jsx("span",{role:"link",...o,style:c,...i,children:r}):x.createElement("span",{...o,...i,style:c,role:"link"},n):r?s.jsx("a",{"aria-label":n,href:(t==null?void 0:t.href)||"#/",target:t==null?void 0:t.target,...o,...i,children:r}):x.createElement("a",{...o,...i,href:(t==null?void 0:t.href)||"#",target:(t==null?void 0:t.target)||"_self","aria-label":n},n)},Ce={type:"Link",description:"A link component",label:"Link",category:"core",icon:u.Link1Icon,group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),content:{type:"string",default:"Link goes here",title:"Content"},link:{type:"object",properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}},default:{type:"url",href:"",target:"_self"},ui:{"ui:field":"link"}},prefetchLink:{type:"boolean",default:!1,title:"Prefetch Link"}}}),aiProps:["content"],i18nProps:["content","link"],canAcceptBlock:e=>e!=="Link"},Be=e=>{const{blockProps:o,children:t,styles:r,tag:i,inBuilder:a}=e;return!t&&d.isEmpty(r==null?void 0:r.className)?s.jsx(k,{inBuilder:a}):y.createElement(i||"ul",{...o,...r},t)},Se={type:"List",description:"A list component",label:"List",icon:u.RowsIcon,category:"core",group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("")}}),canAcceptBlock:e=>e==="ListItem",blocks:[{_type:"List",_id:"a",styles:"#styles:,"},{_type:"ListItem",_id:"b",_parent:"a",styles:"#styles:,",content:"Item 1"},{_type:"ListItem",_id:"c",_parent:"a",styles:"#styles:,",content:"Item 2"},{_type:"ListItem",_id:"d",_parent:"a",styles:"#styles:,",content:"Item 3"}]},we=e=>{const{blockProps:o,content:t,styles:r,children:i,tag:a}=e;return i?y.createElement(a||"li",{...r,...o},i):y.createElement(a||"li",{...r,...o,dangerouslySetInnerHTML:{__html:t}})},Pe={type:"ListItem",description:"A list item component",label:"List Item",icon:u.ColumnsIcon,category:"core",group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),content:{type:"string",default:"List item",title:"Content",ui:{"ui:widget":"textarea"}}}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e!=="ListItem",canBeNested:e=>e==="List"||e==="Repeater"},ve=e=>{const{blockProps:o,styles:t,content:r}=e;return d.isNull(e.children)?y.createElement("p",{...t,...o,dangerouslySetInnerHTML:{__html:r}}):y.createElement("p",{...t,...o},e.children)},Ie={type:"Paragraph",description:"A paragraph component",label:"Paragraph",category:"core",icon:u.TextIcon,group:"typography",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),content:{type:"string",title:"Content",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":5}}}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e==="Span"||e==="Link"||e==="Text"},je=e=>{const{blockProps:o,inBuilder:t,children:r,partialBlockId:i}=e;return t&&!i?s.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",...o,children:[s.jsxs("h1",{children:["Partial Block - ",i]}),s.jsx("p",{children:"Choose a block from the sidebar to add it to this page."})]}):y.createElement("span",{...o},r)},Le={type:"PartialBlock",description:"A partial block component",label:"Partial Block",icon:u.FrameIcon,category:"core",group:"basic",hidden:!0,...l.registerChaiBlockSchema({properties:{partialBlockId:{type:"string",title:"Partial Block",default:"",ui:{"ui:widget":"hidden"}}}})},S={SMALL:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},MEDIUM:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},LARGE:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},Ne=e=>{const{blockProps:o,children:t,styles:r,colSpan:i,tabletColSpan:a,desktopColSpan:n}=e,p={className:[d.get(r,"className",""),d.get(S,["SMALL",isNaN(i)||!i?6:i],""),a?d.get(S,["MEDIUM",a||i],""):"",n?d.get(S,["LARGE",a||i],""):""].join(" ")};return s.jsx("div",{...o,...r,...p,children:t||s.jsx("div",{className:"h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900"})})},_e={type:"Column",description:"A column component",label:"Column",group:"basic",category:"core",icon:u.LayoutIcon,wrapper:!0,canDelete:()=>!0,canAcceptBlock:()=>!0,canBeNested:e=>e==="Row",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),colSpan:{type:"number",title:"Column Span",default:6,enum:[1,2,3,4,5,6,7,8,9,10,11,12]},tabletColSpan:{type:"number",title:"Column Span (Tablet)",default:null,enumNames:["Default",1,2,3,4,5,6,7,8,9,10,11,12],enum:[null,1,2,3,4,5,6,7,8,9,10,11,12]},desktopColSpan:{type:"number",title:"Column Span (Desktop)",default:null,enumNames:["Default",1,2,3,4,5,6,7,8,9,10,11,12],enum:[null,1,2,3,4,5,6,7,8,9,10,11,12]}}})},Te=e=>{const{blockProps:o,children:t,styles:r,gutter:i}=e,n={className:[d.get(r,"className","")," grid grid-cols-12"].join()};return typeof(r==null?void 0:r.style)=="object"?r.style.gap=`${i}px`:n.style={gap:`${i}px`},s.jsx("div",{...o,...r,...n,children:t})},Ee={type:"Row",description:"A row component",label:"Row",group:"basic",icon:u.RowsIcon,blocks:()=>[{_type:"Row",_id:"row",styles:"#styles:,p-1"},{_type:"Column",id:"column",_parent:"row",styles:"#styles:,"},{_type:"Column",id:"column",_parent:"row",styles:"#styles:,"}],category:"core",wrapper:!0,canAcceptBlock:e=>e==="Column",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),colCount:{type:"number",default:2,minimum:0,ui:{"ui:widget":"colCount"}},gutter:{type:"number",title:"Gutter (in px)",default:16,minimum:0}}})},Re=e=>{const{blockProps:o,content:t,styles:r}=e,i=I(r,"prose dark:prose-invert prose-p:m-0 prose-p:min-h-[1rem] prose-blockquote:m-2 prose-blockquote:ml-4 prose-ul:m-0 prose-ol:m-0 prose-li:m-0","max-w-full");return s.jsx("div",{...o,...i,dangerouslySetInnerHTML:{__html:t}})},Me={type:"RichText",description:"A rich text block",label:"Rich Text",category:"core",icon:u.CursorTextIcon,group:"typography",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),content:{type:"string",title:"Content",default:"<p>This is a rich text block. You can add text, and other content here.</p>",ui:{"ui:widget":"richtext"}}}}),aiProps:["content"],i18nProps:["content"]},Ae=e=>{const{blockProps:o,styles:t,content:r,children:i=null,tag:a}=e;return i?y.createElement("span",{...t,...o},i):y.createElement(a||"span",{...t,...o,dangerouslySetInnerHTML:{__html:r||""}})},He={type:"Span",description:"A span component",label:"Span",category:"core",group:"typography",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp(""),content:{type:"string",title:"Content",default:"",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:()=>!0},$e=e=>e.inBuilder||e.forceWrapper?s.jsx("span",{...e.blockProps,children:e.content}):`${e.content}`,De={type:"Text",description:"A text component with no styling",label:"Text",hidden:!0,category:"core",group:"typography",icon:u.SpaceBetweenVerticallyIcon,...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("text-black"),content:{title:"Content",type:"string",default:""}}}),aiProps:["content"],i18nProps:["content"]},w={type:"object",title:"Controls",default:{autoplay:!0,controls:!1,loop:!0,muted:!0},properties:{autoplay:{type:"boolean",title:"Autoplay",default:!1},controls:{type:"boolean",title:"Show Controls",default:!0},loop:{type:"boolean",title:"Loop Video",default:!1},muted:{type:"boolean",title:"Muted",default:!1}}},P=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,v=/(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com\/(?:channels\/[\w]+\/|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/)?|player\.vimeo\.com\/video\/)(\d+)/,ze=(e,o)=>{const t=d.get(o,"autoplay",!1),r=d.get(o,"controls",!1),i=d.get(o,"loop",!1),a=t||d.get(o,"muted",!0);if(P.test(e)){const n=e.match(P);if(n){const c=n[4];let p=`https://www.youtube.com/embed/${c}`,m=t?"autoplay=1":"";return m+=i?`&loop=1&playlist=${c}`:"",m+=a?"&mute=1&muted=1":"",m+=r?"&controls=1":"&controls=0",`${p}?${m}`}}if(v.test(e)){const n=e.match(v);if(n){const c=n[1];let p="";return p+=t?"autoplay=1":"",p+=r?"&controls=1":"&controls=0",p+=a?"&muted=1":"",p+=i?"&loop=1":"",`https://player.vimeo.com/video/${c}?${p}`}}return null},Ve=e=>{const{url:o,blockProps:t,styles:r,controls:i,videoSource:a,inBuilder:n}=e,c=ze(o,i);return s.jsxs("div",{...d.omit(r,"className"),className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[!c&&n?s.jsx("div",{className:"absolute flex h-full w-full items-center justify-center bg-gray-300 text-center",children:d.isEmpty(o)?`Provided ${a} video link in settings Video URL.`:`Provided ${a} video link is invalid.`}):s.jsx("iframe",{width:"100%",src:c,...d.pick(r,"className")}),n&&s.jsx("div",{...t,className:"absolute top-0 h-full w-full"})]})},Ue=e=>{const{url:o,styles:t,controls:r,sources:i,poster:a,blockProps:n}=e;let c=a;const p=[...d.get(i,"srcsets",[])||[]];o&&typeof o=="string"&&p.push({url:o,width:"9999"});const m=p.sort((h,f)=>parseInt(h.width)-parseInt(f.width)).filter(h=>!d.isEmpty(h.url)&&!d.isEmpty(h.width));m.length===0&&!c&&(c="https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");const g=d.get(r,"autoplay",!1)||d.get(r,"muted",!0);return(c||!d.isEmpty(m))&&s.jsx("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:x.createElement("video",{...t,...n,key:JSON.stringify(m),controls:d.get(r,"controls",!1),autoPlay:d.get(r,"autoplay",!1),loop:d.get(r,"loop",!1),poster:c,...g?{muted:!0}:{}},m.map(h=>{if(!h.url||h.url.length<4||isNaN(h.width))return null;const f=`(max-width: ${h.width}px)`;return s.jsx("source",{src:h.url,media:f,type:h.type},h.url)}),"Your browser does not support the video tag.")})},Fe=e=>{const{videoSource:o}=e;return o==="Custom"?s.jsx(Ue,{...e}):o==="Youtube"||o==="Vimeo"?s.jsx(Ve,{...e}):s.jsxs("div",{children:["Invalid video source : ",o]})},qe={type:"Video",label:"Video",category:"core",icon:u.VideoIcon,group:"media",...l.registerChaiBlockSchema({properties:{styles:l.StylesProp("absolute h-full w-full object-cover"),videoSource:{type:"string",default:"Custom",enum:["Custom","Youtube","Vimeo"],title:"Video source"}},allOf:[{if:{properties:{videoSource:{const:"Custom"}}},then:{properties:{url:{type:"string",title:"Video URL",default:""},poster:{type:"string",title:"Poster URL",default:""},sources:{type:"object",default:{srcsets:[]}},controls:{...w}}}},{if:{properties:{videoSource:{const:"Youtube"}}},then:{properties:{url:{type:"string",title:"Youtube Video URL",default:""},controls:{...w}}}},{if:{properties:{videoSource:{const:"Vimeo"}}},then:{properties:{url:{type:"string",title:"Vimeo Video URL",default:""},controls:{...w}}}}],ui:{url:{"ui:placeholder":"Enter Video URL"},sources:{"ui:field":"sources"},poster:{"ui:placeholder":"Enter poster URL"}}}),i18nProps:["url"]},Oe=e=>{const{styles:o}=e,t=l.getRegisteredChaiBlock("Pagination");return s.jsx("div",{...o,children:t?y.createElement(t.component,{...d.omit(e,["styles"]),blockProps:{}}):s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",disabled:!0,children:s.jsx(u.ChevronLeftIcon,{className:"h-4 w-4"})}),s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-blue-500 bg-blue-500 font-medium text-white",children:"1"}),s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50",children:"2"}),s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50",children:"3"}),s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50",children:"4"}),s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50",children:"5"}),s.jsx("button",{className:"flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white hover:bg-gray-50",children:s.jsx(u.ChevronRightIcon,{className:"h-4 w-4"})})]})})},Ze=e=>{const{children:o,tag:t,styles:r,blockProps:i,$loading:a}=e,{pagination:n,inBuilder:c}=e;let p=o;return d.isEmpty(p)&&c&&(p=s.jsx("div",{className:"col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground",children:"Choose a collection to display items"})),t==="none"?a&&c?Array.from({length:2}).map((m,g)=>s.jsxs("div",{className:"animate-pulse rounded-md bg-primary/10 p-5",children:[s.jsx("div",{className:"h-6 w-1/2 rounded-md bg-primary/10"}),s.jsx("div",{className:"mt-2 h-4 w-1/2 rounded-md bg-primary/10"})]},g)):p:s.jsxs(s.Fragment,{children:[y.createElement(t,{...i,...r},a&&c?Array.from({length:2}).map((m,g)=>s.jsxs("div",{className:"animate-pulse rounded-md bg-primary/10 p-5",children:[s.jsx("div",{className:"h-6 w-1/2 rounded-md bg-primary/10"}),s.jsx("div",{className:"mt-2 h-4 w-1/2 rounded-md bg-primary/10"})]},g)):p),n&&s.jsx(Oe,{...d.pick(e,["limit","totalItems","paginationStrategy","inBuilder","draft","lang"])})]})},Ge={type:"Repeater",label:"Repeater",icon:u.LoopIcon,group:"basic",dataProviderMode:"live",dataProviderDependencies:["filter","sort","limit","repeaterItems"],blocks:()=>[{_id:"A",_type:"Repeater",tag:"ul"},{_id:"B",_name:"Repeater Item",_type:"RepeaterItem",parentTag:"ul",_parent:"A"}],...l.registerChaiBlockSchema({properties:{styles:l.stylesProp("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),paginationStyles:l.stylesProp("flex items-center justify-center gap-2 p-4"),repeaterItems:{title:"Collection",type:"string",binding:"array",default:"",ui:{"ui:widget":"repeaterBinding","ui:readonly":!0}},tag:{title:"Tag",type:"string",default:"ul",enum:["none","div","ul","ol"]},filter:{title:"Filter by",type:"string",default:"",ui:{"ui:widget":"collectionSelect"}},sort:{title:"Sort by",type:"string",default:"",ui:{"ui:widget":"collectionSelect"}},pagination:{title:"Pagination",type:"boolean",default:!1}},allOf:[{if:{properties:{pagination:{const:!0}}},then:{properties:{paginationStrategy:{type:"string",title:"Pagination Strategy",default:"segment",enum:["query","segment"],enumNames:["Query(/items?page=1)","Segment(/items/1)"]},limit:{type:"number",title:"Items Per Page",default:10,minimum:1}}}},{if:{properties:{pagination:{const:!1}}},then:{properties:{limit:{type:"number",title:"Max items",default:10,minimum:1}}}}]}),canAcceptBlock:e=>e==="Pagination"},We=({children:e,blockProps:o,styles:t,parentTag:r,inBuilder:i})=>{let a="li";switch(r){case"ul":a="li";break;case"ol":a="li";break;default:a="div"}return!e&&i?y.createElement(a,{...o,...t},s.jsx("div",{className:"col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground",children:"Add children to repeater item"})):y.createElement(a,{...o,...t},e)},Ye={type:"RepeaterItem",label:"Repeater Item",icon:u.LoopIcon,hidden:!0,group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.stylesProp(""),parentTag:l.closestBlockProp("Repeater","tag")}}),canAcceptBlock:e=>e!=="RepeaterItem",canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},Qe=({children:e,blockProps:o,styles:t})=>y.createElement("div",{...o,...t},e),Je={type:"RepeaterEmptyState",label:"Empty State",hidden:!0,group:"basic",...l.registerChaiBlockSchema({properties:{styles:l.stylesProp("p-5 flex items-center justify-center")}}),canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},Xe=()=>{l.registerChaiBlock(L,N),l.registerChaiBlock(D,z),l.registerChaiBlock(_,T),l.registerChaiBlock(ie,ae),l.registerChaiBlock(ve,Ie),l.registerChaiBlock(Ae,He),l.registerChaiBlock(Re,Me),l.registerChaiBlock(ke,Ce),l.registerChaiBlock(Be,Se),l.registerChaiBlock(we,Pe),l.registerChaiBlock(ge,he),l.registerChaiBlock(fe,xe),l.registerChaiBlock(Fe,qe),l.registerChaiBlock(E,R),l.registerChaiBlock(M,A),l.registerChaiBlock($e,De),l.registerChaiBlock(F,q),l.registerChaiBlock(O,Z),l.registerChaiBlock(W,Y),l.registerChaiBlock(V,U),l.registerChaiBlock(X,K),l.registerChaiBlock(ee,te),l.registerChaiBlock(oe,le),l.registerChaiBlock(Q,J),l.registerChaiBlock(ne,ce),l.registerChaiBlock(H,$),l.registerChaiBlock(re,se),l.registerChaiBlock(je,Le),l.registerChaiBlock(Te,Ee),l.registerChaiBlock(Ne,_e),l.registerChaiBlock(Ze,Ge),l.registerChaiBlock(We,Ye),l.registerChaiBlock(Qe,Je)};exports.loadWebBlocks=Xe;
@@ -1,16 +1,16 @@
1
- import { registerChaiBlockSchema as p, StylesProp as u, registerChaiBlock as d, getRegisteredChaiBlock as V, stylesProp as L, closestBlockProp as F } from "@chaibuilder/runtime";
2
- import { jsx as a, jsxs as b, Fragment as N } from "react/jsx-runtime";
1
+ import { registerChaiBlockSchema as p, StylesProp as u, registerChaiBlock as d, getRegisteredChaiBlock as U, stylesProp as L, closestBlockProp as q } from "@chaibuilder/runtime";
2
+ import { jsx as a, jsxs as g, Fragment as N } from "react/jsx-runtime";
3
3
  import { c as _, g as I } from "./common-functions-BGzDsf1z.js";
4
- import * as g from "react";
4
+ import * as y from "react";
5
5
  import { createElement as w } from "react";
6
- import { ButtonIcon as M, CodeIcon as E, DividerHorizontalIcon as U, CheckboxIcon as q, FileTextIcon as Z, InputIcon as H, LetterCaseToggleIcon as G, RadiobuttonIcon as W, DropdownMenuIcon as O, FrameIcon as $, HeadingIcon as Y, TableIcon as Q, BorderTopIcon as J, BorderAllIcon as X, ViewHorizontalIcon as K, DragHandleHorizontalIcon as ee, SketchLogoIcon as te, ImageIcon as oe, Link1Icon as le, RowsIcon as z, ColumnsIcon as re, TextIcon as ne, LayoutIcon as ae, CursorTextIcon as ie, SpaceBetweenVerticallyIcon as se, VideoIcon as ce, ChevronLeftIcon as de, ChevronRightIcon as pe, LoopIcon as j } from "@radix-ui/react-icons";
7
- import { isEmpty as v, get as x, map as T, isNull as ue, omit as me, pick as ye } from "lodash-es";
6
+ import { ButtonIcon as M, CodeIcon as E, DividerHorizontalIcon as Z, CheckboxIcon as G, FileTextIcon as W, InputIcon as H, LetterCaseToggleIcon as O, RadiobuttonIcon as Y, DropdownMenuIcon as Q, FrameIcon as $, HeadingIcon as J, TableIcon as X, BorderTopIcon as K, BorderAllIcon as ee, ViewHorizontalIcon as te, DragHandleHorizontalIcon as oe, SketchLogoIcon as le, ImageIcon as re, Link1Icon as ne, RowsIcon as z, ColumnsIcon as ae, TextIcon as ie, LayoutIcon as se, CursorTextIcon as ce, SpaceBetweenVerticallyIcon as de, VideoIcon as pe, ChevronLeftIcon as ue, ChevronRightIcon as me, LoopIcon as j } from "@radix-ui/react-icons";
7
+ import { isEmpty as v, get as x, map as T, isNull as ye, omit as D, pick as V } from "lodash-es";
8
8
  const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div", { className: _("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ a("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ a("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, ge = (e) => {
9
9
  const { blockProps: o, inBuilder: t, backgroundImage: l, children: r, tag: n = "div", styles: i } = e;
10
10
  let s = r;
11
11
  r || (s = /* @__PURE__ */ a(C, { inBuilder: t }));
12
12
  let c = {};
13
- return l && (c = { backgroundImage: `url(${l})` }), g.createElement(n, { ...o, ...i, style: c }, s);
13
+ return l && (c = { backgroundImage: `url(${l})` }), y.createElement(n, { ...o, ...i, style: c }, s);
14
14
  }, be = {
15
15
  type: "Box",
16
16
  description: "Similar to a div or section elements in HTML",
@@ -54,7 +54,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
54
54
  }),
55
55
  canAcceptBlock: () => !0
56
56
  }, fe = (e) => {
57
- const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: i, iconPos: s, link: c, inBuilder: m } = e, h = l, y = i || /* @__PURE__ */ b(N, { children: [
57
+ const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: i, iconPos: s, link: c, inBuilder: m } = e, h = l, b = i || /* @__PURE__ */ g(N, { children: [
58
58
  r && /* @__PURE__ */ a("span", { children: r }),
59
59
  h && /* @__PURE__ */ a(
60
60
  "div",
@@ -72,7 +72,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
72
72
  type: "button",
73
73
  "aria-label": r
74
74
  },
75
- y
75
+ b
76
76
  );
77
77
  return v(x(c, "href")) ? k : m ? /* @__PURE__ */ a("span", { children: k }) : /* @__PURE__ */ a("a", { "aria-label": r, href: x(c, "href") || "/", target: x(c, "target", "_self"), children: k });
78
78
  }, he = {
@@ -134,13 +134,13 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
134
134
  aiProps: ["content"]
135
135
  }, xe = (e) => {
136
136
  const { blockProps: o, styles: t, htmlCode: l, inBuilder: r } = e;
137
- return r ? /* @__PURE__ */ b("div", { className: "relative", children: [
137
+ return r ? /* @__PURE__ */ g("div", { className: "relative", children: [
138
138
  r ? /* @__PURE__ */ a("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
139
- g.createElement("div", {
139
+ y.createElement("div", {
140
140
  ...t,
141
141
  dangerouslySetInnerHTML: { __html: l.replace(/<script.*?>.*?<\/script>/g, "") }
142
142
  })
143
- ] }) : g.createElement("div", {
143
+ ] }) : y.createElement("div", {
144
144
  ...o,
145
145
  ...t,
146
146
  dangerouslySetInnerHTML: { __html: l }
@@ -193,7 +193,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
193
193
  description: "A horizontal line component",
194
194
  label: "Divider",
195
195
  category: "core",
196
- icon: U,
196
+ icon: Z,
197
197
  group: "basic",
198
198
  ...p({
199
199
  properties: {
@@ -203,7 +203,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
203
203
  }, Pe = (e) => {
204
204
  const { blockProps: o, styles: t, backgroundImage: l } = e;
205
205
  let r = {};
206
- return l && (r = { backgroundImage: `url(${l})` }), g.createElement("div", { ...o, ...t, style: r });
206
+ return l && (r = { backgroundImage: `url(${l})` }), y.createElement("div", { ...o, ...t, style: r });
207
207
  }, Le = {
208
208
  type: "EmptyBox",
209
209
  description: "A box component with no children",
@@ -223,7 +223,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
223
223
  })
224
224
  }, Be = (e) => {
225
225
  const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: s, showLabel: c = !0 } = e;
226
- return c ? /* @__PURE__ */ b("div", { ...r, ...o, children: [
226
+ return c ? /* @__PURE__ */ g("div", { ...r, ...o, children: [
227
227
  /* @__PURE__ */ a("input", { ...n, name: t, type: "checkbox", required: i, defaultChecked: s }),
228
228
  l && /* @__PURE__ */ a("label", { htmlFor: t, children: l })
229
229
  ] }) : /* @__PURE__ */ a(
@@ -242,7 +242,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
242
242
  type: "Checkbox",
243
243
  label: "web_blocks.checkbox",
244
244
  category: "core",
245
- icon: q,
245
+ icon: G,
246
246
  group: "form",
247
247
  ...p({
248
248
  properties: {
@@ -280,7 +280,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
280
280
  }, Ne = (e) => {
281
281
  const { children: o, blockProps: t, errorMessage: l, successMessage: r, action: n, styles: i, inBuilder: s } = e;
282
282
  let c = o;
283
- return o || (c = /* @__PURE__ */ a(C, { inBuilder: s })), /* @__PURE__ */ b(
283
+ return o || (c = /* @__PURE__ */ a(C, { inBuilder: s })), /* @__PURE__ */ g(
284
284
  "form",
285
285
  {
286
286
  ...{
@@ -306,7 +306,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
306
306
  type: "Form",
307
307
  label: "Form",
308
308
  category: "core",
309
- icon: Z,
309
+ icon: W,
310
310
  group: "form",
311
311
  blocks: () => [
312
312
  { _type: "Form", _id: "form", styles: "#styles:p-1 space-y-2," },
@@ -345,7 +345,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
345
345
  canAcceptBlock: () => !0
346
346
  }, Te = (e) => {
347
347
  const { blockProps: o, inBuilder: t, label: l, styles: r, icon: n, iconSize: i, iconPos: s } = e;
348
- return /* @__PURE__ */ b("button", { ...r, ...o || {}, type: t ? "button" : "submit", "aria-label": l, children: [
348
+ return /* @__PURE__ */ g("button", { ...r, ...o || {}, type: t ? "button" : "submit", "aria-label": l, children: [
349
349
  l,
350
350
  n && /* @__PURE__ */ a(
351
351
  "div",
@@ -475,8 +475,8 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
475
475
  required: c,
476
476
  inputType: m,
477
477
  defaultValue: h
478
- } = e, { type: y, autocomplete: k } = Ae(m);
479
- return s ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
478
+ } = e, { type: b, autocomplete: k } = Ae(m);
479
+ return s ? /* @__PURE__ */ g("div", { ...n, ...o, children: [
480
480
  s && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
481
481
  /* @__PURE__ */ a(
482
482
  "input",
@@ -484,7 +484,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
484
484
  name: t,
485
485
  defaultValue: h,
486
486
  ...i,
487
- type: y,
487
+ type: b,
488
488
  placeholder: r,
489
489
  required: c,
490
490
  autoComplete: k
@@ -497,7 +497,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
497
497
  ...o,
498
498
  ...i,
499
499
  ...n,
500
- type: y,
500
+ type: b,
501
501
  placeholder: r,
502
502
  required: c,
503
503
  autoComplete: k,
@@ -621,7 +621,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
621
621
  i18nProps: ["label", "placeholder"]
622
622
  }, He = (e) => {
623
623
  const { blockProps: o, content: t, styles: l, children: r } = e, n = { ...l, ...o };
624
- return r ? g.createElement("label", n, r) : g.createElement("label", {
624
+ return r ? y.createElement("label", n, r) : y.createElement("label", {
625
625
  ...n,
626
626
  dangerouslySetInnerHTML: { __html: t }
627
627
  });
@@ -629,7 +629,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
629
629
  type: "Label",
630
630
  label: "Label",
631
631
  category: "core",
632
- icon: G,
632
+ icon: O,
633
633
  group: "form",
634
634
  ...p({
635
635
  properties: {
@@ -645,7 +645,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
645
645
  i18nProps: ["content"]
646
646
  }, ze = (e) => {
647
647
  const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: i, checked: s, showLabel: c = !0 } = e;
648
- return c ? /* @__PURE__ */ b("div", { ...r, ...o, children: [
648
+ return c ? /* @__PURE__ */ g("div", { ...r, ...o, children: [
649
649
  /* @__PURE__ */ a("input", { ...n, name: t, type: "radio", required: i, defaultChecked: s }),
650
650
  l && /* @__PURE__ */ a("label", { htmlFor: t, children: l })
651
651
  ] }) : /* @__PURE__ */ a(
@@ -664,7 +664,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
664
664
  type: "Radio",
665
665
  label: "web_blocks.radio",
666
666
  category: "core",
667
- icon: W,
667
+ icon: Y,
668
668
  group: "form",
669
669
  ...p({
670
670
  properties: {
@@ -711,11 +711,11 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
711
711
  showLabel: c,
712
712
  _multiple: m,
713
713
  options: h,
714
- defaultValue: y
715
- } = e, k = m && y ? y.split(",").map((f) => f.trim()) : y || "";
716
- return c ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
714
+ defaultValue: b
715
+ } = e, k = m && b ? b.split(",").map((f) => f.trim()) : b || "";
716
+ return c ? /* @__PURE__ */ g("div", { ...n, ...o, children: [
717
717
  c && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
718
- /* @__PURE__ */ b(
718
+ /* @__PURE__ */ g(
719
719
  "select",
720
720
  {
721
721
  ...i,
@@ -729,7 +729,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
729
729
  ]
730
730
  }
731
731
  )
732
- ] }) : /* @__PURE__ */ b(
732
+ ] }) : /* @__PURE__ */ g(
733
733
  "select",
734
734
  {
735
735
  ...n,
@@ -748,7 +748,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
748
748
  type: "Select",
749
749
  label: "web_blocks.select",
750
750
  category: "core",
751
- icon: O,
751
+ icon: Q,
752
752
  group: "form",
753
753
  ...p({
754
754
  properties: {
@@ -815,7 +815,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
815
815
  i18nProps: ["label", "placeholder"]
816
816
  }, Fe = (e) => {
817
817
  const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: i, rows: s, showLabel: c, required: m, defaultValue: h } = e;
818
- return c ? /* @__PURE__ */ b("div", { ...n, ...o, children: [
818
+ return c ? /* @__PURE__ */ g("div", { ...n, ...o, children: [
819
819
  c && /* @__PURE__ */ a("label", { htmlFor: t, children: l }),
820
820
  /* @__PURE__ */ a(
821
821
  "textarea",
@@ -894,20 +894,20 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
894
894
  i18nProps: ["label", "placeholder"]
895
895
  }, qe = (e) => {
896
896
  const { blockProps: o, inBuilder: t, children: l, globalBlock: r } = e;
897
- return t && !r ? /* @__PURE__ */ b(
897
+ return t && !r ? /* @__PURE__ */ g(
898
898
  "div",
899
899
  {
900
900
  className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
901
901
  ...o,
902
902
  children: [
903
- /* @__PURE__ */ b("h1", { children: [
903
+ /* @__PURE__ */ g("h1", { children: [
904
904
  "Global Block - ",
905
905
  r
906
906
  ] }),
907
907
  /* @__PURE__ */ a("p", { children: "Choose a block from the sidebar to add it to this page." })
908
908
  ]
909
909
  }
910
- ) : g.createElement("span", { ...o }, l);
910
+ ) : y.createElement("span", { ...o }, l);
911
911
  }, Ze = {
912
912
  type: "GlobalBlock",
913
913
  description: "A global block component",
@@ -928,7 +928,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
928
928
  })
929
929
  }, Ge = (e) => {
930
930
  const { blockProps: o, styles: t, content: l, tag: r = "h1", children: n = null } = e;
931
- return n ? g.createElement(r, { ...t, ...o }, n) : g.createElement(r, {
931
+ return n ? y.createElement(r, { ...t, ...o }, n) : y.createElement(r, {
932
932
  ...t,
933
933
  ...o,
934
934
  dangerouslySetInnerHTML: { __html: l }
@@ -938,7 +938,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ a("div",
938
938
  description: "A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",
939
939
  label: "Heading",
940
940
  category: "core",
941
- icon: Y,
941
+ icon: J,
942
942
  group: "typography",
943
943
  ...p({
944
944
  properties: {
@@ -1004,7 +1004,7 @@ d(Qe, {
1004
1004
  category: "core",
1005
1005
  group: "table",
1006
1006
  hidden: !0,
1007
- icon: Q,
1007
+ icon: X,
1008
1008
  ...p({
1009
1009
  properties: {
1010
1010
  styles: u("")
@@ -1018,7 +1018,7 @@ d(Je, {
1018
1018
  category: "core",
1019
1019
  group: "table",
1020
1020
  hidden: !0,
1021
- icon: J,
1021
+ icon: K,
1022
1022
  ...p({
1023
1023
  properties: {
1024
1024
  styles: u("")
@@ -1032,7 +1032,7 @@ d(Xe, {
1032
1032
  category: "core",
1033
1033
  group: "table",
1034
1034
  hidden: !0,
1035
- icon: X,
1035
+ icon: ee,
1036
1036
  ...p({
1037
1037
  properties: {
1038
1038
  styles: u("")
@@ -1046,7 +1046,7 @@ d(Ke, {
1046
1046
  category: "core",
1047
1047
  group: "table",
1048
1048
  hidden: !0,
1049
- icon: K,
1049
+ icon: te,
1050
1050
  ...p({
1051
1051
  properties: {
1052
1052
  styles: u("")
@@ -1060,7 +1060,7 @@ d(et, {
1060
1060
  category: "core",
1061
1061
  group: "table",
1062
1062
  hidden: !0,
1063
- icon: ee,
1063
+ icon: oe,
1064
1064
  ...p({
1065
1065
  properties: {
1066
1066
  styles: u(""),
@@ -1119,15 +1119,15 @@ function P(e) {
1119
1119
  }
1120
1120
  return e === "TableRow" ? t() : e === "TableHead" ? l() : e === "TableBody" ? r() : [];
1121
1121
  }
1122
- const D = (e, ...o) => ({
1122
+ const F = (e, ...o) => ({
1123
1123
  ...e,
1124
1124
  className: _(e.className, ...o)
1125
1125
  }), tt = (e) => {
1126
- const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: i } = e, s = D(l, "");
1126
+ const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: i } = e, s = F(l, "");
1127
1127
  if (v(t))
1128
1128
  return /* @__PURE__ */ a(C, { inBuilder: n, className: "h-8 w-14" });
1129
1129
  const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
1130
- return g.createElement("span", {
1130
+ return y.createElement("span", {
1131
1131
  ...o,
1132
1132
  ...s,
1133
1133
  style: {
@@ -1140,7 +1140,7 @@ const D = (e, ...o) => ({
1140
1140
  type: "Icon",
1141
1141
  label: "web_blocks.icon",
1142
1142
  category: "core",
1143
- icon: te,
1143
+ icon: le,
1144
1144
  group: "media",
1145
1145
  ...p({
1146
1146
  properties: {
@@ -1165,7 +1165,7 @@ const D = (e, ...o) => ({
1165
1165
  })
1166
1166
  }, lt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==", rt = (e) => {
1167
1167
  const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height: i, width: s, lazyLoading: c, mobileWidth: m, mobileHeight: h } = e;
1168
- return v(t) ? /* @__PURE__ */ a(C, { className: "h-36" }) : /* @__PURE__ */ b("picture", { children: [
1168
+ return v(t) ? /* @__PURE__ */ a(C, { className: "h-36" }) : /* @__PURE__ */ g("picture", { children: [
1169
1169
  l && /* @__PURE__ */ a("source", { srcSet: l, media: "(max-width: 480px)", width: m, height: h }),
1170
1170
  /* @__PURE__ */ a(
1171
1171
  "img",
@@ -1185,7 +1185,7 @@ const D = (e, ...o) => ({
1185
1185
  description: "A image component",
1186
1186
  label: "Image",
1187
1187
  category: "core",
1188
- icon: oe,
1188
+ icon: re,
1189
1189
  group: "media",
1190
1190
  ...p({
1191
1191
  properties: {
@@ -1269,7 +1269,7 @@ const D = (e, ...o) => ({
1269
1269
  description: "A link component",
1270
1270
  label: "Link",
1271
1271
  category: "core",
1272
- icon: le,
1272
+ icon: ne,
1273
1273
  group: "basic",
1274
1274
  ...p({
1275
1275
  properties: {
@@ -1307,7 +1307,7 @@ const D = (e, ...o) => ({
1307
1307
  canAcceptBlock: (e) => e !== "Link"
1308
1308
  }, st = (e) => {
1309
1309
  const { blockProps: o, children: t, styles: l, tag: r, inBuilder: n } = e;
1310
- return !t && v(l == null ? void 0 : l.className) ? /* @__PURE__ */ a(C, { inBuilder: n }) : g.createElement(r || "ul", { ...o, ...l }, t);
1310
+ return !t && v(l == null ? void 0 : l.className) ? /* @__PURE__ */ a(C, { inBuilder: n }) : y.createElement(r || "ul", { ...o, ...l }, t);
1311
1311
  }, ct = {
1312
1312
  type: "List",
1313
1313
  description: "A list component",
@@ -1347,7 +1347,7 @@ const D = (e, ...o) => ({
1347
1347
  ]
1348
1348
  }, dt = (e) => {
1349
1349
  const { blockProps: o, content: t, styles: l, children: r, tag: n } = e;
1350
- return r ? g.createElement(n || "li", { ...l, ...o }, r) : g.createElement(n || "li", {
1350
+ return r ? y.createElement(n || "li", { ...l, ...o }, r) : y.createElement(n || "li", {
1351
1351
  ...l,
1352
1352
  ...o,
1353
1353
  dangerouslySetInnerHTML: { __html: t }
@@ -1356,7 +1356,7 @@ const D = (e, ...o) => ({
1356
1356
  type: "ListItem",
1357
1357
  description: "A list item component",
1358
1358
  label: "List Item",
1359
- icon: re,
1359
+ icon: ae,
1360
1360
  category: "core",
1361
1361
  group: "basic",
1362
1362
  ...p({
@@ -1378,17 +1378,17 @@ const D = (e, ...o) => ({
1378
1378
  canBeNested: (e) => e === "List" || e === "Repeater"
1379
1379
  }, ut = (e) => {
1380
1380
  const { blockProps: o, styles: t, content: l } = e;
1381
- return ue(e.children) ? g.createElement("p", {
1381
+ return ye(e.children) ? y.createElement("p", {
1382
1382
  ...t,
1383
1383
  ...o,
1384
1384
  dangerouslySetInnerHTML: { __html: l }
1385
- }) : g.createElement("p", { ...t, ...o }, e.children);
1385
+ }) : y.createElement("p", { ...t, ...o }, e.children);
1386
1386
  }, mt = {
1387
1387
  type: "Paragraph",
1388
1388
  description: "A paragraph component",
1389
1389
  label: "Paragraph",
1390
1390
  category: "core",
1391
- icon: ne,
1391
+ icon: ie,
1392
1392
  group: "typography",
1393
1393
  ...p({
1394
1394
  properties: {
@@ -1406,20 +1406,20 @@ const D = (e, ...o) => ({
1406
1406
  canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
1407
1407
  }, yt = (e) => {
1408
1408
  const { blockProps: o, inBuilder: t, children: l, partialBlockId: r } = e;
1409
- return t && !r ? /* @__PURE__ */ b(
1409
+ return t && !r ? /* @__PURE__ */ g(
1410
1410
  "div",
1411
1411
  {
1412
1412
  className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
1413
1413
  ...o,
1414
1414
  children: [
1415
- /* @__PURE__ */ b("h1", { children: [
1415
+ /* @__PURE__ */ g("h1", { children: [
1416
1416
  "Partial Block - ",
1417
1417
  r
1418
1418
  ] }),
1419
1419
  /* @__PURE__ */ a("p", { children: "Choose a block from the sidebar to add it to this page." })
1420
1420
  ]
1421
1421
  }
1422
- ) : g.createElement("span", { ...o }, l);
1422
+ ) : y.createElement("span", { ...o }, l);
1423
1423
  }, gt = {
1424
1424
  type: "PartialBlock",
1425
1425
  description: "A partial block component",
@@ -1495,7 +1495,7 @@ const D = (e, ...o) => ({
1495
1495
  label: "Column",
1496
1496
  group: "basic",
1497
1497
  category: "core",
1498
- icon: ae,
1498
+ icon: se,
1499
1499
  wrapper: !0,
1500
1500
  canDelete: () => !0,
1501
1501
  canAcceptBlock: () => !0,
@@ -1560,7 +1560,7 @@ const D = (e, ...o) => ({
1560
1560
  }
1561
1561
  })
1562
1562
  }, kt = (e) => {
1563
- const { blockProps: o, content: t, styles: l } = e, r = D(
1563
+ const { blockProps: o, content: t, styles: l } = e, r = F(
1564
1564
  l,
1565
1565
  "prose dark:prose-invert prose-p:m-0 prose-p:min-h-[1rem] prose-blockquote:m-2 prose-blockquote:ml-4 prose-ul:m-0 prose-ol:m-0 prose-li:m-0",
1566
1566
  "max-w-full"
@@ -1571,7 +1571,7 @@ const D = (e, ...o) => ({
1571
1571
  description: "A rich text block",
1572
1572
  label: "Rich Text",
1573
1573
  category: "core",
1574
- icon: ie,
1574
+ icon: ce,
1575
1575
  group: "typography",
1576
1576
  ...p({
1577
1577
  properties: {
@@ -1588,7 +1588,7 @@ const D = (e, ...o) => ({
1588
1588
  i18nProps: ["content"]
1589
1589
  }, vt = (e) => {
1590
1590
  const { blockProps: o, styles: t, content: l, children: r = null, tag: n } = e;
1591
- return r ? g.createElement("span", { ...t, ...o }, r) : g.createElement(n || "span", {
1591
+ return r ? y.createElement("span", { ...t, ...o }, r) : y.createElement(n || "span", {
1592
1592
  ...t,
1593
1593
  ...o,
1594
1594
  dangerouslySetInnerHTML: { __html: l || "" }
@@ -1620,7 +1620,7 @@ const D = (e, ...o) => ({
1620
1620
  hidden: !0,
1621
1621
  category: "core",
1622
1622
  group: "typography",
1623
- icon: se,
1623
+ icon: de,
1624
1624
  ...p({
1625
1625
  properties: {
1626
1626
  styles: u("text-black"),
@@ -1685,8 +1685,8 @@ const D = (e, ...o) => ({
1685
1685
  return null;
1686
1686
  }, Bt = (e) => {
1687
1687
  const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: i } = e, s = Lt(o, r);
1688
- return /* @__PURE__ */ b("div", { ...me(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
1689
- !s && i ? /* @__PURE__ */ a("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: v(o) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ a("iframe", { width: "100%", src: s, ...ye(l, "className") }),
1688
+ return /* @__PURE__ */ g("div", { ...D(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
1689
+ !s && i ? /* @__PURE__ */ a("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: v(o) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ a("iframe", { width: "100%", src: s, ...V(l, "className") }),
1690
1690
  i && /* @__PURE__ */ a("div", { ...t, className: "absolute top-0 h-full w-full" })
1691
1691
  ] });
1692
1692
  }, St = (e) => {
@@ -1694,7 +1694,7 @@ const D = (e, ...o) => ({
1694
1694
  let s = n;
1695
1695
  const c = [...x(r, "srcsets", []) || []];
1696
1696
  o && typeof o == "string" && c.push({ url: o, width: "9999" });
1697
- const m = c.sort((y, k) => parseInt(y.width) - parseInt(k.width)).filter((y) => !v(y.url) && !v(y.width));
1697
+ const m = c.sort((b, k) => parseInt(b.width) - parseInt(k.width)).filter((b) => !v(b.url) && !v(b.width));
1698
1698
  m.length === 0 && !s && (s = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
1699
1699
  const h = x(l, "autoplay", !1) || x(l, "muted", !0);
1700
1700
  return (s || !v(m)) && /* @__PURE__ */ a("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */ w(
@@ -1709,16 +1709,16 @@ const D = (e, ...o) => ({
1709
1709
  poster: s,
1710
1710
  ...h ? { muted: !0 } : {}
1711
1711
  },
1712
- m.map((y) => {
1713
- if (!y.url || y.url.length < 4 || isNaN(y.width)) return null;
1714
- const k = `(max-width: ${y.width}px)`;
1715
- return /* @__PURE__ */ a("source", { src: y.url, media: k, type: y.type }, y.url);
1712
+ m.map((b) => {
1713
+ if (!b.url || b.url.length < 4 || isNaN(b.width)) return null;
1714
+ const k = `(max-width: ${b.width}px)`;
1715
+ return /* @__PURE__ */ a("source", { src: b.url, media: k, type: b.type }, b.url);
1716
1716
  }),
1717
1717
  "Your browser does not support the video tag."
1718
1718
  ) });
1719
1719
  }, Nt = (e) => {
1720
1720
  const { videoSource: o } = e;
1721
- return o === "Custom" ? /* @__PURE__ */ a(St, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ a(Bt, { ...e }) : /* @__PURE__ */ b("div", { children: [
1721
+ return o === "Custom" ? /* @__PURE__ */ a(St, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ a(Bt, { ...e }) : /* @__PURE__ */ g("div", { children: [
1722
1722
  "Invalid video source : ",
1723
1723
  o
1724
1724
  ] });
@@ -1726,7 +1726,7 @@ const D = (e, ...o) => ({
1726
1726
  type: "Video",
1727
1727
  label: "Video",
1728
1728
  category: "core",
1729
- icon: ce,
1729
+ icon: pe,
1730
1730
  group: "media",
1731
1731
  ...p({
1732
1732
  properties: {
@@ -1807,15 +1807,15 @@ const D = (e, ...o) => ({
1807
1807
  }
1808
1808
  }),
1809
1809
  i18nProps: ["url"]
1810
- }, Tt = ({ styles: e }) => {
1811
- const o = V("Pagination");
1812
- return /* @__PURE__ */ a("div", { ...e, children: o ? g.createElement(o.component) : /* @__PURE__ */ b(N, { children: [
1810
+ }, Tt = (e) => {
1811
+ const { styles: o } = e, t = U("Pagination");
1812
+ return /* @__PURE__ */ a("div", { ...o, children: t ? y.createElement(t.component, { ...D(e, ["styles"]), blockProps: {} }) : /* @__PURE__ */ g(N, { children: [
1813
1813
  /* @__PURE__ */ a(
1814
1814
  "button",
1815
1815
  {
1816
1816
  className: "flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",
1817
1817
  disabled: !0,
1818
- children: /* @__PURE__ */ a(de, { className: "h-4 w-4" })
1818
+ children: /* @__PURE__ */ a(ue, { className: "h-4 w-4" })
1819
1819
  }
1820
1820
  ),
1821
1821
  /* @__PURE__ */ a("button", { className: "flex h-9 w-9 items-center justify-center rounded-md border border-blue-500 bg-blue-500 font-medium text-white", children: "1" }),
@@ -1823,24 +1823,29 @@ const D = (e, ...o) => ({
1823
1823
  /* @__PURE__ */ a("button", { className: "flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50", children: "3" }),
1824
1824
  /* @__PURE__ */ a("button", { className: "flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50", children: "4" }),
1825
1825
  /* @__PURE__ */ a("button", { className: "flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white font-medium text-gray-700 hover:bg-gray-50", children: "5" }),
1826
- /* @__PURE__ */ a("button", { className: "flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white hover:bg-gray-50", children: /* @__PURE__ */ a(pe, { className: "h-4 w-4" }) })
1826
+ /* @__PURE__ */ a("button", { className: "flex h-9 w-9 items-center justify-center rounded-md border border-gray-300 bg-white hover:bg-gray-50", children: /* @__PURE__ */ a(me, { className: "h-4 w-4" }) })
1827
1827
  ] }) });
1828
1828
  }, Rt = (e) => {
1829
- const { children: o, tag: t, styles: l, blockProps: r, $loading: n, paginationStyles: i } = e, { pagination: s, inBuilder: c } = e;
1830
- let m = o;
1831
- return v(m) && c && (m = /* @__PURE__ */ a("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Choose a collection to display items" })), t === "none" ? n && c ? Array.from({ length: 2 }).map((h, y) => /* @__PURE__ */ b("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
1829
+ const { children: o, tag: t, styles: l, blockProps: r, $loading: n } = e, { pagination: i, inBuilder: s } = e;
1830
+ let c = o;
1831
+ return v(c) && s && (c = /* @__PURE__ */ a("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Choose a collection to display items" })), t === "none" ? n && s ? Array.from({ length: 2 }).map((m, h) => /* @__PURE__ */ g("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
1832
1832
  /* @__PURE__ */ a("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
1833
1833
  /* @__PURE__ */ a("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
1834
- ] }, y)) : m : /* @__PURE__ */ b(N, { children: [
1835
- g.createElement(
1834
+ ] }, h)) : c : /* @__PURE__ */ g(N, { children: [
1835
+ y.createElement(
1836
1836
  t,
1837
1837
  { ...r, ...l },
1838
- n && c ? Array.from({ length: 2 }).map((h, y) => /* @__PURE__ */ b("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
1838
+ n && s ? Array.from({ length: 2 }).map((m, h) => /* @__PURE__ */ g("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
1839
1839
  /* @__PURE__ */ a("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
1840
1840
  /* @__PURE__ */ a("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
1841
- ] }, y)) : m
1841
+ ] }, h)) : c
1842
1842
  ),
1843
- s && /* @__PURE__ */ a(Tt, { styles: i })
1843
+ i && /* @__PURE__ */ a(
1844
+ Tt,
1845
+ {
1846
+ ...V(e, ["limit", "totalItems", "paginationStrategy", "inBuilder", "draft", "lang"])
1847
+ }
1848
+ )
1844
1849
  ] });
1845
1850
  }, At = {
1846
1851
  type: "Repeater",
@@ -1954,11 +1959,11 @@ const D = (e, ...o) => ({
1954
1959
  default:
1955
1960
  n = "div";
1956
1961
  }
1957
- return !e && r ? g.createElement(
1962
+ return !e && r ? y.createElement(
1958
1963
  n,
1959
1964
  { ...o, ...t },
1960
1965
  /* @__PURE__ */ a("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Add children to repeater item" })
1961
- ) : g.createElement(n, { ...o, ...t }, e);
1966
+ ) : y.createElement(n, { ...o, ...t }, e);
1962
1967
  }, Et = {
1963
1968
  type: "RepeaterItem",
1964
1969
  label: "Repeater Item",
@@ -1968,7 +1973,7 @@ const D = (e, ...o) => ({
1968
1973
  ...p({
1969
1974
  properties: {
1970
1975
  styles: L(""),
1971
- parentTag: F("Repeater", "tag")
1976
+ parentTag: q("Repeater", "tag")
1972
1977
  }
1973
1978
  }),
1974
1979
  canAcceptBlock: (e) => e !== "RepeaterItem",
@@ -1979,7 +1984,7 @@ const D = (e, ...o) => ({
1979
1984
  children: e,
1980
1985
  blockProps: o,
1981
1986
  styles: t
1982
- }) => g.createElement("div", { ...o, ...t }, e), $t = {
1987
+ }) => y.createElement("div", { ...o, ...t }, e), $t = {
1983
1988
  type: "RepeaterEmptyState",
1984
1989
  label: "Empty State",
1985
1990
  hidden: !0,
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "author": "Suraj Air",
6
6
  "license": "BSD-3-Clause",
7
7
  "homepage": "https://chaibuilder.com",
8
- "version": "3.0.12",
8
+ "version": "3.0.13",
9
9
  "type": "module",
10
10
  "repository": {
11
11
  "type": "git",