@chaibuilder/sdk 4.0.0-beta.8 → 4.0.0-beta.9

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.
Files changed (139) hide show
  1. package/README.md +4 -5
  2. package/dist/{2SSKDMRQ-DewwiCoQ.js → 2SSKDMRQ-CdFBQR2o.js} +2 -2
  3. package/dist/{2SSKDMRQ-DHv4u_0i.cjs → 2SSKDMRQ-CuQ42ST6.cjs} +1 -1
  4. package/dist/{AP7HFJJL-cz754qhG.cjs → AP7HFJJL-DcnEb4BE.cjs} +1 -1
  5. package/dist/{AP7HFJJL-ComnZw7J.js → AP7HFJJL-bDlWX5Yx.js} +1 -1
  6. package/dist/{IconPicker-2H9IGKMS.js → IconPicker-CNwplOGy.js} +1 -1
  7. package/dist/{IconPicker-U0Z2dWeR.cjs → IconPicker-FpyYsxOf.cjs} +1 -1
  8. package/dist/STRINGS-BExFecZW.js +8 -0
  9. package/dist/STRINGS-FNnfjF5H.cjs +1 -0
  10. package/dist/{WDYDFRGG-BfRX3M58.cjs → WDYDFRGG-BxLmjulP.cjs} +1 -1
  11. package/dist/{WDYDFRGG-vy7nMYD4.js → WDYDFRGG-CWq7H6Qk.js} +2 -2
  12. package/dist/{actions-registery-CtQSSexG.cjs → actions-registery-BRgseJas.cjs} +16 -16
  13. package/dist/{actions-registery-DqrFhSMp.js → actions-registery-DRV8xywr.js} +180 -181
  14. package/dist/actions.cjs +1 -1
  15. package/dist/actions.d.ts +112 -51
  16. package/dist/actions.js +2 -2
  17. package/dist/{active-in-another-tab-5hn17Jeq.js → active-in-another-tab-C392ZWQc.js} +2 -2
  18. package/dist/{active-in-another-tab-ijahI5qu.cjs → active-in-another-tab-DEWOFgY5.cjs} +1 -1
  19. package/dist/{add-new-language-page-DmOyPy0u.js → add-new-language-page-BL2F_Cu7.js} +3 -3
  20. package/dist/{add-new-language-page-vmNKNx-e.cjs → add-new-language-page-DBWd0wDY.cjs} +1 -1
  21. package/dist/{add-new-page-XDuCkOyb.cjs → add-new-page-DYrQeKCi.cjs} +1 -1
  22. package/dist/{add-new-page-NHScAQn8.js → add-new-page-QVlyJhn9.js} +2 -2
  23. package/dist/{ai-panel-content-CHJ0JcQI.js → ai-panel-content-CCOluPtK.js} +3 -3
  24. package/dist/{ai-panel-content-BDqW16AW.cjs → ai-panel-content-DCZRBa6s.cjs} +1 -1
  25. package/dist/{ai-panel-default-lang-HeYWpbMu.cjs → ai-panel-default-lang-C3t0elrO.cjs} +2 -2
  26. package/dist/{ai-panel-default-lang-BIomgsN0.js → ai-panel-default-lang-Crz7QAxl.js} +4 -4
  27. package/dist/{ai-panel-other-lang-BMelEs3p.cjs → ai-panel-other-lang-BRkr4Te3.cjs} +1 -1
  28. package/dist/{ai-panel-other-lang-CbAgG-qX.js → ai-panel-other-lang-DIF8PYLh.js} +4 -4
  29. package/dist/{ai-prompt-input-BH8LOVT4.js → ai-prompt-input-D4dqy8L2.js} +1 -1
  30. package/dist/{ai-prompt-input-C_GG6nwq.cjs → ai-prompt-input-Ybgvrvd6.cjs} +1 -1
  31. package/dist/{ai-translation-prompt-CkHaFv5I.cjs → ai-translation-prompt-Ck12Bfl6.cjs} +1 -1
  32. package/dist/{ai-translation-prompt-DxsNw8YR.js → ai-translation-prompt-eZ4Sllva.js} +1 -1
  33. package/dist/{apply-binding-BvWfJCSZ.js → apply-binding-CLU6Xp4K.js} +77 -81
  34. package/dist/apply-binding-NvZX_rJe.cjs +1 -0
  35. package/dist/{code-editor-CGBAc-A6.js → code-editor-D45h29W1.js} +1 -1
  36. package/dist/{code-editor-GV8ibQ4h.cjs → code-editor-DH8eU4WL.cjs} +1 -1
  37. package/dist/{continue-editing-in-this-client-Da8ab_9d.js → continue-editing-in-this-client-BRrIvSrl.js} +2 -2
  38. package/dist/{continue-editing-in-this-client-DKHP0pq8.cjs → continue-editing-in-this-client-DgZ9Q18G.cjs} +1 -1
  39. package/dist/core-8lkXy4lC.cjs +1 -0
  40. package/dist/core-BvsZwF26.js +52 -0
  41. package/dist/core.cjs +1 -1
  42. package/dist/core.d.ts +147 -87
  43. package/dist/core.js +2 -2
  44. package/dist/{css-import-modal-CcZVLsF9.js → css-import-modal-BhLPzQH8.js} +1 -1
  45. package/dist/{css-import-modal-B4j26_cO.cjs → css-import-modal-C2-oVwFv.cjs} +1 -1
  46. package/dist/{delete-design-token-DzINIVtO.js → delete-design-token-D4Q5-Xql.js} +1 -1
  47. package/dist/{delete-design-token-3-WwqXMO.cjs → delete-design-token-DJSQluQ6.cjs} +1 -1
  48. package/dist/{delete-page-B7ODELqM.cjs → delete-page-BxbsKhY5.cjs} +1 -1
  49. package/dist/{delete-page-DwZDMwfI.js → delete-page-xHdZT-7c.js} +2 -2
  50. package/dist/{design-token-usage-DQf180Lg.js → design-token-usage-7wgmVSWI.js} +1 -1
  51. package/dist/{design-token-usage-Dy08kcIc.cjs → design-token-usage-KZ4pilLm.cjs} +1 -1
  52. package/dist/{digital-asset-manager-CDy9kHZO.js → digital-asset-manager-BmbVU7fX.js} +3 -3
  53. package/dist/{digital-asset-manager-C7subULa.cjs → digital-asset-manager-a1fqrQVH.cjs} +1 -1
  54. package/dist/{duplicate-page-DTnSztlr.js → duplicate-page-5uIno9Yh.js} +3 -3
  55. package/dist/{duplicate-page-CWQ9aMd9.cjs → duplicate-page-BBTxn_o1.cjs} +1 -1
  56. package/dist/{dynamic-page-selector-DJuxLcsM.cjs → dynamic-page-selector-C1ef0i2I.cjs} +1 -1
  57. package/dist/{dynamic-page-selector-DYW3ov_u.js → dynamic-page-selector-rhvhg7ol.js} +2 -2
  58. package/dist/{image-editor-DLeSST0K.js → image-editor-BXYZDa0s.js} +1 -1
  59. package/dist/{image-editor-C4H3AkZK.cjs → image-editor-rqUgAO8V.cjs} +1 -1
  60. package/dist/{index-D5d4QDq7.js → index-Be9lAaD7.js} +420 -422
  61. package/dist/index-BhqugjzS.cjs +160 -0
  62. package/dist/index-CNEEEgTV.cjs +5 -0
  63. package/dist/{index-BK0xWO1z.js → index-mjuSGlPU.js} +440 -447
  64. package/dist/{json-diff-viewer-g6SY62bl.cjs → json-diff-viewer-C9qmLiaq.cjs} +1 -1
  65. package/dist/{json-diff-viewer-BYHieVod.js → json-diff-viewer-aVwY7_hZ.js} +2 -2
  66. package/dist/{lang-panel-BG1GMn-1.js → lang-panel-BTWk23Mw.js} +3 -3
  67. package/dist/{lang-panel-Dm1eOO2J.cjs → lang-panel-Bo1ZWYfu.cjs} +1 -1
  68. package/dist/{manage-design-tokens-BdWQUHhw.js → manage-design-tokens-id8bylgO.js} +3 -3
  69. package/dist/manage-design-tokens-lUMCgjdS.cjs +1 -0
  70. package/dist/{mark-as-template-DUFnfVM3.cjs → mark-as-template-BYXBDXMv.cjs} +1 -1
  71. package/dist/{mark-as-template-D2XxagVO.js → mark-as-template-hv3WD852.js} +2 -2
  72. package/dist/{nested-path-selector-content-Wd6-Eql0.js → nested-path-selector-content-B8z90MFF.js} +1 -1
  73. package/dist/{nested-path-selector-content-CQOx2L9C.cjs → nested-path-selector-content-DgFFXcTD.cjs} +1 -1
  74. package/dist/{no-language-page-content-C11uF6hs.cjs → no-language-page-content-6Kk8UjFX.cjs} +1 -1
  75. package/dist/{no-language-page-content-BOv6TZIk.js → no-language-page-content-DMACzysm.js} +2 -2
  76. package/dist/{no-language-page-dialog-DIXyKRJq.js → no-language-page-dialog-D4n_XYUq.js} +2 -2
  77. package/dist/{no-language-page-dialog-CY5XhXsC.cjs → no-language-page-dialog-mBH-fthh.cjs} +1 -1
  78. package/dist/{page-creator-zSUFF4eT.cjs → page-creator-CGglYnYg.cjs} +1 -1
  79. package/dist/{page-creator-WX9lMrJY.js → page-creator-CgsOF0Eg.js} +3 -3
  80. package/dist/{page-lock-D9miLZjm.js → page-lock-CUCEBnJb.js} +2 -2
  81. package/dist/{page-lock-DGhR_url.cjs → page-lock-Hsi61Mk5.cjs} +1 -1
  82. package/dist/{page-locked-dialog-DTLnbfuP.cjs → page-locked-dialog-DSxbAMpt.cjs} +1 -1
  83. package/dist/{page-locked-dialog-CNCUCcvH.js → page-locked-dialog-bHvbFllT.js} +2 -2
  84. package/dist/{page-manager-new-Dd2c-Q_O.cjs → page-manager-new-CBfFl5rL.cjs} +1 -1
  85. package/dist/{page-manager-new-BFFOLh-l.js → page-manager-new-Cifc526h.js} +7 -7
  86. package/dist/{page-manager-search-and-filter-C1IWF_4d.js → page-manager-search-and-filter-CLJss6pV.js} +2 -2
  87. package/dist/{page-manager-search-and-filter-BKdQUJ2W.cjs → page-manager-search-and-filter-mEKl-UKh.cjs} +1 -1
  88. package/dist/{page-revisions-content-D0cflnj1.cjs → page-revisions-content-C95dQJyx.cjs} +1 -1
  89. package/dist/{page-revisions-content-DHapiLck.js → page-revisions-content-DvL4ya9g.js} +3 -3
  90. package/dist/pages.cjs +1 -1
  91. package/dist/pages.d.ts +146 -93
  92. package/dist/pages.js +1 -1
  93. package/dist/{publish-pages-content-BqLcnKry.cjs → publish-pages-content-B-6vSkql.cjs} +1 -1
  94. package/dist/{publish-pages-content-Bd2zJHtK.js → publish-pages-content-B8-IZW_U.js} +3 -3
  95. package/dist/render.cjs +1 -1
  96. package/dist/render.d.ts +12 -14
  97. package/dist/render.js +3 -3
  98. package/dist/{rte-widget-modal-RS8PMKOn.js → rte-widget-modal-1SbY5bcQ.js} +1 -1
  99. package/dist/{rte-widget-modal-DiB5BjH1.cjs → rte-widget-modal-CyKwtbOG.cjs} +1 -1
  100. package/dist/runtime.cjs +1 -1
  101. package/dist/runtime.d.ts +91 -77
  102. package/dist/runtime.js +57 -56
  103. package/dist/{save-to-lib--6ZXHEbC.js → save-to-lib-BKcBfjfi.js} +2 -2
  104. package/dist/{save-to-lib-BXJvaC1N.cjs → save-to-lib-BmPh_Vns.cjs} +1 -1
  105. package/dist/{selected-block-display-CUnCqXQw.js → selected-block-display-B3hHlcLA.js} +2 -2
  106. package/dist/{selected-block-display-BfpJda4h.cjs → selected-block-display-BCvTNcp2.cjs} +1 -1
  107. package/dist/{seo-panel-Bs-FcY1A.js → seo-panel-D3EyOYij.js} +2 -2
  108. package/dist/{seo-panel-CQITMfZ6.cjs → seo-panel-DVClgzX9.cjs} +1 -1
  109. package/dist/{shared-json-ld-DDXXi-Mj.cjs → shared-json-ld-BRgJTv0m.cjs} +1 -1
  110. package/dist/{shared-json-ld-7EujD341.js → shared-json-ld-DSPadwbY.js} +2 -2
  111. package/dist/{slug-input-CsVJAr7r.cjs → slug-input-B39SPBdP.cjs} +1 -1
  112. package/dist/{slug-input-DoEIq5rs.js → slug-input-C3UrwSkt.js} +1 -1
  113. package/dist/supabase-actions.cjs +1 -1
  114. package/dist/supabase-actions.js +1 -1
  115. package/dist/{take-over-request-C14kJ356.js → take-over-request-DfAlPvpE.js} +2 -2
  116. package/dist/{take-over-request-D5Oo3MPo.cjs → take-over-request-Tq9-gOCV.cjs} +1 -1
  117. package/dist/{theme-panel-footer-Dvknelm8.js → theme-panel-footer-DIy4baYU.js} +2 -2
  118. package/dist/{theme-panel-footer-Eeibz2JA.cjs → theme-panel-footer-DQzjVBBP.cjs} +1 -1
  119. package/dist/{translation-warning-modal-YlzP2XoO.js → translation-warning-modal-BHwLZZOw.js} +1 -1
  120. package/dist/{translation-warning-modal-CPzdHzqq.cjs → translation-warning-modal-Ckwt5Skc.cjs} +1 -1
  121. package/dist/types.cjs +1 -0
  122. package/dist/types.d.ts +598 -0
  123. package/dist/types.js +1 -0
  124. package/dist/{unmark-as-template-BGDwuCnv.cjs → unmark-as-template-BKA-sNZr.cjs} +1 -1
  125. package/dist/{unmark-as-template-CPJvQk7L.js → unmark-as-template-CbgifSbI.js} +2 -2
  126. package/dist/{unpublish-page-BMowW5wT.cjs → unpublish-page-BqzvOD76.cjs} +1 -1
  127. package/dist/{unpublish-page-DlFHLlmI.js → unpublish-page-DXQpAkvc.js} +2 -2
  128. package/dist/utils.d.ts +5 -5
  129. package/dist/web-blocks.cjs +1 -1
  130. package/dist/web-blocks.js +237 -237
  131. package/dist/{web-preview-BUnv3jIc.js → web-preview-DH7Yv-jg.js} +1 -1
  132. package/dist/{web-preview-D8GQHCjs.cjs → web-preview-DShy13AM.cjs} +1 -1
  133. package/package.json +6 -1
  134. package/dist/apply-binding-IsUf6UWJ.cjs +0 -1
  135. package/dist/core-Dr7QYemB.js +0 -56
  136. package/dist/core-Y0lXLwkq.cjs +0 -1
  137. package/dist/index-BRJCj7c_.cjs +0 -5
  138. package/dist/index-Bm8iS2OH.cjs +0 -160
  139. package/dist/manage-design-tokens-XWs_B6jo.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("lodash-es"),r=require("react/jsx-runtime"),a=require("./runtime.cjs"),B=require("./common-functions-B3a4xKt_.cjs"),x=require("react"),m=require("@radix-ui/react-icons"),d=require("./core-Y0lXLwkq.cjs");function L(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const b=L(x),C=({className:e="",inBuilder:o})=>o?r.jsx("div",{className:B.cn("pointer-events-none flex h-20 flex-col items-center justify-center p-2",e),children:r.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800",children:r.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,_=e=>{const{blockProps:o,inBuilder:t,backgroundImage:l,children:i,tag:s="div",styles:n}=e;let c=i;i||(c=r.jsx(C,{inBuilder:t}));let p={};return l&&(p={backgroundImage:`url(${l})`}),b.createElement(s,{...o,...n,style:p},c)},N={type:"Box",description:"Similar to a div or section elements in HTML",label:"Box",category:"core",group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.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","ui:allowEmpty":!0}}}}),canAcceptBlock:()=>!0},T=e=>{const{blockProps:o,iconSize:t,icon:l,content:i,styles:s,children:n,iconPos:c,link:p,inBuilder:g}=e,h=l,k=n||r.jsxs(r.Fragment,{children:[i&&r.jsx("span",{children:i}),h&&r.jsx("div",{style:{width:t+"px"},className:c+" "+(i?c==="order-first"?"mr-2":"ml-2":"")||"",dangerouslySetInnerHTML:{__html:h}})]}),f=x.createElement("button",{...o,...s,type:"button","aria-label":i},k);return u.isEmpty(u.get(p,"href"))?f:g?r.jsx("span",{children:f}):r.jsx("a",{"aria-label":i,href:u.get(p,"href")||"/",target:u.get(p,"target","_self"),children:f})},E={type:"Button",description:"similar to a button element in HTML",label:"Button",category:"core",icon:m.ButtonIcon,group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.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"],enumNames:["Left","Right"]},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"]},R=e=>{const{blockProps:o,styles:t,htmlCode:l,inBuilder:i}=e;return i?r.jsxs("div",{className:"relative",...o,children:[i?r.jsx("div",{...t,className:"absolute z-20 h-full w-full"}):null,b.createElement("div",{...t,dangerouslySetInnerHTML:{__html:l.replace(/<script.*?>.*?<\/script>/g,"")}})]}):b.createElement("div",{...o,...t,dangerouslySetInnerHTML:{__html:l}})},A={type:"CustomHTML",description:"similar to a div or section elements in HTML",label:"Custom HTML",category:"core",icon:m.CodeIcon,group:"advanced",...a.registerChaiBlockSchema({properties:{styles:a.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:l}=e;return t?r.jsx("div",{...l,children:r.jsx("div",{className:B.cn("pointer-events-none flex flex-col items-center justify-center p-2",""),children:r.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800",children:r.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"})})})}):r.jsx("div",{dangerouslySetInnerHTML:{__html:o}})},H={type:"CustomScript",description:"similar to a script element in HTML",label:"Custom Script",category:"core",icon:m.CodeIcon,hidden:!0,group:"advanced",...a.registerChaiBlockSchema({properties:{scripts:{type:"string",title:"Script",default:"",format:"code",placeholder:"<script>console.log('Hello, world!');<\/script>"}}})},$=e=>{const{blockProps:o,inBuilder:t,children:l,globalBlock:i}=e;return t&&!i?r.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:[r.jsxs("h1",{children:["Global Block - ",i]}),r.jsx("p",{children:"Choose a block from the sidebar to add it to this page."})]}):b.createElement("span",{...o},l)},D={type:"GlobalBlock",description:"A global block component",label:"Global Block",icon:m.FrameIcon,category:"core",group:"basic",hidden:!0,...a.registerChaiBlockSchema({properties:{globalBlock:{type:"string",title:"Global Block",default:"",ui:{"ui:widget":"hidden"}}}})},v=(e,...o)=>({...e,className:B.cn(e.className,...o)}),V=e=>{const{blockProps:o,icon:t,styles:l,width:i,inBuilder:s,height:n}=e,c=v(l,"");if(u.isEmpty(t))return r.jsx(C,{inBuilder:s,className:"h-8 w-14"});const p=t.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return b.createElement("span",{...o,...c,style:{width:i?`${i}px`:"auto",height:n?`${n}px`:"auto"},dangerouslySetInnerHTML:{__html:p}})},z={type:"Icon",label:"web_blocks.icon",category:"core",description:"Icon block is used to display an icon/svg.",icon:m.SketchLogoIcon,group:"media",...a.registerChaiBlockSchema({properties:{styles:a.StylesProp(""),icon:{type:"string",title:"Icon",default:'<svg xmlns="http://www.w3.org/2000/svg" class="chai-default-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-diamond-icon lucide-diamond"><path d="M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z"/></svg>',ui:{"ui:widget":"icon"}},width:{type:"number",default:16,title:"Width"},height:{type:"number",default:16,title:"Height"}}})},U=e=>{const{blockProps:o,inBuilder:t,children:l,partialBlockId:i}=e;return t&&!i?r.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:[r.jsxs("h1",{children:["Partial Block - ",i]}),r.jsx("p",{children:"Choose a block from the sidebar to add it to this page."})]}):b.createElement("span",{...o},l)},F={type:"PartialBlock",description:"A partial block component. Partial blocks are global blocks that can be used in multiple pages.",label:"Partial Block",icon:m.FrameIcon,category:"core",group:"basic",hidden:!0,...a.registerChaiBlockSchema({properties:{partialBlockId:{type:"string",title:"Partial Block",default:"",ui:{"ui:widget":"hidden"}}}})},w={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"}},q=e=>{const{blockProps:o,children:t,styles:l,colSpan:i,tabletColSpan:s,desktopColSpan:n}=e,p={className:[u.get(l,"className",""),u.get(w,["SMALL",isNaN(i)||!i?6:i],""),s?u.get(w,["MEDIUM",s||i],""):"",n?u.get(w,["LARGE",s||i],""):""].join(" ")};return r.jsx("div",{...o,...l,...p,children:t||r.jsx("div",{className:"h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900"})})},O={type:"Column",description:"A column component",label:"Column",group:"basic",category:"core",icon:m.LayoutIcon,wrapper:!0,hidden:!0,canDelete:()=>!0,canAcceptBlock:()=>!0,canBeNested:e=>e==="Row",...a.registerChaiBlockSchema({properties:{styles:a.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]}}})},Z=e=>{const{blockProps:o,children:t,styles:l,gutter:i}=e,n={className:[u.get(l,"className","")," grid grid-cols-12"].join()};return typeof(l==null?void 0:l.style)=="object"&&l.style!==null?n.style={...l.style,gap:`${i}px`}:n.style={gap:`${i}px`},r.jsx("div",{...o,...l,...n,children:t})},G={type:"Row",description:"A row component",label:"Row",group:"basic",icon:m.RowsIcon,hidden:!0,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",...a.registerChaiBlockSchema({properties:{styles:a.StylesProp(""),colCount:{type:"number",default:2,minimum:0,ui:{"ui:widget":"colCount"}},gutter:{type:"number",title:"Gutter (in px)",default:16,minimum:0}}})},W=e=>{const{blockProps:o,styles:t}=e;return x.createElement("hr",{...t,...o})},Y={type:"Divider",description:"A horizontal line component",label:"Divider",category:"core",icon:m.DividerHorizontalIcon,group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.StylesProp("bg-gray-900 h-0.5 py-2 my-1")}})},Q=e=>{const{blockProps:o,styles:t,backgroundImage:l}=e;let i={};return l&&(i={backgroundImage:`url(${l})`}),b.createElement("div",{...o,...t,style:i})},J={type:"EmptyBox",description:"A box component with no children",label:"Empty Box",category:"core",group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.StylesProp(""),backgroundImage:{type:"string",title:"Background Image",default:"",ui:{"ui:widget":"image","ui:allowEmpty":!0}}}})},X=e=>{const{blockProps:o,fieldName:t,label:l,styles:i,inputStyles:s,required:n,checked:c,showLabel:p=!0}=e;return p?r.jsxs("div",{...i,...o,children:[r.jsx("input",{...s,name:t,type:"checkbox",required:n,defaultChecked:c}),l&&r.jsx("label",{htmlFor:t,children:l})]}):r.jsx("input",{name:t,...o,...s,...i,type:"checkbox",required:n,defaultChecked:c})},K={type:"Checkbox",label:"web_blocks.checkbox",category:"core",icon:m.CheckboxIcon,group:"form",...a.registerChaiBlockSchema({properties:{styles:a.StylesProp("flex items-center gap-x-2"),inputStyles:a.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{children:o,blockProps:t,errorMessage:l,successMessage:i,action:s,styles:n,inBuilder:c}=e;let p=o;o||(p=r.jsx(C,{inBuilder:c}));const g={"x-data":"{}","x-on:submit.prevent":"post"},h={"x-html":"",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return r.jsxs("form",{...g,"data-error":l,"data-success":i,method:"post",action:s,...t,...n,children:[r.jsx("div",{...h}),p]})},te={type:"Form",label:"Form",category:"core",icon:m.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,"}],...a.registerChaiBlockSchema({properties:{styles:a.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},oe=e=>{const{blockProps:o,inBuilder:t,label:l,styles:i,icon:s,iconSize:n,iconPos:c}=e;return r.jsxs("button",{...i,...o||{},type:t?"button":"submit","aria-label":l,children:[l,s&&r.jsx("div",{style:{width:n+"px"},className:c+" "+(c==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:s}})]})},le={type:"FormButton",label:"Submit Button",category:"core",icon:m.ButtonIcon,group:"form",...a.registerChaiBlockSchema({properties:{styles:a.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"]},re=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},ie=e=>{const{blockProps:o,fieldName:t,label:l,placeholder:i,styles:s,inputStyles:n,showLabel:c,required:p,inputType:g,defaultValue:h}=e,{type:k,autocomplete:f}=re(g);return c?r.jsxs("div",{...s,...o,children:[c&&r.jsx("label",{htmlFor:t,children:l}),r.jsx("input",{name:t,defaultValue:h,...n,type:k,placeholder:i,required:p,autoComplete:f})]}):r.jsx("input",{name:t,...o,...n,...s,type:k,placeholder:i,required:p,autoComplete:f,defaultValue:h})},se={type:"Input",label:"web_blocks.input",category:"core",icon:m.InputIcon,group:"form",...a.registerChaiBlockSchema({properties:{styles:a.StylesProp(""),inputStyles:a.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"]},ae=e=>{const{blockProps:o,content:t,styles:l,children:i}=e,s={...l,...o};return i?b.createElement("label",s,i):b.createElement("label",{...s,dangerouslySetInnerHTML:{__html:t}})},ne={type:"Label",label:"Label",category:"core",icon:m.LetterCaseToggleIcon,group:"form",...a.registerChaiBlockSchema({properties:{styles:a.StylesProp(),content:{type:"string",title:"Content",default:""}}}),aiProps:["content"],i18nProps:["content"]},ce=e=>{const{blockProps:o,fieldName:t,label:l,styles:i,inputStyles:s,required:n,checked:c,showLabel:p=!0}=e;return p?r.jsxs("div",{...i,...o,children:[r.jsx("input",{...s,name:t,type:"radio",required:n,defaultChecked:c}),l&&r.jsx("label",{htmlFor:t,children:l})]}):r.jsx("input",{name:t,...o,...s,...i,type:"radio",required:n,checked:c})},pe={type:"Radio",label:"web_blocks.radio",category:"core",icon:m.RadiobuttonIcon,group:"form",...a.registerChaiBlockSchema({properties:{styles:a.StylesProp("flex items-center gap-x-2"),inputStyles:a.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"]},de=e=>{const{blockProps:o,fieldName:t,label:l,placeholder:i,styles:s,inputStyles:n,required:c,showLabel:p,_multiple:g,options:h,defaultValue:k}=e,f=g&&k?k.split(",").map(y=>y.trim()):k||"";return p?r.jsxs("div",{...s,...o,children:[p&&r.jsx("label",{htmlFor:t,children:l}),r.jsxs("select",{...n,required:c,multiple:g,name:t,defaultValue:f,children:[r.jsx("option",{value:"",disabled:!0,hidden:!0,children:i}),u.map(h,y=>r.jsx("option",{value:y==null?void 0:y.value,children:y==null?void 0:y.label},y==null?void 0:y.value))]})]}):r.jsxs("select",{...s,...o,required:c,multiple:g,name:t,defaultValue:f,children:[r.jsx("option",{value:"",disabled:!0,hidden:!0,children:i}),u.map(h,y=>r.jsx("option",{value:y==null?void 0:y.value,children:y==null?void 0:y.label},y==null?void 0:y.value))]})},ue={type:"Select",label:"web_blocks.select",category:"core",icon:m.DropdownMenuIcon,group:"form",...a.registerChaiBlockSchema({properties:{styles:a.StylesProp(""),inputStyles:a.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"]},me=e=>{const{blockProps:o,fieldName:t,label:l,placeholder:i,styles:s,inputStyles:n,rows:c,showLabel:p,required:g,defaultValue:h}=e;return p?r.jsxs("div",{...s,...o,children:[p&&r.jsx("label",{htmlFor:t,children:l}),r.jsx("textarea",{name:t,...n,placeholder:i,rows:c,required:g,defaultValue:h})]}):r.jsx("textarea",{name:t,...o,...n,...s,placeholder:i,rows:c,required:g,defaultValue:h})},ye={type:"TextArea",label:"web_blocks.textarea",category:"core",icon:m.InputIcon,group:"form",...a.registerChaiBlockSchema({properties:{fieldName:{type:"string",title:"Field Name",default:"fieldName"},styles:a.StylesProp(""),inputStyles:a.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"]},ge=e=>{const{blockProps:o,styles:t,content:l,tag:i="h1",children:s=null}=e;return s?b.createElement(i,{...t,...o},s):b.createElement(i,{...t,...o,dangerouslySetInnerHTML:{__html:l}})},he={type:"Heading",description:"A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",label:"Heading",category:"core",icon:m.HeadingIcon,group:"typography",...a.registerChaiBlockSchema({properties:{tag:{type:"string",default:"h2",title:"Level",enum:["h1","h2","h3","h4","h5","h6"]},styles:a.StylesProp("text-3xl"),content:{type:"string",default:"Heading goes here",title:"Content",ui:{"ui:widget":"textarea","ui:rows":3}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:()=>!0},be=e=>{const{blockProps:o,styles:t}=e;return x.createElement("br",{...o,...t})},fe={type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,...a.registerChaiBlockSchema({properties:{styles:a.StylesProp("")}}),canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},xe=e=>{const{blockProps:o,children:t,styles:l}=e;return t?x.createElement("table",{...o,...l},t):r.jsx(C,{})},ke=e=>{const{blockProps:o,children:t,styles:l}=e;return t?x.createElement("thead",{...o,...l},t):r.jsx(C,{})},Ce=e=>{const{blockProps:o,children:t,styles:l}=e;return t?x.createElement("tbody",{...o,...l},t):r.jsx(C,{})},Be=e=>{const{blockProps:o,children:t,styles:l}=e;return t?x.createElement("tr",{...o,...l},t):r.jsx(C,{})},Se=e=>{const{blockProps:o,children:t,content:l,styles:i}=e;return!t&&u.isEmpty(l)?r.jsx(C,{}):t?x.createElement("td",{...o,...i},t):x.createElement("td",{...o,...i,dangerouslySetInnerHTML:{__html:l}})};d.registerChaiBlock(xe,{type:"Table",label:"Table",category:"core",group:"table",hidden:!0,icon:m.TableIcon,...a.registerChaiBlockSchema({properties:{styles:a.StylesProp("")}}),blocks:S("Table")});d.registerChaiBlock(ke,{type:"TableHead",label:"Table Head",category:"core",group:"table",hidden:!0,icon:m.BorderTopIcon,...a.registerChaiBlockSchema({properties:{styles:a.StylesProp("")}}),blocks:S("TableHead")});d.registerChaiBlock(Ce,{type:"TableBody",label:"Table Body",category:"core",group:"table",hidden:!0,icon:m.BorderAllIcon,...a.registerChaiBlockSchema({properties:{styles:a.StylesProp("")}}),blocks:S("TableBody")});d.registerChaiBlock(Be,{type:"TableRow",label:"Table Row",category:"core",group:"table",hidden:!0,icon:m.ViewHorizontalIcon,...a.registerChaiBlockSchema({properties:{styles:a.StylesProp("")}}),blocks:S("TableRow")});d.registerChaiBlock(Se,{type:"TableCell",label:"Table Cell",category:"core",group:"table",hidden:!0,icon:m.DragHandleHorizontalIcon,...a.registerChaiBlockSchema({properties:{styles:a.StylesProp(""),content:{type:"string",default:"Heading goes here",title:"Content",ui:{"ui:widget":"textarea"}}}}),blocks:S("TableCell"),i18nProps:["content"],aiProps:["content"]});function S(e){const o=(s,n)=>({_id:B.generateUUID(),_parent:s,_type:"TableCell",styles:"#styles:,",content:`${e==="TableHead"?"Table Head":"Table Cell "+n}`}),t=s=>{const n=B.generateUUID(),c={_type:"TableRow",_id:n,styles:"#styles:,border-b"};return s&&(c._parent=s),[c,o(n,"1"),o(n,"2"),o(n,"3")]},l=s=>{const n=B.generateUUID(),c={_id:n,_type:"TableHead",styles:"#styles:,font-medium"};return s&&(c._parent=s),[c,...t(n)]},i=s=>{const n=B.generateUUID(),c={_id:n,_type:"TableBody",styles:"#styles:,"};return s&&(c._parent=s),[c,...t(n),...t(n)]};if(e==="Table"){const s=B.generateUUID();return[{_id:s,_type:"Table",styles:"#styles:,w-full text-left text-gray-500 dark:text-gray-400"},...l(s),...i(s)]}return e==="TableRow"?t():e==="TableHead"?l():e==="TableBody"?i():[]}const we="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==",Pe=e=>{const{blockProps:o,image:t,mobileImage:l,styles:i,alt:s,height:n,width:c,lazyLoading:p,mobileWidth:g,mobileHeight:h}=e;return u.isEmpty(t)?r.jsx(C,{className:"h-36"}):r.jsxs("picture",{children:[l&&r.jsx("source",{srcSet:l,media:"(max-width: 480px)",width:g,height:h}),r.jsx("img",{...o,...i,src:t,alt:s,loading:p?"lazy":"eager",width:c,height:n})]})},ve={type:"Image",description:"A image component",label:"Image",category:"core",icon:m.ImageIcon,group:"media",...a.registerChaiBlockSchema({properties:{styles:a.StylesProp("w-full h-full object-cover"),image:{type:"string",title:"Image",default:we,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"]},Ie=e=>{const{blockProps:o,link:t,children:l,styles:i,inBuilder:s,content:n}=e;let c={};return!l&&u.isEmpty(n)&&(c={minHeight:"50px",display:"flex",alignItems:"center",justifyContent:"center"}),s?l?r.jsx("span",{role:"link",...o,style:c,...i,children:l}):x.createElement("span",{...o,...i,style:c,role:"link"},n):l?r.jsx("a",{"aria-label":n,href:(t==null?void 0:t.href)||"#/",target:t==null?void 0:t.target,...o,...i,children:l}):x.createElement("a",{...o,...i,href:(t==null?void 0:t.href)||"#",target:(t==null?void 0:t.target)||"_self","aria-label":n},n)},je={type:"Link",description:"A link component",label:"Link",category:"core",icon:m.Link1Icon,group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.StylesProp("block"),content:{type:"string",default:"Link text 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"},Le=e=>{const{blockProps:o,children:t,styles:l,tag:i,inBuilder:s}=e;return!t&&u.isEmpty(l==null?void 0:l.className)?r.jsx(C,{inBuilder:s}):b.createElement(i||"ul",{...o,...l},t)},_e={type:"List",description:"A list component",label:"List",icon:m.RowsIcon,category:"core",group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.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"}]},Ne=e=>{const{blockProps:o,content:t,styles:l,children:i,tag:s}=e;return i?b.createElement(s||"li",{...l,...o},i):b.createElement(s||"li",{...l,...o,dangerouslySetInnerHTML:{__html:t}})},Te={type:"ListItem",description:"A list item component",label:"List Item",icon:m.ColumnsIcon,category:"core",group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.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"},Ee=e=>{const{blockProps:o,styles:t,content:l}=e;if(!u.isNull(e.children))return b.createElement("p",{...t,...o},e.children);const i=v(t,"rte");return b.createElement("div",{...i,...o,dangerouslySetInnerHTML:{__html:l}})},Re={type:"Paragraph",description:"A paragraph component",label:"Paragraph",category:"core",icon:m.TextIcon,group:"typography",...a.registerChaiBlockSchema({properties:{styles:a.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":"richtext","ui:autosize":!0,"ui:rows":5}}}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e==="Span"||e==="Link"||e==="Text"},Ae=e=>{const{blockProps:o,content:t,styles:l}=e,i=v(l,"rte");return r.jsx("div",{...o,...i,dangerouslySetInnerHTML:{__html:t}})},Me={type:"RichText",description:"A rich text block",label:"Rich Text",hidden:!0,category:"core",icon:m.CursorTextIcon,group:"typography",...a.registerChaiBlockSchema({properties:{styles:a.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"]},He=e=>{const{blockProps:o,styles:t,content:l,children:i=null,tag:s}=e;return i?b.createElement("span",{...t,...o},i):b.createElement(s||"span",{...t,...o,dangerouslySetInnerHTML:{__html:l||""}})},$e={type:"Span",description:"A span component",label:"Span",category:"core",group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.StylesProp(""),content:{type:"string",title:"Content",default:"",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:()=>!0},De=e=>e.inBuilder||e.forceWrapper?r.jsx("span",{...e.blockProps,children:e.content}):`${e.content}`,Ve={type:"Text",description:"A text component with no styling",label:"Text",category:"core",group:"typography",blocks:()=>[{_id:"a",_type:"Text",_name:"Text",content:""}],icon:m.SpaceBetweenVerticallyIcon,...a.registerChaiBlockSchema({properties:{styles:a.StylesProp("text-black"),content:{title:"Content",type:"string",default:""}}}),aiProps:["content"],i18nProps:["content"]},P={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}}},I=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,j=/(?: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),l=u.get(o,"controls",!1),i=u.get(o,"loop",!1),s=t||u.get(o,"muted",!0);if(I.test(e)){const n=e.match(I);if(n){const c=n[4];let p=`https://www.youtube.com/embed/${c}`,g=t?"autoplay=1":"";return g+=i?`&loop=1&playlist=${c}`:"",g+=s?"&mute=1&muted=1":"",g+=l?"&controls=1":"&controls=0",`${p}?${g}`}}if(j.test(e)){const n=e.match(j);if(n){const c=n[1];let p="";return p+=t?"autoplay=1":"",p+=l?"&controls=1":"&controls=0",p+=s?"&muted=1":"",p+=i?"&loop=1":"",`https://player.vimeo.com/video/${c}?${p}`}}return null},Ue=e=>{const{url:o,blockProps:t,styles:l,controls:i,videoSource:s,inBuilder:n,title:c}=e,p=ze(o,i);return r.jsxs("div",{...u.omit(l,"className"),className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[!p&&n?r.jsx("div",{className:"absolute flex h-full w-full items-center justify-center bg-gray-300 text-center",children:u.isEmpty(o)?`Provided ${s} video link in settings Video URL.`:`Provided ${s} video link is invalid.`}):r.jsx("iframe",{width:"100%",src:p??"",title:c||"Video player",...u.pick(l,"className")}),n&&r.jsx("div",{...t,className:"absolute top-0 h-full w-full"})]})},Fe=e=>{const{url:o,styles:t,controls:l,sources:i,poster:s,blockProps:n,title:c}=e;let p=s;const g=[...u.get(i,"srcsets",[])||[]];o&&typeof o=="string"&&g.push({url:o,width:9999});const h=g.sort((f,y)=>f.width-y.width).filter(f=>!u.isEmpty(f.url)&&!u.isEmpty(f.width));h.length===0&&!p&&(p="https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");const k=u.get(l,"autoplay",!1)||u.get(l,"muted",!0);return(p||!u.isEmpty(h))&&r.jsx("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:x.createElement("video",{...t,...n,title:c||"Video player",key:JSON.stringify(h),controls:u.get(l,"controls",!1),autoPlay:u.get(l,"autoplay",!1),loop:u.get(l,"loop",!1),poster:p,...k?{muted:!0}:{}},h.map(f=>{if(!f.url||f.url.length<4||isNaN(f.width))return null;const y=`(max-width: ${f.width}px)`;return r.jsx("source",{src:f.url,media:y,type:f.type},f.url)}),"Your browser does not support the video tag.")})},qe=e=>{const{videoSource:o}=e;return o==="Custom"?r.jsx(Fe,{...e}):o==="Youtube"||o==="Vimeo"?r.jsx(Ue,{...e}):r.jsxs("div",{children:["Invalid video source : ",o]})},Oe={type:"Video",label:"Video",category:"core",icon:m.VideoIcon,group:"media",...a.registerChaiBlockSchema({properties:{styles:a.StylesProp("absolute h-full w-full object-cover"),videoSource:{type:"string",default:"Custom",enum:["Custom","Youtube","Vimeo"],title:"Video source"},title:{type:"string",title:"Video Title",default:"Video player"}},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:{...P}}}},{if:{properties:{videoSource:{const:"Youtube"}}},then:{properties:{url:{type:"string",title:"Youtube Video URL",default:""},controls:{...P}}}},{if:{properties:{videoSource:{const:"Vimeo"}}},then:{properties:{url:{type:"string",title:"Vimeo Video URL",default:""},controls:{...P}}}}],ui:{url:{"ui:placeholder":"Enter Video URL"},sources:{"ui:field":"sources"},poster:{"ui:placeholder":"Enter poster URL"}}}),i18nProps:["url","title"]},Ze=e=>{const{paginationStyles:o}=e,t=d.getRegisteredChaiBlock("Pagination");return r.jsx("div",{...o,children:t?b.createElement(t.component,{...u.omit(e,["paginationStyles"]),blockProps:{}}):r.jsxs(r.Fragment,{children:[r.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:r.jsx(m.ChevronLeftIcon,{className:"h-4 w-4"})}),r.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"}),r.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"}),r.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"}),r.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"}),r.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"}),r.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:r.jsx(m.ChevronRightIcon,{className:"h-4 w-4"})})]})})},Ge=e=>{const{children:o,tag:t,styles:l,blockProps:i,$loading:s}=e,{pagination:n,inBuilder:c}=e;let p=o;return u.isEmpty(p)&&c&&(p=r.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"?s&&c?Array.from({length:2}).map((g,h)=>r.jsxs("div",{className:"animate-pulse rounded-md bg-primary/10 p-5",children:[r.jsx("div",{className:"h-6 w-1/2 rounded-md bg-primary/10"}),r.jsx("div",{className:"mt-2 h-4 w-1/2 rounded-md bg-primary/10"})]},h)):p:r.jsxs(r.Fragment,{children:[b.createElement(t,{...i,...l},s&&c?Array.from({length:2}).map((g,h)=>r.jsxs("div",{className:"animate-pulse rounded-md bg-primary/10 p-5",children:[r.jsx("div",{className:"h-6 w-1/2 rounded-md bg-primary/10"}),r.jsx("div",{className:"mt-2 h-4 w-1/2 rounded-md bg-primary/10"})]},h)):p),n&&r.jsx(Ze,{...u.pick(e,["limit","totalItems","paginationStrategy","inBuilder","draft","lang","paginationStyles"])})]})},We={type:"Repeater",label:"Repeater",icon:m.LoopIcon,group:"basic",description:"Repeater block is used to display a list of items based on data binding in repeaterItems",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"}],...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),paginationStyles:a.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"},Ye=({children:e,blockProps:o,styles:t,parentTag:l,inBuilder:i})=>{let s="li";switch(l){case"ul":s="li";break;case"ol":s="li";break;default:s="div"}return!e&&i?b.createElement(s,{...o,...t},r.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"})):b.createElement(s,{...o,...t},e)},Qe={type:"RepeaterItem",label:"Repeater Item",icon:m.LoopIcon,hidden:!0,group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp(""),parentTag:d.closestBlockProp("Repeater","tag")}}),canAcceptBlock:e=>e!=="RepeaterItem",canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},Je=({children:e,blockProps:o,styles:t})=>b.createElement("div",{...o,...t},e),Xe={type:"RepeaterEmptyState",label:"Empty State",hidden:!0,group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("p-5 flex items-center justify-center")}}),canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},Ke=()=>{d.registerChaiBlock(_,N),d.registerChaiBlock(Q,J),d.registerChaiBlock(T,E),d.registerChaiBlock(ge,he),d.registerChaiBlock(Ee,Re),d.registerChaiBlock(He,$e),d.registerChaiBlock(Ae,Me),d.registerChaiBlock(Ie,je),d.registerChaiBlock(Le,_e),d.registerChaiBlock(Ne,Te),d.registerChaiBlock(V,z),d.registerChaiBlock(Pe,ve),d.registerChaiBlock(qe,Oe),d.registerChaiBlock(R,A),d.registerChaiBlock(M,H),d.registerChaiBlock(De,Ve),d.registerChaiBlock(ee,te),d.registerChaiBlock(oe,le),d.registerChaiBlock(ie,se),d.registerChaiBlock(X,K),d.registerChaiBlock(ce,pe),d.registerChaiBlock(de,ue),d.registerChaiBlock(me,ye),d.registerChaiBlock(ae,ne),d.registerChaiBlock(be,fe),d.registerChaiBlock(W,Y),d.registerChaiBlock($,D),d.registerChaiBlock(U,F),d.registerChaiBlock(Z,G),d.registerChaiBlock(q,O),d.registerChaiBlock(Ge,We),d.registerChaiBlock(Ye,Qe),d.registerChaiBlock(Je,Xe)};exports.loadWebBlocks=Ke;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("lodash-es"),r=require("react/jsx-runtime"),a=require("./runtime.cjs"),B=require("./common-functions-B3a4xKt_.cjs"),x=require("react"),m=require("@radix-ui/react-icons"),d=require("./core-8lkXy4lC.cjs");function L(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const b=L(x),C=({className:e="",inBuilder:o})=>o?r.jsx("div",{className:B.cn("pointer-events-none flex h-20 flex-col items-center justify-center p-2",e),children:r.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800",children:r.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,_=e=>{const{blockProps:o,inBuilder:t,backgroundImage:l,children:s,tag:i="div",styles:n}=e;let c=s;s||(c=r.jsx(C,{inBuilder:t}));let p={};return l&&(p={backgroundImage:`url(${l})`}),b.createElement(i,{...o,...n,style:p},c)},N={type:"Box",description:"Similar to a div or section elements in HTML",label:"Box",category:"core",group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.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","ui:allowEmpty":!0}}}}),canAcceptBlock:()=>!0},T=e=>{const{blockProps:o,iconSize:t,icon:l,content:s,styles:i,children:n,iconPos:c,link:p,inBuilder:g}=e,h=l,k=n||r.jsxs(r.Fragment,{children:[s&&r.jsx("span",{children:s}),h&&r.jsx("div",{style:{width:t+"px"},className:c+" "+(s?c==="order-first"?"mr-2":"ml-2":"")||"",dangerouslySetInnerHTML:{__html:h}})]}),f=x.createElement("button",{...o,...i,type:"button","aria-label":s},k);return u.isEmpty(u.get(p,"href"))?f:g?r.jsx("span",{children:f}):r.jsx("a",{"aria-label":s,href:u.get(p,"href")||"/",target:u.get(p,"target","_self"),children:f})},E={type:"Button",description:"similar to a button element in HTML",label:"Button",category:"core",icon:m.ButtonIcon,group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.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"],enumNames:["Left","Right"]},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"]},R=e=>{const{blockProps:o,styles:t,htmlCode:l,inBuilder:s}=e;return s?r.jsxs("div",{className:"relative",...o,children:[s?r.jsx("div",{...t,className:"absolute z-20 h-full w-full"}):null,b.createElement("div",{...t,dangerouslySetInnerHTML:{__html:l.replace(/<script.*?>.*?<\/script>/g,"")}})]}):b.createElement("div",{...o,...t,dangerouslySetInnerHTML:{__html:l}})},A={type:"CustomHTML",description:"similar to a div or section elements in HTML",label:"Custom HTML",category:"core",icon:m.CodeIcon,group:"advanced",...a.registerChaiBlockSchema({properties:{styles:a.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:l}=e;return t?r.jsx("div",{...l,children:r.jsx("div",{className:B.cn("pointer-events-none flex flex-col items-center justify-center p-2",""),children:r.jsx("div",{className:"h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800",children:r.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"})})})}):r.jsx("div",{dangerouslySetInnerHTML:{__html:o}})},H={type:"CustomScript",description:"similar to a script element in HTML",label:"Custom Script",category:"core",icon:m.CodeIcon,hidden:!0,group:"advanced",...a.registerChaiBlockSchema({properties:{scripts:{type:"string",title:"Script",default:"",format:"code",placeholder:"<script>console.log('Hello, world!');<\/script>"}}})},$=e=>{const{blockProps:o,inBuilder:t,children:l,globalBlock:s}=e;return t&&!s?r.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:[r.jsxs("h1",{children:["Global Block - ",s]}),r.jsx("p",{children:"Choose a block from the sidebar to add it to this page."})]}):b.createElement("span",{...o},l)},D={type:"GlobalBlock",description:"A global block component",label:"Global Block",icon:m.FrameIcon,category:"core",group:"basic",hidden:!0,...a.registerChaiBlockSchema({properties:{globalBlock:{type:"string",title:"Global Block",default:"",ui:{"ui:widget":"hidden"}}}})},S=(e,...o)=>({...e,className:B.cn(e.className,...o)}),V=e=>{const{blockProps:o,icon:t,styles:l,width:s,inBuilder:i,height:n}=e,c=S(l,"");if(u.isEmpty(t))return r.jsx(C,{inBuilder:i,className:"h-8 w-14"});const p=t.replace(/<svg /g,'<svg class="w-[inherit] h-[inherit]" ');return b.createElement("span",{...o,...c,style:{width:s?`${s}px`:"auto",height:n?`${n}px`:"auto"},dangerouslySetInnerHTML:{__html:p}})},z={type:"Icon",label:"web_blocks.icon",category:"core",description:"Icon block is used to display an icon/svg.",icon:m.SketchLogoIcon,group:"media",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp(""),icon:{type:"string",title:"Icon",default:'<svg xmlns="http://www.w3.org/2000/svg" class="chai-default-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-diamond-icon lucide-diamond"><path d="M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z"/></svg>',ui:{"ui:widget":"icon"}},width:{type:"number",default:16,title:"Width"},height:{type:"number",default:16,title:"Height"}}})},U=e=>{const{blockProps:o,inBuilder:t,children:l,partialBlockId:s}=e;return t&&!s?r.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:[r.jsxs("h1",{children:["Partial Block - ",s]}),r.jsx("p",{children:"Choose a block from the sidebar to add it to this page."})]}):b.createElement("span",{...o},l)},F={type:"PartialBlock",description:"A partial block component. Partial blocks are global blocks that can be used in multiple pages.",label:"Partial Block",icon:m.FrameIcon,category:"core",group:"basic",hidden:!0,...a.registerChaiBlockSchema({properties:{partialBlockId:{type:"string",title:"Partial Block",default:"",ui:{"ui:widget":"hidden"}}}})},P={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"}},q=e=>{const{blockProps:o,children:t,styles:l,colSpan:s,tabletColSpan:i,desktopColSpan:n}=e,p={className:[u.get(l,"className",""),u.get(P,["SMALL",isNaN(s)||!s?6:s],""),i?u.get(P,["MEDIUM",i||s],""):"",n?u.get(P,["LARGE",i||s],""):""].join(" ")};return r.jsx("div",{...o,...l,...p,children:t||r.jsx("div",{className:"h-full min-h-12 w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900"})})},O={type:"Column",description:"A column component",label:"Column",group:"basic",category:"core",icon:m.LayoutIcon,wrapper:!0,hidden:!0,canDelete:()=>!0,canAcceptBlock:()=>!0,canBeNested:e=>e==="Row",...a.registerChaiBlockSchema({properties:{styles:a.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]}}})},Z=e=>{const{blockProps:o,children:t,styles:l,gutter:s}=e,n={className:[u.get(l,"className","")," grid grid-cols-12"].join()};return typeof(l==null?void 0:l.style)=="object"&&l.style!==null?n.style={...l.style,gap:`${s}px`}:n.style={gap:`${s}px`},r.jsx("div",{...o,...l,...n,children:t})},G={type:"Row",description:"A row component",label:"Row",group:"basic",icon:m.RowsIcon,hidden:!0,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",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp(""),colCount:{type:"number",default:2,minimum:0,ui:{"ui:widget":"colCount"}},gutter:{type:"number",title:"Gutter (in px)",default:16,minimum:0}}})},W=e=>{const{blockProps:o,styles:t}=e;return x.createElement("hr",{...t,...o})},Y={type:"Divider",description:"A horizontal line component",label:"Divider",category:"core",icon:m.DividerHorizontalIcon,group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("bg-gray-900 h-0.5 py-2 my-1")}})},Q=e=>{const{blockProps:o,styles:t,backgroundImage:l}=e;let s={};return l&&(s={backgroundImage:`url(${l})`}),b.createElement("div",{...o,...t,style:s})},J={type:"EmptyBox",description:"A box component with no children",label:"Empty Box",category:"core",group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp(""),backgroundImage:{type:"string",title:"Background Image",default:"",ui:{"ui:widget":"image","ui:allowEmpty":!0}}}})},X=e=>{const{blockProps:o,fieldName:t,label:l,styles:s,inputStyles:i,required:n,checked:c,showLabel:p=!0}=e;return p?r.jsxs("div",{...s,...o,children:[r.jsx("input",{...i,name:t,type:"checkbox",required:n,defaultChecked:c}),l&&r.jsx("label",{htmlFor:t,children:l})]}):r.jsx("input",{name:t,...o,...i,...s,type:"checkbox",required:n,defaultChecked:c})},K={type:"Checkbox",label:"web_blocks.checkbox",category:"core",icon:m.CheckboxIcon,group:"form",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("flex items-center gap-x-2"),inputStyles:a.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{children:o,blockProps:t,errorMessage:l,successMessage:s,action:i,styles:n,inBuilder:c}=e;let p=o;o||(p=r.jsx(C,{inBuilder:c}));const g={"x-data":"{}","x-on:submit.prevent":"post"},h={"x-html":"",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return r.jsxs("form",{...g,"data-error":l,"data-success":s,method:"post",action:i,...t,...n,children:[r.jsx("div",{...h}),p]})},te={type:"Form",label:"Form",category:"core",icon:m.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,"}],...a.registerChaiBlockSchema({properties:{styles:a.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},oe=e=>{const{blockProps:o,inBuilder:t,label:l,styles:s,icon:i,iconSize:n,iconPos:c}=e;return r.jsxs("button",{...s,...o||{},type:t?"button":"submit","aria-label":l,children:[l,i&&r.jsx("div",{style:{width:n+"px"},className:c+" "+(c==="order-first"?"mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:i}})]})},le={type:"FormButton",label:"Submit Button",category:"core",icon:m.ButtonIcon,group:"form",...a.registerChaiBlockSchema({properties:{styles:a.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"]},re=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},se=e=>{const{blockProps:o,fieldName:t,label:l,placeholder:s,styles:i,inputStyles:n,showLabel:c,required:p,inputType:g,defaultValue:h}=e,{type:k,autocomplete:f}=re(g);return c?r.jsxs("div",{...i,...o,children:[c&&r.jsx("label",{htmlFor:t,children:l}),r.jsx("input",{name:t,defaultValue:h,...n,type:k,placeholder:s,required:p,autoComplete:f})]}):r.jsx("input",{name:t,...o,...n,...i,type:k,placeholder:s,required:p,autoComplete:f,defaultValue:h})},ie={type:"Input",label:"web_blocks.input",category:"core",icon:m.InputIcon,group:"form",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp(""),inputStyles:a.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"]},ae=e=>{const{blockProps:o,content:t,styles:l,children:s}=e,i={...l,...o};return s?b.createElement("label",i,s):b.createElement("label",{...i,dangerouslySetInnerHTML:{__html:t}})},ne={type:"Label",label:"Label",category:"core",icon:m.LetterCaseToggleIcon,group:"form",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp(),content:{type:"string",title:"Content",default:""}}}),aiProps:["content"],i18nProps:["content"]},ce=e=>{const{blockProps:o,fieldName:t,label:l,styles:s,inputStyles:i,required:n,checked:c,showLabel:p=!0}=e;return p?r.jsxs("div",{...s,...o,children:[r.jsx("input",{...i,name:t,type:"radio",required:n,defaultChecked:c}),l&&r.jsx("label",{htmlFor:t,children:l})]}):r.jsx("input",{name:t,...o,...i,...s,type:"radio",required:n,checked:c})},pe={type:"Radio",label:"web_blocks.radio",category:"core",icon:m.RadiobuttonIcon,group:"form",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("flex items-center gap-x-2"),inputStyles:a.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"]},de=e=>{const{blockProps:o,fieldName:t,label:l,placeholder:s,styles:i,inputStyles:n,required:c,showLabel:p,_multiple:g,options:h,defaultValue:k}=e,f=g&&k?k.split(",").map(y=>y.trim()):k||"";return p?r.jsxs("div",{...i,...o,children:[p&&r.jsx("label",{htmlFor:t,children:l}),r.jsxs("select",{...n,required:c,multiple:g,name:t,defaultValue:f,children:[r.jsx("option",{value:"",disabled:!0,hidden:!0,children:s}),u.map(h,y=>r.jsx("option",{value:y==null?void 0:y.value,children:y==null?void 0:y.label},y==null?void 0:y.value))]})]}):r.jsxs("select",{...i,...o,required:c,multiple:g,name:t,defaultValue:f,children:[r.jsx("option",{value:"",disabled:!0,hidden:!0,children:s}),u.map(h,y=>r.jsx("option",{value:y==null?void 0:y.value,children:y==null?void 0:y.label},y==null?void 0:y.value))]})},ue={type:"Select",label:"web_blocks.select",category:"core",icon:m.DropdownMenuIcon,group:"form",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp(""),inputStyles:a.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"]},me=e=>{const{blockProps:o,fieldName:t,label:l,placeholder:s,styles:i,inputStyles:n,rows:c,showLabel:p,required:g,defaultValue:h}=e;return p?r.jsxs("div",{...i,...o,children:[p&&r.jsx("label",{htmlFor:t,children:l}),r.jsx("textarea",{name:t,...n,placeholder:s,rows:c,required:g,defaultValue:h})]}):r.jsx("textarea",{name:t,...o,...n,...i,placeholder:s,rows:c,required:g,defaultValue:h})},ye={type:"TextArea",label:"web_blocks.textarea",category:"core",icon:m.InputIcon,group:"form",...a.registerChaiBlockSchema({properties:{fieldName:{type:"string",title:"Field Name",default:"fieldName"},styles:a.stylesProp(""),inputStyles:a.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"]},ge=e=>{const{blockProps:o,styles:t,content:l,tag:s="h1",children:i=null}=e;return i?b.createElement(s,{...t,...o},i):b.createElement(s,{...t,...o,dangerouslySetInnerHTML:{__html:l}})},he={type:"Heading",description:"A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",label:"Heading",category:"core",icon:m.HeadingIcon,group:"typography",...a.registerChaiBlockSchema({properties:{tag:{type:"string",default:"h2",title:"Level",enum:["h1","h2","h3","h4","h5","h6"]},styles:a.stylesProp("text-3xl"),content:{type:"string",default:"Heading goes here",title:"Content",ui:{"ui:widget":"textarea","ui:rows":3}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:()=>!0},be=e=>{const{blockProps:o,styles:t}=e;return x.createElement("br",{...o,...t})},fe={type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("")}}),canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},xe=e=>{const{blockProps:o,children:t,styles:l}=e;return t?x.createElement("table",{...o,...l},t):r.jsx(C,{})},ke=e=>{const{blockProps:o,children:t,styles:l}=e;return t?x.createElement("thead",{...o,...l},t):r.jsx(C,{})},Ce=e=>{const{blockProps:o,children:t,styles:l}=e;return t?x.createElement("tbody",{...o,...l},t):r.jsx(C,{})},Be=e=>{const{blockProps:o,children:t,styles:l}=e;return t?x.createElement("tr",{...o,...l},t):r.jsx(C,{})},we=e=>{const{blockProps:o,children:t,content:l,styles:s}=e;return!t&&u.isEmpty(l)?r.jsx(C,{}):t?x.createElement("td",{...o,...s},t):x.createElement("td",{...o,...s,dangerouslySetInnerHTML:{__html:l}})};d.registerChaiBlock(xe,{type:"Table",label:"Table",category:"core",group:"table",hidden:!0,icon:m.TableIcon,...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("")}}),blocks:w("Table")});d.registerChaiBlock(ke,{type:"TableHead",label:"Table Head",category:"core",group:"table",hidden:!0,icon:m.BorderTopIcon,...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("")}}),blocks:w("TableHead")});d.registerChaiBlock(Ce,{type:"TableBody",label:"Table Body",category:"core",group:"table",hidden:!0,icon:m.BorderAllIcon,...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("")}}),blocks:w("TableBody")});d.registerChaiBlock(Be,{type:"TableRow",label:"Table Row",category:"core",group:"table",hidden:!0,icon:m.ViewHorizontalIcon,...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("")}}),blocks:w("TableRow")});d.registerChaiBlock(we,{type:"TableCell",label:"Table Cell",category:"core",group:"table",hidden:!0,icon:m.DragHandleHorizontalIcon,...a.registerChaiBlockSchema({properties:{styles:a.stylesProp(""),content:{type:"string",default:"Heading goes here",title:"Content",ui:{"ui:widget":"textarea"}}}}),blocks:w("TableCell"),i18nProps:["content"],aiProps:["content"]});function w(e){const o=(i,n)=>({_id:B.generateUUID(),_parent:i,_type:"TableCell",styles:"#styles:,",content:`${e==="TableHead"?"Table Head":"Table Cell "+n}`}),t=i=>{const n=B.generateUUID(),c={_type:"TableRow",_id:n,styles:"#styles:,border-b"};return i&&(c._parent=i),[c,o(n,"1"),o(n,"2"),o(n,"3")]},l=i=>{const n=B.generateUUID(),c={_id:n,_type:"TableHead",styles:"#styles:,font-medium"};return i&&(c._parent=i),[c,...t(n)]},s=i=>{const n=B.generateUUID(),c={_id:n,_type:"TableBody",styles:"#styles:,"};return i&&(c._parent=i),[c,...t(n),...t(n)]};if(e==="Table"){const i=B.generateUUID();return[{_id:i,_type:"Table",styles:"#styles:,w-full text-left text-gray-500 dark:text-gray-400"},...l(i),...s(i)]}return e==="TableRow"?t():e==="TableHead"?l():e==="TableBody"?s():[]}const Pe="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==",ve=e=>{const{blockProps:o,image:t,mobileImage:l,styles:s,alt:i,height:n,width:c,lazyLoading:p,mobileWidth:g,mobileHeight:h}=e;return u.isEmpty(t)?r.jsx(C,{className:"h-36"}):r.jsxs("picture",{children:[l&&r.jsx("source",{srcSet:l,media:"(max-width: 480px)",width:g,height:h}),r.jsx("img",{...o,...s,src:t,alt:i,loading:p?"lazy":"eager",width:c,height:n})]})},Se={type:"Image",description:"A image component",label:"Image",category:"core",icon:m.ImageIcon,group:"media",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("w-full h-full object-cover"),image:{type:"string",title:"Image",default:Pe,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"]},Ie=e=>{const{blockProps:o,link:t,children:l,styles:s,inBuilder:i,content:n}=e;let c={};return!l&&u.isEmpty(n)&&(c={minHeight:"50px",display:"flex",alignItems:"center",justifyContent:"center"}),i?l?r.jsx("span",{role:"link",...o,style:c,...s,children:l}):x.createElement("span",{...o,...s,style:c,role:"link"},n):l?r.jsx("a",{"aria-label":n,href:(t==null?void 0:t.href)||"#/",target:t==null?void 0:t.target,...o,...s,children:l}):x.createElement("a",{...o,...s,href:(t==null?void 0:t.href)||"#",target:(t==null?void 0:t.target)||"_self","aria-label":n},n)},je={type:"Link",description:"A link component",label:"Link",category:"core",icon:m.Link1Icon,group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("block"),content:{type:"string",default:"Link text 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"},Le=e=>{const{blockProps:o,children:t,styles:l,tag:s,inBuilder:i}=e;return!t&&u.isEmpty(l==null?void 0:l.className)?r.jsx(C,{inBuilder:i}):b.createElement(s||"ul",{...o,...l},t)},_e={type:"List",description:"A list component",label:"List",icon:m.RowsIcon,category:"core",group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.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"}]},Ne=e=>{const{blockProps:o,content:t,styles:l,children:s,tag:i}=e;return s?b.createElement(i||"li",{...l,...o},s):b.createElement(i||"li",{...l,...o,dangerouslySetInnerHTML:{__html:t}})},Te={type:"ListItem",description:"A list item component",label:"List Item",icon:m.ColumnsIcon,category:"core",group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.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"},Ee=e=>{const{blockProps:o,styles:t,content:l}=e;if(!u.isNull(e.children))return b.createElement("p",{...t,...o},e.children);const s=S(t,"rte");return b.createElement("div",{...s,...o,dangerouslySetInnerHTML:{__html:l}})},Re={type:"Paragraph",description:"A paragraph component",label:"Paragraph",category:"core",icon:m.TextIcon,group:"typography",...a.registerChaiBlockSchema({properties:{styles:a.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":"richtext","ui:autosize":!0,"ui:rows":5}}}}),i18nProps:["content"],aiProps:["content"],canAcceptBlock:e=>e==="Span"||e==="Link"||e==="Text"},Ae=e=>{const{blockProps:o,content:t,styles:l}=e,s=S(l,"rte");return r.jsx("div",{...o,...s,dangerouslySetInnerHTML:{__html:t}})},Me={type:"RichText",description:"A rich text block",label:"Rich Text",hidden:!0,category:"core",icon:m.CursorTextIcon,group:"typography",...a.registerChaiBlockSchema({properties:{styles:a.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"]},He=e=>{const{blockProps:o,styles:t,content:l,children:s=null,tag:i}=e;return s?b.createElement("span",{...t,...o},s):b.createElement(i||"span",{...t,...o,dangerouslySetInnerHTML:{__html:l||""}})},$e={type:"Span",description:"A span component",label:"Span",category:"core",group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp(""),content:{type:"string",title:"Content",default:"",ui:{"ui:widget":"textarea","ui:autosize":!0,"ui:rows":3}}}}),aiProps:["content"],i18nProps:["content"],canAcceptBlock:()=>!0},De=e=>e.inBuilder||e.forceWrapper?r.jsx("span",{...e.blockProps,children:e.content}):`${e.content}`,Ve={type:"Text",description:"A text component with no styling",label:"Text",category:"core",group:"typography",blocks:()=>[{_id:"a",_type:"Text",_name:"Text",content:""}],icon:m.SpaceBetweenVerticallyIcon,...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("text-black"),content:{title:"Content",type:"string",default:""}}}),aiProps:["content"],i18nProps:["content"]},v={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}}},I=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,j=/(?: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),l=u.get(o,"controls",!1),s=u.get(o,"loop",!1),i=t||u.get(o,"muted",!0);if(I.test(e)){const n=e.match(I);if(n){const c=n[4];let p=`https://www.youtube.com/embed/${c}`,g=t?"autoplay=1":"";return g+=s?`&loop=1&playlist=${c}`:"",g+=i?"&mute=1&muted=1":"",g+=l?"&controls=1":"&controls=0",`${p}?${g}`}}if(j.test(e)){const n=e.match(j);if(n){const c=n[1];let p="";return p+=t?"autoplay=1":"",p+=l?"&controls=1":"&controls=0",p+=i?"&muted=1":"",p+=s?"&loop=1":"",`https://player.vimeo.com/video/${c}?${p}`}}return null},Ue=e=>{const{url:o,blockProps:t,styles:l,controls:s,videoSource:i,inBuilder:n,title:c}=e,p=ze(o,s);return r.jsxs("div",{...u.omit(l,"className"),className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[!p&&n?r.jsx("div",{className:"absolute flex h-full w-full items-center justify-center bg-gray-300 text-center",children:u.isEmpty(o)?`Provided ${i} video link in settings Video URL.`:`Provided ${i} video link is invalid.`}):r.jsx("iframe",{width:"100%",src:p??"",title:c||"Video player",...u.pick(l,"className")}),n&&r.jsx("div",{...t,className:"absolute top-0 h-full w-full"})]})},Fe=e=>{const{url:o,styles:t,controls:l,sources:s,poster:i,blockProps:n,title:c}=e;let p=i;const g=[...u.get(s,"srcsets",[])||[]];o&&typeof o=="string"&&g.push({url:o,width:9999});const h=g.sort((f,y)=>f.width-y.width).filter(f=>!u.isEmpty(f.url)&&!u.isEmpty(f.width));h.length===0&&!p&&(p="https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");const k=u.get(l,"autoplay",!1)||u.get(l,"muted",!0);return(p||!u.isEmpty(h))&&r.jsx("div",{className:"relative w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:x.createElement("video",{...t,...n,title:c||"Video player",key:JSON.stringify(h),controls:u.get(l,"controls",!1),autoPlay:u.get(l,"autoplay",!1),loop:u.get(l,"loop",!1),poster:p,...k?{muted:!0}:{}},h.map(f=>{if(!f.url||f.url.length<4||isNaN(f.width))return null;const y=`(max-width: ${f.width}px)`;return r.jsx("source",{src:f.url,media:y,type:f.type},f.url)}),"Your browser does not support the video tag.")})},qe=e=>{const{videoSource:o}=e;return o==="Custom"?r.jsx(Fe,{...e}):o==="Youtube"||o==="Vimeo"?r.jsx(Ue,{...e}):r.jsxs("div",{children:["Invalid video source : ",o]})},Oe={type:"Video",label:"Video",category:"core",icon:m.VideoIcon,group:"media",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("absolute h-full w-full object-cover"),videoSource:{type:"string",default:"Custom",enum:["Custom","Youtube","Vimeo"],title:"Video source"},title:{type:"string",title:"Video Title",default:"Video player"}},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:{...v}}}},{if:{properties:{videoSource:{const:"Youtube"}}},then:{properties:{url:{type:"string",title:"Youtube Video URL",default:""},controls:{...v}}}},{if:{properties:{videoSource:{const:"Vimeo"}}},then:{properties:{url:{type:"string",title:"Vimeo Video URL",default:""},controls:{...v}}}}],ui:{url:{"ui:placeholder":"Enter Video URL"},sources:{"ui:field":"sources"},poster:{"ui:placeholder":"Enter poster URL"}}}),i18nProps:["url","title"]},Ze=e=>{const{paginationStyles:o}=e,t=d.getRegisteredChaiBlock("Pagination");return r.jsx("div",{...o,children:t?b.createElement(t.component,{...u.omit(e,["paginationStyles"]),blockProps:{}}):r.jsxs(r.Fragment,{children:[r.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:r.jsx(m.ChevronLeftIcon,{className:"h-4 w-4"})}),r.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"}),r.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"}),r.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"}),r.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"}),r.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"}),r.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:r.jsx(m.ChevronRightIcon,{className:"h-4 w-4"})})]})})},Ge=e=>{const{children:o,tag:t,styles:l,blockProps:s,$loading:i}=e,{pagination:n,inBuilder:c}=e;let p=o;return u.isEmpty(p)&&c&&(p=r.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"?i&&c?Array.from({length:2}).map((g,h)=>r.jsxs("div",{className:"animate-pulse rounded-md bg-primary/10 p-5",children:[r.jsx("div",{className:"h-6 w-1/2 rounded-md bg-primary/10"}),r.jsx("div",{className:"mt-2 h-4 w-1/2 rounded-md bg-primary/10"})]},h)):p:r.jsxs(r.Fragment,{children:[b.createElement(t,{...s,...l},i&&c?Array.from({length:2}).map((g,h)=>r.jsxs("div",{className:"animate-pulse rounded-md bg-primary/10 p-5",children:[r.jsx("div",{className:"h-6 w-1/2 rounded-md bg-primary/10"}),r.jsx("div",{className:"mt-2 h-4 w-1/2 rounded-md bg-primary/10"})]},h)):p),n&&r.jsx(Ze,{...u.pick(e,["limit","totalItems","paginationStrategy","inBuilder","draft","lang","paginationStyles"])})]})},We={type:"Repeater",label:"Repeater",icon:m.LoopIcon,group:"basic",description:"Repeater block is used to display a list of items based on data binding in repeaterItems",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"}],...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),paginationStyles:a.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"},Ye=({children:e,blockProps:o,styles:t,parentTag:l,inBuilder:s})=>{let i="li";switch(l){case"ul":i="li";break;case"ol":i="li";break;default:i="div"}return!e&&s?b.createElement(i,{...o,...t},r.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"})):b.createElement(i,{...o,...t},e)},Qe={type:"RepeaterItem",label:"Repeater Item",icon:m.LoopIcon,hidden:!0,group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp(""),parentTag:d.closestBlockProp("Repeater","tag")}}),canAcceptBlock:e=>e!=="RepeaterItem",canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},Je=({children:e,blockProps:o,styles:t})=>b.createElement("div",{...o,...t},e),Xe={type:"RepeaterEmptyState",label:"Empty State",hidden:!0,group:"basic",...a.registerChaiBlockSchema({properties:{styles:a.stylesProp("p-5 flex items-center justify-center")}}),canAcceptBlock:()=>!0,canDelete:()=>!1,canMove:()=>!1,canDuplicate:()=>!1},Ke=()=>{d.registerChaiBlock(_,N),d.registerChaiBlock(Q,J),d.registerChaiBlock(T,E),d.registerChaiBlock(ge,he),d.registerChaiBlock(Ee,Re),d.registerChaiBlock(He,$e),d.registerChaiBlock(Ae,Me),d.registerChaiBlock(Ie,je),d.registerChaiBlock(Le,_e),d.registerChaiBlock(Ne,Te),d.registerChaiBlock(V,z),d.registerChaiBlock(ve,Se),d.registerChaiBlock(qe,Oe),d.registerChaiBlock(R,A),d.registerChaiBlock(M,H),d.registerChaiBlock(De,Ve),d.registerChaiBlock(ee,te),d.registerChaiBlock(oe,le),d.registerChaiBlock(se,ie),d.registerChaiBlock(X,K),d.registerChaiBlock(ce,pe),d.registerChaiBlock(de,ue),d.registerChaiBlock(me,ye),d.registerChaiBlock(ae,ne),d.registerChaiBlock(be,fe),d.registerChaiBlock(W,Y),d.registerChaiBlock($,D),d.registerChaiBlock(U,F),d.registerChaiBlock(Z,G),d.registerChaiBlock(q,O),d.registerChaiBlock(Ge,We),d.registerChaiBlock(Ye,Qe),d.registerChaiBlock(Je,Xe)};exports.loadWebBlocks=Ke;