PageSourceSearch

https://barhana.com/_next/static/chunks/9425.6bf7b8bc5de757c2.js

js barhana.com collected 2026-10-08 19:11:40 UTC 463,137 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9425,8500,538,672,2886,1025,5362,9871,6285],{60672:function(e,t,l){"use strict";l.r(t);var i=l(85893);l(54705);var n=l(49268),o=l(20761),s=l(67294),a=l(2030);let Calendly=e=>{let{backgroundColor:t,padding:l,overflow:s,container:a,border:r,borderRadius:d,boxShadow:c,widgetWidth:u,widgetHeight:p,calendlyUrl:h,hideLandingPageDetails:v,hideEventTypeDetails:g,hideGdprBanner:x,calendlyBackgroundColor:m,calendlyTextolor:k,calendlyPrimaryColor:f}=e,rgbToHex=e=>{if((null==e?void 0:e.r)!==void 0)return"#"+componentToHex(parseInt(e.r))+componentToHex(parseInt(e.g))+componentToHex(parseInt(e.b))},componentToHex=e=>{let t=e.toString(16);return 1==t.length?"0"+t:t};return(0,i.jsx)("div",{style:{width:"100%",height:"100%",...(0,n.lG)(l),background:(0,n.ad)(t),...(0,n.J$)(a),...(0,n.Fj)(r),borderRadius:(0,n.Wl)(d),boxShadow:(0,n.tX)(c),overflow:s},children:u&&(0,i.jsx)(o.KS,{styles:{width:(0,n.o3)(u),height:(0,n.o3)(p)},url:h,pageSettings:{hideLandingPageDetails:"true"===v,hideEventTypeDetails:"true"===g,hideGdprBanner:"true"===x,backgroundColor:rgbToHex(m),textColor:rgbToHex(k),primaryColor:rgbToHex(f)}})})};Calendly.displayName="Calendly",Calendly.schema=a._,t.default=(0,s.memo)(Calendly)},8500:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return C}});var i=l(85893),n=l(45407),o=l(67294),s=l(9473),a=l(54402),r=l(24722),d=l(16370),c=l(22052),u=l(31567),p=l(63998);let CustomMenuSection=e=>{var t;let{sections:l,menuId:n,level:h}=e,{blockId:v,sectionPage:g,menuItemPage:x,showType:m,show86Type:k,filterSectionsByGuestFacing:f,filterMenuItemsByGuestFacing:y,filterSectionsByTags:b,filterMenuItemsByTags:w,listLength:j,listOffset:C}=e.props,L=(0,s.v9)(e=>e.usersList.kanvas,c.Z),I=(0,s.v9)(e=>e.usersList.callBacks,c.Z),S=(0,s.v9)(e=>e.usersList.orderHeaderLocations,c.Z),E=(0,s.v9)(e=>e.usersList.menuItemLocations,c.Z),N=(0,s.v9)(e=>e.usersList.menuType,c.Z),T=(0,s.v9)(e=>e.usersList.searchFilter,c.Z),M=(0,s.v9)(e=>e.usersList.language,c.Z),D=(0,s.v9)(e=>e.usersList.locationValues,c.Z),P=null==D?void 0:null===(t=D.concepts)||void 0===t?void 0:t.find(e=>{var t,l,i;return e.conceptId.toUpperCase()===(null===(i=L.website)||void 0===i?void 0:null===(l=i.settings)||void 0===l?void 0:null===(t=l.defaultConcept)||void 0===t?void 0:t.toUpperCase())}),[H,B]=(0,o.useState)(null),[Z,R]=(0,o.useState)(l),{t:A}=(0,u.$)(),{ensurePageHydrated:V}=(0,d.ZP)(),{isMenuItemAvailable:_}=(0,p.ZP)(),F=(0,o.useCallback)(e=>{var t,l,i,n;let o=null==e?void 0:null===(t=e.toLowerCase)||void 0===t?void 0:t.call(e),s=null!==(n=null!==(i=null!==(l=null==S?void 0:S[e])&&void 0!==l?l:null==S?void 0:S[o])&&void 0!==i?i:null==E?void 0:E[e])&&void 0!==n?n:null==E?void 0:E[o];return void 0===s||s.unlimited?999:s.available},[S,E]);(0,o.useEffect)(()=>{if(!l)return;let updateSectionsWithAvailability=e=>{let t=!1,l=e.map(e=>{let l=e.sectionItems;if(e.sectionItems&&e.sectionItems.length>0){let t=!1;l=e.sectionItems.map(e=>{let l=F(e.menuItemId),i=l>0?"opacity: 1;cursor: pointer;":"opacity: 0.7;cursor: default;",n=l>0?"SELECT-MENUITEM":"DISREGARD",o=(null==e?void 0:e.url)||(null==P?void 0:P.thumbNailUrl);return e.available===l&&e.availableStyle===i&&e.clickEvent===n&&e.url===o?e:(t=!0,{...e,available:l,availableStyle:i,clickEvent:n,url:o})}),t||(l=e.sectionItems)}let i=e.children;return(e.children&&e.children.length>0&&(i=updateSectionsWithAvailability(e.children)),l===e.sectionItems&&i===e.children)?e:(t=!0,{...e,sectionItems:l,children:i})});return t?l:e};R(e=>{let t=updateSectionsWithAvailability(l);return t===e?e:t})},[l,F]),(0,o.useEffect)(()=>{let e=[...Z],t=!1;for(let i=0;i<e.length;i++){var l;let n=e[i],o=null==n?void 0:null===(l=n.sectionId)||void 0===l?void 0:l.toUpperCase(),s=o+".name",a=A(s);a!==s&&(null==n?void 0:n.sectionName)!==a&&(n.sectionName=a,t=!0);let r=o+".description",d=A(r);d!==r&&(null==n?void 0:n.sectionDescription)!==d&&(n.sectionDescription=d,t=!0);for(let e=0;e<n.sectionItems.length;e++){let l=n.sectionItems[e].menuItemId.toUpperCase(),i=l+".name",o=A(i);o!==i&&n.sectionItems[e].menuItemName!==o&&(n.sectionItems[e].menuItemName=o,t=!0);let s=l+".description",a=A(s);a!==s&&n.sectionItems[e].menuItemDescription!==a&&(n.sectionItems[e].menuItemDescription=a,t=!0)}}t&&R(e)},[Z,M]);let[U,z]=(0,o.useState)(null);(0,o.useEffect)(()=>{let e=L.website.pages.find(e=>{var t;return(null===(t=e.pageId)||void 0===t?void 0:t.toUpperCase())===(null==g?void 0:g.toUpperCase())});B(e?V(e):e)},[g,L.website.pages]),(0,o.useEffect)(()=>{let e=L.website.pages.find(e=>{var t;return(null===(t=e.pageId)||void 0===t?void 0:t.toUpperCase())===(null==x?void 0:x.toUpperCase())});z(e?V(e):e)},[x,L.website.pages]);let G=(0,o.useCallback)(e=>{let t=[];return I.forEach(l=>{var i;
1(null==l?void 0:null===(i=l.keys)||void 0===i?void 0:i.includes(e))&&t.push(l.callBack)}),t},[I,v]),K=(0,o.useCallback)(e=>{let t=G(v),l=!0;for(let i=0;i<t.length;i++)if(!t[i](e)){l=!1;break}return"true"===y&&(null==e?void 0:e.guestFacing)===!1&&(l=!1),l},[G,v]),Y=(0,o.useCallback)(e=>"qr"===N&&(null===e.website||!!e.website)||"oo"===N&&(null===e.onlineOrder||!!e.onlineOrder)||"di"===N&&(null===e.tableSide||!!e.tableSide),[N]),q=(0,o.useMemo)(()=>b&&b.trim()?b.trim().toLowerCase().split(/\s+/):[],[b]),J=(0,o.useMemo)(()=>w&&w.trim()?w.trim().toLowerCase().split(/\s+/):[],[w]),X=(0,o.useCallback)((e,t)=>{if(t.length>0){let l="string"==typeof e?e.toLowerCase().split(/\s+/):[],i=t.every(e=>l.includes(e));if(!i)return!1}return!0},[]),Q=(0,o.useCallback)(e=>!!(("true"!==y||(null==e?void 0:e.guestFacing)!==!1)&&K(e)&&_(null==e?void 0:e.menuItemId))&&("remove"!==k||0!==e.available)&&(!(J.length>0)||X(null==e?void 0:e.tags,J)),[K,k,J,X,_]),$=(0,o.useCallback)(e=>{if("true"===f&&(null==e?void 0:e.guestFacing)===!1)return!1;if(q.length>0)return X(null==e?void 0:e.tags,q);if(!Y(e))return!1;if(!h&&!(null==T?void 0:T.length)){var t;let l=null===(t=I.find(e=>{var t;return(null==e?void 0:null===(t=e.key)||void 0===t?void 0:t.toUpperCase())===(null==v?void 0:v.toUpperCase())&&"SectionFilter"===e.filterBlockName}))||void 0===t?void 0:t.callBack;if(l&&!l(e))return!1}let l=!1,forEach=e=>{var t;e.sectionItems.forEach(e=>{Q(e)&&(l=!0)});for(let l=0;l<(null==e?void 0:null===(t=e.children)||void 0===t?void 0:t.length);l++)forEach(e.children[l])};return forEach(e),l},[h,Y,I,v,Q,T,q]),ee=(0,o.useMemo)(()=>Z.filter(e=>$(e)).map(e=>({...e,sectionItems:e.sectionItems.filter(e=>X(null==e?void 0:e.tags,J))})).sort((e,t)=>e.sequence-t.sequence),[Z,$,X,J]),et=(0,o.useMemo)(()=>{if("menuItem"!==m)return[];let e=[];for(let t of ee)for(let l of t.sectionItems)Q(l)&&e.push(l);return e.sort((e,t)=>(null==e?void 0:e.sequence)-(null==t?void 0:t.sequence))},[m,ee,Q]),el=(0,o.useMemo)(()=>{var t,l;return"menuItem"===m&&(null==U?void 0:null===(t=U.blocks)||void 0===t?void 0:t[0])?et.map((e,t)=>{if(t>=parseInt(C)&&t<parseInt(C)+parseInt(j)){let l=new Map(Object.entries(e));return(0,i.jsx)(r.Z,{estimatedHeight:150,displayContents:!0,children:(0,i.jsx)(a.Z,{block:U.blocks[0],localData:l})},"".concat(e.menuItemId||"item","-").concat(t))}}):(null==H?void 0:null===(l=H.blocks)||void 0===l?void 0:l[0])?ee.map((t,l)=>{var o,s,d;let c=new Map([...Object.entries({...t,menuItems:(null==t?void 0:t.sectionItems)||[]})]);return(0,i.jsx)("div",{style:{width:"100%"},id:"".concat(null==t?void 0:t.sectionId,"_").concat(v),"data-sectionid":null==t?void 0:null===(o=t.sectionId)||void 0===o?void 0:o.toUpperCase(),"data-sectionname":null==t?void 0:null===(s=t.sectionName)||void 0===s?void 0:s.toLowerCase(),children:(0,i.jsxs)(r.Z,{estimatedHeight:400,displayContents:!0,children:[(0,i.jsx)(a.Z,{block:null==H?void 0:null===(d=H.blocks)||void 0===d?void 0:d[0],localData:c},l),t.children.length>0&&(0,i.jsx)(CustomMenuSection,{sections:t.children,menuId:n,level:h+1,props:e.props})]})},null==t?void 0:t.sectionId)}):void 0},[m,U,et,H,ee,v,h,j,C]);return el};var h=l(12608),v=l(49268),g=l(27489),x=l(32175),m=l(49040),k=l(75277),f=l(57609),y=l(34988),b=l(12024),w=l(24203),j=l(47097);let CustomMenu=e=>{var t,l;let{children:a,blockData:r,blockId:d,backgroundColor:u,padding:p,fallbackMenu:w,useSingleSection:C,selectedSection:L,showSubSections:I,filterSectionsByGuestFacing:S,filterMenuItemsByGuestFacing:E,filterSectionsByTags:N,filterMenuItemsByTags:T,groupAllSections:M,showType:D,container:P,listLength:H,listOffset:B}=e,[Z,R]=(0,o.useState)(null),[A,V]=(0,o.useState)(""),[_,F]=(0,o.useState)(null),[U,z]=(0,o.useState)(null),[G,K]=(0,o.useState)(null),[Y,q]=(0,o.useState)(!0),J=(0,s.I0)(),X=(0,o.useRef)(null),Q=(0,o.useRef)(!1),$=(0,o.useRef)(null),ee=(0,o.useRef)(!1),et=(0,o.useRef)(null),el=(0,s.v9)(e=>e.usersList.pricingBooks,c.Z),ei=(0,s.v9)(e=>e.usersList.menus,c.Z),en=(0,s.v9)(e=>e.usersList.locationValues,c.Z),eo=(0,s.v9)(e=>e.usersList.userData,c.Z),es=(0,s.v9)(e=>e.usersList.orderTime,c.Z),ea=(null==es?void 0:es.time)instanceof Date?null==es?void 0:es.time:new Date,er=(0,o.useRef)(null);
1null===er.current&&(er.current=new j.ZP);let ed=r&&r.get("orderHeader")?r.get("orderHeader"):er.current,ec=!!((null==r?void 0:null===(t=r.get)||void 0===t?void 0:t.call(r,"menu"))||(null==r?void 0:null===(l=r.get)||void 0===l?void 0:l.call(r,"parentMenuLoading"))),eu=(0,o.useRef)(ec);eu.current=ec;let ep=(0,m.ZP)(el,en,eo,ed,(0,k.Z)(),ea,f.Z,e=>(0,y.Z)(ei,e,!0)),eh=(0,o.useMemo)(()=>{var e,t,l;let i;if(!(null==U?void 0:null===(t=U.menu)||void 0===t?void 0:null===(e=t.section)||void 0===e?void 0:e.children))return U;try{i=JSON.parse(JSON.stringify(U))}catch(e){return U}let n=(null==en?void 0:null===(l=en.currency)||void 0===l?void 0:l.symbol)||"",priceSection=e=>{var t,l;if(null===(t=e.sectionItems)||void 0===t?void 0:t.length)for(let t=0;t<e.sectionItems.length;t++){let l=e.sectionItems[t],i=ep(l.menuItem||l,1,l.menuItemOptionId);l.defaultPrice=i.price,l.cashDiscountPercent=i.cashDiscountPercent,l.menuItemOptions=(0,b.Z)(l.menuItemOptions,ep,e=>(0,y.Z)(ei,e,!0)),l.displayPrice=l.defaultPrice?n+l.defaultPrice.toFixed(2):"Select Options",l.menuItem={...l}}if(null===(l=e.children)||void 0===l?void 0:l.length)for(let t=0;t<e.children.length;t++)priceSection(e.children[t])};for(let e=0;e<i.menu.section.children.length;e++)priceSection(i.menu.section.children[e]);return i},[U,el,en,eo,ed,es,ei]);(0,o.useEffect)(()=>{let t=A&&!U?A:Z,l=!!(e.menu||w);ee.current?t!==_&&q(!!t):(ee.current=!0,q(!!t||l)),F(t)},[Z,A,U]),(0,o.useEffect)(()=>{let e=r.get("menu");if(!Q.current){if(e){var t;if(et.current===e)return;et.current=e,$.current="blockData",e.menu.section.children=e.menu.section.children.map(e=>({...e})),z({...e}),(null===(t=e.menu)||void 0===t?void 0:t.menuId)&&J({type:"UPDATE_MENU_REFERENCE",blockId:d,menuId:e.menu.menuId})}else"blockData"===$.current&&(et.current=null,$.current=null,z(null),K(null))}},[r]),(0,o.useEffect)(()=>{let e=X.current;X.current=Z,e&&!Z?(Q.current=!0,z(null),K(null),V("")):Z&&(Q.current=!1)},[Z]),(0,o.useEffect)(()=>{var e;if(null==eh?void 0:null===(e=eh.menu)||void 0===e?void 0:e.section){let parseMenu=e=>{var t,l;((null==e?void 0:e.sectionName)===L||(null==e?void 0:null===(t=e.sectionId)||void 0===t?void 0:t.toUpperCase())===(null==L?void 0:L.toUpperCase()))&&K([{...e,children:"true"===I?e.children:[]}]);for(let t=0;t<(null==e?void 0:null===(l=e.children)||void 0===l?void 0:l.length);t++)parseMenu(e.children[t])};"true"===C?parseMenu(eh.menu.section):K(eh.menu.section.children.map(e=>({...e})))}},[eh,L,I]),(0,o.useEffect)(()=>{J({type:"UPDATE_MENU_FILTERS",blockId:d,process:!0})},[]);let ev=r.get("parentMenuLoading"),eg=!G&&!U&&(Y||!!ev),ex=!G&&!U&&!eg,em=(0,o.useMemo)(()=>{if(!G||"true"!==M||0===G.length)return G;let collectItems=e=>{let t=[];for(let i of e){var l;i.sectionItems&&(t=t.concat(i.sectionItems)),(null===(l=i.children)||void 0===l?void 0:l.length)&&(t=t.concat(collectItems(i.children)))}return t},e={...G[0]};return e.sectionItems=collectItems(G),e.children=[],[{...e,children:[]}]},[G,M]);return(0,i.jsxs)(i.Fragment,{children:[_&&!ec&&(0,i.jsx)(g.Z,{blockId:d,menuId:_,menuProp:null==e?void 0:e.menu,setMenuData:e=>{q(!1),null===e||eu.current||($.current="getMenu",z(e))}}),e.menu&&!ec&&(0,i.jsx)(n.Z,{menu:e.menu,blockId:d,menuId:Z,setMenuId:R,orderHeader:ed,dontUpdateOrderHeader:!0}),w&&!U&&!ec&&(0,i.jsx)(n.Z,{menu:e.fallbackMenu,blockId:d,menuId:A,setMenuId:V,orderHeader:ed,dontUpdateOrderHeader:!0}),(0,i.jsx)("div",{id:d,style:{width:"100%",height:"100%",backgroundColor:(0,v.ad)(u),...(0,v.lG)(p)},children:(0,i.jsxs)(h.f,{block:a,children:[em&&(0,i.jsx)("div",{style:{width:"100%",height:"100%",...(0,v.J$)(P)},children:(0,i.jsx)(CustomMenuSection,{sections:em,menuId:_,props:e,level:0})}),!G&&eg&&(0,i.jsx)(x.Z,{show:!0,id:"".concat(d,"-loading"),width:"100px",height:"100px"}),ex&&(0,i.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"24px",color:"black",fontFamily:"urbanist",fontWeight:"bold"},children:(0,i.jsx)("span",{children:"Menu is currently unavailable"})})]})})]})};CustomMenu.displayName="MenuNew",CustomMenu.schema=w.R;var C=(0,o.memo)(CustomMenu)},99871:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return m}});var i=l(85893),n=l(67294),o=l(9473),s=l(22052),a=l(12608),r=l(49268),d=l(88818),c=l(73935),u=l(11544),p=l(12451),h=l(38858);let v="https://kluck.s3.amazonaws.com/",g="https://cdn.getkluck.com/",toCdn=e=>"string"==typeof e?e.replace(v,g):"",toHighRes=e=>"string"==typeof e?e.replace(v,g+"hires/"):"",gallerySrc=e=>(null==e?void 0:e.image)||(null==e?void 0:e.url)||(null==e?void 0:e.name)||"",x={fade:{enter:()=>({opacity:0}
1),center:{opacity:1,x:0,scale:1},exit:()=>({opacity:0})},zoom:{enter:()=>({opacity:0,scale:.9}),center:{opacity:1,x:0,scale:1},exit:()=>({opacity:0,scale:.9})},slide:{enter:e=>({opacity:0,x:e>=0?60:-60}),center:{opacity:1,x:0,scale:1},exit:e=>({opacity:0,x:e>=0?-60:60})}},controlButtonStyle=(e,t,l)=>({position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",width:e,height:e,padding:"0",border:"none",background:t,borderRadius:l,cursor:"pointer",zIndex:2}),controlIconStyle=e=>({width:"calc(".concat(e," * 0.65)"),height:"calc(".concat(e," * 0.65)")});var Gallery_GalleryLightbox=e=>{let{items:t,index:l,onClose:o,onIndexChange:s,popupAnimation:a,popupShowArrows:d,popupShowClose:v,popupShowCaption:g,popupHighRes:m,popupBackdropColor:k,popupPadding:f,popupImageBorderRadius:y,popupImageBoxShadow:b,popupControlColor:w,popupControlBackgroundColor:j,popupControlSize:C,popupControlBorderRadius:L,popupCaptionFont:I,popupZIndex:S}=e,E=(0,h.pd)(),[N,T]=(0,n.useState)(!1),[M,D]=(0,n.useState)(0),[P,H]=(0,n.useState)({}),B=(0,n.useRef)(null),Z=(null==t?void 0:t.length)||0,R=null==t?void 0:t[l],A=null==R?void 0:R.src,V="true"===m&&A&&!P[A],_=V?toHighRes(A):toCdn(A),F="true"===d&&Z>1,step=e=>{Z<2||(D(e),s((l+e+Z)%Z))};(0,n.useEffect)(()=>{T(!0)},[]),(0,n.useEffect)(()=>{let onKeyDown=e=>{"Escape"===e.key?o():"ArrowRight"===e.key?step(1):"ArrowLeft"===e.key&&step(-1)},e=[E];return"undefined"!=typeof document&&document!==E&&e.push(document),e.forEach(e=>null==e?void 0:e.addEventListener("keydown",onKeyDown)),()=>e.forEach(e=>null==e?void 0:e.removeEventListener("keydown",onKeyDown))},[E,l,Z]),(0,n.useEffect)(()=>{let e=null==E?void 0:E.body;if(!e)return;let t=e.style.overflow;return e.style.overflow="hidden",()=>{e.style.overflow=t}},[E]),(0,n.useEffect)(()=>{Z<2||[l+1,l-1].forEach(e=>{let l=t[(e+Z)%Z];if(!(null==l?void 0:l.src))return;let i=new window.Image;i.src="true"!==m||P[l.src]?toCdn(l.src):toHighRes(l.src)})},[l,Z,m]);let U=(null==E?void 0:E.body)||("undefined"!=typeof document?document.body:null);if(!N||!U||!R)return null;let z=(0,r.ad)(w),G=(0,r.o3)(C)||"44px",K=controlButtonStyle(G,(0,r.ad)(j),(0,r.Wl)(L)),Y=controlIconStyle(G),q=x[a]||x.fade,J="true"===g&&R.caption?R.caption:null;return(0,c.createPortal)((0,i.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":R.altText||R.caption||"Image",onClick:e=>{e.target===e.currentTarget&&o()},onTouchStart:e=>{var t,l,i;B.current=null!==(i=null===(l=e.changedTouches)||void 0===l?void 0:null===(t=l[0])||void 0===t?void 0:t.clientX)&&void 0!==i?i:null},onTouchEnd:e=>{var t,l,i;if(null===B.current)return;let n=(null!==(i=null===(l=e.changedTouches)||void 0===l?void 0:null===(t=l[0])||void 0===t?void 0:t.clientX)&&void 0!==i?i:B.current)-B.current;B.current=null,n>50?step(-1):n<-50&&step(1)},style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:parseInt(S)||1050,background:(0,r.ad)(k),display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",boxSizing:"border-box",...(0,r.lG)(f)},children:["true"===v&&(0,i.jsx)("button",{type:"button","aria-label":"Close",onClick:o,style:{...K,top:"8px",right:"8px"},children:(0,i.jsx)("svg",{style:Y,viewBox:"0 0 24 24",children:(0,i.jsx)("path",{fill:z,d:"M13.46,12L19,17.54V19H17.54L12,13.46L6.46,19H5V17.54L10.54,12L5,6.46V5H6.46L12,10.54L17.54,5H19V6.46L13.46,12Z"})})}),F&&(0,i.jsx)("button",{type:"button","aria-label":"Previous image",onClick:()=>step(-1),style:{...K,left:"8px",top:"50%",transform:"translateY(-50%)"},children:(0,i.jsx)("svg",{style:Y,viewBox:"0 0 24 24",children:(0,i.jsx)("path",{fill:z,d:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"})})}),F&&(0,i.jsx)("button",{type:"button","aria-label":"Next image",onClick:()=>step(1),style:{...K,right:"8px",top:"50%",transform:"translateY(-50%)"},children:(0,i.jsx)("svg",{style:Y,viewBox:"0 0 24 24",children:(0,i.jsx)("path",{fill:z,d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"})})}),(0,i.jsx)("div",{onClick:e=>{e.target===e.currentTarget&&o()},style:{flex:"1 1 auto",minHeight:0,width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)(u.M,{mode:"wait",custom:M,initial:!1,children:(0,i.jsx)(p.E.img,{custom:M,variants:q,initial:"enter",animate:"center",exit:"exit",transition:{duration:.25,ease:"easeOut"},src:_,alt:R.altText||"",onError:()=>{V&&H(e=>({...e,[A]:!0}))},draggable:!1,style:{maxWidth:"100%",maxHeight:"100%",objectFit:"contain",display:"block",borderRadius:(0,r.Wl)(y),boxShadow:(0,r.tX)(b)}},"".concat(l,"-").concat(_))})}),J&&(0,i.jsx)("div",{style:{flex:"0 0 auto",marginTop:"12px",textAlign:"center",maxWidth:"100%",...(0,r.Gf)(I)},children:J})]}),U)};let hoverCss=(e,t)=>"zoom"===t?".".concat(e," .gallery-tile { transition: transform 0.3s ease; } .").concat(e," .gallery-tile:hover { transform: scale(1.04); }"):"fade"===t?".".concat(e," .gallery-tile { transition: opacity 0.3s ease; } .").concat(e," .gallery-tile:hover { opacity: 0.75; }"):"",Gallery=e=>{let{blockId:t,children:l,backgroundColor:d,padding:c,border:u,borderRadius:p,boxSh
1adow:h,galleryType:v,galleryImages:g,enableLightbox:x,galleryContainer:m,imageWidth:k,imageHeight:f,masonryColumns:y,justifiedRowHeight:b,imageGap:w,imageBackgroundImage:j,imageBorder:C,imageBorderRadius:L,imageBoxShadow:I,imageHoverEffect:S,popupAnimation:E,popupShowArrows:N,popupShowClose:T,popupShowCaption:M,popupHighRes:D,popupBackdropColor:P,popupPadding:H,popupImageBorderRadius:B,popupImageBoxShadow:Z,popupControlColor:R,popupControlBackgroundColor:A,popupControlSize:V,popupControlBorderRadius:_,popupCaptionFont:F,popupZIndex:U}=e,z=(0,o.v9)(e=>e.usersList.clickableLinks,s.Z),[G,K]=(0,n.useState)(null),[Y,q]=(0,n.useState)({}),J=(0,n.useMemo)(()=>(Array.isArray(g)?g:[]).filter(e=>(null==e?void 0:e.checked)!==!1&&gallerySrc(e)).map(e=>({src:gallerySrc(e),caption:e.caption||"",altText:e.altText||"",key:e.addChildId})),[g]),X="true"===x&&!!z,Q="gallery-".concat(String(t).replace(/[^a-zA-Z0-9_-]/g,"")),$=(0,r.o3)(w),ee={...(0,r.Fj)(C),borderRadius:(0,r.Wl)(L),boxShadow:(0,r.tX)(I),cursor:X?"pointer":"default"},onTileClick=e=>{X&&K(e)},onImageLoad=(e,t)=>{let{naturalWidth:l,naturalHeight:i}=t.target;if(!l||!i)return;let n=l/i;q(t=>t[e]===n?t:{...t,[e]:n})},et=hoverCss(Q,S);return(0,i.jsxs)("div",{className:Q,style:{width:"100%",height:"100%",background:(0,r.ad)(d),...(0,r.lG)(c),...(0,r.Fj)(u),borderRadius:(0,r.Wl)(p),boxShadow:(0,r.tX)(h),overflow:"hidden"},children:[et&&(0,i.jsx)("style",{children:et}),(0,i.jsxs)(a.f,{block:l,children:["masonry"===v&&(0,i.jsx)("div",{style:{width:"100%",columnCount:parseInt(y)||1,columnGap:$},children:J.map((e,t)=>(0,i.jsx)("div",{style:{breakInside:"avoid",marginBottom:$},children:(0,i.jsx)("img",{className:"gallery-tile",src:toCdn(e.src),alt:e.altText,loading:"lazy",onClick:()=>onTileClick(t),style:{width:"100%",display:"block",...ee}})},e.key||t))}),"justified"===v&&(()=>{let e=(0,r.o3)(b);return(0,i.jsxs)("div",{style:{width:"100%",display:"flex",flexWrap:"wrap",gap:$},children:[J.map((t,l)=>{let n=Y[t.src]||1;return(0,i.jsx)("div",{style:{flexGrow:100*n,flexShrink:1,flexBasis:"calc(".concat(e," * ").concat(n,")"),height:e,minWidth:0},children:(0,i.jsx)("img",{className:"gallery-tile",src:toCdn(t.src),alt:t.altText,loading:"lazy",onLoad:e=>onImageLoad(t.src,e),onClick:()=>onTileClick(l),style:{width:"100%",height:"100%",objectFit:"cover",display:"block",...ee}})},t.key||l)}),(0,i.jsx)("div",{style:{flexGrow:1e4,flexBasis:0,height:0}})]})})(),"masonry"!==v&&"justified"!==v&&(0,i.jsx)("div",{style:{width:"100%",height:"100%",...(0,r.J$)(m)},children:J.map((e,t)=>(0,i.jsx)("div",{className:"gallery-tile",role:"img","aria-label":e.altText||e.caption||void 0,onClick:()=>onTileClick(t),style:{width:(0,r.o3)(k),height:(0,r.o3)(f),flexShrink:0,...(0,r.nc)(j,e.src),...ee}},e.key||t))})]}),X&&null!==G&&J[G]&&(0,i.jsx)(Gallery_GalleryLightbox,{items:J,index:G,onClose:()=>
1K(null),onIndexChange:K,popupAnimation:E,popupShowArrows:N,popupShowClose:T,popupShowCaption:M,popupHighRes:D,popupBackdropColor:P,popupPadding:H,popupImageBorderRadius:B,popupImageBoxShadow:Z,popupControlColor:R,popupControlBackgroundColor:A,popupControlSize:V,popupControlBorderRadius:_,popupCaptionFont:F,popupZIndex:U})]})};Gallery.displayName="Gallery",Gallery.schema=d.N;var m=(0,n.memo)(Gallery)},45362:function(e,t,l){"use strict";l.r(t);var i=l(85893),n=l(12608),o=l(49268),s=l(9473),a=l(67294),r=l(22052),d=l(21582);let MenuFilter=e=>{let{backgroundColor:t,padding:l,children:d,inputBackgroundColor:c,inputPadding:u,inputFont:p,inputBorder:h,inputBorderRadius:v,inputBoxShadow:g,selectedMenu:x,selectedConcept:m,filterMenuBlock:k}=e,f=(0,s.v9)(e=>e.usersList.menus,r.Z),y=(0,s.I0)(),[b,w]=(0,a.useState)(null),[j,C]=(0,a.useState)([]);return(0,a.useEffect)(()=>{if(m){let e=[];for(let t=0;t<Object.keys(f).length;t++){let l=f[Object.keys(f)[t]];l.conceptId.toUpperCase()===m.toUpperCase()&&e.push(l.menu)}C(e),w(e[0])}},[m,f]),(0,a.useEffect)(()=>{(null==x?void 0:x.blockId)&&m&&b&&y({type:"UPDATE_MENU_FILTERS",blockId:x.blockId,name:"menuFilter",value:{type:"selected",menuId:b.menuId,conceptId:m}})},[x,m,b]),(0,i.jsx)("div",{style:{width:"100%",height:"100%",backgroundColor:(0,o.ad)(t),...(0,o.lG)(l)},children:(0,i.jsx)(n.f,{block:d,children:(0,i.jsxs)("div",{style:{position:"relative",display:"flex",justifyContent:"flex-end",alignItems:"center",backgroundColor:(0,o.ad)(c),...(0,o.Fj)(h),borderRadius:(0,o.Wl)(v),boxShadow:(0,o.tX)(g)},children:[(0,i.jsx)("select",{id:"select_".concat(d.blockId),value:null==b?void 0:b.menuId,onChange:e=>w(j.filter(t=>t.menuId===e.target.value)[0]),style:{background:"transparent",...(0,o.lG)(u),...(0,o.Gf)(p),WebkitAppearance:"none",zIndex:"2",border:"none",paddingRight:"36px"},children:j.map((e,t)=>(0,i.jsx)("option",{value:e.menuId,children:e.menuName},t))}),(0,i.jsx)("svg",{style:{position:"absolute",inset:"auto 0px auto auto",zIndex:"1",width:"24px",height:"24px",margin:"0 6px"},viewBox:"0 0 24 24",children:(0,i.jsx)("path",{fill:(0,o.ad)(null==p?void 0:p.color),d:"M7,10L12,15L17,10H7Z"})})]})})})};MenuFilter.displayName="MenuFilter",MenuFilter.schema=d.x,t.default=(0,a.memo)(MenuFilter)},72886:function(e,t,l){"use strict";l.r(t);var i=l(85893),n=l(12608),o=l(49268),s=l(9473),a=l(67294),r=l(27840),d=l(38937),c=l(54402),u=l(22052),p=l(31567),h=l(26982),v=l(38858);let NavBar=e=>{let{blockData:t,blockId:l,children:c,backgroundColor:p,padding:h,blockStyle:g,selectedMenu:x,filterMenuBlock:m,itemType:k,itemPage:f,scrollPadding:y,itemPadding:b,itemsPadding:w,font:j,selectedItemFont:C,border:L,borderRadius:I,boxShadow:S,scrollDirection:E,showArrows:N,arrowsSize:T,arrowsColor:M,container:D}=e,P=(0,s.v9)(e=>e.usersList.menus,u.Z),H=(0,s.v9)(e=>e.usersList.resizeBit,u.Z),B=(0,s.v9)(e=>e.usersList.editor,u.Z),Z=(0,s.v9)(e=>e.usersList.menuFiltersBit,u.Z),R=(0,s.v9)(e=>e.usersList.menuReference,u.Z),A=(0,a.useContext)(v.P8),V=A||("undefined"!=typeof document?document:null),[_,F]=(0,a.useState)({}),[U,z]=(0,a.useState)(!1),[G,K]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=null==V?void 0:V.getElementById("".concat(l,"_parent")),t=null==V?void 0:V.getElementById("".concat(l,"_child"));if(!e||!t)return;let measure=()=>{if("horizontal"===E){let l=e.getBoundingClientRect().width,i=t.scrollWidth;l-i<1&&i-l<1&&(i=l),"true"===N?(K(!0),z(l<i)):"auto"===N?l<i?(K(!0),z(!0)):(K(!1),z(!1)):(K(!1),z(l<i))}else if("vertical"===E){let l=e.getBoundingClientRect().height,i=t.scrollHeight;l-i<1&&i-l<1&&(i=l),"true"===N?(K(!0),z(l<i)):"auto"===N?l<i?(K(!0),z(!0)):(K(!1),z(!1)):(K(!1),z(l<i))}};measure();let i=new MutationObserver(measure);return i.observe(t,{childList:!0,subtree:!0,characterData:!0,attributeFilter:["style"]}),()=>i.disconnect()},[V,N,E,_,P,H,B.open,Z]),(0,a.useEffect)(()=>{var e,l;F((null==t?void 0:null===(e=t.get("menu"))||void 0===e?void 0:e.menu)||(null==P?void 0:null===(l=P[R[null==x?void 0:x.blockId]])||void 0===l?void 0:l.menu)||{})},[t,P,x,R]);let arrowOnClick=e=>{let t=null==V?void 0:V.getElementById("".concat(l,"_parent"));if(!(null==t?void 0:t.children[0]))return;let i=t.scrollLeft,n=t.scrollLeft+t.getBoundingClientRect().width,o=0;for(let l=0;l<t.children[0].children.length;l++){let s=t.children[0].children[l].getBoundingClientRect().width;if(o+=s,"forward"===e&&n<o+s)break;if("backward"===e&&i<o+s){o-=t.getBoundingClientRect().width;break}}t.scrollLeft=o};return(0,i.jsx)("div",{style:{width:"100%",height:"100%",backgroundColor:(0,o.ad)(p),...(0,o.lG)(h),cursor:"default"},children:(0,i.jsx)(n.f,{block:c,children:(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"horizontal"===E?"row":"column",justifyContent:"space-between",alignItems:"center"},children:["scroll"===g&&(0,i.jsxs)(i.Fragment,{children:[G&&(0,i.jsx)("div",{style:{minWidth:(0,o.o3)(T),cursor:"pointer"},children:(0,i.jsx)(r.Z,{onClick:()=>arrowOnClick("backward"),size:null==T?void 0:T.value,color:(0,o.ad)(M)})}),(0,i.jsx)("div",{id:"".concat(l,"_parent"),style:{width:"100%",maxWidth:"100%",height:"100%",maxHeight:"100%",overflow:U?"horizontal"===E?"scroll hidden":"hidden scroll":"visible",scrollBehavior:"smooth",margin:"auto ".concat(U?(0,o.QS)(w).marginRight:"auto"," auto ").concat(U?(0,o.QS)(w).marginLeft:"auto")},children:(0,i.jsx)(MappedChildren,{menu:_,scrollable:U,...e})}),G&&(0,i.jsx)("div",{style:{minWidth:(0,o.o3)(T),cursor:"pointer"},children:(0,i.jsx)(d.Z,{onClick:()=>arrowOnClick("forward"),size:null==T?void 0:T.value,color:(0,o.ad)(M)})})]}),"flexbox"===g&&(0,i.jsx)(MappedChildren,{menu:_,scrollable:U,...e})]})})})},MappedChildren=e=>{var t,l,n;let r;let{blockId:d,border:h,borderRadius:g,boxShadow:x,container:m,selectedMenu:k,itemType:f,itemPage:y,itemPadding:b,scrollPadding:w,font:j,scrollable:C,selectedItemFont:L,menu:I,sectionsToShow:S}=e,E=(0,s.v9)(e=>e.usersList.kanvas,u.Z),N=(0,s.v9)(e=>e.usersList.menuType,u.Z),T=(0,s.v9)(e=>e.usersList.menuFilters,u.Z),M=(0,s.v9)(e=>e.usersList.clickableLinks,u.Z),D=(0,s.v9)(e=>e.usersList.searchFilter,u.Z),P=(0,a.useContext)(v.P8),H=P||("undefined"!=typeof document?document:null),[B,Z]=(0,a.useState)(void 0),[R,A]=(0,a.useState)(null),[V,_]=(0,a.useState)(void 0),[F,U]=(0,a.useState)([]),[z,G]=(0,a.useState)(""),[K,Y]=(0,a.useState)(0),{t:q}=(0,p.$)(),J=(n=()=>{Y(Math.random())},function(){for(var e=arguments.length,t=Array(e),l=0;l<e;l++)t[l]=arguments[l];clearTimeout(r),r=setTimeout(()=>n.apply(this,t),100)});(0,a.useEffect)(()=>{let e=null==H?void 0:H.getElementById("myDiv"+(null==k?void 0:k.blockId)),t=[];for(;e&&e.parentElement;)e.parentElement.addEventListener("scroll",J),t.push(e.parentElement),e=e.parentElement;return()=>
1{t.forEach(e=>{e.removeEventListener("scroll",J)})}},[H,k]),(0,a.useEffect)(()=>{U([])},[null===(t=T[null==k?void 0:k.blockId])||void 0===t?void 0:t.sectionFilter]),(0,a.useEffect)(()=>{A(E.website.pages.find(e=>e.pageId===y))},[y]);let sectionSearchFilter=e=>{let t=!1,checkDiets=e=>{var t,l,i,n,o;if(null===(l=T[k.blockId])||void 0===l||null===(t=l.dietFilter)||void 0===t||!t.length)return!0;{let t=null===(n=T[k.blockId])||void 0===n?void 0:null===(i=n.dietFilter)||void 0===i?void 0:i.length,l=0;return(null===(o=T[null==k?void 0:k.blockId])||void 0===o?void 0:o.dietFilter)&&T[k.blockId].dietFilter.forEach(t=>{e.diets.forEach(e=>{e&&t===e.dietName&&(l+=1)})}),t===l}},forEach=e=>{e.sectionItems.forEach(e=>{var l,i,n;(null==e?void 0:null===(l=e.menuItem)||void 0===l?void 0:l.menuItemName)&&(e.menuItem.menuItemName.toLowerCase().includes(D.toLowerCase())||(null===(n=e.menuItem)||void 0===n?void 0:null===(i=n.menuItemDescription)||void 0===i?void 0:i.toLowerCase().includes(D.toLowerCase()))||e.menuItem.tags.toLowerCase().includes(D.toLowerCase()))&&checkDiets(e.menuItem)&&(t=!0)}),e.children[0]&&e.children.forEach(e=>forEach(e))};return forEach(e),t},sectionMenuTypeFilter=e=>"qr"===N&&(null===e.website||!!e.website)||"oo"===N&&(null===e.onlineOrder||!!e.onlineOrder)||"di"===N&&(null===e.tableSide||!!e.tableSide),sectionCheck=e=>{let t=!0;return e.guestFacing||(t=!1),D&&!sectionSearchFilter(e)&&(t=!1),e.sectionItems[0]||e.children[0]||(t=!1),sectionMenuTypeFilter(e)||(t=!1),t},onClick=e=>{e=e||new Map;let t=(null==e?void 0:e.get)?e.get("sectionId"):"";if(t&&M){let e=null==H?void 0:H.getElementById("".concat(t,"_").concat(k.blockId));if(e){G(t);let l=(0,o.lG)(w);e.style.scrollMargin="calc(".concat(l.paddingTop," - 50px) ").concat(l.paddingRight," ").concat(l.paddingBottom," ").concat(l.paddingLeft),e.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})}Y(Math.random())}};(0,a.useEffect)(()=>{if(F[0]){if(K)for(let o=0;o<F.length;o++){let s=null==H?void 0:H.getElementById(F[o]);if(s){var e,t,l,i,n;let{top:a,left:r,bottom:d,right:c}=s.getBoundingClientRect(),u=parseInt(null==w?void 0:null===(e=w.top)||void 0===e?void 0:e.value);if(isNaN(u)&&(u=0),d-u>=0&&c>=0&&a-u<=((null==H?void 0:null===(t=H.defaultView)||void 0===t?void 0:t.innerHeight)||(null==H?void 0:null===(l=H.documentElement)||void 0===l?void 0:l.clientHeight))&&r<=((null==H?void 0:null===(i=H.defaultView)||void 0===i?void 0:i.innerWidth)||(null==H?void 0:null===(n=H.documentElement)||void 0===n?void 0:n.clientWidth))){_(F[o]);break}}}else _(F[0])}},[H,F,K]),(0,a.useEffect)(()=>{if(V&&V.includes(z)&&K){G("");let e=null==H?void 0:H.getElementById("".concat(d,"_parent")),t=0;if(null==e?void 0:e.children[0]){for(let l=0;l<e.children[0].children.length;l++){let i=e.children[0].children[l];if(V.includes(i.innerHTML))break;t+=i.getBoundingClientRect().width}e.scrollLeft=t}}},[V]);let getSectionFilter=()=>{var e,t,l,i;switch(typeof(null==T?void 0:null===(e=T[null==k?void 0:k.blockId])||void 0===e?void 0:e.sectionFilter)){case"object":return(null==T?void 0:null===(l=T[null==k?void 0:k.blockId])||void 0===l?void 0:null===(t=l.sectionFilter)||void 0===t?void 0:t.sectionId)||"";case"string":return(null==T?void 0:null===(i=T[null==k?void 0:k.blockId])||void 0===i?void 0:i.sectionFilter)||"";default:return""}};return(0,i.jsxs)("div",{id:"".concat(d,"_child"),style:{width:"100%",height:"100%",...(0,o.Fj)(h),boxShadow:(0,o.tX)(x),borderRadius:(0,o.Wl)(g),...(0,o.J$)(m),justifyContent:C?"flex-start":null===(l=(0,o.J$)(m))||void 0===l?void 0:l.justifyContent,alignItems:"center"},children:[k&&(null==I?void 0:I.section)&&(()=>{if("rootSections"===S)return[I.section];let e=[...I.section.children].sort((e,t)=>e.sequence-t.sequence),t=getSectionFilter().toUpperCase();return t?e.filter(e=>e.sectionId.toUpperCase()===t):e})().map(t=>t.children.filter(e=>sectionCheck(e)).sort((e,t)=>e.sequence-t.sequence).map((t,l)=>{var n,s,a,r;let d="".concat(t.sectionId,"_").concat(k.blockId);if(void 0===B&&Z(d),F.includes(d)||U([d,...F]),"page"===f&&(null==R?void 0:null===(n=R.blocks)||void 0===n?void 0:n[0]))return(0,i.jsx)(c.Z,{block:null==R?void 0:null===(s=R.blocks)||void 0===s?void 0:s[0],localData:new Map([...(null==e?void 0:e.localData)||[],...Object.entries({sectionId:t,...t,keyId:"sectionId",onClick:onCl
1ick,active:V===d,useEffect:Math.random()})])},l);let u=q("".concat(null===(a=t.sectionId)||void 0===a?void 0:a.toUpperCase(),".name"));if(u==="".concat(null===(r=t.sectionId)||void 0===r?void 0:r.toUpperCase(),".name")&&(u=t.sectionName),"styled"===f)return(0,i.jsx)("div",{onClick:()=>onClick(new Map([...Object.entries(t)])),style:{whiteSpace:"nowrap",...(0,o.Gf)(V===d?L:j),cursor:"pointer",...(0,o.lG)(b)},children:u},l)})),!k&&(0,i.jsx)("div",{style:{width:"100%",height:"100%",textAlign:"center",fontSize:"16px"},children:"Please select a menu in properties."})]})};NavBar.displayName="NavBar",NavBar.schema=h.X,t.default=(0,a.memo)(NavBar)},11025:function(e,t,l){"use strict";l.r(t);var i=l(85893),n=l(12608),o=l(49268),s=l(9473),a=l(67294),r=l(175),d=l(22052),c=l(90620),u=l(85271);let SearchBar=e=>{let{blockName:t,children:l,backgroundColor:u,padding:p,placeholderText:h,filterMenuBlock:v,filterListBlock:g,font:x,fontPadding:m,textAlign:k,inputBackgroundColor:f,border:y,borderRadius:b,boxShadow:w,showIcon:j,iconSize:C,iconColor:L,iconMargin:I}=e,S=(0,s.v9)(e=>e.usersList.searchFilter,d.Z),E=(0,s.I0)(),N=(0,a.useCallback)(e=>{var t;return!e||!S||(null==e||delete e.modifierGroups,null==e||null===(t=e.menuItem)||void 0===t||delete t.modifierGroups,JSON.stringify(e).toLowerCase().includes(S.toLowerCase()))},[S]);(0,a.useEffect)(()=>{let e=[null==v?void 0:v.blockId,null==g?void 0:g.blockId].filter(Boolean);if(e.length){let l=(0,c.v4)();return E({type:"REGISTER",keys:e,callBack:N,filterBlockName:t,callBackId:l}),()=>{E({type:"UNREGISTER",keys:e,callBack:N,filterBlockName:t,callBackId:l})}}},[S,v,g,N]);let T=(0,a.useMemo)(()=>({width:"100%",height:"100%",backgroundColor:(0,o.ad)(u),...(0,o.lG)(p),justifyContent:"center",alignItems:"center",display:"flex",cursor:"default"}),[u,p]),M=(0,a.useMemo)(()=>({width:"100%",height:"100%",backgroundColor:(0,o.ad)(f),display:"flex",alignItems:"center",...(0,o.Fj)(y),borderRadius:(0,o.Wl)(b),boxShadow:(0,o.tX)(w)}),[f,y,b,w]),D=(0,a.useMemo)(()=>({...(0,o.QS)(I),minWidth:null==C?void 0:C.value}),[I,null==C?void 0:C.value]),P=(0,a.useMemo)(()=>({width:"100%",height:"100%",backgroundColor:"transparent",...(0,o.lG)(m),...(0,o.Gf)(x),textAlign:k}),[m,x,k]),H=(0,a.useMemo)(()=>({size:null==C?void 0:C.value,color:(0,o.ad)(L)}),[null==C?void 0:C.value,L]);return(0,i.jsx)("div",{style:T,children:(0,i.jsx)(n.f,{block:l,children:(0,i.jsxs)("div",{style:M,children:["true"===j&&(0,i.jsx)(r.Z,{...H,style:D}),(0,i.jsx)("form",{style:{width:"100%",height:"100%"},autoComplete:"off",spellCheck:"false",onSubmit:e=>e.preventDefault(),children:(0,i.jsx)("input",{value:S,onChange:e=>{E({type:"UPDATE_VARIABLE",name:"searchFilter",value:e.target.value})},placeholder:h,style:P,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false","data-form-type":"other","data-lpignore":"true","data-1p-ignore":"true",name:"search",type:"text",role:"searchbox","aria-label":"Search menu items"})})]})})})};SearchBar.displayName="Search Bar",SearchBar.schema=u.w,t.default=(0,a.memo)(SearchBar)},48755:function(e,t,l){"use strict";l.r(t);var i=l(85893),n=l(12608),o=l(49268),s=l(9473),a=l(67294),r=l(70233),d=l(40755),c=l(38858),u=l(77724),p=l(2609),h=l(75289),v=l(22052),g=l(90620),x=l(92018);let SectionFilter=e=>{var t,l,x;let{blockData:m,blockName:k,blockId:f,children:y,backgroundColor:b,padding:w,selectedMenu:j,blockVariant:C,dropdownPlacement:L,selectedSectionOnLoad:I,container:S,border:E,borderRadius:N,boxShadow:T,itemFont:M,itemContainer:D,itemWidth:P,itemHeight:H,itemBackgroun
1dColor:B,itemPadding:Z,itemMargin:R,itemBorder:A,itemBorderRadius:V,itemBoxShadow:_,sItemFont:F,sItemContainer:U,sItemWidth:z,sItemHeight:G,sItemBackgroundColor:K,sItemPadding:Y,sItemMargin:q,sItemBorder:J,sItemBorderRadius:X,sItemBoxShadow:Q,dItemFont:$,dItemContainer:ee,dItemWidth:et,dItemHeight:el,dItemBackgroundColor:ei,dItemPadding:en,dItemMargin:eo,dItemBorder:es,dItemBorderRadius:ea,dItemBoxShadow:er,dWidth:ed,dHeight:ec,dBackgroundColor:eu,dPadding:ep,dBorder:eh,dBorderRadius:ev,dBoxShadow:eg,dContainer:ex,dIconSize:em,dIconColor:ek,dIconMargin:ef,showItemImage:ey,itemBackgroundImage:eb,itemImageWidth:ew,itemImageHeight:ej,itemImageMargin:eC}=e,eL=(0,s.v9)(e=>e.usersList.menus,v.Z),eI=(0,s.v9)(e=>e.usersList.menuFilters,v.Z),eS=(0,s.v9)(e=>e.usersList.menuFiltersBit,v.Z),eE=(0,s.v9)(e=>e.usersList.menuReference,v.Z),eN=(0,s.v9)(e=>e.usersList.openPopover,v.Z),eT=(0,s.v9)(e=>e.usersList.clickableLinks,v.Z),eM=(0,a.useContext)(c.P8),eD=(0,s.I0)(),[eP,eH]=(0,a.useState)(""),[eB,eZ]=(0,a.useState)({}),setOpenPopover=e=>{eD({type:"UPDATE_OPEN_POPOVER",openPopover:e,setAnyways:!0})},eO=(0,a.useCallback)(e=>{var t;return null==e||!e.sectionName||!eP||(null==e?void 0:null===(t=e.sectionId)||void 0===t?void 0:t.toUpperCase())===(null==eP?void 0:eP.toUpperCase())},[eP]);(0,a.useEffect)(()=>{let e=[null==j?void 0:j.blockId].filter(Boolean);if(e.length){let t=(0,g.v4)();return eD({type:"REGISTER",keys:e,callBack:eO,filterBlockName:k,callBackId:t}),()=>{eD({type:"UNREGISTER",keys:e,callBack:eO,filterBlockName:k,callBackId:t})}}},[eP,j,eO]),(0,a.useEffect)(()=>{var e,t;let l=(null==m?void 0:null===(e=m.get("menu"))||void 0===e?void 0:e.menu)||(null==eL?void 0:null===(t=eL[eE[null==j?void 0:j.blockId]])||void 0===t?void 0:t.menu)||{};(null==l?void 0:l.menuId)!==(null==eB?void 0:eB.menuId)&&eZ(l)},[m,eL,j,eE]),(0,a.useEffect)(()=>{if(eI[null==j?void 0:j.blockId]){let e=eI[j.blockId].sectionFilter;e?eH(e):eH("")}},[eI,j,eS]);let eR=(0,a.useCallback)(e=>{var t;(null==j?void 0:j.blockId)&&(null===(t=eI[j.blockId])||void 0===t?void 0:t.sectionFilter)!==(null==e?void 0:e.sectionId)&&eH(null==e?void 0:e.sectionId)},[j,eI]);(0,a.useEffect)(()=>{var e,t,l;if((null==eB?void 0:null===(e=eB.section)||void 0===e?void 0:e.children[0])&&Object.keys(eB).length){let e,i=null===(l=window)||void 0===l?void 0:null===(t=l.location)||void 0===t?void 0:t.search,n=new URLSearchParams(i);if(n.get("currentSection")){eD({type:"UPDATE_MENU_FILTERS",blockId:j.blockId,name:"sectionFilter",value:{sectionId:n.get("currentSection")}});return}I&&(e=eB.section.children.find(e=>{var t;return(null===(t=e.sectionId)||void 0===t?void 0:t.toUpperCase())===(null==I?void 0:I.toUpperCase())})),void 0===e&&(e=eB.section.children.sort((e,t)=>e.sequence-t.sequence)[0]),eR(e)}},[eB,j,I,eR]),(0,a.useEffect)(()=>{(0,h.Z)(null==j?void 0:j.blockId),eP&&eD({type:"UPDATE_MENU_FILTERS",blockId:j.blockId,name:"sectionFilter",value:eP})},[eP,j]);let eA=(0,a.useCallback)(t=>({width:(0,o.o3)(e[t+"Width"]),height:(0,o.o3)(e[t+"Height"]),background:(0,o.ad)(e[t+"BackgroundColor"]),...(0,o.lG)(e[t+"Padding"]),...(0,o.QS)(e[t+"Margin"]),...(0,o.J$)(e[t+"Container"]),...(0,o.Gf)(e[t+"Font"]),...(0,o.Fj)(e[t+"Border"]),borderRadius:(0,o.Wl)(e[t+"BorderRadius"]),boxShadow:(0,o.tX)(e[t+"BoxShadow"]),cursor:"pointer"}),[e]),eV=(0,a.useMemo)(()=>({zIndex:"1110",width:(0,o.o3)(ed),maxWidth:"none",height:(0,o.o3)(ec),backgroundColor:(0,o.ad)(eu),...(0,o.lG)(ep),...(0,o.Fj)(eh),borderRadius:(0,o.Wl)(ev),boxShadow:(0,o.tX)(eg),...(0,o.J$)(ex)}),[ed,ec,eu,ep,eh,ev,eg,ex]),eW=(0,a.useMemo)(()=>({width:"100%",height:"100%",backgroundColor:(0,o.ad)(b),...(0,o.lG)(w),justifyContent:"center",alignItems:"center",display:"flex",cursor:"default"}),[b,w]),e_=(0,a.useMemo)(()=>({width:"100%",height:"100%",...(0,o.Fj)(E),borderRadius:(0,o.Wl)(N),boxShadow:(0,o.tX)(T)}),[E,N,T]),eF=(0,a.useMemo)(()=>({...(0,o.J$)(S),height:"100%",textAlign:"center"}),[S]),eU=(0,a.useCallback)((e,t,l)=>({size:null==e?void 0:e.value,color:(0,o.ad)(t),style:(0,o.QS)(l)}),[]),ez=(0,a.useMemo)(()=>eU(em,ek,ef),[em,ek,ef,eU]),eG=(0,a.useCallback)((e,t,l,i,n)=>({width:(0,o.o3)(e),minWidth:(0,o.o3)(e),height:(0,o.o3)(t),minHeight:(0,o.o3)(t),...(0,o.QS)(l),...(0,o.nc)(i,n)}),[]),eK=(0,a.useMemo)(()=>(0,i.jsx)(d.Z,{id:"popover-basic",style:eV,children:Object.keys(eB).length>0&&eB.section.children.filter(e=>e.guestFacing&&e.website).sort((e,t)=>
1e.sequence-t.sequence).map((e,t)=>eP===e.sectionId?(0,i.jsxs)("div",{onClick:()=>{eT&&eR(e)},style:eA("sItem"),children:["true"===ey&&(0,i.jsx)("div",{style:eG(ew,ej,eC,eb,e.url)}),e.sectionName]},t):(0,i.jsxs)("div",{onClick:()=>{eT&&eR(e)},style:eA("dItem"),children:["true"===ey&&(0,i.jsx)("div",{style:eG(ew,ej,eC,eb,e.url)}),e.sectionName]},t))}),[eB,eP,eR,eA,ey,eG,ew,ej,eC,eb,eV]),eY=(0,a.useMemo)(()=>{var e;return(null==eB?void 0:null===(e=eB.section)||void 0===e?void 0:e.children)?eB.section.children.filter(e=>e.guestFacing&&e.website).sort((e,t)=>e.sequence-t.sequence):[]},[eB]);return(0,i.jsx)("div",{style:eW,children:(0,i.jsx)(n.f,{block:y,children:(0,i.jsx)("div",{style:e_,children:Object.keys(eB).length>0&&(0,i.jsxs)("div",{style:eF,children:["dropdown"===C&&(0,i.jsx)(r.Z,{show:eN==="sectionFilter_".concat(f),placement:L,overlay:eK,container:(null==eM?void 0:eM.body)||void 0,trigger:["click","focus"],onToggle:e=>{e||setOpenPopover("")},children:(0,i.jsxs)("div",{onClick:()=>{eT&&setOpenPopover("sectionFilter_".concat(f))},style:eA("item"),children:[(null==eB?void 0:null===(x=eB.section)||void 0===x?void 0:null===(l=x.children)||void 0===l?void 0:null===(t=l.find(e=>e.sectionId===eP))||void 0===t?void 0:t.sectionName)||"",eN==="sectionFilter_".concat(f)?(0,i.jsx)(u.Z,{...ez}):(0,i.jsx)(p.Z,{...ez})]})}),"list"===C&&eY.map((e,t)=>(0,i.jsxs)("div",{onClick:()=>{eT&&eR(e)},style:eA(eP===e.sectionId?"sItem":"item"),children:["true"===ey&&(0,i.jsx)("div",{style:eG(ew,ej,eC,eb,e.url)}),e.sectionName]},t))]})})})})};SectionFilter.displayName="SectionFilter",SectionFilter.schema=x.B,t.default=(0,a.memo)(SectionFilter)},4759:function(e,t,l){"use strict";l.r(t);var i=l(85893),n=l(26070),o=l(12608);l(9292),l(54705);var s=l(49268),a=l(67294),r=l(97279),d=l(62473);let SlideShow=e=>{let{backgroundColor:t,padding:l,controls:d,index:c,slideAnimation:u,duration:p,addChild:h,presentationType:v,imgWidth:g,imgHeight:x,marginInline:m,scheduledData:k,children:f,slideshowBackgroundImage:y,galleryImgContainer:b,galleryImgWidth:w,galleryImgHeight:j,galleryBackgroundImage:C,galleryImgMargin:L,galleryImgBorder:I,galleryImgBorderRadius:S,galleryImgBoxShadow:E}=e,[N,T]=(0,a.useState)(""),[M,D]=(0,a.useState)([]),[P,H]=(0,a.useState)(0),[B,Z]=(0,a.useState)(!1),getResolution=e=>{if(e)return e.replace("https://kluck-highres.","https://kluck.")};if((0,a.useEffect)(()=>{T((0,s.ad)(t))},[t]),(0,a.useEffect)(()=>{if((null==k?void 0:k.type)==="play"){var e;let t=[],l=null==k?void 0:null===(e=k.playList)||void 0===e?void 0:e.playListItems;if(null==l?void 0:l.length)for(let e=0;e<l.length;e++)t.push({checked:!0,name:l[e].description,url:l[e].url});D(t)}else D(h)},[h,k]),f)return(0,i.jsx)("div",{style:{width:"100%",height:"100%",backgroundColor:N,...(0,s.lG)(l),overflow:"hidden"},children:(0,i.jsxs)(o.f,{block:f,children:["slide"===v&&(0,i.jsx)(r.Z,{indicators:"true"===c,controls:"true"===d,fade:"true"!==u,interval:parseInt(p),style:{height:"100%"},pause:!1,children:null==M?void 0:M.filter(e=>e.checked).map((e,t)=>(0,i.jsx)(r.Z.Item,{style:{height:"100%"},children:(0,i.jsx)("div",{style:{width:"100%",height:"100%",...(0,s.nc)(y,e.url?e.url:e.name)}})},t))}),"collage"===v&&(0,i.jsx)(n.Z,{vertical:!1,style:{display:"flex",cursor:"grab",height:"100%"},children:null==M?void 0:M.filter(e=>e.checked).map((e,t)=>{var l;return(0,i.jsx)("div",{style:{display:"flex",alignItems:t%2==0?"flex-end":"flex-start",width:g,margin:(0,s.o3)(m)},children:(0,i.jsx)("img",{src:null===(l=e.url)||void 0===l?void 0:l.replace("https://kluck.s3.amazonaws.com/","https://cdn.getkluck.com/"),style:{width:(0,s.o3)(g),height:(0,s.o3)(x)},alt:""})},t)})}),"gallery"===v&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{width:"auto",height:"100%",display:"flex",...(0,s.J$)(b)},children:M.filter(e=>e.checked).map((e,t)=>(0,i.jsx)("div",{onClick:()=>{H(t),Z(!0)},style:{width:(0,s.o3)(w),height:(0,s.o3)(j),...(0,s.lG)(L),...(0,s.nc)(C,getResolution(e.url)),cursor:"pointer",...(0,s.Fj)(I),borderRadius:(0,s.Wl)(S),boxShadow:(0,s.tX)(E)}},t))}),B&&(0,i.jsxs)("div",{className:"editorPopover",style:{width:"100vw",height:"100vh",position:"fixed",top:"0",left:"0"},children:[(0,i.jsx)("svg",{onClick:()=>Z(!1),style:{width:"24px",height:"24px",position:"absolute",top:"12px",right:"12px",cursor:"pointer",zIndex:"2"},viewBox:"0 0 24 24",children:(0,i.jsx)("path",{fill:"white",d:"M13.46,12L19,17.54V19H17.54L12,13.46L6.46,19H5V17.54L10.54,12L5,6.46V5H6.46L12,10.54L17.54,5H19V6.46L13.46,12Z"})}),(0,i.jsx)(r.Z,{onSelect:e=>H(e),activeIndex:P,indicators:"true"===c,controls:"true"===d,fade:"true"!==u,interval:timer,children:M.filter(e=>e.checked).map((e,t)=>(0,i.jsx)(r.Z.Item,{style:{height:"100vh",background:"rgb(0 0 0 / .5)"},children:(0,i.jsx)("div",{style:{width:"100%",height:"75%",marginTop:"12.5%",...(0,s.nc)(C,getResolution(e.url)),backgroundSize:"auto 100%",...(0,s.Fj)(I),borderRadius:(0,s.Wl)(S)}})},t))})]})]})]})})};SlideShow.displayName="SlideShow",SlideShow.schema=d.G,t.default=(0,a.memo)(SlideShow)},50538:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return w}});var i=l(85893),n=l(54402),o=l(49268),s=l(67294),a=l(3506),r=l(51476),d=l(9473),c=l(22052),u=l(49040),p=l(34988),h=l(12024),v=l(75277),g=l(57609),x=l(47097);let m=new x.ZP;var k=(0,s.memo)(e=>{let{record:t,localData:l,childrenNode:o,blockId:a}=e,r=(0,d.v9)(e=>e.usersList.menus,c.Z),x=(0,d.v9)(e=>
1e.usersList.menuItemLocations,c.Z),k=(0,d.v9)(e=>e.usersList.locationValues,c.Z),f=(0,d.v9)(e=>e.usersList.pricingBooks,c.Z),y=(0,d.v9)(e=>e.usersList.userData,c.Z),b=(0,d.v9)(e=>e.usersList.orderTime,c.Z),w=(0,d.I0)(),j=(null==b?void 0:b.time)instanceof Date?b.time:new Date,C=(0,u.ZP)(f,k,y,m,(0,v.Z)(),j,g.Z,e=>(0,p.Z)(r,e,!0)),L=(0,s.useMemo)(()=>{var e;let l=null==t?void 0:t.menuItemId,i=999;if(x){let e=x[l];i=void 0===e||e.unlimited?999:e.available}let n=null===(e=C(t))||void 0===e?void 0:e.price,o={...t||{},available:i,defaultPrice:n};return o.menuItemOptions&&(o.menuItemOptions=(0,h.Z)(o.menuItemOptions,C,e=>(0,p.Z)(r,e,!0))),o},[t,x,C]),I=(0,s.useMemo)(()=>new Map([...l,...Object.entries(L)]),[l,L]);return(0,s.useEffect)(()=>{a&&w({type:"UPDATE_BLOCK_DATA",blockData:[{blockId:a,data:new Map(Object.entries(L))}]})},[a,L]),((null==o?void 0:o.children)||[]).map((e,t)=>(0,i.jsx)(n.Z,{block:e,localData:I},t))});let f={PLAYLIST:"play",SCHEDULEDPROMOTION:"promo"};var y=(0,s.memo)(e=>{let{record:t,localData:l,childrenNode:o,objectName:a}=e,r=(0,s.useMemo)(()=>t?{...t,type:f[a]}:void 0,[t,a]),d=(0,s.useMemo)(()=>new Map([...l,...Object.entries(r||{})]),[l,r]);return((null==o?void 0:o.children)||[]).map((e,t)=>((null==e?void 0:e.params)&&(e.params.scheduledData=r),(0,i.jsx)(n.Z,{block:e,localData:d},t)))});let b={MENUITEM:k,PLAYLIST:y,SCHEDULEDPROMOTION:y},Data=e=>{var t;let{children:l,localData:r,backgroundColor:d,padding:c,blockId:u,border:p,borderRadius:h,boxShadow:v,container:g,data:x}=e,{data:m}=(0,a.ZP)(null==x?void 0:x.objectName,null==x?void 0:x.itemId),k=(0,s.useMemo)(()=>r instanceof Map?r:new Map(Object.entries(r||{})),[r]),f=(0,s.useMemo)(()=>{let e=m&&"object"==typeof m&&!(m instanceof Map)&&!Array.isArray(m);return e?new Map([...k,...Object.entries(m)]):k},[k,m]),y=m?b[null==x?void 0:x.objectName]:null;return(0,i.jsx)("div",{style:{width:"100%",height:"100%",...(0,o.lG)(c),background:(0,o.ad)(d),...(0,o.J$)(g),...(0,o.Fj)(p),borderRadius:(0,o.Wl)(h),boxShadow:(0,o.tX)(v)},children:y?(0,i.jsx)(y,{record:m,localData:k,childrenNode:l,blockId:u,objectName:null==x?void 0:x.objectName}):null==l?void 0:null===(t=l.children)||void 0===t?void 0:t.map((e,t)=>(0,i.jsx)(n.Z,{block:e,localData:f},t))})};Data.displayName="Data",Data.schema=r.S;var w=(0,s.memo)(Data)},36563:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return k}});var i=l(85893),n=l(45407),o=l(97443),s=l(67294),a=l(9473),r=l(12608),d=l(49268),c=l(49040),u=l(22052),p=l(75277),h=l(57609),v=l(34988),g=l(12024),x=l(63998),menuBoard_SectionCondensed=e=>{let{section:t}=e,{showSectionTitle:l,sectionTitleFont:n,sectionTitlePadding:o,sectionTitleAlign:r,showSectionDesc:m,sectionDescFont:k,sectionDescPadding:f,sectionDescAlign:y,showSubSections:b,condensedPerRow:w,condensedPerColumn:j,cardBoxShadow:C,cardBorder:L,cardBorderRadius:I,menuItemTextPadding:S,textBackgroundColor:E,menuItemTextAlign:N,menuItemNameFont:T,priceFont:M}=e.props,D=(0,a.v9)(e=>e.usersList.orderHeaderLocations,u.Z),P=(0,a.v9)(e=>e.usersList.pricingBooks,u.Z),H=(0,a.v9)(e=>e.usersList.locationValues,u.Z),B=(0,a.v9)(e=>e.usersList.userData,u.Z),Z=(0,a.v9)(e=>e.usersList.orderHeader,u.Z),R=(0,a.v9)(e=>e.usersList.orderTime,u.Z),A=(0,a.v9)(e=>e.usersList.menus,u.Z),[V,_]=(0,s.useState)([]),F=(null==R?void 0:R.time)instanceof Date?null==R?void 0:R.time:new Date,U=(0,c.ZP)(P,H,B,Z,(0,p.Z)(),F,h.Z,e=>(0,v.Z)(A,e,!0)),{isMenuItemAvailable:z}=(0,x.ZP)(),getMenuItemStyle=()=>{let e={};return e.boxShadow=(0,d.tX)(C),e.borderRadius=(0,d.Wl)(I),e.width="100%",e.height="100%",e.overflow="hidden",e};return(0,s.useEffect)(()=>{var e,l;let i=[],n=[],o=[],parseSection=e=>{e.children.length>0&&e.children.sort((e,t)=>e.sequence-t.sequence),e.sectionItems.length>0&&e.sectionItems.sort((e,t)=>e.sequence-t.sequence);for(let t=0;t<e.sectionItems.length;t++)null!==e.sectionItems[t].menuItem&&e.sectionItems[t].menuItem.guestFacing&&z(e.sectionItems[t].menuItem.menuItemId)&&n.push(e.sectionItems[t]);if(void 0===b||"true"===b)for(let t=0;t<e.children.length;t++)parseSection(e.children[t])};t&&(null===(l=Object)||void 0===l?void 0:null===(e=l.keys(t))||void 0===e?void 0:e.length)&&parseSection(t);let s=n.length%w,a=void 0!==w?w:1;j.includes("fill")&&(s=0,a=i.length);for(let e=0;e<n.length;e++)o.length<Math.floor(n.length/a)+(i.length<s?1:0)&&o.push(n[e]),(o.length===Math.floor(n.length/a)+(i.length<s?1:0)||e===n.length-1)&&(length-=o.length,i.push(o),o=[]);_(i)},[t,b,w,j,z]),(0,i.jsxs)("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,i.jsxs)("div",{children:["true"===l&&void 0!==t&&(0,i.jsx)("div",{style:{...(0,d.lG)(o),...(0,d.Gf)(n),textAlign:r},children:t.sectionName}),"true"===m&&void 0!==t&&(0,i.jsx)("div",{style:{...(0,d.lG)(f),...(0,d.Gf)(k),textAlign:y},children:t.sectionDescription})]}),(0,i.jsx)("div",{style:{width:"100%",height:"true"===l||"true"===m?"90%":"100%",display:"flex",flexDirection:j.includes("fill")?"column":"row",flexWrap:j.includes("fill")?"wrap":"nowrap"},children:V.length>0&&V.map((e,t)=>(0,i.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:j.includes("row")?"row":"column",flexWrap:j.includes("fill")?"wrap":"nowrap"},children:e.length>0&&e.map((e,t)=>{let l=e.menuItem;if(D){let e=D[l.menuItemId];void 0===e||e.unlimited?l.available=999:l.available=e.available}else l.available=999;let n=U(l);return l.defaultPrice=n.price,l.menuItemOptions=(0,g.Z)(l.menuItemOptions,U,e=>(0,v.Z)(A,e,!0)),(0,i.jsx)("div",{style:{width:j.includes("fill")?"calc(100% / ".concat(w,")"):"100%",padding:"2px 6px"},children:(0,i.jsx)("div",{style:{...getMenuItemStyle(),...(0,d.Fj)(L),opacity:l.available>0?"unset":"0.5"},children:(0,i.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",...(0,d.lG)(S),textAlign:N,backgroundColor:(0,d.ad)(E)},children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("span",{style:(0,d.Gf)(T),children:l.menuItemName})," ",(0,i.jsx)("span",{style:(0,d.Gf)(M),children:0!==l.defaultPrice?l.defaultPrice
1:""})]}),l.menuItemOptions.length>0&&(0,i.jsx)("div",{style:{display:"flex",justifyContent:"flex-start",flexWrap:"wrap",...(0,d.Gf)(M)},children:l.menuItemOptions.sort((e,t)=>e.sequence-t.sequence).map((e,t)=>(0,i.jsxs)("div",{style:{marginRight:"8px",fontSize:"80%"},children:[e.menuItemOptionName," ",e.amount>0&&(0,i.jsx)(i.Fragment,{children:e.amount})]},t))})]})})},t)})},t))})]})},m=l(54673);let SingleSection=e=>{let{children:t,padding:l,selectedSection:c,showSubSections:p,sortByGuestFacing:h,showSectionTitle:v,sectionTitleFont:g,sectionTitlePadding:x,sectionTitleAlign:m,showSectionDesc:k,sectionDescFont:f,sectionDescPadding:y,sectionDescAlign:b,cardFontScaling:w,cardsRowPadding:j,cardsJustifyContent:C,xs:L,sm:I,md:S,lg:E,xl:N,xxl:T,itemsToShow:M,menuItemStyle:D,condensedPerRow:P,condensedPerColumn:H,show86Type:B,cardWidth:Z,cardHeight:R,cardMargin:A,cardPadding:V,cardBackgroundColor:_,cardBorder:F,cardBorderRadius:U,cardBoxShadow:z,showImages:G,imageWidth:K,imageHeight:Y,imageOrientation:q,backgroundImage:J,showText:X,menuItemTextPadding:Q,textBackgroundColor:$,menuItemTextAlign:ee,menuItemNameFont:et,showLine:el,lineColor:ei,showMenuItemDesc:en,menuItemDescPadding:eo,menuItemDescFont:es,menuItemOptionFont:ea,menuItemOptionPadding:er,menuItemDietFont:ed,showPrice:ec,showPriceCC:eu,priceFormat:ep,priceFont:eh,priceLocation:ev,priceBackgroundColor:eg,pricePadding:ex,priceMargin:em,priceBorder:ek,priceBorderRadius:ef,priceBoxShadow:ey}=e,eb=(0,a.v9)(e=>e.usersList.menus,u.Z),ew=(0,a.v9)(e=>e.usersList.conceptsRetrieved,u.Z),ej=(0,a.v9)(e=>e.usersList.selectedConcept,u.Z),[eC,eL]=(0,s.useState)(""),[eI,eS]=(0,s.useState)(void 0),[eE,eN]=(0,s.useState)(void 0);return(0,s.useEffect)(()=>{var t,l,i;let n=(null==e?void 0:null===(t=e.menu)||void 0===t?void 0:t.conceptId)==="selectedConcept"?null==ej?void 0:ej.conceptId:null==e?void 0:null===(l=e.menu)||void 0===l?void 0:l.conceptId;ew.find(e=>e.toUpperCase()===(null==n?void 0:n.toUpperCase()))&&eS(null===(i=eb[eC])||void 0===i?void 0:i.menu)},[eb,eC,ej,ew]),(0,s.useEffect)(()=>{if(eI){let parseMenu=e=>{var t;(e.sectionName===c||(null===(t=e.sectionId)||void 0===t?void 0:t.toUpperCase())===(null==c?void 0:c.toUpperCase()))&&eN(e);for(let t=0;t<e.children.length;t++)parseMenu(e.children[t])};parseMenu(eI.section)}},[eI,c]),(0,i.jsxs)("div",{style:{width:"100%",height:"100%",backgroundColor:(0,d.ad)(e.backgroundColor),...(0,d.lG)(l),color:"white",position:"relative"},children:[e.menu&&(0,i.jsx)(n.Z,{menu:e.menu,blockId:e.children.blockId,menuId:eC,setMenuId:eL}),(0,i.jsxs)(r.f,{block:t,children:[(null==c?void 0:c.length)&&D&&eC&&eE&&(0,i.jsxs)("div",{style:{height:"100%",marginTop:"calc(-1 * ".concat((0,d.lG)(x).paddingTop,")")},children:["normal"===D&&(0,i.jsx)(o.Z,{menuId:eC,singleSection:!0,sections:[eE],level:0,props:e}),"condensed"===D&&(0,i.jsx)(menuBoard_SectionCondensed,{section:eE,props:e})]}),(null==c?void 0:c.length)===0&&(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",fontSize:"24px",color:"black"},children:(0,i.jsx)("div",{children:"Please select a section in properties."})})]})]})};SingleSection.displayName="SingleSection",SingleSection.schema=m.Z;var k=(0,s.memo)(SingleSection)},3506:function(e,t,l){"use strict";l.d(t,{MS:function(){return getObjectId},el:function(){return getSchemaByObjectName},vZ:function(){return getIdField}});var i=l(67294),n=l(9473),o=l(43435),s=l(81885),a=l(22052);let getDataTypeOptions=()=>o.J.filter(e=>e.showInDataBlock&&e.objectName&&e.objectLabel).map(e=>({label:e.objectLabel,value:e.objectName})),getSchemaByObjectName=e=>o.J.find(t=>t.objectName===e)||null,getIdField=e=>(null==e?void 0:e.idKey)||(null==e?void 0:e.keyId)||"",getObjectId=e=>getIdField(getSchemaByObjectName(e)),isPlainObject=e=>e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof Map),toArray=(e,t)=>e?Array.isArray(e)?e:e instanceof Map?Array.from(e.values()):"object"==typeof e?t&&void 0!==e[t]?[e]:Object.values(e):[]:[],dedupeBy=(e,t)=>{let l=[],i=new Set;return(e||[]).forEach(e=>{if(!e)return;let n=null==e?void 0:e[t],o=null!=n?n:JSON.stringify(e);
1i.has(o)||(i.add(o),l.push(e))}),l},fromConcepts=(e,t)=>{if(!e||"object"!=typeof e)return[];let l=[];return Object.values(e).forEach(e=>{Array.isArray(null==e?void 0:e[t])&&l.push(...e[t])}),l},allModifierGroups=e=>{let t=[];return Object.values(e||{}).forEach(e=>{(null==e?void 0:e.modifierGroupMap)&&t.push(...Object.values(e.modifierGroupMap))}),t},allSections=e=>{let t=[],parseSections=e=>e?Array.isArray(e)?e:"object"==typeof e?Object.values(e):[]:[],collect=e=>{parseSections(e).forEach(e=>{e&&(t.push(e),collect(e.children))})};return Object.values(e||{}).forEach(e=>{var t,l;return collect(null==e?void 0:null===(l=e.menu)||void 0===l?void 0:null===(t=l.section)||void 0===t?void 0:t.children)}),t},r={CONCEPT:e=>{let{locationValues:t}=e;return Array.isArray(null==t?void 0:t.concepts)?t.concepts:[]},MENU:e=>{let{menus:t}=e;return Object.values(t||{}).map(e=>null==e?void 0:e.menu).filter(Boolean)},MENUITEM:e=>{let{concepts:t}=e;return fromConcepts(t,"menuItems")},MODIFIERGROUP:e=>{let{menus:t}=e;return allModifierGroups(t)},MODIFIER:e=>{let{menus:t}=e;return allModifierGroups(t).flatMap(e=>(null==e?void 0:e.modifiers)||[])},SECTION:e=>{let{menus:t}=e;return allSections(t)},PLAYLIST:e=>{let{namedSlice:t}=e;return Array.isArray(null==t?void 0:t.website)?t.website:[]},SCHEDULEDPROMOTION:e=>{let{namedSlice:t}=e;return Array.isArray(null==t?void 0:t.website)?t.website:[]}},resolveRecords=(e,t)=>{if(!e)return[];let l=getIdField(e),i=r[e.objectName];if(i)return dedupeBy(i(t),l);let n=toArray(t.namedSlice,e.keyId);if(n.length)return dedupeBy(n,l);let o=fromConcepts(t.concepts,e.key);if(o.length)return dedupeBy(o,l);if(t.globalDataUrl&&t.globalData instanceof Map){let i=toArray(t.globalData.get(t.globalDataUrl),e.keyId);if(i.length)return dedupeBy(i,l)}return[]};t.ZP=(e,t)=>
1{let l=(0,i.useMemo)(()=>e?getSchemaByObjectName(e):null,[e]),o=(0,i.useMemo)(()=>getDataTypeOptions(),[]),r=(0,i.useMemo)(()=>{if(!l||!["s3","url","globalData"].includes(l.type))return"";try{return(0,s.Z)(l)}catch(e){return""}},[l]),d=(0,n.v9)(e=>(null==l?void 0:l.key)?e.usersList[l.key]:void 0,a.Z),c=(0,n.v9)(e=>e.usersList.concepts,a.Z),u=(0,n.v9)(e=>e.usersList.menus,a.Z),p=(0,n.v9)(e=>e.usersList.locationValues,a.Z),h=(0,n.v9)(e=>e.usersList.globalData,a.Z),v=(0,i.useMemo)(()=>resolveRecords(l,{namedSlice:d,concepts:c,menus:u,locationValues:p,globalData:h,globalDataUrl:r}),[l,d,c,u,p,h,r]),g=(0,n.I0)(),x=(0,i.useRef)(null);(0,i.useEffect)(()=>{if(!(null==l?void 0:l.fetchInDataBlock)||v.length>0)return;let e=null==p?void 0:p.locationId;e&&x.current!==e&&(x.current=e,g({type:"GET_DATA",keys:[l.key],mustacheData:{}}))},[l,v.length,null==p?void 0:p.locationId,g]);let m=(0,i.useMemo)(()=>{if(l){if(l.singleObject)return isPlainObject(d)?d:void 0;if(null!=t&&""!==t){let e=getIdField(l);return v.find(l=>String(null==l?void 0:l[e])===String(t))}}},[l,t,v,d]);return{schema:l,data:m,records:v,objectId:(null==l?void 0:l.keyId)||"",objectLabel:(null==l?void 0:l.objectLabel)||"",dataTypeOptions:o}}},33315:function(e,t,l){"use strict";var i=_interopRequireDefault(l(67294)),n=_interopRequireDefault(l(79941)),o=_interopRequireDefault(l(64809)),s=l(1150);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var alphaToHex=function(e){var t=null==e?1:Number(e);return isNaN(t)&&(t=1),t<0&&(t=0),t>1&&(t=1),Math.round(255*t).toString(16).padStart(2,"0").toUpperCase()},isValidHexWithAlpha=function(e){var t="#"===String(e).charAt(0)?String(e).slice(1):String(e);return 8!==t.length?o.default.isValidHex(e):/^[0-9a-fA-F]{8}$/.test(t)};t.ZP=function(e){var t=e.onChange,l=e.rgb,o=e.hsl,a=e.hex,r=e.disableAlpha,d=(0,n.default)({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"100%",textAlign:"center",padding:"4px 10% 3px",background:"#292D32",color:"white",border:"none",fontSize:"11px",borderRadius:"4px",fontFamily:"var(--font-family)"},label:{width:"100%",display:"block",textAlign:"center",fontSize:"11px",color:"white",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize",fontFamily:"var(--font-family)"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:r}),handleChange=function(e,i){e.hex?isValidHexWithAlpha(e.hex)&&t({hex:e.hex,source:"hex"},i):e.r||e.g||e.b?t({r:e.r||l.r,g:e.g||l.g,b:e.b||l.b,a:l.a,source:"rgb"},i):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,t({h:o.h,s:o.s,l:o.l,a:e.a,source:"rgb"},i))},c="transparent"===a?"#00000000":Number(l.a)>=1?a:a+alphaToHex(l.a);return i.default.createElement("div",{style:d.fields,className:"flexbox-fix kluck-font"},i.default.createElement("div",{style:d.double},i.default.createElement(s.EditableInput,{style:{input:d.input,label:d.label},label:"hex",value:c,onChange:handleChange})),i.default.createElement("div",{style:d.single,className:" kluck-font"},i.default.createElement(s.EditableInput,{style:{input:d.input,label:d.label},label:"r",value:l.r,onChange:handleChange,dragLabel:"true",dragMax:"255"})),i.default.createElement("div",{style:d.single},i.default.createElement(s.EditableInput,{style:{input:d.input,label:d.label},label:"g",value:l.g,onChange:handleChange,dragLabel:"true",dragMax:"255"})),i.default.createElement("div",{style:d.single},i.default.createElement(s.EditableInput,{style:{input:d.input,label:d.label},label:"b",value:l.b,onChange:handleChange,dragLabel:"true",dragMax:"255"})),i.default.createElement("div",{style:d.alpha},i.default.createElement(s.EditableInput,{style:{input:d.input,label:d.label},label:"a",value:Math.round(100*l.a),onChange:handleChange,dragLabel:"true",dragMax:"100"})))}},85702:function(e,t,l){"use strict";let i;l.r(t),l.d(t,{default:function(){return renderers_Editor}});var n=l(85893),o=l(44892),s=l(9473),a=l(48982),r=l(67294),d=l(30767),c=l(18384),u=l(16518),p=l(22052),h=l(70233),v=l(40755);let g=/^[A-Za-z0-9_-]+$/,x=new Map,m=new Map;
1let HelpDocNotFound=class HelpDocNotFound extends Error{constructor(e){super('No documentation found for "'.concat(e,'".')),this.name="HelpDocNotFound",this.status=404,this.key=e}};let helpDocUrl=e=>"/help/".concat(e,".html"),parseDoc=(e,t,l)=>{let i=new DOMParser().parseFromString(e,"text/html"),n=i.body.querySelector("h1"),o=t||l;if(n){let e=n.textContent.trim();e&&(o=e),n.remove()}return{title:o,content:i.body.innerHTML}},loadHelpDoc=(e,t)=>{if(!e||!g.test(e))return Promise.reject(Error('Invalid help key "'.concat(e,'".')));if(x.has(e))return Promise.resolve(x.get(e));if(m.has(e))return m.get(e);let l=fetch(helpDocUrl(e),{headers:{Accept:"text/html"}}).then(async l=>{if(404===l.status)throw new HelpDocNotFound(e);if(!l.ok)throw Error("Could not load documentation (".concat(l.status,")."));let i=parseDoc(await l.text(),t,e);return x.set(e,i),i}).finally(()=>m.delete(e));return m.set(e,l),l};var k=l(38858),f=l(68850),components_HelpIcon=e=>{let{description:t,helpCode:l,label:i="Help",size:o=12,style:a={}}=e,c=(0,s.v9)(e=>{var t;return null===(t=e.usersList.editor)||void 0===t?void 0:t.hideHelpIcons},p.Z),u=(0,s.v9)(e=>e.usersList.openPopover,p.Z),g=(0,s.I0)(),x="helpIcon_".concat((0,r.useId)()),m=u===x,setPopoverShow=e=>{e?g({type:"UPDATE_OPEN_POPOVER",openPopover:x,setAnyways:!0}):m&&g({type:"UPDATE_OPEN_POPOVER",openPopover:"",setAnyways:!0})},[y,b]=(0,r.useState)(!1),[w,j]=(0,r.useState)(null),[C,L]=(0,r.useState)(!1),[I,S]=(0,r.useState)(null);if((0,r.useEffect)(()=>{if(!y||!l)return;let e=!1;return L(!0),S(null),j(null),loadHelpDoc(l,i).then(t=>{e||j(t)}).catch(t=>{e||S(t)}).finally(()=>{e||L(!1)}),()=>{e=!0}},[y,l,i]),(0,r.useEffect)(()=>{if(!m)return;let e=(0,k.ik)();if(!e||e===document)return;let close=()=>g({type:"UPDATE_OPEN_POPOVER",openPopover:"",setAnyways:!0});return e.addEventListener("mousedown",close,!0),()=>e.removeEventListener("mousedown",close,!0)},[m,g]),c||!t&&!l)return null;let openModal=e=>
1{null==e||e.preventDefault(),setPopoverShow(!1),b(!0)},E=I?404===I.status?I.message:"Could not load documentation.":null,N=(0,n.jsx)("button",{type:"button",className:"opacityHover",onClick:t?void 0:openModal,title:"About ".concat(i),"aria-label":"About ".concat(i),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:o+2,height:o+2,border:"none",background:"transparent",color:"inherit",cursor:"pointer",padding:0,lineHeight:1,...a},children:(0,n.jsxs)("svg",{width:o,height:o,viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10.5",fill:"none",stroke:"currentColor",strokeWidth:"2"}),(0,n.jsx)("circle",{cx:"12",cy:"7.5",r:"1.6",fill:"currentColor"}),(0,n.jsx)("rect",{x:"10.6",y:"10.5",width:"2.8",height:"7.5",rx:"1.2",fill:"currentColor"})]})}),T=(0,n.jsx)(v.Z,{id:x,className:"kluck-font",style:{"--bs-popover-bg":"var(--color-6)","--bs-popover-border-color":"var(--color-5)","--bs-popover-max-width":"280px",backgroundColor:"var(--color-6)",color:"var(--white)",overflow:"hidden",borderRadius:"6px"},children:(0,n.jsxs)(v.Z.Body,{className:"kluck-font",style:{backgroundColor:"var(--color-6)",color:"var(--white)",padding:"12px 14px"},children:[(0,n.jsx)("div",{className:"kluck-h2-light",style:{lineHeight:1.45},children:t}),l&&(0,n.jsx)("button",{type:"button",onClick:openModal,className:"kluck-background-tile-button kluck-font kluck-h4",style:{marginTop:"10px",padding:"6px 12px",border:"none",borderRadius:"4px",width:"100%"},children:"Read more"})]})});return(0,n.jsxs)("span",{onClick:e=>e.stopPropagation(),style:{display:"inline-flex",alignItems:"center",flexShrink:0},children:[t?(0,n.jsx)(h.Z,{trigger:"click",rootClose:!0,placement:"auto",show:m,onToggle:setPopoverShow,overlay:T,children:N}):N,l&&(0,n.jsxs)(d.Z,{className:"editorModal",backdropClassName:"editorModal",centered:!0,size:"lg",show:y,onHide:()=>b(!1),style:{backgroundColor:"rgba(var(--color-6), 0.8)",color:"var(--white)"},children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"var(--color-4)",padding:"16px 20px",borderBottom:"1px solid #555"},children:[(0,n.jsx)("div",{className:"kluck-font kluck-header",style:{color:"var(--white)"},children:C?"Loading…":(null==w?void 0:w.title)||i}),(0,n.jsx)("button",{type:"button",onClick:()=>b(!1),"aria-label":"Close",style:{background:"transparent",border:"none",color:"var(--white)",fontSize:20,cursor:"pointer"},children:"\xd7"})]}),(0,n.jsxs)(d.Z.Body,{style:{backgroundColor:"var(--color-4)",color:"var(--white)",padding:"20px",maxHeight:"70vh",overflow:"auto"},children:[C&&(0,n.jsx)("div",{children:"Loading documentation…"}),E&&(0,n.jsx)("div",{style:{color:"var(--danger, #ff6b6b)"},children:E}),!C&&!I&&(null==w?void 0:w.content)&&(0,n.jsx)("div",{className:"confluence-content",dangerouslySetInnerHTML:{__html:(0,f.Z6)(w.content)}}),!C&&!I&&w&&!w.content&&(0,n.jsx)("div",{style:{opacity:.7},children:"No documentation content available."})]})]})]})},y=(0,r.memo)(e=>{let{definition:t,selected:l="",className:i,style:o,labelStyle:s,ellipsis:a=!1}=e,r=((null==t?void 0:t.label)||"").replace(l,""),d=!!((null==t?void 0:t.description)||(null==t?void 0:t.helpCode));return(0,n.jsxs)("span",{className:i,style:{display:"inline-flex",alignItems:"center",gap:"4px",minWidth:0,maxWidth:"100%",...o},children:[(0,n.jsx)("label",{htmlFor:null==t?void 0:t.name,style:{margin:0,cursor:"inherit",...a?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{},...s},children:r}),d&&(0,n.jsx)(components_HelpIcon,{description:t.description,helpCode:t.helpCode,label:r})]})}),b=(0,r.memo)(e=>{let{definition:t,setShow:l,show:i,selected:o,expandable:a,children:d,groupShow:c,group:u,onClick:h,style:v,inLineProps:g}=e,x=(0,s.v9)(e=>e.usersList.openProperties,p.Z),[m,k]=(0,r.useState)("kluck-dark"),f=(0,r.useRef)(null),b=(0,s.I0)();return(0,r.useEffect)(()=>{x.get(t.name)!==(!0===i)&&b({type:"UPDATE_OPEN_PROPERTIES",name:t.name,value:!0===i})},[i]),(0,r.useEffect)(()=>{if(f.current){let l=f.current.parentElement;for(;;){var e,t;if(null==l?void 0:null===(e=l.className)||void 0===e?void 0:e.includes("kluck-background")){k("
1kluck-dark");break}if(null==l?void 0:null===(t=l.className)||void 0===t?void 0:t.includes("kluck-dark")){k("kluck-background");break}if(l.parentElement)l=l.parentElement;else{k(" ");break}}}},[f]),(0,n.jsxs)("div",{ref:f,id:"kluck-property",style:{width:"auto",height:"auto",margin:"10px 10px 0",padding:"0",transition:"0s",...v},className:"kluck-component kluck-font "+m,children:[t.label.length>0&&(0,n.jsxs)("div",{className:"propertyContainer kluck-h2",onClick:()=>{l&&l(!i),c&&c(t.name,...u),h&&h()},style:{height:"38px",padding:"10px",cursor:"pointer"},children:[(0,n.jsx)(y,{definition:t,selected:o,labelStyle:{cursor:"pointer"}}),(0,n.jsxs)("span",{style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",gap:"12px"},children:[g,a&&(0,n.jsx)("svg",{className:"opacityHover",style:{width:"24px",height:"24px"},viewBox:"0 0 24 24",children:(0,n.jsx)("path",{fill:"currentColor",d:i?"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z":"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"})})]})]}),(0,n.jsx)("div",{style:{paddingBottom:i?"10px":"0px",transition:"0.5s"},children:r.Children&&m&&r.Children.map(d,e=>e)})]})}),property_PropertyGroup=e=>{let{definitions:t,renderProperty:l,groupLabel:i,groupShowState:o,onToggleGroup:s,keyPrefix:a}=e,d=new Set,c=a||"";return t.map((e,a)=>{if(e.grouped){var p;if(d.has(e.groupTag))return null;d.add(e.groupTag);let h=t.filter(t=>t.grouped&&t.groupTag===e.groupTag),v=h.map((e,t)=>l(e,t)),g=v.some(e=>null!==e);if(!g)return null;let x=c+e.groupTag;return(0,n.jsx)(r.Fragment,{children:(0,n.jsx)(b,{definition:{label:(null===(p=h[0])||void 0===p?void 0:p.groupName)||i||"Advanced Settings",name:x},expandable:!0,tile:!0,groupShow:s,group:o,show:o.includes(x),children:(0,n.jsx)(u.Z,{in:o.includes(x),children:(0,n.jsx)("div",{children:v})})})},a)}return l(e,a)})},w=l(90620);let parseOperand=(e,t)=>{if("true"===e)return"true";if("false"===e)return"false";if(!1===isNaN(e))return parseFloat(e);if("$"===e[0]){let l=e.substring(1),i=t[l];return null==i?null:i}return e},evaluateClause=(e,t)=>{let l=e.split(" ").filter(e=>""!==e);if(l.length<3)return console.error("Invalid Expression. Expected 3 arguments. Got: "+l),!1;let i=!0,n=[];for(let e=0;e<l.length;e++)e%2==0?n.push(parseOperand(l[e],t)):n.push(l[e]),3===n.length&&(!1===evaluate(n[0],n[1],n[2])&&(i=!1),n=[]);return i},parseExpression=(e,t)=>{let l=e.split("||");for(let e=0;e<l.length;e++){let i=l[e].split("&&"),n=!0;for(let e=0;e<i.length;e++)if(!evaluateClause(i[e],t)){n=!1;break}if(n)return!0}return!1},evaluate=(e,t,l)=>"==="===t?e===l:"!=="===t&&e!==l;var property_compileCommandText=(e,t)=>!e||("object"==typeof t&&(t={...t,domain:window.location.hostname}),parseExpression(e,t));let buildAssetsFromParams=(e,t,l)=>{var i,n,o,s,a;if("image"===e.dataType)return t[e.name]&&(null==t?void 0:null===(n=t.scheduledData)||void 0===n?void 0:n.type)!=="play"?0===t[e.name].length?[{label:"Kluck Filler Image",name:"https://cdn.getkluck.com/system/kanvas/defaultImage.png",checked:!0}]:t[e.name]:[];if("Set Locations"===e.label){let i=[];for(let n=0;n<l.length;n++){let a=l[n],r=null===(s=t[e.name])||void 0===s?void 0:null===(o=s.filter(e=>e.locationId===a.locationId)[0])||void 0===o?void 0:o.checked;i.push({checked:r,label:a.locationName,name:"".concat(a.address1," ").concat(a.address2),locationId:a.locationId})}return i}return(null==e?void 0:e.childProperties)?"object"==typeof t[e.name]&&(null===(a=t[e.name])||void 0===a?void 0:a.length)?t[e.name].map(t=>{let l={...t};for(let t=0;t<e.childProperties.length;t++){let i=e.childProperties[t];void 0===l[i.name]&&(l[i.name]=void 0!==i.defaultValue?i.defaultValue:"")}return void 0===l.checked&&(l.checked=!0),l}):[]:"object"==typeof t[e.name]&&(null===(i=t[e.name])||void 0===i?void 0:i.length)?t[e.name]:[]};var property_PropertyAddChild=e=>{var t,l,i,o;let{definition:h,blockId:v,params:g,darkMode:x,selected:m,openProperties:k}=e,f=(0,s.v9)(e=>e.usersList.kanvas,p.Z),y=(0,s.v9)(e=>e.usersList.locations,p.Z),[j,C]=(0,r.useState)(()=>buildAssetsFromParams(h,g,y)),L=(0,r.useRef)((null===(t=g[h.name])||void 0===t?void 0:t.length)>0&&!buildAssetsFromParams(h,g,y).length),[I,S]=(0,r.useState)(k.get(h.name)),[E,N]=(0,r.useState)(!1),[T,M]=(0,r.useState)({show:!1,index:null}),[D,P]=(0,r.useState)([]);(0,r.useEffect)(()=>
1{if("image"===h.dataType&&g.scheduledData&&"play"===g.scheduledData.type){let e=g.scheduledData.playList.playListItems,t=[];for(let l=0;l<e.length;l++)t.push({name:e[l].description,url:e[l].url,checked:!0});C(t)}},[g.scheduledData]);let H=(0,r.useRef)(0);(0,r.useEffect)(()=>{var e;if(H.current>0){H.current-=1;return}let t=buildAssetsFromParams(h,g,y);(null===(e=g[h.name])||void 0===e?void 0:e.length)&&"Set Locations"!==h.label&&(C(t),L.current=!1)},[h,g[h.name],v]),(0,r.useEffect)(()=>{"Set Locations"===h.label&&C(buildAssetsFromParams(h,g,y))},[y,v]),(0,r.useEffect)(()=>{(!L.current||(null==j?void 0:j.length))&&(L.current=!1,JSON.stringify(j)!==JSON.stringify(g[h.name])&&(H.current+=1,e.onChange(v,h.name,j),"addField"===h.name&&j.forEach(e=>{e.element&&(delete e.element,delete e.url)})))},[j]);let handleCheck=e=>{C(j.map((t,l)=>l===e?{...t,checked:!t.checked}:t))},handleDelete=e=>{let t=[];j.forEach((l,i)=>{i!==e&&t.push(l)}),C(t)},addHandler=()=>{let e=[...j],t={};if(null==h?void 0:h.childProperties){for(let e=0;e<h.childProperties.length;e++){let l=h.childProperties[e];l.initialize&&(t[l.name]=void 0!==l.defaultValue?l.defaultValue:"")}t.checked=!0}else t="IP"===h.valueType?{label:"0.0.0.0",name:"0.0.0.0",checked:!0}:"FORMINPUT"===h.valueType?{label:"Input Label #".concat(j.length+1),name:"inputValue".concat(j.length+1),checked:!0}:"addField"===h.name?{label:"New Item #".concat(j.length+1),name:"value".concat(j.length+1),checked:!0}:"PAGE"===h.dataType?{label:"Page #".concat(j.length+1),name:"value".concat(j.length+1),checked:!0}:{label:"New Item #".concat(j.length+1),name:"value".concat(j.length+1),checked:!0};t.addChildId=(0,w.v4)(),e.push(t),C(e)},selectAll=()=>{var e;let t=(null==j?void 0:j.length)!==(null==j?void 0:null===(e=j.filter(e=>null==e?void 0:e.checked))||void 0===e?void 0:e.length);C(j.map(e=>({...e,checked:t})))},changePosition=(e,t)=>{let l=e+(t?1:-1);if(l<0||l>=j.length)return;let i=[...j],n={...i[e]},o={...i[l]};i[e]=o,i[l]=n,C(i)},editHandler=(e,t,l)=>{if(j[e]){let i={...j[e]};t&&(i.name=t),l&&(i.label=l),C(j.map((t,l)=>l===e?i:t))}},editHandlerMultiple=(e,t,l)=>{j[e]&&C(j.map((i,n)=>n===e?{...i,[t]:l}:i))},compile=(e,t)=>property_compileCommandText(e,t);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b,{definition:h,selected:m,blockId:v,params:g,tile:!0,value:g[h.name],setValue:void 0,setShow:S,show:I,expandable:!0,children:(0,n.jsx)(u.Z,{in:I,children:(0,n.jsx)("div",{children:(0,n.jsxs)(c.Z,{style:{lineHeight:"1",marginBottom:"-10px"},children:[(null==j?void 0:j.length)>1&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{style:{height:"1px",background:"var(--color-1)",opacity:"0.2"}}),(0,n.jsxs)(c.Z.Item,{style:{display:"flex",alignItems:"center",whiteSpace:"nowrap",color:"white",backgroundColor:"transparent",padding:"10px",border:"none"},children:["Add Tabs"!==h.label&&(0,n.jsx)("div",{style:{height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer",marginRight:"7px"},children:(0,n.jsx)("svg",{onClick:()=>selectAll(),xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,n.jsxs)("g",{id:"tick-square",children:[(0,n.jsx)("path",{id:"Vector",d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",fill:(null==j?void 0:j.length)===(null==j?void 0:null===(l=j.filter(e=>null==e?void 0:e.checked))||void 0===l?void 0:l.length)?"white":"",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(null==j?void 0:j.length)===(null==j?void 0:null===(i=j.filter(e=>null==e?void 0:e.checked))||void 0===i?void 0:i.length)&&(0,n.jsx)("path",{id:"Vector_2",d:"M5.8125 9L7.935 11.1225L12.1875 6.8775",stroke:"#1D1E21",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})}),(0,n.jsx)("div",{className:"kluck-h5-bold",children:"Select All"})]})]}),j.sort((e,t)=>(null==h?void 0:h.edit)!==!1?"":e.name>t.name?1:t.name>e.name?-1:0).map((e,t)=>{if((null==e?void 0:e.addChildId)||(e.addChildId=(0,w.v4)()),e)return(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)("div",{style:{height:"1px",background:"var(--color-1)",opacity:"0.2"}}),(0,n.jsxs)(c.Z.Item,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",whiteSpace:"nowrap",color:"white",backgroundColor:"transparent",border:"none",padding:"0 8px"},children:["Add Tabs"!==h.label&&(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",marginRight:"7px"},children:[(null==h?void 0:h.edit)!==!1&&(0,n.jsx)("svg",{onClick:()=>t>0&&changePosition(t),xmlns:"http://www.w3.org/2000/svg",style:{width:"12px",height:"12px",margin:"2px",cursor:t>0?"pointer":"default"},viewBox:"0 0 8 8",fill:"none",children:t>0&&(0,n.jsx)("path",{d:"M1.36001 5.0166L3.53335 2.84327C3.79002 2.5866 4.21001 2.5866 4.46668 2.84327L6.64001 5.0166",stroke:"white",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,n.jsx)("div",{style:{height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:(0,n.jsx)("svg",{onClick:()=>handleCheck(t),xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,n.jsxs)("g",{id:"tick-square",children:[(0,n.jsx)("path",{id:"Vector",d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",fill:e.checked?"white":"",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),e.checked&&(0,n.jsx)("path",{id:"Vector_2",d:"M5.8125 9L7.935 11.1225L12.1875 6.8775",stroke:"#1D1E21",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})}),(null==h?void 0:h.edit)!==!1&&(0,n.jsx)("svg",{onClick:()=>
1t<j.length-1&&changePosition(t,!0),xmlns:"http://www.w3.org/2000/svg",style:{width:"12px",height:"12px",margin:"2px",cursor:t<j.length-1?"pointer":"default"},viewBox:"0 0 8 8",fill:"none",children:t<j.length-1&&(0,n.jsx)("path",{d:"M6.63999 2.9834L4.46665 5.15673C4.20999 5.4134 3.78999 5.4134 3.53332 5.15673L1.35999 2.9834",stroke:"white",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]}),(0,n.jsxs)("div",{style:{position:"relative",width:"100%",height:"100%",overflow:"scroll",paddingBottom:"10px"},children:[(null==h?void 0:h.edit)===!1&&!(null==h?void 0:h.childProperties)&&(0,n.jsx)("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",cursor:"default"}}),(null==h?void 0:h.childProperties)?(0,n.jsx)(property_PropertyGroup,{definitions:h.childProperties,groupShowState:D,onToggleGroup:e=>P(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),keyPrefix:"".concat(e.addChildId,"-"),renderProperty:(l,i)=>{let o=e||{},s=compile(null==l?void 0:l.commandText,o);return s?(0,n.jsxs)(r.Fragment,{children:[i>0&&(0,n.jsx)("div",{style:{height:"1px",background:"var(--color-1)",opacity:"0.2",margin:"7px 0"}}),(0,n.jsx)(ls,{blockId:v,definition:l,params:o,onChangeHandler:(e,l,i)=>editHandlerMultiple(t,l,i),selected:m})]},i):null}}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ls,{blockId:v,definition:{...h,name:"label",label:"",inputType:"TEXT"},params:{label:e.label},onChangeHandler:(e,l,i)=>editHandler(t,null,i),selected:m}),(0,n.jsx)("div",{style:{height:"1px",background:"var(--color-1)",opacity:"0.2",margin:"7px 0"}}),(0,n.jsx)(ls,{blockId:v,definition:{...h,name:"addChild"+t,label:"",inputType:(null==h?void 0:h.childInputType)||"TEXT",parentName:null==h?void 0:h.name},params:{["addChild"+t]:e.name},onChangeHandler:(e,l,i)=>editHandler(t,i,null),selected:m})]})]}),(null==h?void 0:h.delete)!==!1&&(0,n.jsxs)("svg",{onClick:()=>handleDelete(t),xmlns:"http://www.w3.org/2000/svg",style:{minWidth:"18px",width:"18px",height:"18px",marginLeft:"7px",cursor:"pointer"},viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M14 3.98665C11.78 3.76665 9.54667 3.65332 7.32 3.65332C6 3.65332 4.68 3.71999 3.36 3.85332L2 3.98665",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.6665 3.31331L5.81317 2.43998C5.91984 1.8066
15 5.99984 1.33331 7.1265 1.33331H8.87317C9.99984 1.33331 10.0865 1.83331 10.1865 2.44665L10.3332 3.31331",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.5664 6.09332L12.1331 12.8067C12.0598 13.8533 11.9998 14.6667 10.1398 14.6667H5.85977C3.99977 14.6667 3.93977 13.8533 3.86644 12.8067L3.43311 6.09332",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.88672 11H9.10672",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.3335 8.33331H9.66683",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]},e.addChildId)}),((null==g?void 0:null===(o=g.addChild)||void 0===o?void 0:o.length)>=(null==h?void 0:h.limit)||(null==h?void 0:h.limit)===void 0)&&(null==h?void 0:h.add)!==!1&&(0,n.jsxs)(c.Z.Item,{onClick:()=>addHandler(),style:{display:"flex",alignItems:"center",cursor:"pointer",color:"white",backgroundColor:"transparent",padding:"10px",border:"none"},children:[(0,n.jsx)("svg",{style:{width:"24px",height:"24px",marginRight:"2px"},fill:"white",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"})}),"Add New"]})]})})})}),(0,n.jsxs)(d.Z,{show:E,className:"editorModal",backdropClassName:"editorModal",contentClassName:"editorModalContent",centered:!0,onHide:()=>N(!1),children:[(0,n.jsx)(d.Z.Header,{closeButton:!0,children:(0,n.jsx)(d.Z.Title,{children:"Asset Manager"})}),(0,n.jsx)(a.default,{onSelect:e=>{M({...T,value:e.source}),N(!1)},allowFolderEdit:!1,nested:!0,kanvas:f})]}),(0,n.jsxs)(d.Z,{show:T.show,className:"editorModal",backdropClassName:"editorModal",contentClassName:"editorModalContent",centered:!0,onHide:()=>M({show:!1,index:null}),children:[(0,n.jsx)(d.Z.Header,{className:"kluck-background",style:{color:"white"},closeButton:!0,children:(0,n.jsx)(d.Z.Title,{children:"Edit Item"})}),(0,n.jsxs)(d.Z.Body,{className:"kluck-background",style:{fontSize:"20px",color:"white"},children:[(0,n.jsx)(ls,{blockId:v,definition:{...h,name:"label",label:"Label",inputType:"TEXT"},params:{label:T.label},onChangeHandler:(e,t,l)=>M({...T,label:l}),selected:m}),(0,n.jsx)(ls,{blockId:v,definition:{...h,name:"addChild",label:"Value",inputType:(null==h?void 0:h.childInputType)||"TEXT"},params:{addChild:T.value},onChangeHandler:(e,t,l)=>M({...T,value:l}),selected:m}),(null==h?void 0:h.dataType)==="image"&&(0,n.jsxs)("div",{style:{marginBottom:"12px"},children:[(0,n.jsx)("label",{style:{whiteSpace:"nowrap",marginBottom:"6px"},children:"Image"}),(0,n.jsx)("div",{onClick:()=>N(!0),style:{width:"100%",height:"300px",borderRadius:"4px",border:"1px solid",cursor:"pointer",background:"url(".concat(null==T?void 0:T.value,") center center / contain no-repeat")}})]}),(0,n.jsx)("button",{onClick:()=>{j[T.index]&&(C(j.map((e,t)=>t===T.index?{...e,name:T.value,label:T.label}:e)),M({show:!1,id:null}))},className:"kluck-background",style:{color:"white",backgroundColor:"blue",border:"none",padding:"6px",width:"100%",borderRadius:"4px",marginTop:"24px"},children:"Save"})]})]})]})};let j={"flex-start":"start",start:"start",left:"start",top:"start",center:"center",middle:"center","flex-end":"end",end:"end",right:"end",bottom:"end"},bucketOf=e=>j[String(e)]||String(e),C={justify:{start:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{d:"M3.5 3.5V18.5",strokeWidth:"1.5",strokeLinecap:"round"}),(0,n.jsx)("rect",{x:"6.5",y:"6",width:"4.5",height:"10",rx:"1.5",stroke:"none"}),(0,n.jsx)("rect",{x:"12.5",y:"6",width:"4.5",height:"10",rx:"1.5",stroke:"none"})]}),center:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{d:"M11 3.5V18.5",strokeWidth:"1.5",strokeLinecap:"round"}),(0,n.jsx)("rect",{x:"3.5",y:"6",width:"5.5",height:"10",rx:"1.5",stroke:"none"}),(0,n.jsx)("rect",{x:"13",y:"6",width:"5.5",height:"10",rx:"1.5",stroke:"none"})]}),end:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{d:"M18.5 3.5V18.5",strokeWidth:"1.5",strokeLinecap:"round"}),(0,n.jsx)("rect",{x:"5",y:"6",width:"4.5",height:"10",rx:"1.5",stroke:"none"}
1),(0,n.jsx)("rect",{x:"11",y:"6",width:"4.5",height:"10",rx:"1.5",stroke:"none"})]})},align:{start:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{d:"M3.5 3.5H18.5",strokeWidth:"1.5",strokeLinecap:"round"}),(0,n.jsx)("rect",{x:"6",y:"6.5",width:"10",height:"4.5",rx:"1.5",stroke:"none"}),(0,n.jsx)("rect",{x:"6",y:"12.5",width:"10",height:"4.5",rx:"1.5",stroke:"none"})]}),center:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{d:"M3.5 11H18.5",strokeWidth:"1.5",strokeLinecap:"round"}),(0,n.jsx)("rect",{x:"6",y:"3.5",width:"10",height:"5.5",rx:"1.5",stroke:"none"}),(0,n.jsx)("rect",{x:"6",y:"13",width:"10",height:"5.5",rx:"1.5",stroke:"none"})]}),end:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{d:"M3.5 18.5H18.5",strokeWidth:"1.5",strokeLinecap:"round"}),(0,n.jsx)("rect",{x:"6",y:"5",width:"10",height:"4.5",rx:"1.5",stroke:"none"}),(0,n.jsx)("rect",{x:"6",y:"11",width:"10",height:"4.5",rx:"1.5",stroke:"none"})]})}};var L=(0,r.memo)(e=>{let{definition:t,blockId:l,params:i,onChange:o,selected:s}=e,a=t.options||[],r=t.iconSet||(/justify/i.test(t.name)?"justify":"align"),d=C[r]||C.align,c=void 0!==i[t.name]?i[t.name]:t.defaultValue,u=bucketOf(c),onSelect=e=>{o&&o(l,t.name,e.value)};return(0,n.jsxs)("div",{className:"kluck-component kluck-font kluck-h5",style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsx)(y,{definition:t,selected:s,style:{paddingRight:"10px",color:"var(--white)"}}),(0,n.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"7px",flexShrink:0},children:a.map(e=>{let t=bucketOf(e.value),l=d[t];return(0,n.jsx)("div",{title:e.label,onClick:()=>onSelect(e),style:{display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:t===u?"var(--color-3)":"var(--white)",transition:"color var(--color-transition)"},children:l?(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"currentColor",stroke:"currentColor",children:l}):(0,n.jsx)("span",{style:{whiteSpace:"nowrap"},children:e.label})},String(e.value))})})]})}),I=l(24624),S=l(59344),editorComponents_KluckToggleSwitch=e=>{let{value:t,setValue:l,title:i}=e,handleToggle=e=>{l(!t,e)};return(0,n.jsxs)("div",{className:"kluck-font",style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",gap:"12px"},children:[i.length>0&&(0,n.jsx)("div",{className:"kluck-h4",style:{flex:"1",display:"flex",alignItems:"center"},children:i}),(0,n.jsx)("div",{onClick:handleToggle,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),handleToggle(e))},role:"switch",tabIndex:0,"aria-checked":!!t,style:{width:"".concat(35,"px"),minWidth:"".concat(35,"px"),height:"".concat(18,"px"),boxSizing:"border-box",backgroundColor:"transparent",border:"".concat(1.3,"px solid var(--white)"),borderRadius:"".concat(9,"px"),padding:"".concat(1.5,"px"),cursor:"pointer",display:"flex",alignItems:"center"},children:(0,n.jsx)("div",{style:{width:"".concat(12.4,"px"),height:"".concat(12.4,"px"),backgroundColor:"var(--white)",borderRadius:"50%",transform:t?"translateX(".concat(17,"px)"):"translateX(0px)",transition:"transform 0.2s ease",display:"flex",alignItems:"center",justifyContent:"center"},children:t?(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:(0,n.jsx)("path",{d:"M2.1 5.35L4.15 7.4L7.9 2.9",stroke:"var(--color-7)",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:(0,n.jsx)("path",{d:"M2.7 2.7L7.3 7.3M7.3 2.7L2.7 7.3",stroke:"var(--color-2)",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})};let E="Select",optionLabel=e=>null==e?"":"string"==typeof e?e:null===e.label||void 0===e.label?"":String(e.label);var N=(0,r.memo)(e=>{var t,l;let{value:i,definition:o,options:s,onChangeHandler:a,title:d,isDefault:c}=e,u=(null==s?void 0:s.length)===2&&((null===(t=s[0])||void 0===t?void 0:t.label)==="Enable"||(null===(l=s[0])||void 0===l?void 0:l.label)==="Disable"),p=(0,r.useMemo)(()=>{let e=Array.isArray(s)?s:[],t=[],l=[];for(let i=0;i<e.length;i++){let n=e[i];if(""!==optionLabel(n).trim()){l.push(n);continue}let o=(null==n?void 0:n.value)===""||(null==n?void 0:n.value)==="null"||(null==n?void 0:n.value)===null||(null==n?void 0:n.value)===void 0;o?t.push({...n,label:E}):l.push({...n,label:"(untitled)"})}return 0===t.length&&t.push({label:E,value:""}),[t[0],...l]},[s]),isActiveOption=e=>{if((null==e?void 0:e.value)===i||(null==i?void 0:i.name)!=null&&(null==e?void 0:e.value)===i.name)return!0;
1if("object"==typeof(null==e?void 0:e.value)&&"object"==typeof i&&(null==e?void 0:e.value)&&i){let t=Object.keys(e.value);return t.length>0&&t.every(t=>e.value[t]===i[t])}return!1},getLabel=()=>{let e=p.find(isActiveOption);return optionLabel(e)||E};return(0,n.jsxs)("div",{className:"kluck-component kluck-font",style:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"nowrap",alignContent:"center"},children:[!!d&&(0,n.jsx)("div",{className:"kluck-h4",style:{width:"100%",display:"flex",alignItems:"center",paddingRight:"10px"},children:d}),!u&&(0,n.jsx)(I.Z,{disableClearable:!0,onChange:(e,t)=>a(e,null==t?void 0:t.value),getOptionLabel:optionLabel,placeholder:getLabel(),options:p,className:"kluck-component kluck-font kluck-h3 kluck-background-tile",name:o.name,title:getLabel(),renderInput:e=>(0,n.jsx)(S.Z,{...e,inputProps:{...e.inputProps,autoComplete:"new-password"}}),style:{width:"100%",padding:"4px !important",height:"100%",border:"none",outline:"none",textAlign:"center",borderRadius:"4px",margin:"0",color:"white","--Input-placeholderOpacity":c?"0.65":"1","--Input-focusedThickness":"0px"},slotProps:{listbox:{className:"kluckScrollArea kluck-font",style:{backgroundColor:"var(--color-6)",border:"none",borderRadius:"6px",padding:"4px",marginTop:"2px","--List-gap":"0px"}}},renderOption:(e,t)=>{let{key:l,...i}=e,o=isActiveOption(t);return(0,n.jsx)("li",{...i,"data-active":o?"true":void 0,className:"kluckDropdownOption kluck-h3 kluck-font",style:{minHeight:"18px",flexShrink:0,padding:"0 8px",cursor:"pointer",borderRadius:"4px",display:"flex",alignItems:"center",color:"var(--white)"},children:optionLabel(t)},(null==e?void 0:e.id)||l)},popupIcon:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"10px",height:"5px",margin:"0 4px"},viewBox:"0 0 8 4",fill:"none",children:(0,n.jsx)("path",{d:"M6.63999 0.983398L4.46665 3.15673C4.20999 3.4134 3.78999 3.4134 3.53332 3.15673L1.35999 0.983398",stroke:"white",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})}),u&&(0,n.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center"},children:(0,n.jsx)(editorComponents_KluckToggleSwitch,{title:"",value:"true"===i,setValue:(e,t)=>a(t,e?"true":"false")})})]})}),T=l(45697),M=l.n(T),D=l(79941),P=l(82492),H=l.n(P),B=l(1150),Z=l(23493),R=l.n(Z),A=l(37599);let SaturationCapture=class SaturationCapture extends r.PureComponent{componentWillUnmount(){this.throttle.cancel(),this.unbindEventListeners()}render(){let e=this.props.style||{},t=e.color,l=e.white,i=e.black,o=e.pointer,s=e.circle,a=(0,D.default)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl(".concat(this.props.hsl.h,",100%, 50%)"),borderRadius:this.props.radius,touchAction:"none"},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:"".concat(-(100*this.props.hsv.v)+100,"%"),left:"".concat(100*this.props.hsv.s,"%"),cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n            0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:t,white:l,black:i,pointer:o,circle:s}},{custom:!!this.props.style});return(0,n.jsxs)("div",{style:a.color,ref:e=>{this.container=e},onPointerDown:this.handlePointerDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange,children:[(0,n.jsx)("style",{children:"\n          .saturation-white {\n            background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n            background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n          }\n          .saturation-black {\n            background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n            background: linear-gradient(to top, #000, rgba(0,0,0,0));\n          }\n        "}),(0,n.jsxs)("div",{style:a.white,className:"saturation-white",children:[(0,n.jsx)("div",{style:a.black,className:"saturation-black"}),(0,n.jsx)("div",{style:a.pointer,children:this.props.pointer?r.createElement(this.props.pointer,this.props):(0,n.jsx)("div",{style:a.circle})})]})]})}constructor(e){super(e),this.handlePointerDown=e=>{1===e.buttons&&(this.handleChange(e),this.container.setPointerCapture(e.pointerId),this.container.addEventListener("pointermove",this.handleChange),this.container.addEventListener("pointerup",this.handlePointerUp),this.container.addEventListener("pointercancel",this.handlePointerUp))},this.handlePointerUp=()=>{this.unbindEventListeners()},this.unbindEventListeners=()=>{this.container&&(this.container.removeEventListener("pointermove",this.handleChange),this.container.removeEventListener("pointerup",this.handlePointerUp),this.container.removeEventListener("pointercancel",this.handlePointerUp))},this.handleChange=e=>{"function"==typeof this.props.onChange&&this.throttle(this.props.onChange,A.calculateChange(e,this.props.hsl,this.container),e)},this.throttle=R()((e,t,l)=>{e(t,l)},50)}};var V=l(66713),_=l(34349);let AlphaCapture=class AlphaCapture extends r.Component{componentWillUnmount(){this.unbindEventListeners()}
1render(){let{rgb:e,style:t,direction:l,radius:i,shadow:o,pointer:s}=this.props,a=(0,D.default)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:i||(null==t?void 0:t.borderRadius)},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:i||(null==t?void 0:t.borderRadius)},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba(".concat(e.r,",").concat(e.g,",").concat(e.b,", 0) 0%, rgba(").concat(e.r,",").concat(e.g,",").concat(e.b,", 1) 100%)"),boxShadow:o||(null==t?void 0:t.boxShadow),borderRadius:i||(null==t?void 0:t.borderRadius)},container:{position:"relative",height:"100%",margin:"0 3px",touchAction:"none"},pointer:{position:"absolute",left:"".concat((null!=e.a?e.a:1)*100,"%")},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba(".concat(e.r,",").concat(e.g,",").concat(e.b,", 0) 0%, rgba(").concat(e.r,",").concat(e.g,",").concat(e.b,", 1) 100%)")},pointer:{left:0,top:"".concat((null!=e.a?e.a:1)*100,"%")}},overwrite:{...t}},{vertical:"vertical"===l,overwrite:!0});return(0,n.jsxs)("div",{style:a.alpha,children:[(0,n.jsx)("div",{style:a.checkboard,children:(0,n.jsx)(_.default,{renderers:this.props.renderers})}),(0,n.jsx)("div",{style:a.gradient}),(0,n.jsx)("div",{ref:e=>{this.container=e},style:a.container,onPointerDown:this.handlePointerDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange,children:(0,n.jsx)("div",{style:a.pointer,children:s?r.createElement(s,this.props):(0,n.jsx)("div",{style:a.slider})})})]})}constructor(...e){super(...e),this.handleChange=e=>{let t=V.calculateChange(e,this.props.hsl,this.props.direction,null!=this.props.a?this.props.a:this.props.hsl.a,this.container);t&&"function"==typeof this.props.onChange&&this.props.onChange(t,e)},this.handlePointerDown=e=>{1===e.buttons&&(this.handleChange(e),this.container.setPointerCapture(e.pointerId),this.container.addEventListener("pointermove",this.handleChange),this.container.addEventListener("pointerup",this.handlePointerUp),this.container.addEventListener("pointercancel",this.handlePointerUp))},this.handlePointerUp=()=>{this.unbindEventListeners()},this.unbindEventListeners=()=>{this.container&&(this.container.removeEventListener("pointermove",this.handleChange),this.container.removeEventListener("pointerup",this.handlePointerUp),this.container.removeEventListener("pointercancel",this.handlePointerUp))}}};var F=l(33315);let Sketch=e=>{var t,l,i;let{paramValue:o,width:a,rgb:d,hex:c,hsv:u,hsl:h,onChange:v,onChangeComplete:g,onSwatchHover:x,disableAlpha:m,presetColors:k,renderers:f,styles:y={},className:b="",showPresets:j,onClick:C}=e,L=(0,s.v9)(e=>e.usersList.kanvas,p.Z),[I,S]=(0,r.useState)(null===(l=L.website.settings)||void 0===l?void 0:null===(t=l.paletteColors)||void 0===t?void 0:t[0]),[E,N]=(0,r.useState)(null===(i=L.website.settings)||void 0===i?void 0:i.paletteColors),T=(0,D.default)(H()({default:{picker:{width:a,boxSizing:"initial",background:"#343B43"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden",borderRadius:"4px"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba(".concat(d.r,",").concat(d.g,",").concat(d.b,",").concat(d.a,")"),boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},...y},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},y),{disableAlpha:m}),setColorHandler=e=>{(null==e?void 0:e.addChildId)||(e.addChildId=(0,w.v4)()),g({rgb:"".concat(null==e?void 0:e.addChildId)})};return(0,n.jsxs)("div",{style:{...T.picker,backgroundColor:"var(--color-6)"},className:"sketch-picker ".concat(b," kluck-font"),children:[(0,n.jsx)("div",{style:{marginBottom:"12px",color:"white",fontSize:"16px"},children:(0,n.jsxs)("div",{className:"kluck-font kluck-h1",style:{width:"100%",textAlign:"left",display:"flex",justifyContent:"space-between"}
1,children:[(0,n.jsx)("span",{children:"Pick A Color"}),(0,n.jsxs)("svg",{style:{cursor:"pointer"},onClick:C,xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",children:[(0,n.jsx)("path",{d:"M5.75 5.75L17.2499 17.2499",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.75006 17.2499L17.25 5.75",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})]})}),!1!==j&&(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px 3.6px",margin:"10px 0"},children:E.map((e,t)=>{var l,i,s,a;let r=o===(null==e?void 0:e.addChildId);return(0,n.jsxs)("div",{className:"kluck-background",onClick:()=>setColorHandler(e),style:{position:"relative",width:"25px",height:"25px",borderRadius:"4px",cursor:"pointer"},children:[(0,n.jsx)("div",{style:{width:"100%",height:"100%",borderRadius:"4px",backgroundColor:"rgba(".concat(null==e?void 0:null===(l=e.name)||void 0===l?void 0:l.r,",").concat(null==e?void 0:null===(i=e.name)||void 0===i?void 0:i.g,",").concat(null==e?void 0:null===(s=e.name)||void 0===s?void 0:s.b,",").concat(null==e?void 0:null===(a=e.name)||void 0===a?void 0:a.a,")")}}),r&&(0,n.jsx)("div",{style:{position:"absolute",inset:"auto auto -7px 10px",width:"5px",height:"5px",borderRadius:"25px",backgroundColor:"var(--white)"}})]},t)})}),(0,n.jsx)("div",{style:T.saturation,children:(0,n.jsx)(SaturationCapture,{style:T.Saturation,hsl:h,hsv:u,onChange:v})}),(0,n.jsx)("div",{style:T.controls,className:"flexbox-fix",children:(0,n.jsxs)("div",{style:T.sliders,children:[(0,n.jsx)("div",{style:T.hue,children:(0,n.jsx)(B.Hue,{style:T.Hue,hsl:h,onChange:v})}),(0,n.jsx)("div",{style:T.alpha,children:(0,n.jsx)(AlphaCapture,{style:T.Alpha,rgb:d,hsl:h,renderers:f,onChange:v})})]})}),(0,n.jsx)(F.ZP,{rgb:d,hsl:h,hex:c,onChange:v,disableAlpha:m})]})};Sketch.propTypes={disableAlpha:M().bool,width:M().oneOfType([M().string,M().number]),styles:M().object},Sketch.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623"]};var U=(0,B.ColorWrap)(Sketch),z=l(49268),G=(0,r.memo)(e=>{let{value:t,setValue:l,definition:i,blockId:o,selected:a,title:d,container:c}=e,u=(0,s.v9)(e=>e.usersList.kanvas,p.Z),g=(0,s.v9)(e=>e.usersList.openPopover,p.Z),x=(0,s.v9)(e=>e.usersList.page,p.Z),[m,k]=(0,r.useState)(null),f=(0,s.I0)(),b=(0,r.useRef)(null),j=(0,r.useRef)(null);j.current||(j.current=(0,w.v4)());let C="".concat(null==i?void 0:i.name,"_").concat(o,"_").concat(j.current),setOpenPopover=e=>f({type:"UPDATE_OPEN_POPOVER",openPopover:e}),onChangeComplete=e=>{"string"==typeof e?k(getRgbFromPallete(e)):k(null),l(e)},getRgbFromPallete=e=>{var t,l,i,n,o,s,a,r,d,c,p,h,v,g,m,k,f,y,b,w,j,C,L,I,S,E,N,T,M,D,P,H;let B={website:[null==u?void 0:null===(l=u.website)||void 0===l?void 0:null===(t=l.settings)||void 0===t?void 0:t.primaryColor,null==u?void 0:null===(n=u.website)||void 0===n?void 0:null===(i=n.settings)||void 0===i?void 0:i.secondaryColor,null==u?void 0:null===(s=u.website)||void 0===s?void 0:null===(o=s.settings)||void 0===o?void 0:o.accentColor,null==u?void 0:null===(r=u.website)||void 0===r?void 0:null===(a=r.settings)||void 0===a?void 0:a.backgroundColor,null==u?void 0:null===(c=u.website)||void 0===c?void 0:null===(d=c.settings)||void 0===d?void 0:d.textColor,null==u?void 0:null===(h=u.website)||void 0===h?void 0:null===(p=h.settings)||void 0===p?void 0:p.dangerColor,null==u?void 0:null===(g=u.website)||void 0===g?void 0:null===(v=g.settings)||void 0===v?void 0:v.successColor,null==u?void 0:null===(k=u.website)||void 0===k?void 0:null===(m=k.settings)||void 0===m?void 0:m.neutralColor],page:[null==x?void 0:null===(f=x.params)||void 0===f?void 0:f.primaryColorPage,null==x?void 0:null===(y=x.params)||void 0===y?void 0:y.secondaryColorPage,null==x?void 0:null===(b=x.params)||void 0===b?void 0:b.neutralColorPage,null==x?void 0:null===(w=x.params)||void 0===w?void 0:w.backgroundColorPage,null==x?void 0:null===(j=x.params)||void 0===j?void 0:j.textColorPage,null==x?void 0:null===(C=x.params)||void 0===C?void 0:C.dangerColorPage,null==x?void 0:null===(L=x.params)||void 0===L?void 0:L.successColorPage,null==x?void 0:null===(I=x.params)||void 0===I?void 0:I.accentColorPage]},Z=e.split("_")[0],R=e.split("_")[2],A=null==B?void 0:null===(S=B[null==Z?void 0:Z.toLowerCase()])||void 0===S?void 0:S[R];return!A&&(null==u?void 0:null===(T=u.website)||void 0===T?void 0:null===(N=T.settings)||void 0===N?void 0:null===(E=N.paletteColors)||void 0===E?void 0:E.length)>0&&(A=null==u?void 0:null===(H=u.website)||void 0===H?void 0:null===(P=H.settings)||void 0===P?void 0:null===(D=P.paletteColors)||void 0===D?void 0:null===(M=D.find(t=>t.checked&&t.addChildId===e))||void 0===M?void 0:M.name),A};(0,r.useEffect)(()=>{"string"==typeof t&&t&&k(getRgbFromPallete(t))},[]);let L=["primaryColor","secondaryColor","accentColor","backgroundColor","textColor","dangerColor","successColor","neutralColor","paletteColors"],I="WEBSITE"!==o||!L.includes(null==i?void 0:i.name)&&!L.includes(null==i?void 0:i.parentName),S=(0,n.jsx)(v.Z,{id:"popover-basic",style:{overflow:"hidden"},children:(0,n.jsx)(v.Z.Body,{style:{backgroundColor:"var(--color-6)"},children:(0,n.jsx)(U,{paramValue:t,onClick:()=>setOpenPopover(""),width:"100%",color:m||t,onChangeComplete:e=>onChangeComplete(e.rgb),showPresets:I})})});return(0,n.jsxs)("div",{className:"kluck-component kluck-font",ref:b,style:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"nowrap",padding:c?"0px":""},children:[!d&&(null==i?void 0:i.label)&&(0,n.jsx)(y,{className:"kluck-h4",definition:i,selected:a,style:{width:"100%"}}),d&&(0,n.jsx)("div",{className:"kluck-h4",style:{width:"100%",display:"flex",alignItems:"center"},children:d}),(0,n.jsx)(h.Z,{style:{width:"100%"},show:g===C,placement:"auto",overlay:S,trigger:["click"],rootClose:!0,onToggle:e=>{e||setOpenPopover("")},children:(0,n.jsx)("div",{className:"checkered",style:{width:"100%",height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center"},children:(0,n.jsx)("div",{onClick:()=>setOpenPopover(C),style:{width:"100%",height:"32px",display:"flex",justifyContent:"flex-end",background:(0,z.ad)(t),cursor:"pointer",borderRadius:"4px"},children:(0,n.jsx)("div",{style:{backgroundColor:"white",width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M8.84006 2.4L3.36673 8.19333C3.16006 8.41333 2.96006 8.84667 2.92006 9.14667L2.6734 11.3067C2.58673 12.0867 3.14673 12.62 3.92006 12.4867L6.06673 12.12C6.36673 12.0667 6.78673 11.8467 6.9934 11.62L12.4667 5.82667C13.4134 4.82667 13.8401 3.68667 12.3667 2.29334C10.9001 0.913336 9.78673 1.4 8.84006 2.4Z",stroke:"#292D32",strokeWidth:"1.3",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M7.92664 3.3667C8.2133 5.2067 9.70664 6.61337 11.56 6.80003",stroke:"#292D32",strokeWidth:"1.3",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M2 14.6667H14",stroke:"#292D32",strokeWidth:"1.3",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]})})})})})]})}),K=l(60181),Y=l(23508),q=(0,r.memo)(e=>{let{value:t,setValue:l,values:i,type:o,setType:s,width:a}=e,changeHandler=e=>{s?s(e.target.value):l({...t,type:e.target.value})};return(0,n.jsx)("select",{value:(null==t?void 0:t.type)?t.type:o,style:{width:a||"auto",cursor:"pointer",height:"100%",border:"none",paddingBlock:"8px",borderRadius:"4px",backgroundColor:"var(--white)",color:"var(--color-5)",fontWeight:"700"},onChange:e=>changeHandler(e),children:null==i?void 0:i.map((e,t)=>(0,n.jsx)("option",{value:e,style:{fontWeight:"600"},children:e},t))})}),J=(0,r.memo)(e=>{let{value:t,setValue:l,title:i,values:o,type:s,setType:a,wrapped:d,step:c,isDefault:u}
1=e,p=["auto","none","initial","inherit","unset"],h=c||(["em","rem"].includes(null==t?void 0:t.type)?.1:1),v=(0,r.useRef)(null),g=(0,r.useRef)(0),settle=e=>Math.min(9999,Math.max(-9999,Math.round(10*e)/10)),nudge=e=>l({...t,value:settle(Number((null==t?void 0:t.value)||0)+e*h)}),x=(0,r.useCallback)(()=>{clearTimeout(v.current),v.current=null},[]),startHold=e=>{x(),g.current=Number((null==t?void 0:t.value)||0);let i=0,tick=()=>{i+=1;let n=i>15?10:1;g.current=settle(g.current+e*h*n),l({...t,value:g.current}),v.current=setTimeout(tick,60)};v.current=setTimeout(tick,300),window.addEventListener("mouseup",x,{once:!0})};(0,r.useEffect)(()=>x,[x]);let holdProps=e=>({style:{cursor:"pointer"},onMouseDown:()=>{nudge(e),startHold(e)},onMouseUp:x,onMouseLeave:x});return(0,n.jsxs)("div",{className:"kluck-component kluck-font",style:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"nowrap"},children:[!!i&&(0,n.jsx)("div",{className:"kluck-h4",style:{width:"50%",minWidth:0,display:"flex",alignItems:"center"},children:i}),(0,n.jsxs)("span",{style:{width:"50%",display:"flex",flexDirection:"row",flexWrap:"nowrap",justifyContent:"flex-end",borderRadius:"4px",overflow:"hidden"},children:[!p.includes(s)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("input",{className:" kluck-background-tile kluck-h4",style:{width:"100%",height:"100%",padding:"6px",WebkitTextFillColor:u?"rgba(255, 255, 255, 0.65)":"white"},type:"number",value:null==t?void 0:t.value,step:h,onChange:e=>e.target.value>9999?l({...t,value:9999}):l({...t,value:e.target.value})}),(0,n.jsxs)("div",{className:" kluck-background-tile kluck-h4",style:{display:"flex",flexDirection:"column",justifyContent:"center",paddingInline:"4px"},children:[(0,n.jsx)(K.Z,{...holdProps(1)}),(0,n.jsx)(Y.Z,{...holdProps(-1)})]})]}),(null==o?void 0:o.length)>0&&(0,n.jsx)(q,{type:s,setType:a,value:t,setValue:l,values:o,width:p.includes(s)?"100%":"auto"})]})]})}),X=(0,r.memo)(e=>{let{blockId:t,name:l,title:i}=e,o=(0,s.I0)();return(0,n.jsx)("span",{className:"opacityHover",style:{display:"flex",alignItems:"center",cursor:"pointer"},title:i||"Reset to default",onClick:e=>{e.stopPropagation(),o({type:"RESET_PROPERTY",blockId:t,name:l})},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,n.jsx)("path",{d:"M7.83 2.35A6.75 6.75 0 1 1 4.23 4.23",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M9.59 3.06L7.83 2.35L9.24 1.08",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})});let normalize=e=>String(e).trim().toLowerCase(),isDefaultValue=(e,t)=>{if(null==t||null==e)return!1;if("object"==typeof t||"object"==typeof e){if("object"!=typeof t||"object"!=typeof e)return!1;let l=Object.keys(t);return!!l.length&&l.every(l=>isDefaultValue(e[l],t[l]))}return""!==normalize(e)&&normalize(e)===normalize(t)};var PropertyBorder=e=>{var t,l,i,o,a,d,c,p,h,v;let{definition:g,blockId:x,params:m,onChange:k,selected:f,openProperties:y}=e,[w,j]=(0,r.useState)(null===(t=m[g.name])||void 0===t?void 0:t.showTop),[C,L]=(0,r.useState)(null===(l=m[g.name])||void 0===l?void 0:l.showRight),[I,S]=(0,r.useState)(null===(i=m[g.name])||void 0===i?void 0:i.showBottom),[E,T]=(0,r.useState)(null===(o=m[g.name])||void 0===o?void 0:o.showLeft),[M,D]=(0,r.useState)(null===(a=m[g.name])||void 0===a?void 0:a.width),[P,H]=(0,r.useState)(null===(d=m[g.name])||void 0===d?void 0:d.style),[B,Z]=(0,r.useState)(null===(c=m[g.name])||void 0===c?void 0:c.color),[R,A]=(0,r.useState)(null===(p=m[g.name])||void 0===p?void 0:p.invisible),[V,_]=(0,r.useState)(null!==(h=y.get(g.name))&&void 0!==h?h:g.defaultExpanded||"border"===g.name),F=(0,s.I0)(),valueCheck=()=>{let e=!0;return void 0===w&&(e=!1),void 0===C&&(e=!1),void 0===I&&(e=!1),void 0===E&&(e=!1),void 0===M&&(e=!1),void 0===P&&(e=!1),void 0===B&&(e=!1),e};(0,r.useEffect)(()=>{if(k&&valueCheck()){let e={};e.showTop=w,e.showRight=C,e.showBottom=I,e.showLeft=E,e.width=M,e.style=P,e.color=B,e.invisible=R,k(x,g.name,e)}},[w,C,I,E,M,P,B,R]);let setOpenPopover=e=>F({type:"UPDATE_OPEN_POPOVER",openPopover:e}),U=(0,r.useRef)(!1);(0,r.useEffect)(()=>
1{if(!U.current){U.current=!0;return}V||setOpenPopover("")},[V]);let z=g.defaultValue||{};return(0,n.jsx)(b,{inLineProps:g.defaultValue?(0,n.jsx)(X,{blockId:x,name:g.name}):void 0,definition:g,selected:f,blockId:x,params:m,onChange:k,tile:!0,value:m[g.name],setShow:_,show:V,expandable:!0,children:(0,n.jsx)(u.Z,{in:V,children:(0,n.jsxs)("div",{children:[(0,n.jsx)(N,{title:"Top",value:w+"",definition:g,options:[{label:"Disable",value:"false"},{label:"Enable",value:"true"}],onChangeHandler:(e,t)=>j(t),isDefault:isDefaultValue(w,z.showTop)}),(0,n.jsx)(N,{title:"Right",value:C+"",definition:g,options:[{label:"Disable",value:"false"},{label:"Enable",value:"true"}],onChangeHandler:(e,t)=>L(t),isDefault:isDefaultValue(C,z.showRight)}),(0,n.jsx)(N,{title:"Bottom",value:I+"",definition:g,options:[{label:"Disable",value:"false"},{label:"Enable",value:"true"}],onChangeHandler:(e,t)=>S(t),isDefault:isDefaultValue(I,z.showBottom)}),(0,n.jsx)(N,{title:"Left",value:E+"",definition:g,options:[{label:"Disable",value:"false"},{label:"Enable",value:"true"}],onChangeHandler:(e,t)=>T(t),isDefault:isDefaultValue(E,z.showLeft)}),(0,n.jsx)(N,{title:"Border Style",value:P,definition:g,options:[{label:"None",value:"none"},{label:"Solid",value:"solid"},{label:"Hidden",value:"hidden"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"ridge"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"},{label:"Initial",value:"initial"},{label:"Inherit",value:"inherit"}],onChangeHandler:(e,t)=>H(t),isDefault:isDefaultValue(P,z.style)}),(0,n.jsx)(J,{title:"Border Width",setValue:e=>D(e.value),value:{value:M,type:"px"},values:["px"],type:"px",setType:void 0,wrapped:!0,isDefault:isDefaultValue(M,z.width)}),(0,n.jsx)(G,{title:"Color",value:B,setValue:Z,definition:g,blockId:x,selected:f}),(0,n.jsx)(N,{title:"Invisible Border",value:R,definition:g,options:[{label:"Disable",value:"false"},{label:"Enable",value:"true"}],onChangeHandler:(e,t)=>A(t),isDefault:isDefaultValue(null!=R?R:"false",null!==(v=z.invisible)&&void 0!==v?v:"false")})]})})})},editorComponents_KluckUnitGrouper=e=>{let{title:t,children:l,isGrouped:i,onGroupToggle:o}=e,handleToggle=()=>{o&&o(!i)};return(0,n.jsxs)("div",{className:"kluck-font",style:{display:"flex",flexDirection:"column",flexWrap:"nowrap"},children:[(0,n.jsx)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:"12px"},children:(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[i&&(0,n.jsx)("span",{style:{cursor:"pointer"},onClick:handleToggle,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 18 18",fill:"none",children:[(0,n.jsx)("path",{d:"M2.45268 8.99978C1.86018 8.28727 1.50018 7.37227 1.50018 6.37477C1.50018 4.10976 3.35269 2.24976 5.6252 2.24976H9.37521C11.6402 2.24976 13.5002 4.10976 13.5002 6.37477C13.5002 8.63978 11.6477 10.4998 9.37521 10.4998H7.5002",stroke:"#3C8FF7",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M15.5475 8.99976C16.14 9.71226 16.5 10.6273 16.5 11.6248C16.5 13.8898 14.6475 15.7498 12.375 15.7498H8.62501C6.36001 15.7498 4.5 13.8898 4.5 11.6248C4.5 9.35976 6.35251 7.49976 8.62501 7.49976H10.5",stroke:"#3C8FF7",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}),!i&&(0,n.jsx)("span",{style:{cursor:"pointer"},onClick:handleToggle,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 18 18",fill:"none",children:[(0,n.jsx)("path",{d:"M2.45268 9.00002C1.86018 8.28752 1.50018 7.37252 1.50018 6.37501C1.50018 4.11001 3.35269 2.25 5.6252 2.25H9.37521C11.6402 2.25 13.5002 4.11001 13.5002 6.37501C13.5002 8.64002 11.6477 10.5 9.37521 10.5H7.5002",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M15.5475 9C16.14 9.71251 16.5 10.6275 16.5 11.625C16.5 13.89 14.6475 15.75 12.375 15.75H8.62501C6.36001 15.75 4.5 13.89 4.5 11.625C4.5 9.36001 6.35251 7.5 8.62501 7.5H10.5",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),(0,n.jsx)("div",{style:{opacity:i?.7:1,transition:"opacity 0.2s ease"},children:l})]})},Q=(0,r.memo)(e=>{var t,l,i;let{definition:o,blockId:s,params:a,onChange:d,darkMode:c,selected:p,openProperties:h}=e,[v,g]=(0,r.useState)(null!==(i=h.get(o.name))&&void 0!==i?i:o.defaultExpanded||"borderRadius"===o.name),[x,m]=(0,r.useState)(a[o.name]),[k,f]=(0,r.useState)((null===(t=a[o.name])||void 0===t?void 0:t.active)!==!1),[y,w]=(0,r.useState)(!!(null===(l=a[o.name])||void 0===l?void 0:l.linked));(0,r.useEffect)(()=>
1{if("unset"!==x&&x&&d){var e,t,l,i,n,a,r,c;let u=JSON.parse(JSON.stringify(x)),p=[null,void 0,""];p.includes(null==u?void 0:null===(e=u.topLeft)||void 0===e?void 0:e.value)&&(u.topLeft.value="0"),p.includes(null==u?void 0:null===(t=u.topLeft)||void 0===t?void 0:t.type)&&(u.topLeft.type="px"),p.includes(null==u?void 0:null===(l=u.topRight)||void 0===l?void 0:l.value)&&(u.topRight.value="0"),p.includes(null==u?void 0:null===(i=u.topRight)||void 0===i?void 0:i.type)&&(u.topRight.type="px"),p.includes(null==u?void 0:null===(n=u.bottomRight)||void 0===n?void 0:n.value)&&(u.bottomRight.value="0"),p.includes(null==u?void 0:null===(a=u.bottomRight)||void 0===a?void 0:a.type)&&(u.bottomRight.type="px"),p.includes(null==u?void 0:null===(r=u.bottomLeft)||void 0===r?void 0:r.value)&&(u.bottomLeft.value="0"),p.includes(null==u?void 0:null===(c=u.bottomLeft)||void 0===c?void 0:c.type)&&(u.bottomLeft.type="px"),u.active=k,u.linked=y,d(s,o.name,u)}},[x,k,y]);let handleValueChange=(e,t)=>{y?m({...x,topLeft:t,topRight:t,bottomRight:t,bottomLeft:t,active:k}):m({...x,[e]:t,active:k})},j=o.defaultValue||{};return(0,n.jsx)(b,{inLineProps:(0,n.jsx)(()=>(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",gap:"12px"},onClick:e=>e.stopPropagation(),children:[o.defaultValue&&(0,n.jsx)(X,{blockId:s,name:o.name}),(0,n.jsx)(editorComponents_KluckUnitGrouper,{title:"Active",isGrouped:y,onGroupToggle:w}),(0,n.jsx)(editorComponents_KluckToggleSwitch,{title:"",value:k,setValue:f})]}),{}),definition:o,selected:p,blockId:s,params:a,onChange:d,tile:!0,value:a[o.name],setValue:void 0,setShow:g,show:v,expandable:!0,children:(0,n.jsx)(u.Z,{in:v,children:(0,n.jsxs)("div",{children:[(0,n.jsx)(J,{value:null==x?void 0:x.topLeft,setValue:e=>handleValueChange("topLeft",e),title:"Top Left",wrapped:!0,values:["px","%","em"],isDefault:isDefaultValue(null==x?void 0:x.topLeft,j.topLeft)}),(0,n.jsx)(J,{value:null==x?void 0:x.topRight,setValue:e=>handleValueChange("topRight",e),title:"Top Right",wrapped:!0,values:["px","%","em"],isDefault:isDefaultValue(null==x?void 0:x.topRight,j.topRight)}),(0,n.jsx)(J,{value:null==x?void 0:x.bottomRight,setValue:e=>handleValueChange("bottomRight",e),title:"Bottom Right",wrapped:!0,values:["px","%","em"],isDefault:isDefaultValue(null==x?void 0:x.bottomRight,j.bottomRight)}),(0,n.jsx)(J,{value:null==x?void 0:x.bottomLeft,setValue:e=>handleValueChange("bottomLeft",e),title:"Bottom Left",wrapped:!0,values:["px","%","em"],isDefault:isDefaultValue(null==x?void 0:x.bottomLeft,j.bottomLeft)})]})})})}),property_PropertyImage=e=>{var t,l,i;let{definition:o,blockId:c,params:u,onChange:h,selected:v}=e,g=(0,s.v9)(e=>e.usersList.kanvas,p.Z),x=(0,s.v9)(e=>e.usersList.openPopover,p.Z),[m,k]=(0,r.useState)(u[o.name]),f=(0,r.useRef)("backgroundImageProperty_"+o.name+"_"+(0,w.v4)()).current,b=(0,s.I0)(),setOpenPopover=e=>b({type:"UPDATE_OPEN_POPOVER",openPopover:e}),onSelectHandler=e=>{k(e.source),setOpenPopover("")};return(0,r.useEffect)(()=>{h&&h(c,o.name,m)},[m]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"kluck-component kluck-font",style:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",flexWrap:"nowrap",alignContent:"center"},children:[(null==o?void 0:null===(t=o.label)||void 0===t?void 0:t.length)>0&&(0,n.jsx)(y,{className:"kluck-h4",definition:o,selected:v,style:{width:"100%"}}),(0,n.jsxs)("div",{className:"kluck-background-tile kluck-h4",style:{width:"100%",maxWidth:u[o.name]?"100%":"64px",display:"flex",justifyContent:"space-between",alignItems:"center",borderRadius:"4px",cursor:"pointer",overflow:"hidden"},children:[(0,n.jsxs)("div",{onClick:()=>setOpenPopover(f),style:{width:"100",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",padding:"8px 0 8px 8px",marginRight:"10px",display:"flex",alignItems:"center"},children:[u[o.name]&&(null===(i=u[o.name])||void 0===i?void 0:i.slice((null===(l=u[o.name])||void 0===l?void 0:l.lastIndexOf("/"))+1)),!u[o.name]&&"Change"]}),u[o.name]&&(0,n.jsx)("div",{onClick:()=>onSelectHandler({source:""}),style:{minWidth:"30px",width:"30px",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",background:"var(--color-2)"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"16px",height:"16px"},viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M14 3.98665C11.78 3.76665 9.54667 3.65332 7.32 3.65332C6 3.65332 4.68 3.71999 3.36 3.85332L2 3.98665",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.6665 3.31331L5.81317 2.43998C5.91984 1.8066
15 5.99984 1.33331 7.1265 1.33331H8.87317C9.99984 1.33331 10.0865 1.83331 10.1865 2.44665L10.3332 3.31331",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.5664 6.09332L12.1331 12.8067C12.0598 13.8533 11.9998 14.6667 10.1398 14.6667H5.85977C3.99977 14.6667 3.93977 13.8533 3.86644 12.8067L3.43311 6.09332",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.88672 11H9.10672",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.3335 8.33331H9.66683",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}),!1]})]}),(0,n.jsxs)(d.Z,{show:x===f,className:"editorModal",backdropClassName:"editorModal",contentClassName:"editorModalContent",centered:!0,style:{maxWidth:"unset"},onHide:()=>setOpenPopover(""),children:[(0,n.jsxs)(d.Z.Header,{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Image",(0,n.jsx)("svg",{onClick:()=>setOpenPopover(""),style:{width:"24px",height:"24px",cursor:"pointer"},viewBox:"0 0 24 24",children:(0,n.jsx)("path",{fill:"currentColor",d:"M13.46,12L19,17.54V19H17.54L12,13.46L6.46,19H5V17.54L10.54,12L5,6.46V5H6.46L12,10.54L17.54,5H19V6.46L13.46,12Z"})})]}),(0,n.jsx)(d.Z.Body,{children:(0,n.jsx)(a.default,{onSelect:onSelectHandler,allowFolderEdit:!1,nested:!0,kanvas:g})})]})]})},$=(0,r.memo)(e=>{var t;let{value:l,onChange:i,definition:o,title:s,isDefault:a}=e,r="string"==typeof s?!!s:!!((null==s?void 0:null===(t=s.props)||void 0===t?void 0:t.definition)?s.props.definition.label:s);return(0,n.jsxs)("div",{className:"kluck-component kluck-font",style:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"nowrap"},children:[r&&(0,n.jsx)("div",{className:"kluck-h4",title:"string"==typeof s?s:void 0,style:{width:"100%",maxWidth:"50%",display:"flex",alignItems:"center",paddingRight:"10px"},children:"string"==typeof s?(0,n.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}):s}),(0,n.jsx)("input",{type:"text",value:l,name:o.name,onChange:e=>i(e),className:"kluck-background-tile kluck-h4",style:{width:"100%",border:"none",outline:"none",padding:"6px",borderRadius:"4px",WebkitTextFillColor:a?"rgba(255, 255, 255, 0.65)":"white"}})]})}),ee=(0,r.memo)(e=>{let{definition:t,blockId:l,params:i,onChange:o,selected:s}=e,[a,d]=(0,r.useState)(i[t.name]);return(0,n.jsx)($,{title:(0,n.jsx)(y,{definition:t,selected:s,ellipsis:!0}),value:a,onChange:e=>{e.preventDefault(),d(e.target.value),o&&o(l,t.name,e.target.value)},definition:t,isDefault:isDefaultValue(a,t.defaultValue)})}),et=l(9292),el=(0,r.memo)(e=>{var t,l,i,o,s,a;let{definition:d,blockId:c,params:p,onChange:h,darkMode:v,selected:g,openProperties:x}=e,[m,k]=(0,r.useState)(null===(t=p[d.name])||void 0===t?void 0:t.type),[f,y]=(0,r.useState)(null===(l=p[d.name])||void 0===l?void 0:l.spinnerBorder),[w,j]=(0,r.useState)(null===(i=p[d.name])||void 0===i?void 0:i.spinnerBorderRadius),[C,L]=(0,r.useState)(null===(o=p[d.name])||void 0===o?void 0:o.image),[I,S]=(0,r.useState)(null===(s=p[d.name])||void 0===s?void 0:s.url),[E,T]=(0,r.useState)(null===(a=p[d.name])||void 0===a?void 0:a.loadingAnimation),[M,D]=(0,r.useState)(x.get(d.name));return(0,r.useEffect)(()=>{if(h){let e={};void 0!==m&&(e.type=m),void 0!==f&&(e.spinnerBorder=f),void 0!==w&&(e.spinnerBorderRadius=w),void 0!==C&&(e.image=C),void 0!==I&&(e.url=I),void 0!==E&&(e.loadingAnimation=E),h(c,d.name,e)}},[m,f,w,C,I,E]),(0,n.jsx)(b,{definition:d,selected:g,blockId:c,params:p,onChange:h,tile:!0,value:p[d.name],setValue:void 0,setShow:D,show:M,expandable:!0,children:(0,n.jsx)(u.Z,{in:M,children:(0,n.jsxs)("div",{children:[(0,n.jsx)(N,{title:"Animation Type",value:m,definition:d,options:[{label:"Spinner",value:"spinner"},{label:"Image",value:"image"},{label:"Url",value:"url"}],onChangeHandler:(e,t)=>k(t)}),"spinner"===m&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(PropertyBorder,{definition:{name:"spinnerBorder",label:"Spinner Border"},blockId:c,params:{...p,spinnerBorder:f},onChange:(e,t,l)=>y(l),darkMode:v,selected:g,openProperties:x}),(0,n.jsx)(Q,{definition:{name:"spinnerBorderRadius",label:"Spinner Border Radius"},blockId:c,params:{...p,spinnerBorderRadius:w},onChange:(e,t,l)=>j(l),darkMode:v,selected:g,openProperties:x})]}),"image"===m&&(0,n.jsx)(property_PropertyImage,{definition:{name:"image",label:"Image"},blockId:c,params:{...p,image:C},onChange:(e,t,l)=>L(l),darkMode:v,selected:g,openProperties:x}),"url"===m&&(0,n.jsx)(ee,{definition:{name:"url",label:"Url"},blockId:c,params:{...p,url:I},onChange:(e,t,l)=>S(l),darkMode:v,selected:g,openProperties:x}),(0,n.jsx)(N,{title:"Loading Animation",value:E,definition:d,options:et.$[0].definitions[0].options,onChangeHandler:(e,t)=>T(t)})]})})})}
1),PropertyBackgroundImage=e=>{var t,l,i,o,a,d;let{definition:c,blockId:p,params:h,onChange:v,darkMode:g,selected:x,openProperties:m}=e,[k,f]=(0,r.useState)(null===(t=h[c.name])||void 0===t?void 0:t.position),[y,w]=(0,r.useState)(null===(l=h[c.name])||void 0===l?void 0:l.size),[j,C]=(0,r.useState)(null===(i=h[c.name])||void 0===i?void 0:i.repeat),[L,I]=(0,r.useState)(null===(o=h[c.name])||void 0===o?void 0:o.color),[S,E]=(0,r.useState)(null===(a=h[c.name])||void 0===a?void 0:a.opacity),[T,M]=(0,r.useState)(null===(d=h[c.name])||void 0===d?void 0:d.blendMode),[D,P]=(0,r.useState)(m.get(c.name)),H=(0,s.I0)(),setOpenPopover=e=>H({type:"UPDATE_OPEN_POPOVER",openPopover:e}),B=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(!B.current){B.current=!0;return}D||setOpenPopover("")},[D]),(0,r.useEffect)(()=>{v&&k&&y&&j&&L&&v(p,c.name,{position:k,size:y,repeat:j,color:L,opacity:S,blendMode:T})},[k,y,j,L,S,T]);let Z=c.defaultValue||{};return(0,n.jsx)(b,{inLineProps:c.defaultValue?(0,n.jsx)(X,{blockId:p,name:c.name}):void 0,definition:c,selected:x,blockId:p,params:h,onChange:v,tile:!0,value:h[c.name],setValue:void 0,setShow:P,show:D,expandable:!0,children:(0,n.jsx)(u.Z,{in:D,children:(0,n.jsxs)("div",{children:[(0,n.jsx)(N,{title:"Background Position",definition:{name:"Background Position"},blockId:p,options:[{value:"center",label:"Center"},{value:"center top",label:"Center Top"},{value:"center bottom",label:"Center Bottom"},{value:"left top",label:"Left Top"},{value:"left center",label:"Left Center"},{value:"left bottom",label:"Left Bottom"},{value:"right top",label:"Right Top"},{value:"right center",label:"Right Center"},{value:"right bottom",label:"Right Bottom"}],value:k,onChangeHandler:(e,t)=>f(t),isDefault:isDefaultValue(k,Z.position)}),(0,n.jsx)(N,{title:"Background Size",definition:{name:"Background Size"},blockId:p,options:[{value:"contain",label:"Contain"},{value:"auto",label:"Auto"},{value:"cover",label:"Cover"},{value:"100% auto",label:"100% Width"},{value:"auto 100%",label:"100% Height"},{value:"100% 100%",label:"100% Height and Width"}],value:y,onChangeHandler:(e,t)=>w(t),isDefault:isDefaultValue(y,Z.size)}),(0,n.jsx)(N,{title:"Background Repeat",definition:{name:"Background Repeat"},blockId:p,options:[{value:"no-repeat",label:"No Repeat"},{value:"repeat",label:"Repeat"},{value:"repeat-x",label:"Repeat X"},{value:"repeat-Y",label:"Repeat Y"},{value:"space",label:"Space"},{value:"round",label:"Round"}],value:j,onChangeHandler:(e,t)=>C(t),isDefault:isDefaultValue(j,Z.repeat)}),(0,n.jsx)(G,{definition:{name:"".concat(c.name,"_backgroundColor")},blockId:p,value:L,setValue:I,title:"Background Color"}),(0,n.jsx)(J,{title:"Image Opacity",setValue:E,value:null!=S?S:Z.opacity,values:["%"],type:"%",setType:void 0,wrapped:!0,isDefault:isDefaultValue(null!=S?S:Z.opacity,Z.opacity)}),(0,n.jsx)(N,{title:"Blend Mode",definition:{name:"Blend Mode"},blockId:p,options:[{value:"normal",label:"Normal"},{value:"multiply",label:"Multiply"},{value:"screen",label:"Screen"},{value:"overlay",label:"Overlay"},{value:"darken",label:"Darken"},{value:"lighten",label:"Lighten"},{value:"color-dodge",label:"Color Dodge"},{value:"color-burn",label:"Color Burn"},{value:"hard-light",label:"Hard Light"},{value:"soft-light",label:"Soft Light"},{value:"difference",label:"Difference"},{value:"exclusion",label:"Exclusion"},{value:"hue",label:"Hue"},{value:"saturation",label:"Saturation"},{value:"color",label:"Color"},{value:"luminosity",label:"Luminosity"}],value:T,onChangeHandler:(e,t)=>M(t),isDefault:isDefaultValue(T,Z.blendMode)})]})})})},ei=(0,r.memo)(e=>{let{definition:t,blockId:l,params:i,onChange:o,selected:a}=e,d=(0,s.v9)(e=>e.usersList.selectedPage,p.Z),c=(0,s.v9)(e=>e.usersList.breakpoints,p.Z),u=(0,s.v9)(e=>e.usersList.blockSchemas,p.Z),h=(0,s.v9)(e=>e.usersList.kanvas,p.Z),[v,g]=(0,r.useState)(i[t.name]),[x,m]=(0,r.useState)([]);return(0,r.useEffect)(()=>{let e=[{label:"None",blockId:""}],l=[d.pageId],parseBlock=(i,n)=>{for(let a=0;a<c.length;a++){if(t.blocks.includes(i.blockName)&&!e.find(e=>e.value===i.blockId)){var o,s;let t={label:"".concat(i.blockName," ").concat(e.length," (").concat(n.params.pageName,")"),value:i.blockId,blockId:i.blockId};("Menu"===i.blockName||"MenuNew"===i.blockName)&&(t.menuId=null===(s=i[c[a].key])||void 0===s?void 0:null===(o=s.menu)||void 0===o?void 0:o.menuId),e.push(t)}let r=u[i.blockName].pageDefinitions;for(let e=0;e<r.length;
1e++){let t=i[c[a].key][r[e].name];if(t){let e=h.website.pages.find(e=>e.pageId===t);e&&!l.includes(e.pageId)&&(l.push(e.pageId),e.blocks.forEach(t=>parseBlock(t,e)))}}}for(let e=0;e<i.children.length;e++)parseBlock(i.children[e],n)};d.blocks.forEach(e=>parseBlock(e,d)),m(e)},[]),(0,n.jsx)("div",{className:"propertyContainer kluck-font",children:(0,n.jsx)(N,{value:null==v?void 0:v.blockId,definition:t,options:x,onChangeHandler:(e,i)=>{x.forEach(e=>{e.blockId===i&&(g(e),o(l,t.name,e))})},title:(0,n.jsx)(y,{definition:t,selected:a})})})}),en=l(96513),eo=l(64389),es=l(22961),ea=l(72450),property_PropertyBlockContents=e=>{var t;let{definition:l,blockId:i,params:o,onChange:a,selected:d,openProperties:c}=e,h=(0,s.v9)(e=>e.usersList.kanvas,p.Z),[v,g]=(0,r.useState)(c.get(l.name)),[x,m]=(0,r.useState)([]),[k,f]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=(0,eo.Z)(h,i);e&&m(e.children)},[h,i]);let clickHandler=(e,t)=>{f(e),Object.keys(e.params).length>0&&(console.log((0,eo.Z)(h,i)),a(i,"currentSlide",t))},y=(null==k?void 0:null===(t=k.params)||void 0===t?void 0:t.sliderHidden)!=="true";return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(b,{definition:l,selected:d,blockId:i,params:o,onChange:a,tile:!0,value:o[l.name],setValue:void 0,setShow:g,show:v,expandable:!0,children:(0,n.jsx)(u.Z,{in:v,children:(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",paddingInline:"2px"},children:[(0,n.jsx)("div",{style:{display:"flex",justifyContent:"space-evenly",alignItems:"center",padding:"10px"},children:(0,n.jsx)("div",{className:"kluck-success",style:{width:"100%",textAlign:"center",borderRadius:"2.5px",padding:"4px",cursor:"pointer"},onClick:e=>{e.preventDefault();let t={blockId:(0,w.v4)(),blockName:"NewTemplate",params:{},deviceType:"desktop mobile",blockObject:r.cloneElement((0,n.jsx)(en.Z,{}),{}),children:[],selected:!0},o=(0,eo.Z)(h,i);o.children.push(t),a(i,l.name,JSON.stringify(o.children)),f(t)},children:"Add +"})}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-evenly",alignItems:"center",paddingInline:"6px",marginBlock:"6px"},children:[(0,n.jsx)("div",{className:"kluck-light",style:{width:"100%",textAlign:"center",borderRadius:"2.5px",padding:"4px",cursor:"pointer",marginInline:"4px",opacity:null!==k?"100%":"40%"},onClick:()=>{if(null===k)return;let e=(0,eo.Z)(h,i),t=e.children.findIndex(e=>e.blockId===k.blockId);e.children[t].params.sliderHidden="true"===e.children[t].params.sliderHidden?"false":"true",a(i,l.name,JSON.stringify(e.children))},children:y?"shown":"hidden"}),(0,n.jsx)("div",{className:"kluck-warning",style:{width:"100%",textAlign:"center",borderRadius:"2.5px",padding:"4px",cursor:"pointer",marginInline:"4px",opacity:null!==k?"100%":"40%"},onClick:()=>{let e=(0,eo.Z)(h,i),t=e.children.findIndex(e=>e.blockId===k.blockId);e.children.splice(t,1),a(i,l.name,JSON.stringify(e.children))},children:"delete"})]}),(0,n.jsx)("div",{children:x.map((e,t)=>(0,n.jsx)("div",{style:{display:"flex",justifyContent:"space-evenly",alignItems:"center",paddingBlock:"5px",paddingInline:"10px"},onClick:()=>clickHandler(e,t),children:(0,n.jsxs)("div",{className:"kluck-background-tile",style:{position:"relative",width:"100%",textAlign:"center",borderRadius:"2.5px",padding:"4px",cursor:"pointer",border:(null==k?void 0:k.blockId)===e.blockId?"1px solid var(--color-7)":"1px solid var(--color-2)",display:"flex",flexDirection:"row"},children:[(0,n.jsx)("div",{children:e.blockName}),(0,n.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"20%",position:"absolute",right:"0"},children:"true"===e.params.sliderHidden?(0,n.jsx)(ea.Z,{}):(0,n.jsx)(es.Z,{})})]})},t))})]})})})})};let hasNonColorPropertyChanged=(e,t)=>!!e&&!!t&&["xOffset","yOffset","blur","spread"].some(l=>{let i=String(e[l]||""),n=String(t[l]||"");return i!==n});var er=(0,r.memo)(e=>{var t,l,i,o,a,d,c,p,h;let{definition:v,blockId:g,params:x,onChange:m,darkMode:k,selected:f,openProperties:y}=e,[w,j]=(0,r.useState)(x[v.name]),[C,L]=(0,r.useState)((null===(t=x[v.name])||void 0===t?void 0:t.active)!==!1&&(null===(l=x[v.name])||void 0===l?void 0:l.active)!=="false"),[I,S]=(0,r.useState)(null===(i=x[v.name])||void 0===i?void 0:i.xOffset),[E,N]=(0,r.useState)(null===(o=x[v.name])||void 0===o?void 0:o.yOffset),[T,M]=(0,r.useState)(!!(null===(a=x[v.name])||void 0===a?void 0:a.linked)),[D,P]=(0,r.useState)(null===(d=x[v.name])||void 0===d?void 0:d.blur),[H,B]=(0,r.useState)(null===(c=x[v.name])||void 0===c?void 0:c.spread),[Z,R]=(0,r.useState)(null===(p=x[v.name])||void 0===p?void 0:p.color),[A,V]=(0,r.useState)(null!==(h=y.get(v.name))&&void 0!==h?h:v.defaultExpanded),_=(0,s.I0)(),[F,U]=(0,r.useState)(null);(0,r.useEffect)(()=>{j({xOffset:I,yOffset:E,blur:D,spread:H,color:Z,active:C,linked:T})},[I,E,D,H,Z,C,T]),(0,r.useEffect)(()=>
1{if(T&&F&&hasNonColorPropertyChanged(w,F)){let e=["xOffset","yOffset","blur","spread"].find(e=>String(w[e])!==String(F[e]));if(e){let t=w[e];S(t),N(t),P(t),B(t)}}U({...w}),m&&w&&Object.keys(w).length&&m(g,v.name,w)},[w]);let setOpenPopover=e=>_({type:"UPDATE_OPEN_POPOVER",openPopover:e}),z=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(!z.current){z.current=!0;return}A||setOpenPopover("")},[A]);let K=v.defaultValue||{};return(0,n.jsx)(b,{inLineProps:(0,n.jsx)(()=>(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",gap:"12px"},onClick:e=>e.stopPropagation(),children:[v.defaultValue&&(0,n.jsx)(X,{blockId:g,name:v.name}),(0,n.jsx)(editorComponents_KluckUnitGrouper,{title:"Active",isGrouped:T,onGroupToggle:M}),(0,n.jsx)(editorComponents_KluckToggleSwitch,{title:"",value:C,setValue:L})]}),{}),definition:v,selected:f,blockId:g,params:x,onChange:m,tile:!0,value:x[v.name],setValue:void 0,setShow:V,show:A,expandable:!0,children:(0,n.jsx)(u.Z,{in:A,children:(0,n.jsxs)("div",{children:[(0,n.jsx)(J,{title:"X Offset",value:{value:I},setValue:e=>S(e.value),values:["px"],type:void 0,setType:void 0,wrapped:!0,isDefault:isDefaultValue(I,K.xOffset)}),(0,n.jsx)(J,{title:"Y Offset",value:{value:E},setValue:e=>N(e.value),values:["px"],type:void 0,setType:void 0,wrapped:!0,isDefault:isDefaultValue(E,K.yOffset)}),(0,n.jsx)(J,{title:"Blur",value:{value:D},setValue:e=>P(e.value),values:["px"],type:void 0,setType:void 0,wrapped:!0,isDefault:isDefaultValue(D,K.blur)}),(0,n.jsx)(J,{title:"Spread",value:{value:H},setValue:e=>B(e.value),values:["px"],type:void 0,setType:void 0,wrapped:!0,isDefault:isDefaultValue(H,K.spread)}),(0,n.jsx)(G,{definition:v,blockId:g,params:x,onChange:m,darkMode:k,selected:f,value:Z,setValue:R})]})})})}),property_PropertyBreakpoint=()=>{let e=(0,s.v9)(e=>e.usersList.selectedBlock,p.Z),t=(0,s.v9)(e=>e.usersList.breakpoints,p.Z),l=(0,s.I0)(),onClick=t=>{let i=e.deviceType;i.includes(t.value)?i=i.replace(t.value,""):i+=" "+t.value,l({type:"UPDATE_PROPERTY",blockId:"BREAKPOINT",value:i=(i=i.replaceAll("  "," ")).trim()})};return t.map((t,l)=>{var i;let o=null==e?void 0:null===(i=e.deviceType)||void 0===i?void 0:i.includes(t.value);return(0,n.jsxs)("div",{className:"kluck-component kluck-font propertyContainer",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:l?"10px":"5px"},children:["Show on ",t.label,":",(0,n.jsx)("div",{style:{width:"50%",height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center"},children:(0,n.jsx)(editorComponents_KluckToggleSwitch,{title:"",value:!!o,setValue:()=>onClick(t)})})]},l)})},PropertyCheckBoxArray=e=>{let{definition:t,blockId:l,darkMode:i,selected:o,params:a,onChange:d,openProperties:h}=e,v=(0,s.v9)(e=>e.usersList.kanvas,p.Z),g=(0,s.v9)(e=>e.usersList.selectedPage,p.Z),[x,m]=(0,r.useState)([]),[k,f]=(0,r.useState)(h.get(t.name)),[y,w]=(0,r.useState)(null),[j,C]=(0,r.useState)(null);(0,r.useEffect)(()=>{if("PAGE"===t.options){let t=e.params.pages||[];m(t)}},[t]),(0,r.useEffect)(()=>{d&&d(l,t.name,x)},[x]);let handleCheck=e=>{let t=[...x];e.target.checked?t=[...x,e.target.value]:t.splice(x.indexOf(e.target.value),1),m(t)},handleDragStart=(e,t)=>{w(t),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/html",e.target.outerHTML)},handleDragOver=(e,t)=>{e.preventDefault(),e.dataTransfer.dropEffect="move",C(t)},handleDragLeave=e=>{C(null)},handleDrop=(e,t)=>{if(e.preventDefault(),null===y||y===t){w(null),C(null);return}let l=[...x],i=l[y];l.splice(y,1);let n=y<t?t-1:t;l.splice(n,0,i),m(l),w(null),C(null)},handleDragEnd=()=>{w(null),C(null)},getItemDisplayName=e=>{if("PAGE"===t.options){let t=v.website.pages.find(t=>t.params.pageName===e||t.pageId===e);return t?t.params.pageName:e}return e};return(0,n.jsx)(b,{definition:t,selected:o,blockId:l,params:a,tile:!0,value:a[t.name],setValue:void 0,setShow:f,show:k,expandable:!0,children:(0,n.jsx)(u.Z,{in:k,children:(0,n.jsx)("div",{children:(0,n.jsxs)("div",{style:{padding:"0 18px 12px 18px"},children:[x&&x.length>
10&&(0,n.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,n.jsx)("div",{style:{fontSize:"12px",fontWeight:"bold",marginBottom:"8px",color:"#666"},children:"Selected Items (Drag to reorder, uncheck to remove):"}),(0,n.jsx)(c.Z,{children:x.map((e,t)=>(0,n.jsx)(c.Z.Item,{draggable:!0,onDragStart:e=>handleDragStart(e,t),onDragOver:e=>handleDragOver(e,t),onDragLeave:handleDragLeave,onDrop:e=>handleDrop(e,t),onDragEnd:handleDragEnd,style:{display:"flex",alignItems:"center",padding:"8px 12px",cursor:"move",backgroundColor:y===t?"#f8f9fa":j===t?"#e9ecef":"#ffffff",border:j===t?"2px dashed #007bff":"1px solid #dee2e6",transition:"all 0.2s ease",color:"#000000"},children:(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",flex:1},children:[(0,n.jsx)("div",{style:{marginRight:"12px",fontSize:"16px",color:"#666",cursor:"grab"},children:"⋮⋮"}),(0,n.jsx)("input",{style:{marginRight:"24px"},checked:!0,value:e,type:"checkbox",onChange:handleCheck}),(0,n.jsxs)("span",{style:{marginRight:"8px",fontSize:"12px",color:"#666"},children:[t+1,"."]}),(0,n.jsx)("span",{children:getItemDisplayName(e)})]})},"selected-".concat(t)))})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{style:{fontSize:"12px",fontWeight:"bold",marginBottom:"8px",color:"#666"},children:"Available Items:"}),(0,n.jsx)(c.Z,{children:"PAGE"===t.options&&v.website.pages.filter(e=>(null==e?void 0:e.pageId)!==(null==g?void 0:g.pageId)).filter(e=>{let t=e.params.pageName,l=e.pageId;return!x.includes(t)&&!x.includes(l)}).map((e,t)=>{let l=x.includes(e.params.pageName)||x.includes(e.pageId);return(0,n.jsxs)(c.Z.Item,{onChange:handleCheck,style:{display:"flex"},children:[(0,n.jsx)("input",{style:{marginRight:"24px"},checked:l,value:e.pageId,type:"checkbox",onChange:handleCheck}),(0,n.jsx)("span",{children:e.params.pageName})]},t)})})]})]})})})})},ed=(0,r.memo)(e=>{let{definition:t,blockId:l,params:i,onChange:o,selected:s}=e,[a,d]=(0,r.useState)(i[t.name]);return(0,r.useEffect)(()=>{"unset"!==a&&a&&o&&o(l,t.name,a)},[a]),(0,n.jsx)(G,{value:a,onChange:o,setValue:d,definition:t,blockId:l,selected:s})}),ec=l(30175),eu=(0,r.memo)(e=>{var t,l,i,o,s,a,d,c,p,h,v,g,x;let{definition:m,blockId:k,params:f,onChange:y,darkMode:w,selected:j,openProperties:C}=e,[L,I]=(0,r.useState)(f[m.name]),[S,E]=(0,r.useState)((null===(t=f[m.name])||void 0===t?void 0:t.display)||"flex"),[T,M]=(0,r.useState)(null===(l=f[m.name])||void 0===l?void 0:l.flexDirection),[D,P]=(0,r.useState)(null===(i=f[m.name])||void 0===i?void 0:i.flexWrap),[H,B]=(0,r.useState)(null===(o=f[m.name])||void 0===o?void 0:o.alignContent),[Z,R]=(0,r.useState)(null===(s=f[m.name])||void 0===s?void 0:s.justifyContent),[A,V]=(0,r.useState)(null===(a=f[m.name])||void 0===a?void 0:a.alignItems),[_,F]=(0,r.useState)(null===(d=f[m.name])||void 0===d?void 0:d.gap),[U,z]=(0,r.useState)(null===(c=f[m.name])||void 0===c?void 0:c.gridTemplateColumns),[G,K]=(0,r.useState)(null===(p=f[m.name])||void 0===p?void 0:p.gridTemplateRows),[Y,q]=(0,r.useState)(null===(h=f[m.name])||void 0===h?void 0:h.gridAutoFlow),[J,X]=(0,r.useState)(null===(v=f[m.name])||void 0===v?void 0:v.gridAutoColumns),[Q,ee]=(0,r.useState)(null===(g=f[m.name])||void 0===g?void 0:g.gridAutoRows),[et,el]=(0,r.useState)(C.get(m.name)||m.defaultExpanded||"container"===m.name),[ei,en]=(0,r.useState)(null===(x=f[m.name])||void 0===x?void 0:x.opacity),eo="row"===T||"row-reverse"===T,es={display:"flex",flexDirection:"column",alignItems:"center",margin:"8px",height:"100%",justifyContent:"center",cursor:"pointer",transform:"rotate(".concat(eo?"0":"-90","deg)"),transition:"transform 0.5s ease-in-out"},getStrokeColor=(e,t)=>e===t?"#3072c5":"white";return(0,r.useEffect)(()=>{if(y&&S&&"string"!=typeof L&&(null==L?void 0:L.display)){let e={display:S,alignContent:H,justifyContent:Z,alignItems:A,gap:_,opacity:ei};"flex"!==S&&S?"grid"===S?e={...e,gridTemplateColumns:U,gridTemplateRows:G,gridAutoFlow:Y,gridAutoColumns:J,gridAutoRows:Q,alignContent:H,justifyContent:Z,alignItems:A}:"block"===S&&(e={display:"block",opacity:ei}):e={...e,flexDirection:T,flexWrap:D},y(k,m.name,e)}},[L]),(0,r.useEffect)(()=>{I({display:S,flexDirection:T,flexWrap:D,alignContent:H,justifyContent:Z,al
1ignItems:A,gap:_,gridTemplateColumns:U,gridTemplateRows:G,gridAutoFlow:Y,gridAutoColumns:J,gridAutoRows:Q,opacity:ei})},[S,T,D,H,Z,A,_,U,G,Y,J,Q,ei]),(0,r.useEffect)(()=>{if("flex"===S){var e,t;!T&&(null==m?void 0:null===(e=m.defaultValue)||void 0===e?void 0:e.flexDirection)&&M(m.defaultValue.flexDirection||"row"),!D&&(null==m?void 0:null===(t=m.defaultValue)||void 0===t?void 0:t.flexWrap)&&P(m.defaultValue.flexWrap||"nowrap")}},[S]),(0,n.jsx)(b,{definition:m,selected:j,blockId:k,params:f,onChange:y,tile:!0,value:f[m.name],setValue:void 0,setShow:el,show:et,expandable:!0,children:(0,n.jsx)(u.Z,{in:et,children:(0,n.jsxs)("div",{children:[(0,n.jsx)(N,{title:"Container Type",value:S,definition:m,options:[{label:"Flexbox",value:"flex"},{label:"Grid",value:"grid"},{label:"Block",value:"block"}],onChangeHandler:(e,t)=>E(t)}),"flex"===S&&(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row"},children:[(0,n.jsxs)("div",{style:{width:"60%",padding:"0 10px",marginTop:"10px"},children:["Flex Direction",(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row"},children:[(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Row"}),children:(0,n.jsx)("div",{onClick:()=>M("row"),style:{...es,transform:"none"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[(0,n.jsx)("path",{stroke:"row"===T?"#3072c5":"white",d:"M5.5 16.9583L16.5 16.9583M16.5 16.9583L13.2917 13.75M16.5 16.9583L13.2917 20.1666",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{stroke:"row"===T?"#3072c5":"white",d:"M2.75 5.27087L2.75 3.43754C2.75 2.55158 3.46821 1.83337 4.35417 1.83337L5.15625 1.83337M2.75 7.56254L2.75 9.39587C2.75 10.2818 3.46821 11 4.35417 11H5.15625M9.16667 7.56254V9.39587C9.16667 10.2818 8.44846 11 7.5625 11H6.76042M9.16667 5.27087L9.16667 3.43754C9.16667 2.55158 8.44846 1.83337 7.5625 1.83337L6.76042 1.83337M12.8333 3.66671V9.16671C12.8333 10.1792 13.6541 11 14.6667 11H17.4167C18.4292 11 19.25 10.1792 19.25 9.16671V3.66671C19.25 2.65419 18.4292 1.83337 17.4167 1.83337L14.6667 1.83337C13.6541 1.83337 12.8333 2.65419 12.8333 3.66671Z",strokeWidth:"1.3"})]})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Column"}),children:(0,n.jsx)("div",{onClick:()=>M("column"),style:{...es,transform:"none"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[(0,n.jsx)("path",{stroke:"column"===T?"#3072c5":"white",d:"M16.9583 5.5V16.5M16.9583 16.5L20.1667 13.2917M16.9583 16.5L13.75 13.2917",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{stroke:"column"===T?"#3072c5":"white",d:"M5.27087 9.16667H3.43754C2.55158 9.16667 1.83337 8.44846 1.83337 7.5625V6.76042M7.56254 9.16667H9.39587C10.2818 9.16667 11 8.44846 11 7.5625V6.76042M7.56254 2.75H9.39587C10.2818 2.75 11 3.46821 11 4.35417V5.15625M5.27087 2.75H3.43754C2.55158 2.75 1.83337 3.46821 1.83337 4.35417V5.15625M3.66671 19.25H9.16671C10.1792 19.25 11 18.4292 11 17.4167V14.6667C11 13.6541 10.1792 12.8333 9.16671 12.8333H3.66671C2.65419 12.8333 1.83337 13.6541 1.83337 14.6667V17.4167C1.83337 18.4292 2.65419 19.25 3.66671 19.25Z",strokeWidth:"1.3"})]})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Row Reverse"}),children:(0,n.jsx)("div",{onClick:()=>M("row-reverse"),style:{...es,transform:"none"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[(0,n.jsx)("path",{stroke:"row-reverse"===T?"#3072c5":"white",d:"M16.5 16.9583L5.5 16.9583M5.5 16.9583L8.70833 20.1667M5.5 16.9583L8.70833 13.75",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{stroke:"row-reverse"===T?"#3072c5":"white",d:"M12.8333 5.27087V3.43754C12.8333 2.55158 13.5515 1.83337 14.4375 1.83337L15.2396 1.83337M12.8333 7.56254V9.39587C12.8333 10.2818 13.5515 11 14.4375 11H15.2396M19.25 7.56254V9.39587C19.25 10.2818 18.5318 
111 17.6458 11H16.8438M19.25 5.27087V3.43754C19.25 2.55158 18.5318 1.83337 17.6458 1.83337L16.8438 1.83337M2.75 3.66671L2.75 9.16671C2.75 10.1792 3.57081 11 4.58333 11H7.33333C8.34585 11 9.16667 10.1792 9.16667 9.16671L9.16667 3.66671C9.16667 2.65419 8.34586 1.83337 7.33333 1.83337L4.58333 1.83337C3.57081 1.83337 2.75 2.65419 2.75 3.66671Z",strokeWidth:"1.3"})]})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Column Reverse"}),children:(0,n.jsx)("div",{onClick:()=>M("column-reverse"),style:{...es,transform:"none"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[(0,n.jsx)("path",{stroke:"column-reverse"===T?"#3072c5":"white",d:"M16.9583 16.5L16.9583 5.5M16.9583 5.5L13.75 8.70833M16.9583 5.5L20.1666 8.70833",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{stroke:"column-reverse"===T?"#3072c5":"white",d:"M5.27087 19.25H3.43754C2.55158 19.25 1.83337 18.5318 1.83337 17.6458V16.8438M7.56254 19.25H9.39587C10.2818 19.25 11 18.5318 11 17.6458V16.8438M7.56254 12.8333H9.39587C10.2818 12.8333 11 13.5515 11 14.4375V15.2396M5.27087 12.8333H3.43754C2.55158 12.8333 1.83337 13.5515 1.83337 14.4375V15.2396M3.66671 9.16667H9.16671C10.1792 9.16667 11 8.34586 11 7.33333V4.58333C11 3.57081 10.1792 2.75 9.16671 2.75H3.66671C2.65419 2.75 1.83337 3.57081 1.83337 4.58333V7.33333C1.83337 8.34585 2.65419 9.16667 3.66671 9.16667Z",strokeWidth:"1.3"})]})})})]})]}),(0,n.jsxs)("div",{style:{width:"40%",padding:"0 10px",marginTop:"10px"},children:["Flex Wrap",(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row"},children:[(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"No Wrap"}),children:(0,n.jsx)("div",{onClick:()=>P("nowrap"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:"nowrap"===D?"#3072c5":"white",d:"M2.75 9.85413L2.75 7.33329C2.75 6.82703 3.16041 6.41663 3.66667 6.41663L4.125 6.41663M2.75 12.1458L2.75 14.6666C2.75 15.1729 3.16041 15.5833 3.66667 15.5833H4.125M6.41667 12.1458L6.41667 14.6666C6.41667 15.1729 6.00626 15.5833 5.5 15.5833H5.04167M6.41667 9.85413V7.33329C6.41667 6.82703 6.00626 6.41663 5.5 6.41663L5.04167 6.41663M15.5833 9.85413V7.33329C15.5833 6.82703 15.9937 6.41663 16.5 6.41663L16.9583 6.41663M15.5833 12.1458V14.6666C15.5833 15.1729 15.9937 15.5833 16.5 15.5833H16.9583M19.25 12.1458V14.6666C19.25 15.1729 18.8396 15.5833 18.3333 15.5833H17.875M19.25 9.85413V7.33329C19.25 6.82703 18.8396 6.41663 18.3333 6.41663L17.875 6.41663M9.16667 7.33329L9.16667 14.6666C9.16667 15.1729 9.57707 15.5833 10.0833 15.5833H11.9167C12.4229 15.5833 12.8333 15.1729 12.8333 14.6666V7.33329C12.8333 6.82703 12.4229 6.41663 11.9167 6.41663L10.0833 6.41663C9.57707 6.41663 9.16667 6.82703 9.16667 7.33329Z",strokeWidth:"1.3"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Wrap"}),children:(0,n.jsx)("div",{onClick:()=>P("wrap"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:"wrap"===D?"#3072c5":"white",d:"M2.75 6.64587L2.75 5.50004C2.75 4.99378 3.16041 4.58337 3.66667 4.58337L4.125 4.58337M2.75 8.02087L2.75 9.16671C2.75 9.67297 3.16041 10.0834 3.66667 10.0834H4.125M6.41667 8.02087V9.16671C6.41667 9.67297 6.00626 10.0834 5.5 10.0834H5.04167M6.41667 6.64587V5.50004C6.41667 4.99378 6.00626 4.58337 5.5 4.58337L5.04167 4.58337M15.5833 6.64587V5.50004C15.5833 4.99378 15.9937 4.58337 16.5 4.58337L16.9583 4.58337M15.5833 8.02087V9.16671C15.5833 9.67297 15.9937 10.0834 16.5 10.0834H16.9583M19.25 8.02087V9.16671C19.25 9.67297 18.8396 10.0834 18.3333 10.0834H17.875M19.25 6.64587V5.50004C19.25 4.99378 18.8396 4.58337 18.3333 4.58337L17.875 4.58337M9.16667 14.8959L9.16667 13.75C9.16667 13.2438 9.57707 12.8334 10.0833 12.8334H10.5417M9.16667 16.2709V17.4167C9.16667 17.923 9.57707 18.3334 10.0833 18.3334H10.5417M12.8333 16.2709L12.8333 17.4167C12.8333 17.923 12.4229 18.3334 11.9167 18.3334H11.4583M12.8333 14.8959V13.75C12.8333 13.2438 12.4229 12.8334 11.9167 12.8334H11.4583M9.16667 5.50004L9.16667 9.16671C9.16667 9.67297 9.57707 10.0834 10.0833 10.0834H11.9167C12.4229 10.0834 12.8333 9.67297 12.8333 9.16671V5.50004C12.8333 4.99378 12.4229 4.58337 11.9167 4.58337L10.0833 4.58337C9.57707 4.58337 9.16667 4.99378 9.16667 5.50004ZM15.5833 13.75V17.4167C15.5833 17.923 15.9937 18.3334 16.5 18.3334H18.3333C18.8396 18.3334 19.25 17.923 19.25 17.4167V13.75C19.25 13.2438 18.8396 12.8334 18.3333 12.8334H16.5C15.9937 12.8334 15.5833 13.2438 15.5833 13.75ZM2.75 13.75L2.75 17.4167C2.75 17.923 3.16041 18.3334 3.66667 18.3334H5.5C6.00626 18.3334 6.41667 17.923 6.41667 17.4167L6.41667 13.75C6.41667 13.2438 6.00626 12.8334 5.5 12.8334H3.66667C3.16041 12.8334 2.75 13.2438 2.75 13.75Z",strokeWidth:"1.3"})})})})]})]})]}),"grid"===S&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)($,{title:"Grid Template Columns",value:U,onChange:e=>z(e.target.value),definition:m}),(0,n.jsx)($,{title:"Grid Template Rows",value:G,onChange:e=>K(e.target.value),definition:m}),(0,n.jsx)($,{title:"Grid Auto Columns",value:J,onChange:e=>X(e.target.value),definition:m}),(0,n.jsx)($,{title:"Grid Auto Rows",value:Q,onChange:e=>ee(e.target.value),definition:m}),(0,n.jsx)(N,{title:"Grid Auto Flow",value:Y,definition:m,options:[{label:"Row",value:"row"},{label:"Column",value:"column"},{label:"Dense",value:"dense"},{label:"Row Dense",value:"row dense"},{label:"Column Dense",value:"column dense"}],onChangeHandler:(e,t)=>q(t)})]}),("flex"===S||"grid"===S)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{style:{padding:"0 10px",marginTop:"10px"},children:["Align Content",(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row"},children:[(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Center"}),children:(0,n.jsx)("div",{onClick:()=>B("center"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:"center"===H?"#3072c5":"white",d:"M19 11H4M8.5 8H14.5C14.9142 8 15.25 7.55228 15.25 7V5C15.25 4.44772 14.9142 4 14.5 4H8.5C8.08579 4 7.75 4.44772 7.75 5V7C7.75 7.55228 8.08579 8 8.5 8ZM8.5 18H14.5C14.9142 18 15.25 17.5523 15.25 17V15C15.25 14.4477 14.9142 14 14.5 14H8.5C8.08579 14 7.75 14.4477 7.75 15V17C7.75 17.5523 8.08579 18 8.5 18Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Flex Start"}),children:(0,n.jsx)("div",{onClick:()=>B("flex-start"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(H,"flex-start"),d:"M19 4H4M8.5 11
1H14.5C14.9142 11 15.25 10.5523 15.25 10V8C15.25 7.44772 14.9142 7 14.5 7H8.5C8.08579 7 7.75 7.44772 7.75 8V10C7.75 10.5523 8.08579 11 8.5 11ZM8.5 18H14.5C14.9142 18 15.25 17.5523 15.25 17V15C15.25 14.4477 14.9142 14 14.5 14H8.5C8.08579 14 7.75 14.4477 7.75 15V17C7.75 17.5523 8.08579 18 8.5 18Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Flex-End"}),children:(0,n.jsx)("div",{onClick:()=>B("flex-end"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(H,"flex-end"),d:"M19 18H4M8.5 8H14.5C14.9142 8 15.25 7.55228 15.25 7V5C15.25 4.44772 14.9142 4 14.5 4H8.5C8.08579 4 7.75 4.44772 7.75 5V7C7.75 7.55228 8.08579 8 8.5 8ZM8.5 15H14.5C14.9142 15 15.25 14.5523 15.25 14V12C15.25 11.4477 14.9142 11 14.5 11H8.5C8.08579 11 7.75 11.4477 7.75 12V14C7.75 14.5523 8.08579 15 8.5 15Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Space Around"}),children:(0,n.jsx)("div",{onClick:()=>B("space-around"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(H,"space-around"),d:"M19 20H4M19 3L4 3M8.5 9H14.5C14.9142 9 15.25 8.55228 15.25 8V6C15.25 5.44772 14.9142 5 14.5 5H8.5C8.08579 5 7.75 5.44772 7.75 6V8C7.75 8.55228 8.08579 9 8.5 9ZM8.5 18H14.5C14.9142 18 15.25 17.5523 15.25 17V15C15.25 14.4477 14.9142 14 14.5 14H8.5C8.08579 14 7.75 14.4477 7.75 15V17C7.75 17.5523 8.08579 18 8.5 18Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Space Between"}),children:(0,n.jsx)("div",{onClick:()=>B("space-between"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(H,"space-between"),d:"M19 20H4M19 3L4 3M8.5 7H14.5C14.9142 7 15.25 6.55228 15.25 6V4C15.25 3.44772 14.9142 3 14.5 3L8.5 3C8.08579 3 7.75 3.44772 7.75 4V6C7.75 6.55228 8.08579 7 8.5 7ZM8.5 20H14.5C14.9142 20 15.25 19.5523 15.25 19V17C15.25 16.4477 14.9142 16 14.5 16H8.5C8.08579 16 7.75 16.4477 7.75 17V19C7.75 19.5523 8.08579 20 8.5 20Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Stretch"}),children:(0,n.jsx)("div",{onClick:()=>B("stretch"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(H,"stretch"),d:"M19 20H4M19 3L4 3M8.5 10H14.5C14.9142 10 15.25 9.55228 15.25 9V4C15.25 3.44772 14.9142 3 14.5 3L8.5 3C8.08579 3 7.75 3.44772 7.75 4V9C7.75 9.55228 8.08579 10 8.5 10ZM8.5 20H14.5C14.9142 20 15.25 19.5523 15.25 19V14C15.25 13.4477 14.9142 13 14.5 13H8.5C8.08579 13 7.75 13.4477 7.75 14V19C7.75 19.5523 8.08579 20 8.5 20Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})]}),(0,n.jsxs)("div",{style:{padding:"0 10px",marginTop:"10px"},children:["Justify Content",(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row"},children:[(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Center"}),children:(0,n.jsx)("div",{onClick:()=>R("center"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(Z,"center"),d:"M11.4168 1L11.4168 21M8.66679 15L8.66679 7C8.66679 6.44772 8.25638 6 7.75012 6H5.91679C5.41053 6 5.00012 6.44772 5.00012 7L5.00012 15C5.00012 15.5523 5.41053 16 5.91679 16H7.75012C8.25638 16 8.66679 15.5523 8.66679 15ZM17.8335 15V7C17.8335 6.44772 17.423 6 16.9168 6H15.0835C14.5772 6 14.1668 6.44772 14.1668 7V15C14.1668 15.5523 14.5772 16 15.0835 16H16.9168C17.423 16 17.8335 15.5523 17.8335 15Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Flex Start"}),children:(0,n.jsx)("div",{onClick:()=>R("flex-start"),style:{...es,transform:"rotate(".concat(eo?"0":"90","deg)")},children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(Z,"flex-start"),d:"M4.99988 1L4.99988 21M11.4165 15L11.4165 7C11.4165 6.44772 11.0061 6 10.4999 6H8.66654C8.16028 6 7.74988 6.44772 7.74988 7L7.74988 15C7.74988 15.5523 8.16028 16 8.66655 16H10.4999C11.0061 16 11.4165 15.5523 11.4165 15ZM17.8332 15V7C17.8332 6.44771 17.4228 6 16.9165 6H15.0832C14.5769 6 14.1665 6.44772 14.1665 7V15C14.1665 15.5523 14.577 16 15.0832 16H16.9165C17.4228 16 17.8332 15.5523 17.8332 15Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Flex-End"}),children:(0,n.jsx)("div",{onClick:()=>R("flex-end"),style:{...es,transform:"rotate(".concat(eo?"0":"90","deg)")},children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(Z,"flex-end"),d:"M17.8332 1L17.8332 21M8.66654 15L8.66654 7C8.66654 6.44772 8.25614 6 7.74988 6H5.91654C5.41028 6 4.99988 6.44772 4.99988 7L4.99988 15C4.99988 15.5523 5.41028 16 5.91654 16H7.74988C8.25614 16 8.66654 15.5523 8.66654 15ZM15.0832 15V7C15.0832 6.44772 14.6728 6 14.1665 6H12.3332C11.8269 6 11.4165 6.44772 11.4165 7L11.4165 15C11.4165 15.5523 11.8269 16 12.3332 16H14.1665C14.6728 16 15.0832 15.5523 15.0832 15Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Space Around"}),children:(0,n.jsx)("div",{onClick:()=>R("space-around"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(Z,"space-around"),d:"M18.5832 1V21M2.99988 1L2.99988 21M6.66655 15L6.66654 7C6.66654 6.44772 6.25614 6 5.74988 6H3.91654C3.41028 6 2.99988 6.44772 2.99988 7L2.99988 15C2.99988 15.5523 3.41028 16 3.91655 16H5.74988C6.25614 16 6.66655 15.5523 6.66655 15ZM18.5832 15V7C18.5832 6.44772 18.1728 6 17.6665 6H15.8332C15.3269 6 14.9165 6.44772 14.9165 7V15C14.9165 15.5523 15.327 16 15.8332 16H17.6665C18.1728 16 18.5832 15.5523 18.5832 15Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Space Between"}),children:(0,n.jsx)("div",{onClick:()=>R("space-between"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(Z,"space-between"),d:"M18.5832 1V21M2.99988 1L2.99988 21M8.49988 15L8.49988 7C8.49988 6.44772 8.08947 6 7.58321 6H5.74988C5.24362 6 4.83321 6.44772 4.83321 7L4.83321 15C4.83321 15.5523 5.24362 16 5.74988 16H7.58321C8.08947 16 8.49988 15.5523 8.49988 15ZM16.7499 15V7C16.7499 6.44772 16.3395 6 15.8332 6H13.9999C13.4936 6 13.0832 6.44772 13.0832 7V15C13.0832 15.5523 13.4936 16 13.9999 16H15.8332C16.3395 16 16.7499 15.5523 16.7499 15Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Space Evenly"}),children:(0,n.jsx)("div",{onClick:()=>R("space-evenly"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(Z,"space-evenly"),d:"M18.5832 1V21M2.99988 1L2.99988 21M9.41655 15L9.41655 7C9.41655 6.44772 9.00614 6 8.49988 6H6.66654C6.16028 6 5.74988 6.44772 5.74988 7L5.74988 15C5.74988 15.5523 6.16028 16 6.66655 16H8.49988C9.00614 16 9.41655 15.5523 9.41655 15ZM15.8332 15V7C15.8332 6.44772 15.4228 6 14.9165 6H13.0832C12.5769 6 12.1665 6.44772 12.1665 7V15C12.1665 15.5523 12.577 16 13.0832 16H14.9165C15.4228 16 15.8332 15.5523 15.8332 15Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})]}),(0,n.jsxs)("div",{style:{padding:"0 10px",marginTop:"10px"},children:["Align Items",(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row"},children:[(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Center"}),children:(0,n.jsx)("div",{onClick:()=>V("center"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{d:"M9.33342 19H9.98342H9.33342ZM8.41675 20V20.65V20ZM8.41675 2V1.35V2ZM9.33342 3L8.68342 3L9.33342 3ZM5.66675 3H5.01675H5.66675ZM6.58342 2V2.65V2ZM5.66675 19H6.31675H5.66675ZM6.58342 20V19.35V20ZM16.6668 15H16.0168H16.6668ZM15.7501 16V16.65V16ZM15.7501 6V6.65V6ZM16.6668 7H17.3168H16.6668ZM13.0001 7H13.6501H13.0001ZM13.9168 6V5.35V5.35V6ZM13.0001 15H12.3501H13.0001ZM13.9168 16V15.35V16ZM5.66675 11.65C6.02574 11.65 6.31675 11.359 6.31675 11C6.31675 10.641 6.02574 10.35 5.66675 10.35V11.65ZM2.00008 10.35C1.6411 10.35 1.35008 10.641 1.35008 11C1.35008 11.359 1.6411 11.65 2.00008 11.65V10.35ZM13.0001 11.65C13.3591 11.65 13.6501 11.359 13.6501 11C13.6501 10.641 13.3591 10.35 13.0001 10.35V11.65ZM9.33342 10.35H8.68342V11.65H9.33342V10.35ZM20.3334 11.65C20.6924 11.65 20.9834 11.359 20.9834 11C20.9834 10.641 20.6924 10.35 20.3334 10.35V11.65ZM16.6668 10.35C16.3078 10.35 16.0168 10.641 16.0168 11C16.0168 11.359 16.3078 11.65 16.6668 11.65V10.35ZM6.31675 19L6.31675 3H5.01675L
15.01675 19H6.31675ZM6.58342 2.65L8.41675 2.65L8.41675 1.35L6.58342 1.35V2.65ZM8.68342 3L8.68342 19H9.98342L9.98342 3L8.68342 3ZM8.41675 19.35H6.58342V20.65H8.41675V19.35ZM8.68342 19C8.68342 19.2477 8.51195 19.35 8.41675 19.35V20.65C9.33408 20.65 9.98342 19.8569 9.98342 19H8.68342ZM8.41675 2.65C8.51195 2.65 8.68342 2.7523 8.68342 3H9.98342C9.98342 2.14313 9.33408 1.35 8.41675 1.35L8.41675 2.65ZM6.31675 3C6.31675 2.7523 6.48822 2.65 6.58342 2.65V1.35C5.66609 1.35 5.01675 2.14313 5.01675 3H6.31675ZM5.01675 19C5.01675 19.8569 5.66609 20.65 6.58342 20.65V19.35C6.48822 19.35 6.31675 19.2477 6.31675 19H5.01675ZM13.6501 15V7H12.3501V15H13.6501ZM13.9168 6.65H15.7501V5.35H13.9168V6.65ZM16.0168 7V15H17.3168V7H16.0168ZM15.7501 15.35H13.9168V16.65H15.7501V15.35ZM16.0168 15C16.0168 15.2477 15.8453 15.35 15.7501 15.35V16.65C16.6674 16.65 17.3168 15.8569 17.3168 15H16.0168ZM15.7501 6.65C15.8453 6.65 16.0168 6.7523 16.0168 7H17.3168C17.3168 6.14313 16.6674 5.35 15.7501 5.35V6.65ZM13.6501 7C13.6501 6.7523 13.8216 6.65 13.9168 6.65V5.35C12.9994 5.35 12.3501 6.14313 12.3501 7H13.6501ZM12.3501 15C12.3501 15.8569 12.9994 16.65 13.9168 16.65V15.35C13.8216 15.35 13.6501 15.2477 13.6501 15H12.3501ZM5.66675 10.35H2.00008V11.65H5.66675V10.35ZM13.0001 10.35H9.33342V11.65H13.0001V10.35ZM20.3334 10.35H16.6668V11.65H20.3334V10.35Z",fill:"center"===A?"#3072c5":"white"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Flex Start"}),children:(0,n.jsx)("div",{onClick:()=>V("flex-start"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(A,"flex-start"),d:"M20.3335 3H2.00012M9.33346 18V7C9.33346 6.44772 8.92305 6 8.41679 6L6.58346 6C6.07719 6 5.66679 6.44772 5.66679 7L5.66679 18C5.66679 18.5523 6.07719 19 6.58346 19H8.41679C8.92305 19 9.33346 18.5523 9.33346 18ZM16.6668 14V7C16.6668 6.44772 16.2564 6 15.7501 6L13.9168 6C13.4105 6 13.0001 6.44772 13.0001 7V14C13.0001 14.5523 13.4105 15 13.9168 15H15.7501C16.2564 15 16.6668 14.5523 16.6668 14Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Flex-End"}),children:(0,n.jsx)("div",{onClick:()=>V("flex-end"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(A,"flex-end"),d:"M20.3335 19H2.00012M5.66679 4L5.66679 15C5.66679 15.5523 6.0772 16 6.58346 16H8.41679C8.92305 16 9.33346 15.5523 9.33346 15L9.33346 4C9.33346 3.44772 8.92305 3 8.41679 3L6.58346 3C6.0772 3 5.66679 3.44772 5.66679 4ZM13.0001 8V15C13.0001 15.5523 13.4105 16 13.9168 16H15.7501C16.2564 16 16.6668 15.5523 16.6668 15V8C16.6668 7.44772 16.2564 7 15.7501 7H13.9168C13.4105 7 13.0001 7.44772 13.0001 8Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Stretch"}),children:(0,n.jsx)("div",{onClick:()=>V("stretch"),style:es,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{stroke:getStrokeColor(A,"stretch"),d:"M20.3335 20H2.00012M20.3335 3H2.00012M5.66679 7L5.66679 16C5.66679 16.5523 6.0772 17 6.58346 17H8.41679C8.92305 17 9.33346 16.5523 9.33346 16V7C9.33346 6.44772 8.92305 6 8.41679 6L6.58346 6C6.0772 6 5.66679 6.44771 5.66679 7ZM13.0001 7V16C13.0001 16.5523 13.4105 17 13.9168 17H15.7501C16.2564 17 16.6668 16.5523 16.6668 16V7C16.6668 6.44772 16.2564 6 15.7501 6L13.9168 6C13.4105 6 13.0001 6.44771 13.0001 7Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)(ec.Z,{arrow:!0,disableFocusListener:!0,title:(0,n.jsx)("div",{style:{fontSize:"12px"},children:"Baseline"}),children:(0,n.jsx)("div",{onClick:()=>V("baseline"),style:{...es,transform:"none"},children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,n.jsx)("path",{d:"M21 19.65C21.359 19.65 21.65 19.359 21.65 19C21.65 18.641 21.359 18.35 21 18.35V19.65ZM0.999999 18.35C0.641014 18.35 0.349999 18.641 0.349999 19C0.349999 19.359 0.641014 19.65 0.999999 19.65V18.35ZM10 4V3.35C9.72022 3.35 9.47183 3.52903 9.38336 3.79445L10 4ZM5.38336 15.7945C5.26983 16.135 5.45389 16.5031 5.79445 16.6166C6.13502 16.7302 6.50312 16.5461 6.61664 16.2055L5.38336 15.7945ZM12 4L12.6166 3.79445C12.5282 3.52903 12.2798 3.35 12 3.35V4ZM15.3834 16.2055C15.4969 16.5461 15.865 16.7302 16.2055 16.6166C16.5461 16.5031 16.7302 16.135 16.6166 15.7945L15.3834 16.2055ZM7.5 11.35H6.85V12.65H7.5V11.35ZM14.5 12.65H15.15V11.35H14.5V12.65ZM21 18.35H0.999999V19.65H21V18.35ZM9.38336 3.79445L5.38336 15.7945L6.61664 16.2055L10.6166 4.20555L9.38336 3.79445ZM10 4.65H12V3.35H10V4.65ZM11.3834 4.20555L15.3834 16.2055L16.6166 15.7945L12.6166 3.79445L11.3834 4.20555ZM7.5 12.65H14.5V11.35H7.5V12.65Z",fill:"baseline"===A?"#3072c5":"white"})})})})]})]}
1),(0,n.jsx)($,{title:"Gap",value:_,onChange:e=>{e.preventDefault(),F(e.target.value)},definition:m})]})]})})})}),propertyCustomModal=e=>{let{definition:t,blockId:l,onChange:i,selected:o}=e;return(0,n.jsxs)("div",{className:"kluck-component kluck-font kluck-h4",style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsx)(y,{definition:t,selected:o}),(0,n.jsx)("div",{onClick:()=>{i(l,t.name,!0)},className:"kluck-background-tile",style:{width:"50%",padding:"6px",borderRadius:"4px",textAlign:"center",cursor:"pointer"},children:"Open"})]})},ep=l(3506),eh=(0,r.memo)(e=>{var t;let{definition:l,blockId:i,params:o,onChange:s,selected:a}=e,[d,c]=(0,r.useState)(null==o?void 0:o[null==l?void 0:l.name]),{dataTypeOptions:u,schema:p}=(0,ep.ZP)(null==d?void 0:d.objectName),onTypeChange=e=>{let t={objectName:e,objectId:(0,ep.MS)(e)},l=(0,ep.el)(e);((null==l?void 0:l.dataProperties)||[]).forEach(e=>{t[e.name]=void 0!==e.defaultValue?e.defaultValue:""}),c(t)},onSubChange=(e,t)=>{c(l=>({...l||{},[e]:t}))};return(0,r.useEffect)(()=>{(null==d?void 0:d.objectName)&&s&&s(i,l.name,d)},[d]),(0,n.jsxs)("div",{className:"propertyContainer kluck-font",style:{width:"100%"},children:[(0,n.jsx)(N,{value:null==d?void 0:d.objectName,definition:l,options:u,onChangeHandler:(e,t)=>onTypeChange(t),title:(0,n.jsx)(y,{definition:l,selected:a})}),(null==d?void 0:d.objectName)&&(null==p?void 0:null===(t=p.dataProperties)||void 0===t?void 0:t.map((e,t)=>e.commandText&&!property_compileCommandText(e.commandText,d)?null:(0,n.jsx)(ls,{blockId:i,definition:e,params:d,onChangeHandler:(e,t,l)=>onSubChange(t,l),selected:a}
1,"".concat(d.objectName,"-").concat(e.name||t))))]})}),ev=(0,r.memo)(e=>{let{definition:t,blockId:l,params:i,onChange:o,selected:s}=e,{records:a,schema:d}=(0,ep.ZP)(null==i?void 0:i.objectName),c=(0,r.useMemo)(()=>{if(!d)return[];let e=(0,ep.vZ)(d);return a.map(t=>{var l,i;return{label:String(null!==(i=null!==(l=null==t?void 0:t[d.nameKey])&&void 0!==l?l:null==t?void 0:t[e])&&void 0!==i?i:""),value:null==t?void 0:t[e]}}).filter(e=>void 0!==e.value&&null!==e.value&&""!==e.value)},[a,d]);return(0,n.jsx)("div",{className:"propertyContainer kluck-font",style:{width:"100%"},children:(0,n.jsx)(N,{value:null==i?void 0:i[t.name],definition:t,options:c,onChangeHandler:(e,i)=>{o&&o(l,t.name,i)},title:(0,n.jsx)(y,{definition:t,selected:s})})})}),components_FontManager=e=>{let{fontFamily:t}=e,l=(0,s.v9)(e=>e.usersList.kanvas,p.Z),[i,o]=(0,r.useState)([]),[a,d]=(0,r.useState)(""),[c,u]=(0,r.useState)(!1),[h,v]=(0,r.useState)("Recent"),[g,x]=(0,r.useState)("Google"),[m,k]=(0,r.useState)("My Font"),[f,y]=(0,r.useState)(""),[b,w]=(0,r.useState)(0),[j,C]=(0,r.useState)("Copy Link"),L=["Anton","Bebas Neue","Cabin","Dancing Script","Inconsolata","Inter","Josefin Sans","Kanit","Karla","Lato","Lobster","Lora","Montserrat","Mukta","Open Sans","Oswald","Outfit","Phudu","Playfair Display","Poppins","Prompt","Quicksand","Rajdhani","Roboto","Rubik Bubbles","Source Code Pro","Seymour One","Teko"],createFontHandler=()=>{"Google"===g?e.onSelectHandler({name:f,family:f,type:"Custom Google",url:"https://fonts.googleapis.com/css?family=".concat(f.replaceAll(" ","+"),"&display=swap")}):"Hosted"===g&&e.onSelectHandler({name:m,family:m,type:"Custom Hosted",url:f}),w(b+1),v("Custom"),u(!1)},dedupeFonts=e=>{let t=new Set;return e.filter(e=>{let l="".concat(e.name,"|").concat(e.url);return!t.has(l)&&(t.add(l),!0)})};(0,r.useEffect)(()=>{if("Recent"===h&&(l.website.settings.recentFonts?o(dedupeFonts(l.website.settings.recentFonts)):o([])),"Google"===h){let e=[];L.sort((e,t)=>e>t?1:t>e?-1:0).forEach((t,l)=>{e.push({name:t,family:t,type:"Google",url:"https://fonts.googleapis.com/css?family=".concat(t.replace(" ","+"),":100,200,300,400,500,600,700,800,900&display=swap")}),l+1===L.length&&o(e)})}"Adobe"===h&&o([{name:"Termina",family:"termina",type:"Adobe",url:"https://use.typekit.net/ije4oim.css"},{name:"Adorn Condensed Sans",family:"adorn-condensed-sans",type:"Adobe",url:"https://use.typekit.net/ije4oim.css"}]),"Custom"===h&&(l.website.settings.customFonts?o(dedupeFonts(l.website.settings.customFonts)):o([]))},[h,l.website.settings.recentFonts,l.website.settings.customFonts,b]);let deleteFont=e=>{let t=i.filter(e=>e.name.toLowerCase().includes(a.toLowerCase()))[e],n=l.website.settings.customFonts;l.website.settings.customFonts=n.filter(e=>!(e.name===t.name&&e.url===t.url))};(0,r.useEffect)(()=>{y("")},[g]);let copyHandler=async e=>{let t="Copied!";try{await navigator.clipboard.writeText(e)}catch(e){t="Copy failed"}C(t),setTimeout(()=>{C("Copy Link")},3e3)};return(0,n.jsxs)("div",{className:"kluck-font",style:{width:"400px",maxHeight:"600px",fontSize:"16px",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[!c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"kluck-background",style:{marginBottom:"12px",padding:"8px",borderRadius:"4px",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[(0,n.jsx)("span",{children:"Current Font:"}),(0,n.jsx)("div",{children:null==t?void 0:t.name})]}),(0,n.jsx)("div",{className:"kluck-background-tile-button kluck-h1",onClick:()=>copyHandler(null==t?void 0:t.url),style:{width:"25%",justifyContent:"center",alignItems:"center",display:"flex",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",padding:"10px",borderRadius:"4px"},children:j})]}),(0,n.jsxs)("div",{style:{display:"flex",position:"relative",marginBottom:"12px"},children:[(0,n.jsx)("input",{style:{width:"100%",border:"1px solid grey",borderRadius:"4px",padding:"8px"},value:a,onChange:e=>d(e.target.value),placeholder:"Search Fonts..."}),a.length>0&&(0,n.jsx)("svg",{onClick:()=>d(""),style:{width:"20px",height:"20px",position:"absolute",right:"11px",top:"11px",cursor:"pointer"},viewBox:"0 0 24 24",children:(0,n.jsx)("path",{fill:"currentColor",d:"M13.46,12L19,17.54V19H17.54L12,13.46L6.46,19H5V17.54L10.54,12L5,6.46V5H6.46L12,10.54L17.54,5H19V6.46L13.46,12Z"})})]}),(0,n.jsx)("div",{style:{display:"flex",justifyContent:"space-around",marginBottom:"12px"},children:["Recent","Google","Adobe","Custom"].map(e=>(0,n.jsx)("div",{onClick:()=>v(e),className:h===e?"kluck-warning":"kluck-background-tile-button",style:{marginInline:"4px",borderRadius:"4px",width:"100%",cursor:"pointer",textAlign:"center",padding:"8px"},children:e},e))}),(0,n.jsx)("div",{style:{height:"500px",borderRadius:"4px",overflow:"scroll",marginBottom:"4px"},children:i.filter(e=>e.name.toLowerCase().includes(a.toLowerCase())).map((l,i)=>(0,n.jsx)("div",{className:l.name===(null==t?void 0:t.name)?"kluck-warning":"kluck-background",style:{cursor:"pointer",marginBlock:"8px",borderRadius:"4px",padding:"8px"},children:(0,n.jsxs)("div",{style:{position:"relative",display:"flex",alignItems:"center"},onClick:()=>e.onSelectHandler(l),onChange:()=>console.log(),children:[(0,n.jsxs)("div",{style:{marginRight:"8px"},children:[l.name===(null==t?void 0:t.name)&&(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,n.jsx)("path",{d:"M9 4.5C6.51472 4.5 4.5 6.51472 4.5 9C4.5 11.4853 6.51472 13.5 9 13.5C11.4853 13.5 13.5 11.4853 13.5 9C13.5 6.51472 11.4853 4.5 9 4.5Z",fill:"white",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("circle",{cx:"9",cy:"9",r:"8.35",stroke:"white",strokeWidth:"1.3"})]}),l.name!==(null==t?void 0:t.name)&&(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,n.jsx)("circle",{cx:"9",cy:"9",r:"8.35",stroke:"white",strokeWidth:"1.3"})})]}),(0,n.jsxs)("div",{style:{width:"100%"},children:[(0,n.jsx)("div",{className:"kluck-font",style:{fontSize:"16px",marginRight:"6px"},children:l.name}),"Custom"===h&&(0,n.jsx)("div",{className:"kluck-dark",onClick:()=>deleteFont(i),style:{position:"absolute",inset:"0 0 auto auto",width:"28px",height:"28px",borderRadius:"4px",display:"flex",justifyContent:"center",alignItems:"center"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,n.jsx)("path",{d:"M15.75 4.48535C13.2525 4.23785 10.74 4.11035 8.235 4.11035C6.75 4.11035 5.265 4.18535 3.78 4.33535L2.25 4.48535",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.375 3.7275L6.54 2.745C6.66 2.0325 6.75 1.5 8.0175 1.5H9.9825C11.25 1.5 11.3475 2.0625 11.46 2.7
1525L11.625 3.7275",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M14.1374 6.85547L13.6499 14.408C13.5674 15.5855 13.4999 16.5005 11.4074 16.5005H6.59243C4.49993 16.5005 4.43243 15.5855 4.34993 14.408L3.86243 6.85547",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M7.74756 12.375H10.2451",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M7.125 9.375H10.875",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,n.jsx)("div",{style:{width:"100%",fontSize:"16px",overflow:"hidden",whiteSpace:"nowrap",textAlign:"left"},children:(0,n.jsx)("div",{style:(0,z.Gf)({fontSize:{value:"16",type:"px"},fontFamily:l}),children:(0,n.jsx)("div",{children:"The quick brown fox jumps over the lazy dog"})})})]})]})},i))}),(0,n.jsxs)("div",{onClick:()=>u(!0),className:"kluck-success",style:{width:"100%",padding:"12px",cursor:"pointer",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,n.jsx)("span",{children:"Add New Font"}),(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,n.jsx)("path",{d:"M4.5 9H13.5",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M9 13.5V4.5",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]}),c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"kluck-background",style:{marginBottom:"12px",padding:"8px",borderRadius:"4px",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[(0,n.jsx)("span",{children:"Current Font:"}),(0,n.jsx)("div",{children:null==t?void 0:t.name})]}),(0,n.jsx)("div",{className:"kluck-background-tile-button kluck-h1",onClick:()=>copyHandler(null==t?void 0:t.url),style:{width:"25%",justifyContent:"center",alignItems:"center",display:"flex",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",padding:"10px",borderRadius:"4px"},children:j})]}),(0,n.jsxs)("div",{style:{width:"100%",marginBottom:"12px",display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[(0,n.jsx)("div",{children:"Font Type"}),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row"},children:[(0,n.jsxs)("div",{style:{cursor:"pointer",marginRight:"12px"},onClick:e=>x("Google"),children:["Google"===g&&(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,n.jsx)("path",{d:"M9 4.5C6.51472 4.5 4.5 6.51472 4.5 9C4.5 11.4853 6.51472 13.5 9 13.5C11.4853 13.5 13.5 11.4853 13.5 9C13.5 6.51472 11.4853 4.5 9 4.5Z",fill:"white",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("circle",{cx:"9",cy:"9",r:"8.35",stroke:"white",strokeWidth:"1.3"})]}),"Google"!==g&&(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,n.jsx)("circle",{cx:"9",cy:"9",r:"8.35",stroke:"white",strokeWidth:"1.3"})}),(0,n.jsx)("span",{style:{cursor:"pointer",marginLeft:"8px"},children:"Google"})]}),(0,n.jsxs)("div",{style:{cursor:"pointer"},onClick:e=>x("Hosted"),children:["Hosted"===g&&(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,n.jsx)("path",{d:"M9 4.5C6.51472 4.5 4.5 6.51472 4.5 9C4.5 11.4853 6.51472 13.5 9 13.5C11.4853 13.5 13.5 11.4853 13.5 9C13.5 6.51472 11.4853 4.5 9 4.5Z",fill:"white",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("circle",{cx:"9",cy:"9",r:"8.35",stroke:"white",strokeWidth:"1.3"})]}),"Hosted"!==g&&(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,n.jsx)("circle",{cx:"9",cy:"9",r:"8.35",stroke:"white",strokeWidth:"1.3"})}),(0,n.jsx)("span",{style:{cursor:"pointer",marginLeft:"8px"},children:"Hosted"})]})]})]}),"Hosted"===g&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{style:{marginBottom:"4px"},children:"Font Name"}),(0,n.jsx)("input",{style:{width:"100%",borderRadius:"4px",marginBottom:"12px",padding:"8px"},value:m,onChange:e=>k(e.target.value),placeholder:"Font Name"})]}),(0,n.jsx)("div",{style:{marginBottom:"4px"},children:"Google"===g?"Font Name":"Hosted"===g?"Font Url":void 0}),(0,n.jsx)("input",{style:{width:"100%",borderRadius:"4px",marginBottom:"12px",padding:"8px"},value:f,onChange:e=>y(e.target.value),placeholder:"Enter Font URL..."})]}),(0,n.jsxs)("div",{style:{display:"flex"},children:[(0,n.jsx)("div",{className:"kluck-background-tile-button kluck-h1",onClick:()=>u(!1),style:{width:"25%",padding:"12px",textAlign:"center",borderRadius:"4px",cursor:"pointer",marginRight:"12px"},children:"Back"}),(0,n.jsxs)("div",{onClick:()=>createFontHandler(),className:"kluck-success",style:{width:"100%",padding:"12px",cursor:"pointer",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,n.jsx)("span",{children:"Add Selected Font"}),(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,n.jsx)("path",{d:"M4.5 9H13.5",
1stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M9 13.5V4.5",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]})]})]})},editorComponents_KluckFontPicker=e=>{let{definition:t,blockId:l,openPopover:i,setOpenPopover:o,fontFamily:s,title:a,params:d,onSelectHandler:c,isDefault:u}=e,p=(0,r.useRef)(null);p.current||(p.current=(0,w.v4)());let g="".concat(null==t?void 0:t.name,"_family_").concat(l,"_").concat(p.current),x=(0,n.jsxs)(v.Z,{id:"popover-basic-font",style:{backgroundColor:"var(--color-6)",color:"white",maxWidth:"unset",overflow:"hidden",padding:"6px 4px"},children:[(0,n.jsxs)(v.Z.Header,{className:"kluck-font kluck-h1",style:{backgroundColor:"var(--color-6)",color:"white",display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Font Family",(0,n.jsxs)("svg",{style:{cursor:"pointer"},onClick:()=>o(""),xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",children:[(0,n.jsx)("path",{d:"M5.75 5.75L17.2499 17.2499",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.75006 17.2499L17.25 5.75",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})]}),(0,n.jsx)(v.Z.Body,{className:"kluck-font",style:{backgroundColor:"var(--color-6)",color:"white"},children:(0,n.jsx)(components_FontManager,{onSelectHandler:e=>c({fontFamily:e}),fontFamily:s})})]});return(0,n.jsxs)("div",{className:"kluck-component kluck-font",style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},children:[a.length>0&&(0,n.jsx)("div",{className:"kluck-h4",style:{width:"30%",display:"flex",alignItems:"center"},children:a}),(0,n.jsx)(h.Z,{show:i===g,placement:"auto",overlay:x,trigger:["click","focus"],rootClose:!0,onToggle:e=>{e||o("")},children:(0,n.jsxs)("div",{onClick:()=>o(g),className:"kluck-background-tile kluck-h4",style:{cursor:"pointer",width:"70%",height:"32px",borderRadius:"6px",textAlign:"center",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"10px"},children:[s&&(0,n.jsx)("span",{style:{opacity:u?.65:1},children:"object"==typeof s?s.family:s}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",children:(0,n.jsx)("path",{d:"M6.63999 0.983276L4.46665 3.15661C4.20999 3.41328 3.78999 3.41328 3.53332 3.15661L1.35999 0.983276",stroke:"white",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})})]})};let eg=["px","em","rem","%","pt","vw","vh"],ex=["px","em","rem","pt","vw"],em=["x","em","rem","px","%"],toUnitValue=(e,t)=>{if(e){if("object"!=typeof e){let l=String(e).match(/^(-?[0-9.]+)([a-z%]+)$/i);return l?{value:l[1],type:l[2]}:{value:e,type:t}}return null===e.value||void 0===e.value||""===e.value?void 0:e}},hasUnitValue=e=>void 0!==toUnitValue(e,"");var ek=(0,r.memo)(e=>{var t,l,i,o,a,d,c,h,v,g,x,m;let{definition:k,blockId:f,params:y,onChange:w,darkMode:j,selected:C,openProperties:L}=e,I=(0,s.v9)(e=>e.usersList.openPopover,p.Z),S=(0,s.v9)(e=>e.usersList.kanvas,p.Z),[E,T]=(0,r.useState)(null===(t=y[k.name])||void 0===t?void 0:t.fontWeight),[M,D]=(0,r.useState)("object"==typeof(null===(l=y[k.name])||void 0===l?void 0:l.fontSize)?y[k.name].fontSize:void 0),[P,H]=(0,r.useState)(null===(i=y[k.name])||void 0===i?void 0:i.fontFamily),[B,Z]=(0,r.useState)(null===(o=y[k.name])||void 0===o?void 0:o.color),[R,A]=(0,r.useState)(null===(a=y[k.name])||void 0===a?void 0:a.outlined),[V,_]=(0,r.useState)(toUnitValue(null===(d=y[k.name])||void 0===d?void 0:d.letterSpacing,"px")),[F,U]=(0,r.useState)(toUnitValue(null===(c=y[k.name])||void 0===c?void 0:c.lineHeight,"x")),[z,K]=(0,r.useState)(null===(h=y[k.name])||void 0===h?void 0:h.textTransform),[Y,q]=(0,r.useState)(null===(v=y[k.name])||void 0===v?void 0:v.textDecoration),[Q,$]=(0,r.useState)(null===(g=y[k.name])||void 0===g?void 0:g.fontStyle),[ee,et]=(0,r.useState)(null===(x=y[k.name])||void 0===x?void 0:x.whiteSpace),[el,ei]=(0,r.useState)(L.get(k.name)||k.defaultExpanded),[en,eo]=(0,r.useState)(null===(m=y[k.name])||void 0===m?void 0:m.scalingFont),es=(0,s.I0)(),setOpenPopover=e=>es({type:"UPDATE_OPEN_POPOVER",openPopover:e}),ea=(0,r.useRef)(!1);(0,r.useEffect)(()=>
1{if(!ea.current){ea.current=!0;return}el||setOpenPopover("")},[el]),(0,r.useEffect)(()=>{if(w){let e={};void 0!==E&&(e.fontWeight=E),(null==M?void 0:M.value)!==void 0&&(e.fontSize={value:M.value,type:M.type||"px"}),void 0!==P&&(e.fontFamily=P),void 0!==B&&(e.color=B),void 0!==R&&(e.outlined=R),hasUnitValue(V)&&(e.letterSpacing=V),hasUnitValue(F)&&(e.lineHeight=F),void 0!==z&&(e.textTransform=z),void 0!==Y&&(e.textDecoration=Y),void 0!==Q&&(e.fontStyle=Q),void 0!==ee&&(e.whiteSpace=ee),void 0!==S.website.settings.scalingFont?e.scalingFont=S.website.settings.scalingFont:e.scalingFont="true",w(f,k.name,e)}},[E,M,P,B,R,V,F,z,Y,Q,ee,S.website.settings.scalingFont]);let er=k.defaultValue||{};return(0,n.jsx)(b,{inLineProps:k.defaultValue?(0,n.jsx)(X,{blockId:f,name:k.name}):void 0,definition:k,selected:C,blockId:f,params:y,tile:!0,value:y[k.name],setValue:void 0,setShow:ei,show:el,expandable:!0,children:(0,n.jsx)(u.Z,{in:el,children:(0,n.jsxs)("div",{children:[(0,n.jsx)(editorComponents_KluckFontPicker,{definition:k,blockId:f,openPopover:I,setOpenPopover:setOpenPopover,params:y,onSelectHandler:t=>{(null==t?void 0:t.fontFamily)&&H(t.fontFamily),es({type:"UPDATE_FONT",fontObj:t,blockId:e.blockId,paramName:k.name})},fontFamily:P,title:"Font Family",isDefault:isDefaultValue(P,er.fontFamily)}),(0,n.jsx)(J,{title:"Font Size",value:M||{type:"px"},setValue:D,values:eg,isDefault:isDefaultValue(M,er.fontSize)}),(0,n.jsx)(N,{title:"Font Weight",value:E,definition:k,options:[{label:"100",value:"100"},{label:"200",value:"200"},{label:"300",value:"300"},{label:"400",value:"400"},{label:"500",value:"500"},{label:"600",value:"600"},{label:"700",value:"700"},{label:"800",value:"800"},{label:"900",value:"900"}],onChangeHandler:(e,t)=>T(t),isDefault:isDefaultValue(E,er.fontWeight)}),(0,n.jsx)(G,{title:"Font Color",value:B,setValue:Z,definition:k,blockId:f,selected:C}),(0,n.jsx)(J,{title:"Letter Spacing",value:V||{type:"px"},setValue:_,values:ex,step:.1,isDefault:isDefaultValue(V,toUnitValue(er.letterSpacing,"px"))}),(0,n.jsx)(J,{title:"Line Height",value:F||{type:"x"},setValue:U,values:em,step:.1,isDefault:isDefaultValue(F,toUnitValue(er.lineHeight,"x"))}),(0,n.jsx)(N,{title:"Text Transform",value:z,definition:k,options:[{label:"None",value:"none"},{label:"Capitalize",value:"capitalize"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"}],onChangeHandler:(e,t)=>K(t),isDefault:isDefaultValue(z,er.textTransform)}),(0,n.jsx)(N,{title:"Text Decoration",value:Y,definition:k,options:[{label:"None",value:"none"},{label:"Underline",value:"underline"},{label:"Overline",value:"overline"},{label:"Line Through",value:"line-through"}],onChangeHandler:(e,t)=>q(t),isDefault:isDefaultValue(Y,er.textDecoration)}),(0,n.jsx)(N,{title:"Font Style",value:Q,definition:k,options:[{label:"Normal",value:"normal"},{label:"Italic",value:"italic"},{label:"Oblique",value:"oblique"}],onChangeHandler:(e,t)=>$(t),isDefault:isDefaultValue(Q,er.fontStyle)}),(0,n.jsx)(N,{title:"White Space",value:ee,definition:k,options:[{label:"Normal",value:"normal"},{label:"No Wrap",value:"nowrap"},{label:"Pre",value:"pre"},{label:"Pre Line",value:"pre-line"},{label:"Pre Wrap",value:"pre-wrap"}],onChangeHandler:(e,t)=>et(t),isDefault:isDefaultValue(ee,er.whiteSpace)}),(0,n.jsx)(N,{title:"Outlined Font",value:R,definition:k,options:[{label:"Enable",value:!0},{label:"Disable",value:!1}],onChangeHandler:(e,t)=>A(t),isDefault:isDefaultValue(R,er.outlined)})]})})})}),ef=l(47911),property_PropertyFormat=e=>{var t,l,i;let{definition:o,blockId:s,params:a,onChange:d,selected:c,openProperties:p}=e,[h,v]=(0,r.useState)(null===(t=a[o.name])||void 0===t?void 0:t.format),g=null===(l=a[o.name])||void 0===l?void 0:l.type,[x,m]=(0,r.useState)(p.get(o.name)),onChangeHandler=(e,t)=>{let l={...a[o.name],[e]:t},i=Object.keys(l),n=ef.b.find(e=>e.type===l.type),r=[...(null==n?void 0:n.options)||[],{name:"type"},{name:"formatCurrency"}];for(let e=0;e<i.length;e++)r.find(t=>t.name===i[e])||delete l[i[e]];for(let e=0;e<r.length;e++)void 0===l[r[e].name]&&(l[r[e].name]=r[e].defaultValue||null);d(s,o.name,l)};return(0,r.useEffect)(()=>{v(ef.b.find(e=>e.type===g))},[g]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(b,{definition:o,selected:c,blockId:s,params:a,onChange:d,tile:!0,value:a[o.name],setValue:void 0,setShow:m,show:x,expandable:!0,children:(0,n.jsx)(u.Z,{in:x,children:(0,n.jsxs)("div",{children:[(0,n.jsx)(N,{title:"Format Type",value:g,definition:o,options:ef.b.map((e,t)=>({...e,value:e.type})),onChangeHandler:(e,t)=>
1onChangeHandler("type",t)}),(null==h?void 0:null===(i=h.options)||void 0===i?void 0:i.length)>0&&h.options.map((e,t)=>{var l;if(property_compileCommandText(null==e?void 0:e.commandText,a[o.name]))return(0,n.jsx)(ls,{definition:e,blockId:s,params:a[o.name],value:null===(l=a[o.name])||void 0===l?void 0:l[e.name],onChangeHandler:(t,l,i)=>onChangeHandler(e.name,i)},t)})]})})})})},property_PropertyExpression=e=>{var t,l;let{definition:i,blockId:o,params:s,onChange:a,selected:c,openProperties:p}=e,[h,v]=(0,r.useState)(null===(t=s[i.name])||void 0===t?void 0:t.type),[g,x]=(0,r.useState)(null===(l=s[i.name])||void 0===l?void 0:l.expression),[m,k]=(0,r.useState)(g),[f,y]=(0,r.useState)(p.get(i.name)||!0),[w,j]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(null==i?void 0:i.forceShow)&&"expression"!==h&&v("expression"),a&&a(o,i.name,{type:h,expression:g})},[h,g]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b,{definition:i,selected:c,blockId:o,params:s,onChange:a,tile:!0,value:s[i.name],setValue:void 0,setShow:y,show:f,expandable:!0,children:(0,n.jsx)(u.Z,{in:f,children:(0,n.jsxs)("div",{children:[!(null==i?void 0:i.forceShow)&&(0,n.jsxs)("div",{className:"kluck-component kluck-font",style:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"nowrap",alignContent:"center"},children:[(0,n.jsx)("div",{className:"kluck-h4",style:{width:"50%",display:"flex",alignItems:"center",paddingRight:"10px"},children:"Use Expression"}),(0,n.jsx)("div",{style:{width:"50%",height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center"},children:(0,n.jsx)(editorComponents_KluckToggleSwitch,{title:"",value:"expression"===h,setValue:e=>v(e?"expression":"false")})})]}),"expression"===h&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"kluck-component kluck-font",onClick:()=>{k(g),j(!0)},children:(0,n.jsx)("div",{style:{width:"100%",height:"100%",borderRadius:"4px",cursor:"pointer",background:"var(--color-3)",display:"flex",justifyContent:"center",alignItems:"center"},children:"Change Expression"})}),g&&(0,n.jsx)("div",{className:"kluck-component kluck-font",children:(0,n.jsx)("div",{title:g,style:{width:"100%",height:"100%",borderRadius:"4px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textAlign:"center"},children:g})})]})]})})}),(0,n.jsxs)(d.Z,{show:w,className:"editorModal",backdropClassName:"editorModal",contentClassName:"editorModalContent",centered:!0,style:{backgroundColor:"rgba(var(--color-6), 0.8)",color:"var(--white)"},onHide:()=>j(!1),children:[(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row",backgroundColor:"var(--color-4)",paddingTop:"16px",paddingInline:"20px",justifyContent:"space-between"},children:[(0,n.jsx)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:(0,n.jsx)("div",{className:"kluck-font kluck-header",style:{color:"var(--white)"},children:"Expression Editor"})}),(0,n.jsx)("div",{onClick:()=>j(!1),type:"button",children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",children:[(0,n.jsx)("path",{d:"M5.75 5.75006L17.2499 17.25",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.75006 17.25L17.25 5.75006",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,n.jsx)("div",{style:{backgroundColor:"var(--color-4)"},children:(0,n.jsx)("hr",{style:{opacity:".1",color:"var(--color-1)"}})}),(0,n.jsxs)(d.Z.Body,{style:{backgroundColor:"var(--color-4)",color:"var(--white)",paddin:"20px",fontSize:"14px"},children:[(0,n.jsx)("input",{onChange:e=>k(e.target.value),value:m,style:{width:"100%",height:"36px",textAlign:"center",borderRadius:"4px",marginTop:"20px"},placeholder:"Enter Your Expression..."}),(0,n.jsxs)("div",{className:"kluck-h3",style:{display:"flex",gap:"10px",marginTop:"20px"},children:[(0,n.jsx)("div",{onClick:()=>j(!1),style:{width:"25%",height:"36px",padding:"20px",borderRadius:"4px",cursor:"pointer",background:"var(--color-5)",display:"flex",justifyContent:"center",alignItems:"center"},children:"Close"}),(0,n.jsx)("div",{onClick:()=>{x(m),j(!1)},style:{width:"100%",height:"36px",padding:"20px",borderRadius:"4px",cursor:"pointer",background:"var(--color-3)",display:"flex",justifyContent:"center",alignItems:"center"},children:"Save Expression"})]})]})]})]})},ey=l(99076),eb=l(71284),ew=l(7185),ej=l(81094),components_TextEditor=e=>{let{html:t,paramName:l}=e,i=(0,s.v9)(e=>e.usersList.locationValues,p.Z),[o,a]=(0,r.useState)(!1),d=(0,eb.jE)({immediatelyRender:!1,extensions:e
1j.z,content:t,onUpdate(t){let{editor:i}=t;e.setHtml(i.getHTML(),l)}}),addValueHandler=e=>{d&&(null==e?void 0:e.value)&&d.chain().focus().insertContent(e.value).run()};return(0,n.jsxs)(n.Fragment,{children:[d&&(0,n.jsx)(ew.Z,{editor:d,variant:"full",style:{marginTop:"10px"}}),d&&(0,n.jsx)(eb.kg,{className:"kluckPanelEditor kluck-h2-light",editor:d,style:{width:"100%",background:"var(--white)",borderRadius:"4px",padding:"10px",marginTop:"10px",color:"var(--color-6)",fontFamily:"Arial, sans-serif"}}),(0,n.jsx)(b,{onClick:()=>a(!o),definition:{label:"Dynamic Tags"},selected:"",tile:!0,show:o,expandable:!0,style:{margin:"10px 0 0"},children:(0,n.jsx)(u.Z,{in:o,children:(0,n.jsx)("div",{children:(0,n.jsx)("div",{style:{width:"100%",height:"100%",padding:"0 10px",display:"flex",flexWrap:"wrap",gap:"10px"},children:ey.D.filter(e=>{var t;return!e.locationDependent||(null===(t=i[null==e?void 0:e.name])||void 0===t?void 0:t.length)>1||"number"==typeof i[null==e?void 0:e.name]}).map((e,t)=>(0,n.jsx)(h.Z,{placement:"auto",overlay:(0,n.jsx)(v.Z,{style:{backgroundColor:"#34373C",color:"#e0e1e3"},id:"popover-basic",children:(0,n.jsx)(v.Z.Body,{style:{fontSize:"12px",backgroundColor:"#34373C",color:"#e0e1e3",fontWeight:"300"},children:i[null==e?void 0:e.name]})}),children:(0,n.jsx)("div",{className:"dynamicTagHoverStyling",onClick:()=>addValueHandler(e),style:{display:"flex",borderRadius:"6px",padding:"6px",width:"calc(50% - 5px)",justifyContent:"center",outline:"2px solid #292D32",cursor:"pointer"},children:(0,n.jsx)("div",{children:e.guest_friendly})})},t))})})})})]})},property_PropertyHTML=e=>{let{definition:t,blockId:l,params:i,onChange:o,selected:s}=e;return(0,n.jsxs)("div",{className:"kluck-component kluck-font kluck-dark kluck-h2",style:{width:"auto",height:"auto",display:"flex",flexDirection:"column",margin:"10px 10px 0px",padding:"10px"},children:[(0,n.jsx)(y,{definition:t,selected:s}),(0,n.jsx)(components_TextEditor,{justifyContent:"center",alignItems:"center",html:i[null==t?void 0:t.name],setHtml:e=>{o&&o(l,null==t?void 0:t.name,e)},paramName:null==t?void 0:t.name,blockId:l})]})},eC=l(11865),eL=l.n(eC),eI=l(87771),eS=l(78633),eE=l(6454),eN=l(55451),eT=l(36977),eM=l(19151);let eD={...eI,...eS,...eE,...eN,...eT,...eM};var eP=(0,r.memo)(e=>{let{definition:t,blockId:l,params:i,onChange:o,selected:s}=e,[a,d]=(0,r.useState)(i[t.name]),[c,u]=(0,r.useState)(!1),[p,g]=(0,r.useState)(""),[x,m]=(0,r.useState)([]),[k,f]=(0,r.useState)([]),b=x.find(e=>e===a);(0,r.useEffect)(()=>{let e=Array.from(Object.keys(eD).map(e=>e));m([...e]);let t=e.sort((e,t)=>e.length!==t.length?e.length-t.length:e.localeCompare(t)).slice(0,50);p&&(t=e.filter(e=>e.toLowerCase().includes(p.replaceAll(" ","").toLowerCase())).sort((e,t)=>e.length!==t.length?e.length-t.length:e.localeCompare(t)).slice(0,50)),f([...t])},[eD,p]);let onChangeHandler=(e,i)=>{e&&e.preventDefault(),d(i),o&&o(l,t.name,i)},w=(0,n.jsxs)(v.Z,{id:"popover-basic",style:{position:"relative",width:"20vw",backgroundColor:"var(--color-6)",padding:"10px"},children:[(0,n.jsxs)("svg",{onClick:()=>u(!1),xmlns:"http://www.w3.org/2000/svg",style:{position:"absolute",width:"23px",height:"23px",inset:"5px 5px auto auto",cursor:"pointer"},viewBox:"0 0 23 23",fill:"none",children:[(0,n.jsx)("path",{d:"M5.75 5.75L17.2499 17.2499",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.75006 17.2499L17.25 5.75",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,n.jsx)("div",{className:"kluck-h2",style:{color:"var(--white)"},children:"Select An Icon"}),(0,n.jsxs)("div",{style:{position:"relative",width:"100%",height:"36px",marginTop:"10px"},children:[(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{position:"absolute",inset:"10px auto auto 10px",width:"16px",height:"16px"},viewBox:"0 0 16 16",fill:"none",children:(0,n.jsxs)("g",{opacity:"0.5",children:[(0,n.jsx)("path",{d:"M7.33325 13.3335C10.647 13.3335 13.3333 10.6472 13.3333 7.3335C13.3333 4.01979 10.647 1.3335 7.33325 1.3335C4.01954 1.3335 1.33325 4.01979 1.33325 7.3335C1.33325 10.6472 4.01954 13.3335 7.33325 13.3335Z",stroke:"#1D1E21",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.6199 13.7934C12.9732 14.86 13.7799 14.9667 14.3999 14.0334C14.9665 13.18 14.5932 12.48 13.5665 12.48C12.8065 12.4734 12.3799 13.0667 12.6199 13.7934Z",stroke:"#1D1E21",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,n.jsx)("input",{onChange:e=>{g(e.target.value.toLowerCase())},className:"kluck-h5",placeholder:"Select Icons...",style:{width:"100%",height:"100%",padding:"10px 10px 10px 36px",borderRadius:"4px"}})]}),(0,n.jsxs)("div",{style:{padding:"0",marginTop:"10px",maxHeight:"200px",overflow:"scroll"},children:[k.map((e,l)=>{let o=i[t.name]===e;return(0,n.jsxs)("div",{className:"kluck-h4-bold",onClick:t=>onChangeHandler(t,e),style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"9px",cursor:"pointer",color:"white",fontSize:"14px",color:"white",marginTop:l?"2px":"",background:o?"var(--color-2)":"var(--color-5)",textTransform:"capitalize",borderRadius:"4px"},children:[eL()(e).replaceAll("_"," ").slice(3),r.createElement(eD[e],{style:{fontSize:"20px"}})]},l)}),0===k.length&&p.length>0&&(0,n.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"20px 10px 5px",cursor:"pointer",color:"white",fontSize:"14px"},children:"No Icons Found."})]})]});return(0,n.jsxs)("div",{className:"kluck-component",style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsx)(y,{className:"kluck-h4",definition:t,selected:s}),(0,n.jsxs)("div",{className:"kluck-background-tile kluck-h4",style:{width:"auto",maxWidth:"50%",height:"100%",display:"flex",alignItems:"center",borderRadius:"4px",cursor:"pointer",overflow:"hidden"},children:[(0,n.jsx)(h.Z,{show:c,placement:"auto",overlay:w,trigger:["click","focus"],onToggle:e=>{e||u(!1)},children:(0,n.jsxs)("div",{onClick:()=>u(!c),style:{width:"100",textOverflow:"ellipsis",overflow:"hidden",
1whiteSpace:"nowrap",padding:"8px 0 8px 8px",marginRight:"10px",display:"flex",alignItems:"center",textTransform:"capitalize"},children:[b&&eL()(b).replaceAll("_"," "),!b&&"Change Icon"]})}),i[t.name]&&(0,n.jsx)("div",{onClick:()=>onChangeHandler(null,[""]),style:{minWidth:"30px",width:"30px",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",background:"var(--color-2)"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"16px",height:"16px"},viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M14 3.98665C11.78 3.76665 9.54667 3.65332 7.32 3.65332C6 3.65332 4.68 3.71999 3.36 3.85332L2 3.98665",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.6665 3.31331L5.81317 2.43998C5.91984 1.80665 5.99984 1.33331 7.1265 1.33331H8.87317C9.99984 1.33331 10.0865 1.83331 10.1865 2.44665L10.3332 3.31331",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.5664 6.09332L12.1331 12.8067C12.0598 13.8533 11.9998 14.6667 10.1398 14.6667H5.85977C3.99977 14.6667 3.93977 13.8533 3.86644 12.8067L3.43311 6.09332",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.88672 11H9.10672",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.3335 8.33331H9.66683",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})]})}),eH=l(43435),eB=(0,r.memo)(e=>{var t;let{definition:l,blockId:i,params:o,onChange:a,selected:d}=e,c=(0,s.v9)(e=>e.usersList.listData,p.Z),[u,h]=(0,r.useState)({}),[v,g]=(0,r.useState)(null==o?void 0:o[null==l?void 0:l.name]),[x,m]=(0,r.useState)([]),onChangeHandler=(e,t)=>{let l={[t]:e};if("id"===t&&(null==v?void 0:v.id)!==e){let t=x.find(t=>t.id===e);if(t){var i,n;if(null==t?void 0:null===(i=t.parameters)||void 0===i?void 0:i.length)for(let e=0;e<t.parameters.length;e++){let i=t.parameters[e],o="";switch(i.type){case"number":o=0;break;case"array":o=[];break;case"object":o={}}l[i.name]=v[i.name]||(null===(n=l[i.name])||void 0===n?void 0:n.defaultValue)||o}}g({...l})}else g({...v,...l})};return(0,r.useEffect)(()=>{if(v){let e=eH.J.find(e=>e.id===(null==v?void 0:v.id));e&&e.id!==u.id&&h(e),a&&a(i,l.name,v)}},[v]),(0,r.useEffect)(()=>{let e=[],t=[...c,...eH.J];for(let l=0;l<t.length;l++)e.find(e=>e.id===t[l].id)||e.push({label:t[l].label,value:t[l].id});m(e)},[l,i]),(0,n.jsxs)("div",{className:"propertyContainer kluck-font",children:[(0,n.jsx)(N,{value:null==v?void 0:v.id,definition:l,options:x,onChangeHandler:(e,t)=>onChangeHandler(t,"id"),title:(0,n.jsx)(y,{definition:l,selected:d})}),(null==u?void 0:null===(t=u.parameters)||void 0===t?void 0:t.length)&&u.parameters.map((e,t)=>(0,n.jsx)(ls,{blockId:i,definition:{...e,schemaId:u.id},params:v,onChangeHandler:(t,l,i)=>onChangeHandler(i,e.name),selected:d},t))]})}),eZ=l(57922),eO=(0,r.memo)(e=>{var t,l;let{definition:i,blockId:o,params:s,onChange:a,selected:d,openProperties:c}=e,[u,p]=(0,r.useState)(c.get(i.name)),[h,v]=(0,r.useState)(s[i.name]),[g,x]=(0,r.useState)((null===(t=s[i.name])||void 0===t?void 0:t.active)!==!1&&(null===(l=s[i.name])||void 0===l?void 0:l.active)!=="false");(0,r.useEffect)(()=>{if("unset"!==h&&h&&a){var e,t,l,n,s,r,d,c;let u=JSON.parse(JSON.stringify(h)),p=[null,void 0,""];p.includes(null==u?void 0:null===(e=u.top)||void 0===e?void 0:e.value)&&(u.top.value="0"),p.includes(null==u?void 0:null===(t=u.top)||void 0===t?void 0:t.type)&&(u.top.type="px"),p.includes(null==u?void 0:null===(l=u.right)||void 0===l?void 0:l.value)&&(u.right.value="0"),p.includes(null==u?void 0:null===(n=u.right)||void 0===n?void 0:n.type)&&(u.right.type="px"),p.includes(null==u?void 0:null===(s=u.bottom)||void 0===s?void 0:s.value)&&(u.bottom.value="0"),p.includes(null==u?void 0:null===(r=u.bottom)||void 0===r?void 0:r.type)&&(u.bottom.type="px"),p.includes(null==u?void 0:null===(d=u.left)||void 0===d?void 0:d.value)&&(u.left.value="0"),p.includes(null==u?void 0:null===(c=u.left)||void 0===c?void 0:c.type)&&(u.left.type="px"),u.active=g,a(o,i.name,u)}},[h,g]);let m=i.defaultValue||{};return(0,n.jsx)(b,{inLineProps:(0,n.jsx)(()=>(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",gap:"12px"},onClick:e=>e.stopPropagation(),children:[i.defaultValue&&(0,n.jsx)(X,{blockId:o,name:i.name}),(0,n.jsx)(editorComponents_KluckToggleSwitch,{title:"",value:g,setValue:x})]}),{}),definition:i,selected:d,blockId:o,params:s,onChange:a,tile:!0,value:s[i.name],setValue:void 0,setShow:p,show:u,expandable:!0,children:(0,n.jsx)(eZ.Z,{in:u,children:(0,n.jsxs)("div",{children:[(0,n.jsx)(J,{value:null==h?void 0:h.top,title:"Top",setValue:e=>{v({...h,top:e})},dataTypeTag:"top",wrapped:!0,values:["px","%","em"],isDefault:isDefaultValue(null==h?void 0:h.top,m.top)}),(0,n.jsx)(J,{value:null==h?void 0:h.right,title:"Right",setValue:e=>v({...h,right:e}),dataTypeTag:"right",wrapped:!0,values:["px","%","em"],isDefault:isDefaultValue(null==h?void 0:h.right,m.right)}),(0,n.jsx)(J,{value:null==h?void 0:h.bottom,title:"Bottom",setValue:e=>v({...h,bottom:e}),dataTypeTag:"bottom",wrapped:!0,values:["px","%","em"],isDefault:isDefaultValue(null==h?void 0:h.bottom,m.bottom)}),(0,n.jsx)(J,{value:null==h?void 0:h.left,title:"Left",setValue:e=>v({...h,left:e}),dataTypeTag:"left",wrapped:!0,values:["px","%","em"],isDefault:isDefaultValue(null==h?void 0:h.left,m.left)})]})})})}),eR=l(81885);let eA={display:"flex",justifyContent:"space-between",alignItems:"center",gap:"10px",height:"36px",paddingLeft:"5px"},eV={fontSize:"18px",fontWeight:400,color:"var(--white)",whiteSpace:"nowrap",marginBottom:0},eW={position:"relative",width:"282px",flexShrink:0},e_={width:"100%",height:"36px",appearance:"none",WebkitAppearance:"none",backgroundColor:"var(--color-5)",color:"var(--white)",border:"none",outline:"none",borderRadius:"4px",padding:"0 28px 0 10px",fontSize:"13px",fontWeight:400,cursor:"pointer"},eF={backgroundColor:"var(--color-5)",color:"var(--white)"},Chevron=()=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",he
1ight:"4",viewBox:"0 0 8 4",fill:"none",style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",pointerEvents:"none"},children:(0,n.jsx)("path",{d:"M6.63999 0.983276L4.46665 3.15661C4.20999 3.41328 3.78999 3.41328 3.53332 3.15661L1.35999 0.983276",stroke:"white",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})});var property_PropertyMenu=e=>{var t;let{definition:l,blockId:i,darkMode:o,selected:a,params:c,onChange:u}=e,h=(0,s.v9)(e=>e.usersList.menus,p.Z),v=(0,s.v9)(e=>e.usersList.openPopover,p.Z),g=(0,s.v9)(e=>e.usersList.locationValues,p.Z),x=(0,s.v9)(e=>e.usersList.globalData,p.Z),[m,k]=(0,r.useState)([]),f=(0,s.I0)(),b=c[l.name],setOpenPopover=e=>f({type:"UPDATE_OPEN_POPOVER",openPopover:e}),updateMenu=e=>{u&&u(i,l.name,e)};return(0,r.useEffect)(()=>{(null==b?void 0:b.menuId)&&f({type:"UPDATE_MENU_REFERENCE",blockId:i,menuId:b.menuId})},[b]),(0,r.useEffect)(()=>{if(null==g?void 0:g.locationId){let e=[];for(let t=0;t<Object.keys(h).length;t++)h[Object.keys(h)[t]].menu&&e.push(h[Object.keys(h)[t]].menu);if(null==b?void 0:b.conceptId){let t=eH.J.find(e=>"menus"===e.id),l=(0,eR.Z)(t,{conceptId:null==b?void 0:b.conceptId});if(x.has(l)){let t=Array.from(x.get(l).values());for(let l=0;l<t.length;l++)e.find(e=>e.menuId===t[l].menuId)||e.push(t[l])}}k(e)}},[g,null==b?void 0:b.conceptId,h]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"kluck-component kluck-font",style:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",flexWrap:"nowrap",alignContent:"center"},children:[(0,n.jsx)(y,{className:"kluck-h4",definition:l,selected:a,style:{width:"50%"}}),(0,n.jsx)("div",{className:"kluck-background-tile kluck-h4",style:{width:"auto",maxWidth:"50%",display:"flex",alignItems:"center",borderRadius:"4px",cursor:"pointer",overflow:"hidden"},children:(0,n.jsx)("div",{onClick:()=>setOpenPopover("PropertMenu_"+l.name),style:{width:"100",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",padding:"8px 0 8px 8px",marginRight:"10px",display:"flex",alignItems:"center"},children:(()=>{var e,t,l;let i=null==g?void 0:null===(e=g.concepts)||void 0===e?void 0:e.find(e=>{var t,l;return(null==e?void 0:null===(t=e.conceptId)||void 0===t?void 0:t.toUpperCase())===(null==b?void 0:null===(l=b.conceptId)||void 0===l?void 0:l.toUpperCase())});return(null==b?void 0:b.type)==="scheduled"&&i?"Scheduled ".concat(null==i?void 0:i.conceptName," Menu"):(null==b?void 0:b.menuId)?null===(l=h[b.menuId])||void 0===l?void 0:null===(t=l.menu)||void 0===t?void 0:t.menuName:(null==b?void 0:b.conceptId)==="defaultConcept"?"Default Concept Menu":(null==b?void 0:b.conceptId)==="selectedConcept"?"Selected Concept Menu":""})()||"Change"})})]}),(0,n.jsx)(d.Z,{className:"editorModal",backdropClassName:"editorModal kluckModalBackdrop",dialogClassName:"selectMenuModalContent",centered:!0,show:v==="PropertMenu_"+l.name,onHide:()=>setOpenPopover(""),children:(0,n.jsxs)("div",{className:"kluck-font",style:{padding:"20px",backgroundColor:"var(--color-4)"},children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsx)("div",{className:"kluck-header",style:{color:"var(--white)"},children:"Select Menu to Display"}),(0,n.jsx)("div",{onClick:()=>setOpenPopover(""),style:{cursor:"pointer",display:"flex",flexShrink:0},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",children:[(0,n.jsx)("path",{d:"M5.75 5.75006L17.2499 17.25",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.75006 17.25L17.25 5.75006",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,n.jsx)("hr",{style:{margin:"16px 0",border:"none",borderTop:"1px solid var(--white)",opacity:".1"}}),(0,n.jsxs)("div",{style:{backgroundColor:"var(--color-6)",borderRadius:"6px",padding:"10px",display:"flex",flexDirection:"column",gap:"10px"},children:[(0,n.jsxs)("div",{style:eA,children:[(0,n.jsx)("label",{style:eV,children:"Concept"}),(0,n.jsxs)("div",{style:eW,children:[(0,n.jsxs)("select",{id:"conceptSelect_"+i,className:"kluck-font",value:null==b?void 0:b.conceptId,onChange:e=>{e.preventDefault(),updateMenu({type:"scheduled",menuId:"",conceptId:e.target.value})},style:e_,children:[(0,n.jsx)("option",{style:eF,value:"",children:"Select"}),(0,n.jsx)("option",{style:eF,value:"selectedConcept",children:"Selected Concept"}),(0,n.jsx)("option",{style:eF,value:"defaultConcept",children:"Default Concept"}),(null==g?void 0:null===(t=g.concepts)||void 0===t?void 0:t.length)&&(null==g?void 0:g.concepts.map((e,t)=>(0,n.jsx)("option",{style:eF,value:e.conceptId.toLowerCase(),children:e.conceptName},t)))]}),(0,n.jsx)(Chevron,{})]})]}),(0,n.jsxs)("div",{style:eA,children:[(0,n.jsx)("label",{style:eV,children:"Menu"}),(0,n.jsxs)("div",{style:eW,children:[(0,n.jsxs)("select",{id:"menuSelect_"+i,className:"kluck-font",value:null==b?void 0:b.menuId,onChange:e=>{e.preventDefault(),updateMenu({type:e.target.value?"selected":"scheduled",menuId:e.target.value,conceptId:null==b?void 0:b.conceptId})},style:e_,children:[(0,n.jsx)("option",{style:eF,value:"",children:"Scheduled Menu"}),m.filter(e=>{var t,l;return(null==e?void 0:null===(t=e.conceptId)||void 0===t?void 0:t.toUpperCase())===(null==b?void 0:null===(l=b.conceptId)||void 0===l?void 0:l.toUpperCase())}).map((e,t)=>(0,n.jsx)("option",{style:eF,value:e.menuId,children:e.menuName},t))]}),(0,n.jsx)(Chevron,{})]})]})]})]})})]})},eU=l(23286),ez=l(16361),eG={src:"/_next/static/media/button.3327a457.svg",height:41,width:38,blurWidth:0,blurHeight:0},eK=l(60672),eY=l(35322),eq={src:"/_next/static/media/cart.b210b6cc.svg",height:38,width:48,blurWidth:0,blurHeight:0},eJ=l(15430),eX=l(73629),eQ={src:"/_next/static/media/container.a9408496.svg",height:47,width:45,blurWidth:0,blurHeight:0},e$=l(50932),e0=l(8500),e1=l(50538),e3=l(39811),e5=l(48524),e6=l(8144),e2=l(96101),e4=l(66258),e7=l(80637),e8=l(24475),e9=l(36065),te={src:"/_next/static/media/Icon.c92b9a06.svg",height:41,width:34,blurWidth:0,blurHeight:0},tt=l(94561),tl={src:"/_next/static/media/image.36bca6a3.svg",height:37,width:51,blurWidth:0,blurHeight:0},ti=l(27568),tn=l(90622),to=l(70823),ts={src:"/_next/static/media/menu.b02914ee.svg",height:45,width:31,blurWidth:0,blurHeight:0},ta=l(45362),tr=l(38742),td={src:"/_next/static/media/menuBoard.a29f5afc.svg",height:38,width:38,blurWidth:0,blurHeight:0},tc=l(72886),tu=l(65404),tp=l(10806),th={src:"/_next/static/media/Pages.d82b5318.svg",height:43,width:42,blurWidth:0,blurHeight:0},tv=l(54597);l(24055);var tg=l(64529),tx=l(11025),tm={src:"/_next/static/media/sectionSearch.2a1cf462.svg",height:27,width:54,blurWidth:0,blurHeight:0},tk=l(48755),tf=l(36563),ty=l(57673),tb=l(4759),tw=l(15359),tj=l(99871),tC=l(56345),tL=l(47787),tI=l(48778),tS=l(44042),tE=l(77463),tN=l(84487),tT=l(5768),tM=l(2848),tD=l(23583),tP=l(71692),tH=l(85973),tB=l(71196),tZ=l(2322),tO=l(56675),tR=l(817),tA=l(34436),tV=l(7585),tW=l(86570);let t_=[{name:"Quick Access",blocks:[{block:eX.Z.type,image:eQ},{block:tS.Z.type,image:tl},{block:ez.Z.type,image:eG},{block:tt.Z.type,image:tl},{block:tN.Z.type,image:tl},{block:e9.Z.type,image:te},{block:eY.Z.type,image:tl},{block:tI.Z.type,image:tl},{block:eJ.Z.type,image:tl}]},{name:"Media",blocks:[{block:tS.Z.type,image:tl},{block:tt.Z.type,image:tl},{block:tj.default.type,image:tl},{block:tN.Z.type,image:tl},{block:e9.Z.type,image:te},{block:tw.Z.type,image:te},{block:ty.Z.type,image:tl},{block:eY.Z.type,image:tl},{block:e8.Z.type,image:{src:"/_next/static/media/hours.d31aaa53.svg",height:41,width:44,blurWidth:0,blurHeight:0}},{block:tn.Z.type,image:{src:"/_next/static/media/map.350871c8.svg",height:45,width:36,blurWidth:0,blurHeight:0}},{block:tv.Z.type,image:tl}]},{name:"Website",blocks:[{block:e7.Z.type,image:{src:"/_next/static/media/header.580c847
15.svg",height:47,width:44,blurWidth:0,blurHeight:0}},{block:e4.Z.type,image:{src:"/_next/static/media/footer.7c07013f.svg",height:47,width:44,blurWidth:0,blurHeight:0}},{block:ez.Z.type,image:eG},{block:e6.Z.type,image:{src:"/_next/static/media/dropdown.a3e72435.svg",height:47,width:35,blurWidth:0,blurHeight:0}},{block:eX.Z.type,image:eQ},{block:tb.default.type,image:{src:"/_next/static/media/slideShow.af1e2df7.svg",height:41,width:50,blurWidth:0,blurHeight:0}},{block:e$.Z.type,image:tl},{block:eU.Z.type,image:th},{block:tE.Z.type,image:th},{block:tL.Z.type,image:th}]},{name:"Restaurant",blocks:[{block:e1.default.type,image:eQ},{block:to.default.type,image:ts},{block:e0.default.type,image:ts},{block:tf.default.type,image:{src:"/_next/static/media/singlesection.88dc1086.svg",height:47,width:44,blurWidth:0,blurHeight:0}},{block:tu.default.type,image:eq},{block:tr.default.type,image:td},{block:tp.default.type,image:td},{block:e5.default.type,image:td},{block:tg.default.type,image:eq},{block:e2.default.type,image:tl}]},{name:"Filters",blocks:[{block:tc.default.type,image:{src:"/_next/static/media/menuNav.3617b2b8.svg",height:40,width:40,blurWidth:0,blurHeight:0}},{block:tx.default.type,image:tm},{block:tk.default.type,image:{src:"/_next/static/media/sectionFilter.1b61fecd.svg",height:29,width:62,blurWidth:0,blurHeight:0}},{block:e3.default.type,image:{src:"/_next/static/media/dietFilter.eb8e4149.svg",height:29,width:56,blurWidth:0,blurHeight:0}},{block:ta.default.type,image:ts}]},{name:"Forms",blocks:[{block:eK.default.type,image:tl},{block:tM.Z.type,image:tl},{block:tV.Z.type,image:tm}]},{name:"Advanced",blocks:[{block:tT.Z.type,image:eQ},{block:ti.Z.type,image:eQ}]},{name:"Form Elements",blocks:[{block:ez.Z.type,image:eG},{block:tD.Z.type,image:tm},{block:tP.Z.type,image:tm},{block:tH.Z.type,image:tm},{block:tZ.Z.type,image:tm},{block:tO.Z.type,image:tm},{block:tR.Z.type,image:tm},{block:tA.Z.type,image:tm},{block:tW.Z.type,image:tm},{block:tB.default.type,image:tm},{block:tC.Z.type,image:tm}]}];
1var tF=l(34051),tU=l(12529),tz=l(35005),tG=l(33227),tK=l(54402),tY=l(59581),tq=l.n(tY),tJ=l(440),components_BlockTemplatesModal=e=>{let{blockTemplatesShow:t,setBlockTemplatesShow:l,block:i}=e,o=(0,s.v9)(e=>e.usersList.blockTemplates,p.Z),a=(0,s.v9)(e=>e.usersList.selectedBlock,p.Z);(0,s.v9)(e=>e.usersList.urls,p.Z);let[c,u]=(0,r.useState)([]),[h,v]=(0,r.useState)([]),[g]=(0,tJ.Z)(),x=(0,s.I0)(),addTemplate=e=>{e?x({type:"NEW_BLOCK_SELECT",schema:i,blockId:a.blockId,template:!0,params:e}):x({type:"NEW_BLOCK_SELECT",schema:i,blockId:a.blockId})};return(0,r.useEffect)(()=>{if(o[i.name]){let e=o[i.name],t=tG.K.filter(e=>e.displayName===i.name)[0],l=[];for(let o=0;o<e.length;o++)if("[object Object]"!==e[o].templateData){let s={blockId:(0,w.v4)(),blockName:i.name,blockObject:r.cloneElement((0,n.jsx)(t,{}),{}),children:[],blokBuilderTemplateName:e[o].blokBuilderTemplateName,id:e[o].blokBuilderTemplateId,...JSON.parse(e[o].templateData)};l.push(s)}u(l)}},[o,i]),(0,n.jsxs)(d.Z,{className:"editorModal",contentClassName:tq().modalContentTemplate,dialogClassName:tq().myModalTemplates,show:t,onHide:()=>l(!1),centered:!0,backdrop:"static",children:[(0,n.jsx)(d.Z.Header,{className:tq().myModalTemplates,style:{backgroundColor:"rgb(64, 67, 74)"},closeButton:!0,children:(0,n.jsx)(d.Z.Title,{children:"Select a block template."})}),(0,n.jsxs)(d.Z.Body,{className:tq().myModalTemplates,style:{backgroundColor:"rgb(64, 67, 74)",maxHeight:"50vh",display:"flex",flexWrap:"noWrap",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:[(0,n.jsx)("div",{style:{fontSize:"18px",fontWeight:"700",width:"100%",textAlign:"center",borderBottom:"1px solid rgb(37, 41, 44)",paddingBottom:"10px"},children:"Pre built templates"}),(0,n.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"center",marginTop:"1%",overflow:"scroll",flexWrap:"wrap"},children:c.map((t,l)=>(t.blockId=(0,w.v4)(),(0,n.jsxs)("div",{style:{width:"Header"===t.blockName||"Footer"===t.blockName?"100%":"unset",padding:"12px",margin:"5px",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[(0,n.jsx)("div",{onClick:()=>addTemplate(t),style:{backgroundColor:"rgb(100 100 100)",width:"Header"===t.blockName||"Footer"===t.blockName?"100%":"unset",margin:"auto"},children:(0,n.jsx)(tK.Z,{block:t,localData:null==e?void 0:e.localData,template:!0})}),(0,n.jsx)("div",{style:{width:"100%",textAlign:"center",fontSize:"24px",paddingTop:"12px"},children:t.blokBuilderTemplateName})]},l)))}),h.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("hr",{width:"100%"}),(0,n.jsx)("div",{onClick:addTemplate,style:{padding:"12px",margin:"5px",overflow:"scroll",width:"100%"},children:(0,n.jsx)("div",{style:{fontSize:"18px",fontWeight:"700",width:"100%",textAlign:"center",borderBottom:"1px solid rgb(37, 41, 44)",paddingBottom:"10px"},children:"User Templates"})}),(0,n.jsx)("div",{style:{display:"flex",marginTop:"1%",overflow:"scroll",flexWrap:"wrap"},children:h.map((t,l)=>(0,n.jsxs)("div",{style:{padding:"12px",margin:"5px",zIndex:"100",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[(0,n.jsx)("div",{onClick:()=>addTemplate(t),style:{margin:"auto"},children:(0,n.jsx)(tK.Z,{localData:null==e?void 0:e.localData,block:t,template:!0})}),(0,n.jsx)("div",{style:{width:"100%",textAlign:"center",fontSize:"24px",paddingTop:"12px"},children:t.blokBuilderTemplateName})]},l))})]})]}),(0,n.jsxs)(d.Z.Footer,{className:[tq().myModalTemplates,tq().modalColor],children:[(0,n.jsx)(tz.Z,{variant:"secondary",onClick:()=>addTemplate(),children:"Use default block"}),(0,n.jsx)(tz.Z,{variant:"primary",onClick:()=>l(!1),children:"Cancel"})]})]})},tX=l(88902),property_PropertyNewBlock=e=>{let{onHover:t,onLeave:l,blockId:i,darkMode:o}=e,a=(0,s.v9)(e=>e.usersList.kanvas,p.Z),c=(0,s.v9)(e=>e.usersList.blockTemplates,p.Z),h=(0,s.v9)(e=>e.usersList.urls,p.Z),v=(0,tX.Z)(a,i,["Form","Reservations"]),[g,x]=(0,r.useState)(!1),[m,k]=(0,r.useState)(!1),[f,y]=(0,r.useState)({}),[w,j]=(0,r.useState)(null),[C,L]=(0,r.useState)(""),[I,S]=(0,r.useState)([]),E=(0,s.I0)(),[N]=(0,tJ.Z)(),onNewBlockSelect=(e,t)=>
1E({type:"NEW_BLOCK_SELECT",schema:e,blockId:t}),onChangeHandler=e=>{if("Cart"===e.name){let e=!0,processPage=t=>{for(let l=0;l<t.length;l++)"Cart"===t[l].blockName&&(e=!1),t[l].children.length>0&&processPage(t[l].children)};for(let e=0;e<a.website.pages.length;e++)processPage(a.website.pages[e].blocks);if(!e){x(!0);return}}void 0===c[e.name]?N({method:"GET",url:"".concat(h.rest,"/blokbuildertemplates/blockNames/00000000-0000-0000-0000-000000000000/").concat(e.name.toLowerCase()),log:{level:"ERROR",logger:"PropertyNewBlock.onChangeHandler",sendLogs:!0}}).then(t=>{if(t.data=t.data.filter(e=>{var t;return null===(t=JSON.parse(e.templateData))||void 0===t?void 0:t.desktopParams}),E({type:"UPDATE_BLOCK_TEMPLATES",blockTemplates:t.data,blockName:e.name}),t.data.length>0){y(e),k(!0);return}onNewBlockSelect(e,i)}):c[e.name].length>0?(y(e),k(!0)):onNewBlockSelect(e,i)},onMouseOverHandler=e=>{t&&t(e,i)},onMouseOutHandler=e=>{l&&l(e,i)};(0,r.useEffect)(()=>{v?j("Form Related"):j("Quick Access")},[v]),(0,r.useEffect)(()=>{if(""===C.trim()){S([]);return}let e=[];t_.filter(e=>"Form Related"!==e.name||v).filter(e=>"Quick Access"!==e.name).forEach(t=>{t.blocks.forEach(t=>{t.block.schema&&!t.block.schema.hidden&&("Form"!==t.block.schema.label||void 0===v)&&e.push(t)})});let t=e.filter(e=>e.block.schema.label.toLowerCase().includes(C.toLowerCase()));S(t)},[C,v]);let setActive=e=>{w===e?j(""):j(e)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{style:{margin:"0 0 15px 0"},children:(0,n.jsx)(tU.Z.Control,{type:"text",placeholder:"Search ...",value:C,onChange:e=>{L(e.target.value)},style:{backgroundColor:"white",border:"1px solid var(--color-6)",color:"black",borderRadius:"6px",height:"48px",fontSize:"16px"}})}),(0,n.jsx)(tF.Z,{className:"w-100",style:{margin:"0",textAlign:"center"},children:""!==C.trim()?(0,n.jsx)("div",{style:{width:"100%",padding:"0 10px"},children:(0,n.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",flexWrap:"wrap",gap:"10px"},children:I.length>0?I.map((e,t)=>{let l=e.block;return(0,n.jsx)("div",{className:"kluck-neutral",onClick:()=>onChangeHandler(l.schema),onMouseOver:()=>onMouseOverHandler(l.schema),onMouseOut:()=>onMouseOutHandler(l.schema),style:{width:"calc(50% - 5px)",height:"36px",cursor:"pointer",borderRadius:"4px",display:"flex",justifyContent:"center",alignItems:"center"},children:(0,n.jsx)("div",{className:"kluck-h3",style:{color:"var(--color-6)"},children:l.schema.label})},t)}):(0,n.jsxs)("div",{style:{width:"100%",textAlign:"center",padding:"20px",color:"var(--white)"},children:['No blocks found matching "',C,'"']})})}):t_.filter(e=>"Form Related"!==e.name||v).map((e,t)=>(0,n.jsx)(b,{onClick:()=>setActive(e.name),definition:{label:e.name},selected:"",tile:!0,show:w===e.name,expandable:!0,style:{width:"100%",margin:"0 0 10px"},children:(0,n.jsx)(u.Z,{in:w===e.name,children:(0,n.jsx)("div",{children:(0,n.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",flexWrap:"wrap",gap:"10px",padding:"0 10px"},children:e.blocks.filter(e=>e.block.schema&&!e.block.schema.hidden&&("Form"!==e.block.schema.label||void 0===v)).map((e,t)=>{let l=e.block;return(0,n.jsx)("div",{className:"kluck-neutral",onClick:()=>onChangeHandler(l.schema),onMouseOver:()=>onMouseOverHandler(l.schema),onMouseOut:()=>onMouseOutHandler(l.schema),style:{width:"calc(50% - 5px)",height:"36px",cursor:"pointer",borderRadius:"4px",display:"flex",justifyContent:"center",alignItems:"center"},children:(0,n.jsx)("div",{className:"kluck-h3",style:{color:"var(--color-6)"},children:l.schema.label})},t)})})})})},t))}),(0,n.jsx)(d.Z,{show:g,onHide:()=>x(!1),centered:!0,dialogClassName:"shareModal-dialog editor-popover",children:(0,n.jsx)(d.Z.Body,{children:(0,n.jsx)("div",{style:{fontSize:"18px"},children:"There is already a cart on this kanvas."})})}),(0,n.jsx)(components_BlockTemplatesModal,{blockTemplatesShow:m,setBlockTemplatesShow:k,block:f})]})},tQ=(0,r.memo)(e=>{let{definition:t,blockId:l,params:i,onChange:o,selected:s}=e,[a,d]=(0,r.useState)(String(i[t.name]));return(0,n.jsxs)("div",{className:"kluck-component kluck-font kluck-h4",style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsx)(y,{definition:t,selected:s,style:{width:"50%",paddingRight:"10px"}}),(0,n.jsx)("input",{className:"kluck-background-tile kluck-h4",type:"number",style:{width:"50%",height:"100%",padding:"4px 10px",borderRadius:"4px",WebkitTextFillColor:isDefaultValue(a,t.defaultValue)?"rgba(255, 255, 255, 0.65)":"white"},value:a,onChange:e=>{e.preventDefault(),d(e.target.value),o&&o(l,t.name,e.target.value)},name:t.name})]})}),t$=(0,r.memo)(e=>{var t,l;let{definition:i,blockId:o,params:s,onChange:a,selected:d,openProperties:c}=e,[u,p]=(0,r.useState)(c.get(i.name)),[h,v]=(0,r.useState)(s[i.name]),[g,x]=(0,r.useState)((null===(t=s[i.name])||void 0===t?void 0:t.active)!==!1),[m,k]=(0,r.useState)(!!(null===(l=s[i.name])||void 0===l?void 0:l.linked));(0,r.useEffect)(()=>
1{if("unset"!==h&&h&&a){var e,t,l,n,s,r,d,c;let u=JSON.parse(JSON.stringify(h)),p=[null,void 0,""];p.includes(null==u?void 0:null===(e=u.top)||void 0===e?void 0:e.value)&&(u.top.value="0"),p.includes(null==u?void 0:null===(t=u.top)||void 0===t?void 0:t.type)&&(u.top.type="px"),p.includes(null==u?void 0:null===(l=u.right)||void 0===l?void 0:l.value)&&(u.right.value="0"),p.includes(null==u?void 0:null===(n=u.right)||void 0===n?void 0:n.type)&&(u.right.type="px"),p.includes(null==u?void 0:null===(s=u.bottom)||void 0===s?void 0:s.value)&&(u.bottom.value="0"),p.includes(null==u?void 0:null===(r=u.bottom)||void 0===r?void 0:r.type)&&(u.bottom.type="px"),p.includes(null==u?void 0:null===(d=u.left)||void 0===d?void 0:d.value)&&(u.left.value="0"),p.includes(null==u?void 0:null===(c=u.left)||void 0===c?void 0:c.type)&&(u.left.type="px"),u.active=g,u.linked=m,a(o,i.name,u)}},[h,g,m]);let handleValueChange=(e,t)=>{m?v({...h,top:t,right:t,bottom:t,left:t,active:g}):v({...h,[e]:t,active:g})},f=i.defaultValue||{};return(0,n.jsx)(b,{inLineProps:(0,n.jsx)(()=>(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",gap:"12px"},onClick:e=>e.stopPropagation(),children:[i.defaultValue&&(0,n.jsx)(X,{blockId:o,name:i.name}),(0,n.jsx)(editorComponents_KluckUnitGrouper,{title:"Active",isGrouped:m,onGroupToggle:k}),(0,n.jsx)(editorComponents_KluckToggleSwitch,{title:"",value:g,setValue:x})]}),{}),definition:i,selected:d,blockId:o,params:s,onChange:a,tile:!0,value:s[i.name],setValue:void 0,setShow:p,show:u,expandable:!0,children:(0,n.jsx)(eZ.Z,{in:u,children:(0,n.jsxs)("div",{children:[(0,n.jsx)(J,{value:null==h?void 0:h.top,title:"Top",setValue:e=>handleValueChange("top",e),dataTypeTag:"top",wrapped:!0,values:["px","%","em"],isDefault:isDefaultValue(null==h?void 0:h.top,f.top)}),(0,n.jsx)(J,{value:null==h?void 0:h.right,title:"Right",setValue:e=>handleValueChange("right",e),dataTypeTag:"right",wrapped:!0,values:["px","%","em"],isDefault:isDefaultValue(null==h?void 0:h.right,f.right)}),(0,n.jsx)(J,{value:null==h?void 0:h.bottom,title:"Bottom",setValue:e=>handleValueChange("bottom",e),dataTypeTag:"bottom",wrapped:!0,values:["px","%","em"],isDefault:isDefaultValue(null==h?void 0:h.bottom,f.bottom)}),(0,n.jsx)(J,{value:null==h?void 0:h.left,title:"Left",setValue:e=>handleValueChange("left",e),dataTypeTag:"left",wrapped:!0,values:["px","%","em"],isDefault:isDefaultValue(null==h?void 0:h.left,f.left)})]})})})}),property_PropertyPromoPlay=e=>{let{definition:t,blockId:l,params:i,onChange:o,darkMode:a,selected:d,openProperties:c}=e,h=(0,s.v9)(e=>e.usersList.promos.website,p.Z),v=(0,s.v9)(e=>e.usersList.playlists.website,p.Z),[g,x]=(0,r.useState)(h),[m,k]=(0,r.useState)({type:"",value:{}}),[f,y]=(0,r.useState)(c.get(t.name));return(0,r.useEffect)(()=>{var e,n;let o=i[t.name];if(o){o.type&&o.value&&(document.getElementById("type_"+l).value=o.type,document.getElementById("value_"+l).value=o.scheduleId);for(let e=0;e<h.length;e++)void 0===h[e]&&h.splice(e,1);for(let e=0;e<v.length;e++)void 0===v[e]&&v.splice(e,1);if(h){k({type:"promo",scheduleId:null===(e=h[0])||void 0===e?void 0:e.scheduleId}),x(h);return}if(v){k({type:"play",scheduleId:null===(n=v[0])||void 0===n?void 0:n.scheduleId}),x(v);return}}},[t]),(0,r.useEffect)(()=>{o(l,t.name,m)},[m]),(0,n.jsx)(b,{definition:t,selected:d,blockId:l,params:i,onChange:o,tile:!0,value:i[t.name],setValue:void 0,setShow:y,show:f,expandable:!0,children:(0,n.jsx)(u.Z,{in:f,children:(0,n.jsx)("div",{children:(0,n.jsxs)("div",{className:"kluck-component kluck-font",style:{height:"auto"},children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[(0,n.jsx)("div",{children:"Select Data Source"}),(0,n.jsxs)("select",{className:"propertyField",id:"type_"+l,value:m.type,onChange:e=>{var t,l;"promo"===e.target.value?(k({type:"promo",scheduleId:null===(t=h[0])||void 0===t?void 0:t.scheduleId}),x(h)):"play"===e.target.value&&v&&(k({type:"play",scheduleId:null===(l=v[0])||void 0===l?void 0:l.scheduleId}),x(v))},style:{width:"35%",height:"100%",padding:"5px 6px"},children:[(0,n.jsx)("option",{className:"propertySelectDropdown",value:"promo",children:"Promotion"}),(0,n.jsx)("option",{className:"propertySelectDropdown",value:"play",children:"Playlist"})]})]}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsx)("div",{children:"Select Data Source"}),(0,n.jsxs)("select",{className:"propertyField",id:"value_"+l,value:null==m?void 0:m.scheduleId,onChange:e=>{var t,l;e.preventDefault();let i=null==g?void 0:g.findIndex(t=>t.scheduleId===e.target.value);"promo"===m.type?k({type:"promo",scheduleId:null===(t=g[i])||void 0===t?void 0:t.scheduleId}):"play"===m.type&&k({type:"play",scheduleId:null===(l=g[i])||void 0===l?void 0:l.scheduleId})},style:{width:"35%",height:"100%",padding:"5px 6px"},children:[(0,n.jsx)("option",{className:"propertySelectDropdown",value:""}),(null==g?void 0:g.length)>1&&g.filter(e=>e).map((e,t)=>(0,n.jsx)("option",{className:"propertySelectDropdown",value:e.scheduleId,children:e.scheduleName},t))]})]})]})})})})},t0=l(77724),t1=l(2609);let countItems=e=>{var t,l;let i=(null==e?void 0:null===(t=e.sectionItems)||void 0===t?void 0:t.length)||0;for(let t=0;t<((null==e?void 0:null===(l=e.children)||void 0===l?void 0:l.length)||0);t++)i+=countItems(e.children[t]);return i},TickSquare=e=>{let{checked:t}=e;return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{flexShrink:0},children:[(0,n.jsx)("path",{d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",fill:t?"white":"none",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),t&&(0,n.jsx)("path",{d:"M5.8125 9L7.935 11.1225L12.1875 6.8775",stroke:"#1D1E21",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})};var t3=(0,r.memo)(e=>{var t,l,i;let{definition:o,blockId:a,params:d,onChange:c,darkMode:h,selected:v,openProperties:g}=e,x=(0,s.v9)(e=>e.usersList.menus,p.Z),m=(0,s.v9)(e=>e.usersList.menuReference,p.Z),[k,f]=(0,r.useState)(""),[y,w]=(0,r.useState)(d[o.name]),[j,C]=(0,r.useState)(""),[L,I]=(0,r.useState)(g.get(o.name));(0,r.useEffect)(()=>{var t,l;m[a]?f(m[a]):(null==e?void 0:null===(l=e.params)||void 0===l?void 0:null===(t=l.menu)||void 0===t?void 0:t.menuId)&&x[e.params.menu.menuId]&&f(e.params.menu.menuId)},[x,e.params.menu]),(0,r.useEffect)(()=>
1{if(null==x?void 0:x[k]){var e,t,l,i,n,s,a;let r;let c=null===(i=x[k])||void 0===i?void 0:null===(l=i.menu)||void 0===l?void 0:null===(t=l.section)||void 0===t?void 0:null===(e=t.children)||void 0===e?void 0:e.sort((e,t)=>e.sequence-t.sequence);for(let e=0;e<(null==c?void 0:c.length);e++){let t=null===(s=JSON.stringify(c[e]))||void 0===s?void 0:s.toUpperCase();if(null==t?void 0:t.includes(null===(a=d[o.name])||void 0===a?void 0:a.toUpperCase())){r=c[e];break}}C((null==r?void 0:r.sectionId)||(null===(n=c[0])||void 0===n?void 0:n.sectionId)||"")}},[k]),(0,r.useEffect)(()=>{c&&y&&c(a,o.name,y)},[y]);let[S,E]=(0,r.useState)(new Set),toggleCollapsed=(e,t)=>{e.stopPropagation(),E(e=>{let l=new Set(e);return l.has(t)?l.delete(t):l.add(t),l})},Section=e=>{let{sections:t,level:l=0}=e;return(0,n.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:t.sort((e,t)=>e.sequence-t.sequence).map(e=>{var t,i;let o=(null===(t=e.sectionId)||void 0===t?void 0:t.toUpperCase())===(null==y?void 0:y.toUpperCase()),s=(null===(i=e.children)||void 0===i?void 0:i.length)>0,a=!S.has(e.sectionId);return(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[l>0&&(0,n.jsx)("span",{style:{width:"6px",borderTop:"1px solid var(--color-5)",flexShrink:0}}),(0,n.jsxs)("div",{className:"kluck-font",onClick:()=>w(e.sectionId),style:{flex:"1 1 auto",minWidth:0,height:"30px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"5px",padding:"0 6px",borderRadius:"6px",cursor:"pointer",backgroundColor:o?"var(--color-2)":"var(--color-5)"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"5px",minWidth:0},children:[(0,n.jsx)(TickSquare,{checked:o}),(0,n.jsxs)("span",{style:{fontSize:"13px",color:"var(--white)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:[(0,n.jsxs)("span",{style:{fontWeight:600},children:[e.sectionName," "]}),(0,n.jsxs)("span",{style:{fontWeight:400},children:["(",countItems(e),")"]})]})]}),s&&(0,n.jsx)("span",{onClick:t=>toggleCollapsed(t,e.sectionId),style:{display:"flex",flexShrink:0},children:a?(0,n.jsx)(t0.Z,{size:"16",color:"white"}):(0,n.jsx)(t1.Z,{size:"16",color:"white"})})]})]}),s&&a&&(0,n.jsx)(Section,{sections:e.children,level:l+1})]},e.sectionId)})})};return(0,n.jsx)(b,{definition:o,selected:v,blockId:a,params:d,tile:!0,value:d[o.name],setValue:void 0,setShow:I,show:L,expandable:!0,children:(0,n.jsx)(u.Z,{in:L,children:(0,n.jsx)("div",{children:(0,n.jsxs)("div",{children:[(null==x?void 0:null===(t=x[k])||void 0===t?void 0:t.menu)&&(0,n.jsx)(N,{definition:o,value:j,options:x[k].menu.section.children.sort((e,t)=>e.sequence-t.sequence).map(e=>({label:e.sectionName,value:e.sectionId})),onChangeHandler:(e,t)=>C(t)}),k&&(null===(l=x[k])||void 0===l?void 0:l.menu)&&""!==j&&(0,n.jsx)("div",{className:"kluckScrollArea",style:{maxHeight:"300px",padding:"10px 10px 0 10px",overflowY:"auto",overflowX:"hidden"},children:(0,n.jsx)(Section,{sections:x[k].menu.section.children.filter(e=>{var t;return(null===(t=e.sectionId)||void 0===t?void 0:t.toUpperCase())===(null==j?void 0:j.toUpperCase())})})}),!(null==x?void 0:null===(i=x[k])||void 0===i?void 0:i.menu)&&(0,n.jsx)("div",{style:{padding:"10px 10px 0 10px"},children:"Please select a menu in properties."})]})})})})}),t5=l(36107),t6=l(16363),t2=l(83980),t4=l(25290),t7=l(48242),t8=l(82745),t9=l(35489),le=(0,r.memo)(e=>{let{definition:t,blockId:l,params:i,onChange:o,selected:a}=e,d=(0,s.v9)(e=>e.usersList.kanvas,p.Z),c=(0,s.v9)(e=>e.usersList.locations,p.Z),u=(0,s.v9)(e=>e.usersList.urls,p.Z),h=(0,s.v9)(e=>e.usersList.menus,p.Z),v=(0,s.v9)(e=>e.usersList.locationValues,p.Z),g=(0,s.v9)(e=>e.usersList.pageTypes,p.Z),x=(0,s.v9)(e=>e.usersList.selectedPage,p.Z),m=(0,s.v9)(e=>e.usersList.globalData,p.Z),k=(0,s.v9)(e=>e.usersList.blockSchemas,p.Z),f=(0,s.v9)(e=>e.usersList.breakpoints,p.Z),b=(0,s.v9)(e=>e.usersList.concepts,p.Z),w=(0,s.v9)(e=>e.usersList.templateKanvas,p.Z),[j,C]=(0,r.useState)(i[t.name]),[L,I]=(0,r.useState)([]),S=(0,s.I0)(),[E]=(0,tJ.Z)();return(0,r.useEffect)(()=>{var e,l,n,o,s,a,r,u,p,y,j,L,S,E,N;let T=(null==t?void 0:t.dataType)?[]:t.options||[];switch(t.dataType){case"CLICKEVENT":T=[...t.options||[]];let M=[],D=[...t6.sj,...t2.s,...t4.MA];for(let e=0;e<D.length;e++)T.find(t=>t.value===D[e].name)||T.push({label:D[e].label,value:D[e].name});for(let t=0;t<(null==k?void 0:null===(n=k.Website)||void 0===n?void 0:null===(l=n.schema)||void 0===l?void 0:null===(e=l.clickEvents)||void 0===e?void 0:e.length);t++){let e=null==k?void 0:null===(s=k.Website)||void 0===s?void 0:null===(o=s.schema)||void 0===o?void 0:o.clickEvents[t];T.find(t=>t.value===(null==e?void 0:e.name))||T.push({label:null==e?void 0:e.label,value:null==e?void 0:e.name})}let parseBlock=(e,t)=>{var l,i,n,o,s;if(!M.includes(e.blockName)){let t=null===(l=k[e.blockName])||void 0===l?void 0:l.schema;for(let e=0;e<(null==t?void 0:null===(i=t.clickEvents)||void 0===i?void 0:i.length);e++){let l=t.clickEvents[e];T.find(e=>e.value===(null==l?void 0:l.name))||T.push({label:null==l?void 0:l.label,value:null==l?void 0:l.name})}M.push(e.blockName)}for(let t=0;t<f.length;t++){let l=null===(n=e[f[t].key])||void 0===n?void 0:n.customPages;for(let e=0;e<(null==l?void 0:l.length);e++)T.find(t=>{var i;return t.value===(null===(i=l[e])||void 0===i?void 0:i.label)})||T.push({label:null===(o=l[e])||void 0===o?void 0:o.label,value:null===(s=l[e])||void 0===s?void 0:s.label})}for(let l=0;l<e.children.length;l++)parseBlock(e.children[l],t)};for(let e=0;e<d.website.pages.length;
1e++)d.website.pages[e].blocks.forEach(e=>parseBlock(e,x.params.pageName));T=T.sort((e,t)=>e.label>t.label?1:t.label>e.label?-1:0);break;case"CONCEPT":(T=[{label:"All concepts",value:"00000000-0000-0000-0000-000000000000"}]).push({label:"Select One",value:"null"});for(let e=0;e<v.concepts.length;e++)T.push({label:v.concepts[e].conceptName,value:v.concepts[e].conceptId});break;case"CUSTOMDATA":let P=eH.J.find(e=>e.id===t.schemaId);if(!(0,eR.Z)(P))return;for(let e=0;e<t.values.length;e++){let l=t.values[e];for(let e=0;e<l.data.length;e++){let t=eH.J.find(t=>t.id===l.data[e]),i=(0,eR.Z)(t);if(i){if(null===(a=m.get(i))||void 0===a?void 0:a.values()){let e=null===(u=Array)||void 0===u?void 0:u.from(null===(r=m.get(i))||void 0===r?void 0:r.values());if(!(null==e?void 0:e.length))return;for(let t=0;t<e.length;t++)T.find(i=>i.value===e[t][l.value])||T.push({label:e[t][l.label],value:e[t][l.value]})}}else{let t=t5.h.getState().usersList[l.data[e]]||[];for(let e=0;e<t.length;e++)T.find(i=>i.value===t[e][l.value])||T.push({label:t[e][l.label],value:t[e][l.value]})}}}break;case"DATA":T=[{label:"",value:""}];for(let e=0;e<eH.J.length;e++){let t=eH.J[e];T.push({label:null==t?void 0:t.label,value:null==t?void 0:t.id})}break;case"DATACOLUMN":T=[{label:"",value:""}];let H=null==i?void 0:i.dataVariable;if(H){let e=eH.J.find(e=>e.id===H),t=null==e?void 0:e.columns;for(let e=0;e<(null==t?void 0:t.length);e++)T.push({label:t[e].label,value:t[e].name})}break;case"FORMAT":T=[{label:"",value:""}];for(let e=0;e<ef.b.length;e++)T.push({label:ef.b[e].label,value:ef.b[e].name});break;case"LOCATION":d.website.settings.location&&C(d.website.settings.location),T.push({label:"Select One",value:"null"});for(let e=0;e<c.length;e++)T.push({label:c[e].locationName,value:c[e].locationId,locationData:JSON.stringify(c[e])});break;case"LOCATIONOPTION":T.push({label:"Select One",value:""});for(let e=0;e<c.length;e++)T.push({label:c[e].locationName,value:c[e].locationId});break;case"CUSTOMDATATYPE":T=[{label:"",value:""}],(0,t8.Ic)(null==d?void 0:d.clientId).then(e=>{let t=[];for(let l of e)(null==l?void 0:l.customDataType)&&!t.includes(l.customDataType)&&t.push(l.customDataType);I([{label:"",value:""},...t.map(e=>({label:e,value:e}))])});break;case"CUSTOMDATAFIELD":{T=[{label:"",value:""}];let e=null==i?void 0:i.customDataType;e&&(0,t8.Ic)(null==d?void 0:d.clientId).then(t=>{var l;let i=(0,t9.wQ)(t,e,(null==d?void 0:null===(l=d.website)||void 0===l?void 0:l.settings)||{});I([{label:"",value:""},...((null==i?void 0:i.customDataFields)||[]).filter(e=>null==e?void 0:e.fieldVariable).map(e=>({label:e.fieldLabel||e.fieldVariable,value:e.fieldVariable}))])});break}case"CUSTOMDATAROUTE":for(let e of(T=[{label:"",value:""}],(0,t9.x4)((null==d?void 0:null===(p=d.website)||void 0===p?void 0:p.settings)||{})))T.push({label:"".concat(e.customDataType," (/").concat(e.slug,")"),value:e.slug});break;case"MENUITEM":T=[{label:"",value:""}];let B=Object.keys(b);for(let e=0;e<B.length;e++){let t=b[B[e]],l=null==t?void 0:t.menuItems;for(let t=0;t<(null==l?void 0:l.length);t++)T.find(e=>{var i;return(null===(i=e.value)||void 0===i?void 0:i.menuItemId)===l[t].menuItemId})||T.push({label:l[t].menuItemName,value:{conceptId:B[e],menuItemId:l[t].menuItemId}})}break;case"MODALPAGE":T=[{label:"",value:""}];for(let e=0;e<d.website.pages.length;e++)"true"===d.website.pages[e].params.modalPage&&T.push({label:d.website.pages[e].params.pageName,value:d.website.pages[e].pageId});break;case"MODIFIERGROUP":for(let e=0;e<Object.keys(h).length;e++){let t=null===(y=h[Object.keys(h)[e]])||void 0===y?void 0:y.modifierGroupMap;if(t)for(let e=0;e<Object.keys(t).length;e++){let l=t[Object.keys(t)[e]];T.find(e=>e.value===l.modifierGroupId)||T.push({label:l.modifierGroupName,value:l.modifierGroupId})}}T=T.sort((e,t)=>e.label>t.label?1:t.label>e.label?-1:0);break;case"PAGE":T=[{label:"",value:""}];let Z=d.website.pages.filter(e=>e.params.pageType===t.pageType||"ALL"===t.pageType||!t.pageType);for(let e=0;e<Z.length;e++)T.push({label:Z[e].params.pageName,value:Z[e].pageId});let R=w.website.pages.filter(e=>e.params.pageType===t.pageType||"ALL"===t.pageType||!t.pageType);for(let e=0;e<t7.Qn.length;e++){let t=R.find(t=>t.params.pageType===t7.Qn[e]);t&&T.push({label:t.params.pageName,value:t.pageId})}break;case"PAGEPARENT":T=[{label:"",value:""}];for(let e=0;e<d.website.pages.length;e++)T.push({label:d.website.pages[e].params.pageName,value:d.website.pages[e].params.pageName});break;case"PAGEINPUT":T=[{label:"",value:""},{label:"Custom",value:"Custom"}];let A=[],parseBlock1=(e,t)=>{if(!A.includes(e.blockName)){var l,i;let t=null===(l=k[e.blockName])||void 0===l?void 0:l.schema;for(let l=0;l<(null==t?void 0:null===(i=t.pageInputs)||void 0===i?void 0:i.length);l++){let i=t.pageInputs[l];T.find(e=>e.value===(null==i?void 0:i.variable))||T.push({label:"".concat(e.blockName," - ").concat(null==i?void 0:i.label),value:null==i?void 0:i.variable})}A.push(e.blockName)}for(let l=0;l<e.children.length;l++)parseBlock1(e.children[l],t)};for(let e=0;e<d.website.pages.length;
1e++)d.website.pages[e].blocks.forEach(e=>parseBlock1(e,x.params.pageName));let V=null===(j=k.Website)||void 0===j?void 0:j.schema;for(let e=0;e<(null==V?void 0:null===(L=V.pageInputs)||void 0===L?void 0:L.length);e++){let t=V.pageInputs[e];T.find(e=>e.value===(null==t?void 0:t.variable))||T.push({label:"".concat(null==t?void 0:t.label),value:null==t?void 0:t.variable})}let _=[...(null==d?void 0:null===(E=d.website)||void 0===E?void 0:null===(S=E.settings)||void 0===S?void 0:S.customVariables)||[],...(null==x?void 0:null===(N=x.params)||void 0===N?void 0:N.customVariables)||[]];for(let e=0;e<_.length;e++)T.push({label:"Custom Variable: ".concat(_[e].variableName),value:_[e].variableName});break;case"PAGETYPE":T=[];for(let e=0;e<g.length;e++)T.push({label:g[e].label||g[e].name,value:g[e].name});break;case"RESERVATIONBLOCK":T=[{label:"",value:"00000000-0000-0000-0000-000000000000"}];let parseBlock2=(e,t)=>{let l=T.filter(e=>e.value.includes(t)).length+1;"Reservations"===e.blockName&&T.push({label:"Block ".concat(l," (").concat(t,")"),value:e.blockId});for(let l=0;l<e.children.length;l++)parseBlock2(e.children[l],t)};for(let e=0;e<d.website.pages.length;e++)for(let t=0;t<d.website.pages[e].blocks.length;t++)parseBlock2(d.website.pages[e].blocks[t],d.website.pages[e].params.pageName)}I(T)},[l,t.name,t.dataType,h,g,c,null==i?void 0:i.dataVariable,null==i?void 0:i.customDataType]),(0,r.useEffect)(()=>{var e,l;if("SECTION"===t.dataType&&(null==i?void 0:null===(e=i.selectedMenu)||void 0===e?void 0:e.menuId)){let e=t.options[0]?t.options:[],n=null===(l=h[i.selectedMenu.menuId])||void 0===l?void 0:l.menu.section.children;if(n)for(let t=0;t<n.length;t++)e.push({label:n[t].sectionName,value:n[t].sectionName});I(e)}},[t.dataType,i,h]),(0,n.jsx)("div",{className:"propertyContainer kluck-font",style:{width:"100%"},children:(0,n.jsx)(N,{value:j,definition:t,options:L,onChangeHandler:(e,i)=>{if(void 0!==e.preventDefault&&e.preventDefault(),C(i),o&&o(l,t.name,i),"LOCATION"===t.dataType){let e=c.find(e=>e.locationId===i);(null==e?void 0:e.locationId)&&E({method:"GET",url:"".concat(u.guest,"/unsecure/locationConcepts/location/").concat(e.locationId),log:{level:"ERROR",logger:"PropertySelect.onChangeHandler",sendLogs:!0}}).then(t=>{d.website.settings.location=e.locationId,S({type:"UPDATE_LOCATION_VALUES",data:e,concepts:t.data})})}},title:(0,n.jsx)(y,{definition:t,selected:a}),isDefault:isDefaultValue(j,t.defaultValue)})})}),lt=(0,r.memo)(e=>{let{definition:t,blockId:l,params:i,onChange:o,selected:s}=e,[a,d]=(0,r.useState)(i[t.name]);return(0,n.jsxs)("div",{className:"propertyContainer",children:[(0,n.jsx)(y,{definition:t,selected:s,labelStyle:{whiteSpace:"nowrap"}}),(0,n.jsx)("input",{className:"propertyField",type:"text",style:{width:"35%",height:"100%",borderRadius:"4px",padding:"4px 10px"},value:a,onChange:e=>{e.preventDefault(),d(e.target.value),o&&o(l,t.name,e.target.value)},name:t.name})]})}),property_PropertyTemplate=()=>{let[e,t]=(0,r.useState)(null),l=(0,s.I0)(),clickHandler=e=>{switch(e){case 0:l({type:"USE_TEMPLATE",blocks:["100"],rows:1});break;case 1:l({type:"USE_TEMPLATE",blocks:["50","50"],rows:1});break;case 2:l({type:"USE_TEMPLATE",blocks:["33.33","33.34","33.33"],rows:1});break;case 3:l({type:"USE_TEMPLATE",blocks:["25","25","25","25"],rows:1});break;case 4:l({type:"USE_TEMPLATE",blocks:["100","100"],rows:2});break;case 5:l({type:"USE_TEMPLATE",blocks:["50","50","50","50"],rows:2});break;case 6:l({type:"USE_TEMPLATE",blocks:["100","50","50"],rows:2});break;case 7:l({type:"USE_TEMPLATE",blocks:["50","50","100"],rows:2})}},i={width:"calc(50% - 5px)",height:"115px",position:"relative",padding:"5%",cursor:"pointer",borderRadius:"4px",display:"flex"},o={borderRadius:"4px",border:"2px solid var(--color-6)"},a={...o,width:"100%",height:"100%",display:"flex",flexDirection:"row",borderRadius:"4px",justifyContent:"space-evenly",flexWrap:"wrap",alignItems:"center",gap:"10px",padding:"10px",margin:"0"};return(0,n.jsxs)("div",{style:{width:"100%",display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center",gap:"10px"},children:[(0,n.jsx)("div",{className:"kluck-neutral",style:{...i,outline:0===e?"2px solid grey":"unset"},onMouseEnter:()=>t(0),onMouseLeave:()=>t(null),onClick:()=>clickHandler(0),children:(0,n.jsx)("div",{style:{...a}})}),(0,n.jsx)("div",{className:"kluck-neutral",style:{...i,outline:1===e?"2px solid grey":"unset"},onMouseEnter:()=>t(1),onMouseLeave:()=>t(null),onClick:()=>clickHandler(1),children:(0,n.jsxs)("div",{style:{...a,flexWrap:"nowrap"},children:[(0,n.jsx)("div",{style:{...o,width:"100%",height:"100%"}}),(0,n.jsx)("div",{style:{...o,width:"100%",height:"100%"}})]})}),(0,n.jsx)("div",{className:"kluck-neutral",style:{...i,display:"flex",outline:2===e?"2px solid grey":"unset",flexDirection:"row",justifyContent:"space-evenly",alignItems:"center"},onMouseEnter:()=>t(2),onMouseLeave:()=>t(null),onClick:()=>clickHandler(2),children:(0,n.jsxs)("div",{style:{...a,flexWrap:"nowrap"},children:[(0,n.jsx)("div",{style:{...o,width:"100%",height:"100%"}}),(0,n.jsx)("div",{style:{...o,width:"100%",height:"100%"}}),(0,n.jsx)("div",{style:{...o,width:"100%",height:"100%"}})]})}),(0,n.jsx)("div",{className:"kluck-neutral",style:{...i,outline:3===e?"2px solid grey":"unset"},onMouseEnter:()=>t(3),onMouseLeave:()=>t(null),onClick:()=>clickHandler(3),children:(0,n.jsxs)("div",{style:{...a,flexWrap:"nowrap"},children:[(0,n.jsx)("div",{style:{...o,width:"100%",height:"100%"}}),(0,n.jsx)("div",{style:{...o,width:"100%",height:"100%"}}),(0,n.jsx)("div",{style:{...o,width:"100%",height:"100%"}}),(0,n.jsx)("div",{style:{...o,width:"100%",height:"100%"}})]})}),(0,n.jsx)("div",{className:"kluck-neutral",style:{...i,flexDirection:"column",flexWrap:"nowrap",outline:4===e?"2px solid grey":"unset"},onMouseEnter:()=>t(4),onMouseLeave:()=>t(null),onClick:()=>clickHandler(4),children:(0,n.jsxs)("div",{style:{...a,flexDirection:"column",flexWrap:"nowrap"},children:[(0,n.jsx)("div",{style:{...o,width:"100%",height:"100%"}}),(0,n.jsx)("div",{style:{...o,width:"100%",height:"100%"}})]})}),(0,n.jsx)("div",{className:"kluck-neutral",style:{...i,outline:5===e?"2px solid grey":"unset"},onMouseEnter:()=>t(5),onMouseLeave:()=>t(null),onClick:()=>clickHandler(5),children:(0,n.jsxs)("div",{style:{...a},children:[(0,n.jsx)("div",{style:{...o,width:"calc(50% - 5px)",height:"calc(50% - 5px)"}}),(0,n.jsx)("div",{style:{...o,width:"calc(50% - 5px)",height:"calc(50% - 5px)"}}),(0,n.jsx)("div",{style:{...o,width:"calc(50% - 5px)",height:"calc(50% - 5px)"}}),(0,n.jsx)("div",{style:{...o,width:"calc(50% - 5px)",height:"calc(50% - 5px)"}})]})}),(0,n.jsx)("div",{className:"kluck-neutral",style:{...i,outline:6===e?"2px solid grey":"unset"},onMouseEnter:()=>t(6),onMouseLeave:()=>t(null),onClick:()=>clickHandler(6),children:(0,n.jsxs)("div",{style:{...a},children:[(0,n.jsx)("div",{style:{...o,width:"calc(50% - 5px)",height:"calc(50% - 5px)"}}),(0,n.jsx)("div",{style:{...o,width:"calc(50% - 5px)",height:"calc(50% - 5px)"}}),(0,n.jsx)("div",{style:{...o,width:"100%",height:"calc(50% - 5px)"}})]})}),(0,n.jsx)("div",{className:"kluck-neutral",style:{...i,outline:7===e?"2px solid grey":"unset"},onMouseEnter:()=>t(7),onMouseLeave:()=>t(null),onClick:()=>clickHandler(7),children:(0,n.jsxs)("div",{style:{...a},children:[(0,n.jsx)("div",{style:{...o,width:"100%",height:"calc(50% - 5px)"}}),(0,n.jsx)("div",{style:{...o,width:"calc(50% - 5px)",height:"calc(50% - 5px)"}}),(0,n.jsx)("div",{style:{...o,width:"calc(50% - 5px)",height:"calc(50% - 5px)"}})]})})]})},ll=(0,r.memo)(e=>{let{definition:t,blockId:l,params:i,onChange:o,selected:s}=e,[a,d]=(0,r.useState)(i[t.name]||"00:00");return(0,n.jsxs)("div",{className:"kluck-component kluck-h4",style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsx)(y,{definition:t,selected:s,style:{width:"50%",paddingRight:"10px"}}),(0,n.jsx)("input",{className:"kluck-background-tile kluck-h4",type:"time",step:"1",style:{width:"50%",height:"100%",padding:"4px 10px",borderRadius:"4px"},value:a,onChange:e=>{e.preventDefault(),d(e.target.value),o&&o(l,t.name,e.target.value)},name:t.name})]})}),li=(0,r.memo)(e=>{var t,l,i,o,s;let{definition:a,blockId:d,params:c,onChange:p,darkMode:h,selected:v,openProperties:g}=e,[x,m]=(0,r.useState)(c[a.name]),[k,f]=(0,r.useState)(null===(t=c[a.name])||void 0===t?void 0:t.useGlobal),[y,w]=(0,r.useState)(null===(l=c[a.name])||void 0===l?void 0:l.transitionDuration),[j,C]=(0,r.useState)(null===(i=c[a.name])||void 0===i?void 0:i.transitionDelay),[L,I]=(0,r.useState)(null===(o=c[a.name])||void 0===o?void 0:o.transitionType),[S,E]=(0,r.useState)(null===(s=c[a.name])||void 0===s?void 0:s.customTransition),[T,M]=(0,r.useState)(g.get(a.name));return(0,r.useEffect)(()=>{p&&"string"!=typeof x&&p(d,a.name,x)},[x]),(0,r.useEffect)(()=>{m({useGlobal:k,transitionDuration:y,transitionDelay:j,transitionType:L,customTransition:S}
1)},[y,j,L,S]),(0,n.jsx)(b,{definition:a,selected:v,blockId:d,params:c,onChange:p,value:c[a.name],setValue:void 0,setShow:M,show:T,expandable:!0,children:(0,n.jsx)(u.Z,{in:T,children:(0,n.jsxs)("div",{children:["WEBSITE"!==d&&(0,n.jsxs)("div",{className:"kluck-component kluck-font",style:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"nowrap",alignContent:"center"},children:[(0,n.jsx)("div",{className:"kluck-h4",style:{width:"50%",display:"flex",alignItems:"center",paddingRight:"10px"},children:"Use Global Transition"}),(0,n.jsx)("div",{style:{width:"50%",height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center",cursor:"pointer"},children:(0,n.jsx)("svg",{onClick:()=>f("true"===k?"false":"true"),xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,n.jsxs)("g",{id:"tick-square",children:[(0,n.jsx)("path",{id:"Vector",d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",fill:"true"===k?"white":"",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),"true"===k&&(0,n.jsx)("path",{id:"Vector_2",d:"M5.8125 9L7.935 11.1225L12.1875 6.8775",stroke:"#1D1E21",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]}),("false"===k||"WEBSITE"===d)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(J,{title:"Transition Duration (ms)",setValue:e=>w(e.value),value:{value:y,type:"px"},type:"px",wrapped:!0}),(0,n.jsx)(J,{title:"Transition Delay (ms)",setValue:e=>C(e.value),value:{value:j,type:"px"},type:"px",wrapped:!0}),(0,n.jsx)(N,{title:"Transition Type",value:L,definition:a,options:[{label:"Custom",value:"custom"},{label:"Ease",value:"cubic-bezier(0.25,0.10,0.25,1.00)"},{label:"Linear",value:"cubic-bezier(0.00,0.00,1.00,1.00)"},{label:"Ease In",value:"cubic-bezier(0.42,0.00,1.00,1.00)"},{label:"Ease Out",value:"cubic-bezier(0.00,0.00,0.58,1.00)"},{label:"Ease In Out",value:"cubic-bezier(0.42,0.00,0.58,1.00)"},{label:"Material standard",value:"cubic-bezier(0.40,0.00,0.20,1.00)"},{label:"Material decelerate",value:"cubic-bezier(0.00,0.00,0.20,1.00)"},{label:"Accelerate",value:"cubic-bezier(0.40,0.00,1.00,1.00)"},{label:"Ease In Quint",value:"cubic-bezier(0.76,0.05,0.86,0.06)"},{label:"Ease Out Quint",value:"cubic-bezier(0.23,1.00,0.32,1.00)"},{label:"Ease In Out Quint",value:"cubic-bezier(0.86,0.00,0.07,1.00)"},{label:"Ease In Expo",value:"cubic-bezier(0.95,0.05,0.80,0.04)"},{label:"Ease Out Expo",value:"cubic-bezier(0.19,1.00,0.22,1.00)"},{label:"Ease In Out Expo",value:"cubic-bezier(1.00,0.00,0.00,1.00)"},{label:"Ease In Back",value:"cubic-bezier(0.60,-0.28,0.74,0.05)"},{label:"Ease Out Back",value:"cubic-bezier(0.18,0.89,0.32,1.28)"},{label:"Ease In Out Back",value:"cubic-bezier(0.68,-0.55,0.27,1.55)"},{label:"Ease In Sine",value:"cubic-bezier(0.47,0.00,0.75,0.72)"},{label:"Ease Out Sine",value:"cubic-bezier(0.39,0.58,0.57,1.00)"},{label:"Ease In Out Sine",value:"cubic-bezier(0.45,0.05,0.55,0.95)"},{label:"Ease In Quad",value:"cubic-bezier(0.55,0.09,0.68,0.53)"},{label:"Ease Out Quad",value:"cubic-bezier(0.25,0.46,0.45,0.94)"},{label:"Ease In Out Quad",value:"cubic-bezier(0.46,0.03,0.52,0.96)"},{label:"Ease In Cubic",value:"cubic-bezier(0.55,0.06,0.68,0.19)"},{label:"Ease Out Cubic",value:"cubic-bezier(0.22,0.61,0.36,1.00)"},{label:"Ease In Out Cubic",value:"cubic-bezier(0.65,0.05,0.36,1.00)"}],onChangeHandler:(e,t)=>I(t)}),"custom"===L&&(0,n.jsx)($,{title:"",value:S,onChange:e=>E(e.target.value),definition:a})]})]})})})}),ln=(0,r.memo)(e=>{var t,l;let{definition:i,blockId:o,params:s,onChange:a,selected:d}=e,[c,u]=(0,r.useState)(null===(t=s[null==i?void 0:i.name])||void 0===t?void 0:t.type),[p,h]=(0,r.useState)(parseInt(null===(l=s[i.name])||void 0===l?void 0:l.value));return(0,r.useEffect)(()=>{a&&c&&p+""&&a(o,i.name,{type:c,value:p+""})},[c,p]),(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",width:"100%"},children:(0,n.jsx)(J,{title:(0,n.jsx)(y,{definition:i,selected:d}),value:{value:p},type:c,setType:u,setValue:e=>h(e.value),values:["none","auto","px","em","%","svh","vh","svw","vw"],isDefault:isDefaultValue({value:p,type:c},i.defaultValue)})})}),lo=(0,r.memo)(e=>{var t,l;let{definition:i,blockId:o,params:s,onChange:a,darkMode:d,selected:c,openProperties:p}=e,[h,v]=(0,r.useState)(null===(t=s[i.name])||void 0===t?void 0:t.type),[g,x]=(0,r.useState)(null===(l=s[i.name])||void 0===l?void 0:l.url),[m,k]=(0,r.useState)(p.get(i.name));return(0,r.useEffect)(()=>
1{if(a){let e={};e.type=h,e.url=g,a(o,i.name,e)}},[h,g]),(0,n.jsxs)("div",{style:{backgroundColor:d?"#3B3E45":"",borderRadius:"6px",border:d?"":"1px solid"},children:[(0,n.jsxs)("div",{onClick:()=>k(!m),style:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",padding:"12px"},children:[(0,n.jsx)(y,{definition:i,selected:c,labelStyle:{cursor:"pointer"}}),(0,n.jsx)("svg",{className:"opacityHover",style:{width:"24px",height:"24px"},viewBox:"0 0 24 24",children:(0,n.jsx)("path",{fill:"currentColor",d:m?"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z":"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"})})]}),(0,n.jsx)(u.Z,{in:m,style:{padding:"0 18px 12px 18px"},children:(0,n.jsxs)("div",{style:{marginTop:"8px"},children:[(0,n.jsxs)("div",{className:"editor propertyContainer",style:{marginBottom:"8px"},children:[(0,n.jsx)("div",{children:"Url Type"}),(0,n.jsxs)("select",{className:"propertyField",value:h,onChange:e=>v(e.target.value),style:{width:"35%",height:"100%",padding:"5px 6px",borderRadius:"4px"},children:[(0,n.jsx)("option",{className:"propertySelectDropdown",value:"email",children:"Email"}),(0,n.jsx)("option",{className:"propertySelectDropdown",value:"link",children:"Link"})]})]}),(0,n.jsxs)("div",{className:"editor propertyContainer",children:[(0,n.jsx)("label",{style:{whiteSpace:"nowrap"},children:"Url"}),(0,n.jsx)("input",{className:"propertyField",type:"text",style:{width:"35%",height:"100%",borderRadius:"4px",padding:"4px 10px"},value:g,onChange:e=>x(e.target.value),name:i.name})]})]})})]})});let compareObjects=(e,t)=>{var l,i,n,o;if(null==t||(null==e?void 0:e.length)!==(null==t?void 0:t.length)||e&&t&&(null===(i=Object)||void 0===i?void 0:null===(l=i.keys(e))||void 0===l?void 0:l.length)!==(null===(o=Object)||void 0===o?void 0:null===(n=o.keys(t))||void 0===n?void 0:n.length))return!1;if("object"!=typeof e)return e+""==t+"";{e=Object.fromEntries(Object.entries(e).sort()),t=Object.fromEntries(Object.entries(t).sort());let l=!0;for(let i=0;i<Object.keys(e).length;i++)compareObjects(e[Object.keys(e)[i]],t[Object.keys(t)[i]])||(l=!1);return l}};var ls=(0,r.memo)(e=>{let{block:t,definition:l,blockId:i,params:o,selected:a,onHover:d,onLeave:c,onSelect:u,darkMode:h,onChangeHandler:v}=e,g=(0,s.v9)(e=>e.usersList.kanvas,p.Z),x=(0,s.v9)(e=>e.usersList.openProperties,p.Z),m=(0,s.v9)(e=>{var t;return(null===(t=e.usersList.propertyResets)||void 0===t?void 0:t["".concat(i,"_").concat(l.name)])||0}),k=(0,s.I0)(),onChange=(e,l,i)=>{v?v(e,l,i):(null==t?void 0:t.params)&&null!=i&&!compareObjects(null==t?void 0:t.params[l],i)&&k({type:"UPDATE_PROPERTY",blockId:e,name:l,value:i})};return(0,n.jsxs)(r.Fragment,{children:["CHILDREN"===l.inputType&&(0,n.jsx)(property_PropertyAddChild,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"ALIGN"===l.inputType&&(0,n.jsx)(L,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"ANIMATION"===l.inputType&&(0,n.jsx)(el,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"BACKGROUNDIMAGE"===l.inputType&&(0,n.jsx)(PropertyBackgroundImage,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"BLOCK"===l.inputType&&(0,n.jsx)(ei,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"BORDER"===l.inputType&&(0,n.jsx)(PropertyBorder,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"BORDERRADIUS"===l.inputType&&(0,n.jsx)(Q,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"BOXSHADOW"===l.inputType&&(0,n.jsx)(er,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"BREAKPOINT"===l.inputType&&(0,n.jsx)(property_PropertyBreakpoint,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"CHECKBOX-ARRAY"===l.inputType&&(0,n.jsx)(PropertyCheckBoxArray,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"COLOR"===l.inputType&&(0,n.jsx)(ed,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"CONTAINER"===l.inputType&&(0,n.jsx)(eu,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"CUSTOM_MODAL"===l.inputType&&(0,n.jsx)(propertyCustomModal,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"DATABLOCK"===l.inputType&&(0,n.jsx)(eh,{selected:a,darkMode:h,blockId:i,kanvas:g,definition:l,openProperties:x,onChange:onChange,params:o}),"DATAITEM"===l.inputType&&(0,n.jsx)(ev,{selected:a,darkMode:h,blockId:i,kanvas:g,definition:l,openProperties:x,onChange:onChange,params:o}),"FONT"===l.inputType&&(0,n.jsx)(ek,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"FORMAT"===l.inputType&&(0,n.jsx)(property_PropertyFormat,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"EXPRESSION"===l.inputType&&(0,n.jsx)(property_PropertyExpression,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"HTML"===l.inputType&&(0,n.jsx)(property_PropertyHTML,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"ICON"===l.inputType&&(0,n.jsx)(eP,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"IMAGE"===l.inputType&&(0,n.jsx)(property_PropertyImage,{selected:a,darkMode:h,blockId:i,kanvas:g,definition:l,openProperties:x,onChange:onChange,params:o}),"LISTDATA"===l.inputType&&(0,n.jsx)(eB,{selected:a,darkMode:h,blockId:i,kanvas:g,definition:l,openProperties:x,onChange:onChange,params:o}),"MENU"===l.inputType&&(0,n.jsx)(property_PropertyMenu,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"CHOOSE"===l.inputType&&(0,n.jsx)(property_PropertyNewBlock,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onHover:d,onLeave:c}),"NUMBER"===l.inputType&&(0,n.jsx)(tQ,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"MARGIN"===l.inputType&&(0,n.jsx)(eO,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"PADDING"===l.inputType&&(0,n.jsx)(t$,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"PROMOPLAY"===l.inputType&&(0,n.jsx)(property_PropertyPromoPlay,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"SECTION"===l.inputType&&(0,n.jsx)(t3,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"SELECT"===l.inputType&&(0,n.jsx)(le,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"TAG"===l.inputType&&(0,n.jsx)(lt,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"TEMPLATE"===l.inputType&&(0,n.jsx)(property_PropertyTemplate,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"TEXT"===l.inputType&&(0,n.jsx)(ee,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"TIME"===l.inputType&&(0,n.jsx)(ll,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"TRANSITION"===l.inputType&&(0,n.jsx)(li,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"UNIT"===l.inputType&&(0,n.jsx)(ln,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"URL"===l.inputType&&(0,n.jsx)(lo,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange}),"BLOCKCONTENTS"===l.inputType&&(0,n.jsx)(property_PropertyBlockContents,{selected:a,darkMode:h,blockId:i,params:o,definition:l,openProperties:x,onChange:onChange})]},m)}),components_CssToggle=e=>{let{propertyFilter:t,setPropertyFilter:l}=e,tabClass=e=>e===t?"kluck-warning":"kluck-nav";return(0,n.jsx)("div",{style:{height:"40px",borderRadius:"6px"},children:(0,n.jsxs)("div",{className:"propertyTypeToggleContainer editor kluck-background-tile",style:{borderRadius:"6px"},children:[(0,n.jsx)("div",{className:"editor propertyTypeToggleButton kluck-font kluck-h3 ".concat(tabClass("Content")),onClick:()=>l("Content"),style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",marginRight:"5px",borderRadius:"6px"},children:"Content"}),(0,n.jsx)("div",{className:"editor propertyTypeToggleButton kluck-font kluck-h3 ".concat(tabClass("Style")),onClick:()=>l("Style"),style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",marginInline:"5px",borderRadius:"6px"},children:"Style"}),(0,n.jsx)("div",{className:"editor propertyTypeToggleButton kluck-font kluck-h3 ".concat(tabClass("Advanced")),onClick:()=>l("Advanced"),style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",marginLeft:"5px",borderRadius:"6px"},children:"Advanced"})]})})},la=l(16179),lr=l(12451),property_Properties=e=>{var t;let{block:l,params:i,onHover:o,onLeave:a,darkMode:d,page:c,propertyFilter:u,setPropertyFilter:h}=e,v=(0,s.v9)(e=>e.usersList.selectedPage,p.Z),g=(0,s.v9)(e=>e.usersList.breakpoint,p.Z),x=(0,s.v9)(e=>e.usersList.state,p.Z),[m,k]=(0,r.useState)(null),[f,y]=(0,r.useState)([]),[b,j]=(0,r.useState)("All"),C=(0,s.I0)(),L=(null==m?void 0:m.name)==="NewBlock"||(null==m?void 0:m.name)==="NewTemplate",I=null==l?void 0:l.blockId;(0,r.useEffect)(()=>{j("All")},[c,l]);let getBlock=e=>{for(let t=0;t<tG.K.length;t++){let l=tG.K[t].type;if(l.displayName===e)return l}return tG.K[0].type};(0,r.useEffect)(()=>{k(null)},[x]),(0,r.useEffect)(()=>{(null==l?void 0:l.blockName)&&(!m||(null==m?void 0:m.name)!==(null==l?void 0:l.blockName))&&k(Object.assign({},getBlock(null==l?void 0:l.blockName).schema))},[null==l?void 0:l.blockName,m]),(0,r.useEffect)(()=>{C({type:"UPDATE_OPEN_POPOVER",openPopover:""})},[u]),(0,r.useEffect)(()=>{("NewTemplate"===l.blockName||"NewBlock"===l.blockName)&&h("Content")},[l]);let compile=e=>property_compileCommandText(e,i),groupShow=e=>{f.includes(e)?y(f.filter(t=>t!==e)):y([...f,e])};return(0,r.useEffect)(()=>{var e,t,l,i;let n=["basicContainer"];for(let o=0;o<(null==m?void 0:null===(e=m.definitions)||void 0===e?void 0:e.length);o++)try{for(let e=0;e<(null==m?void 0:null===(l=m.definitions[o])||void 0===l?void 0:null===(t=l.defaultOpen)||void 0===t?void 0:t.length);e++){let t=null==m?void 0:null===(i=m.definitions[o])||void 0===i?void 0:i.defaultOpen[e];n.includes(t)||n.push(t)}}catch(e){console.log(e)}y(n)},[l,u,m]),(0,n.jsx)(n.Fragment,{children:m&&(null==m?void 0:null===(t=m.definitions)||void 0===t?void 0:t.length)?(0,n.jsxs)(lr.E.div,{style:{height:"100%",padding:"0px 10px 10px 10px"},animate:{x:0,opacity:1},initial:{x:50,opacity:0}
1,exit:{x:50,opacity:0},transition:{ease:"linear",duration:.1},children:[(0,n.jsxs)("div",{className:"editor kluck-background-tile",style:{width:"100%",fontSize:"16px",marginBottom:"10px",borderRadius:"6px",display:"flex",justifyContent:"space-between",height:"36px"},children:[(0,n.jsxs)("div",{className:"kluck-font kluck-h2",style:{padding:"10px",display:"flex",alignItems:"center",gap:"8px"},children:[!L&&(0,n.jsx)(components_HelpIcon,{helpCode:m.helpCode,description:m.description,label:m.label}),"NewTemplate"===m.name&&"Select A Container Type","NewBlock"===m.name&&"Add New Block",!L&&m.label]}),!L&&(0,n.jsxs)(la.Z,{style:{height:"100%"},children:[(0,n.jsxs)(la.Z.Toggle,{className:"kluck-property-dark",style:{height:"100%",fontSize:"14px",border:"none",borderRadius:"6px"},children:["\xa0",b,"\xa0"]}),(0,n.jsxs)(la.Z.Menu,{className:"kluck-property-dark",align:"end",style:{padding:"0px"},children:[(0,n.jsx)(la.Z.Item,{className:"kluck-property-dark",style:{fontSize:"14px"},onClick:()=>j("All"),children:"All"}),m.definitions.map((e,t)=>(0,n.jsx)(la.Z.Item,{className:"kluck-property-dark",style:{fontSize:"14px"},onClick:()=>j(e.label),children:e.label},t))]})]})]}),(0,n.jsxs)("div",{className:"kluck-background-tile",style:{height:"100%",fontSize:"12px",fontFamily:"arial",borderRadius:"6px",zIndex:"1",padding:"10px"},children:[(null==l?void 0:l.blockName)!=="NewBlock"&&(null==l?void 0:l.blockName)!=="NewTemplate"&&(0,n.jsx)(components_CssToggle,{filterType:b,definition:m.definitions,propertyFilter:u,setPropertyFilter:h,darkMode:d}),i&&(0,n.jsxs)("div",{style:{width:"100%",height:"calc(100vh - 226px)",marginTop:"0",backgroundColor:L?"":"var(--color-4)",marginTop:L?"":"10px",borderRadius:"6px",zIndex:"1",overflow:"scroll",paddingBottom:"10px"},children:["Advanced"===u&&"WEBSITE"!==l.blockId&&"PAGE"!==l.blockId&&(0,n.jsx)(property_PropertyBreakpoint,{darkMode:d}),m.definitions[0].definitions&&(0,n.jsx)(n.Fragment,{children:m.definitions.map((e,t)=>{let s=e.definitions.filter(t=>t.grouped&&t.groupTag===e.groupTag),r=e.definitions.filter(e=>!e.grouped),c=[],p=[];s.forEach(e=>{(e.showType===u||"TEMPLATE"===e.inputType||"CHOOSE"===e.inputType)&&-1===c.indexOf(e.showType)&&c.push(e.showType)}),r.forEach(e=>{(e.showType===u||"TEMPLATE"===e.inputType||"CHOOSE"===e.inputType)&&-1===p.indexOf(e.showType)&&p.push(e.showType)});let h=(0,w.v4)();return e.designatedGrouping?(0,n.jsx)(property_PropertyGroup,{definitions:e.definitions.filter(t=>e.label===b||"All"===b),groupLabel:e.groupName,groupShowState:f,onToggleGroup:groupShow,renderProperty:(t,s)=>{if(!compile(null==t?void 0:t.commandText))return null;let r=t.grouped&&t.groupTag===e.groupTag,h=r?c.includes(u):(t.showType===u||"TEMPLATE"===t.inputType||"CHOOSE"===t.inputType)&&p.includes(u);return h?(0,n.jsx)("div",{style:t.showType===u?{zIndex:"1",display:"unset",marginBottom:"5px"}:{zIndex:"1",display:"none"},children:(0,n.jsx)(ls,{block:l,definition:t,blockId:I,params:i,selected:b+" ",onHover:o,onLeave:a,darkMode:d})},"".concat(v.pageId,"_").concat(I,"_").concat(u,"_").concat(t.name,"_").concat(g.value)):null}},t):(0,n.jsx)("div",{onClick:()=>groupShow(h),style:{borderRadius:"8px"},children:r.filter(t=>(t.showType===u||"TEMPLATE"===t.inputType||"CHOOSE"===t.inputType)&&(e.label===b||"All"===b)).map((e,s)=>(0,n.jsx)(n.Fragment,{children:compile(null==e?void 0:e.commandText)&&p.includes(u)&&(0,n.jsx)("div",{className:"kluck-font",style:{zIndex:"1",borderRadius:"8px"},children:(0,n.jsx)("div",{style:{zIndex:"1"},children:(0,n.jsx)(ls,{block:l,definition:e,blockId:I,params:i,selected:b+" ",onHover:o,onLeave:a,darkMode:d})},"".concat(v.pageId,"_").concat(I,"_").concat(u,"_").concat(e.name,"_").concat(g.value))},t)}))},t)})})]})]})]},"bottomSettingsBar"):(0,n.jsx)("div",{className:"kluck-font kluck-h2 kluck-background-tile",style:{margin:"0px 10px 10px 10px",borderRadius:"6px",display:"flex",justifyContent:"space-between",height:"36px"},children:(0,n.jsx)("div",{style:{padding:"6px 12px",display:"flex",alignItems:"center"},children:(0,n.jsx)("div",{style:{height:"auto"},children:"Select Element To Start"})})})})}
1,ld=l(50054);let DeviceIcon=e=>{let{deviceType:t,breakpointsLength:l,darkMode:i}=e;return(null==t?void 0:t.includes("desktop"))&&t.split(" ").length<l?(0,n.jsx)("svg",{viewBox:"0 0 24 24",style:{width:"16px",height:"16px"},children:(0,n.jsx)("path",{fill:i?"white":"black",d:"M21,16H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10V20H8V22H16V20H14V18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2Z"})}):(null==t?void 0:t.includes("mobile"))&&t.split(" ").length<l?(0,n.jsx)("svg",{viewBox:"0 0 24 24",style:{width:"16px",height:"16px"},children:(0,n.jsx)("path",{fill:i?"white":"black",d:"M17,19H7V5H17M17,1H7C5.89,1 5,1.89 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3C19,1.89 18.1,1 17,1Z"})}):(null==t?void 0:t.trim())===""?(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",style:{width:"16px",height:"16px"},children:[(0,n.jsx)("path",{stroke:i?"white":"black",d:"M9.68661 6.31328L6.31328 9.68661C5.87995 9.25328 5.61328 8.65995 5.61328 7.99995C5.61328 6.67995 6.67995 5.61328 7.99995 5.61328C8.65995 5.61328 9.25328 5.87995 9.68661 6.31328Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{stroke:i?"white":"black",d:"M11.8799 3.84657C10.7132 2.96657 9.3799 2.48657 7.9999 2.48657C5.64656 2.48657 3.45323 3.87324 1.92656 6.27324C1.32656 7.21324 1.32656 8.79324 1.92656 9.73324C2.45323 10.5599 3.06656 11.2732 3.73323 11.8466",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{stroke:i?"white":"black",d:"M5.61328 13.0202C6.37328 13.3402 7.17995 13.5135 7.99995 13.5135C10.3533 13.5135 12.5466 12.1269 14.0733 9.72687C14.6733 8.78687 14.6733 7.20686 14.0733 6.26687C13.8533 5.9202 13.6133 5.59353 13.3666 5.28687",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{stroke:i?"white":"black",d:"M10.34 8.4668C10.1666 9.4068 9.39996 10.1735 8.45996 10.3468",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{stroke:i?"white":"black",d:"M6.3135 9.68652L1.3335 14.6665",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{stroke:i?"white":"black",d:"M14.6665 1.33325L9.68652 6.31325",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}):null},BlockActions=e=>{let{onDuplicate:t,onDelete:l}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{onClick:e=>{e.stopPropagation(),t()},style:{marginRight:"5px",cursor:"pointer"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("g",{clipPath:"url(#clip0_8_20)",children:(0,n.jsx)("path",{d:"M10.3333 11.7917V12.375C10.3333 13.8222 9.15558 15 7.70833 15H3.625C2.17775 15 1 13.8222 1 12.375V8.29167C1 6.84442 2.17775 5.66667 3.625 5.66667H4.20833C4.36933 5.66667 4.5 5.79733 4.5 5.95833C4.5 6.11933 4.36933 6.25 4.20833 6.25H3.625C2.49917 6.25 1.58333 7.16583 1.58333 8.29167V12.375C1.58333 13.5008 2.49917 14.4167 3.625 14.4167H7.70833C8.83417 14.4167 9.75 13.5008 9.75 12.375V11.7917C9.75 11.6307 9.88067 11.5 10.0417 11.5C10.2027 11.5 10.3333 11.6307 10.3333 11.7917ZM15 3.625V7.70833C15 9.15558 13.8222 10.3333 12.375 10.3333H8.29167C6.84442 10.3333 5.66667 9.15558 5.66667 7.70833V3.625C5.66667 2.17775 6.84442 1 8.29167 1H12.375C13.8222 1 15 2.17775 15 3.625ZM14.4167 3.625C14.4167 2.49917 13.5008 1.58333 12.375 1.58333H8.29167C7.16583 1.58333 6.25 2.49917 6.25 3.625V7.70833C6.25 8.83417 7.16583 9.75 8.29167 9.75H12.375C13.5008 9.75 14.4167 8.83417 14.4167 7.70833V3.625Z",fill:"white",stroke:"white",strokeWidth:"0.5"})}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_8_20",children:(0,n.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]})}),(0,n.jsx)("div",{onClick:e=>{e.stopPropagation(),l()},style:{marginRight:"5px",cursor:"pointer"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M14 3.98665C11.78 3.76665 9.54667 3.65332 7.32 3.65332C6 3.65332 4.68 3.71999 3.36 3.85332L2 3.98665",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.66663 3.31331L5.81329 2.43998C5.91996 1.80665 5.99996 1.33331 7.12663 1.33331H8.87329C9.99996 1.33331 10.0866 1.83331 10.1866 2.44665L10.3333 3.31331",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.5667 6.09332L12.1334 12.8067C12.06 13.8533 12 14.6667 10.
114 14.6667H5.86002C4.00002 14.6667 3.94002 13.8533 3.86668 12.8067L3.43335 6.09332",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.88672 11H9.10672",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.33337 8.33331H9.66671",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})},broadcastLayerHover=e=>{window.dispatchEvent(new CustomEvent("kluck-layer-hover",{detail:e||null}))},getContainerIcon=(e,t)=>{var l;let i=null==e?void 0:null===(l=e.params)||void 0===l?void 0:l.container;return(null==i?void 0:i.display)==="grid"?t.grid:(null==i?void 0:i.display)==="flex"?t[null==i?void 0:i.flexDirection]:null},BlockRow=e=>{var t;let{child:l,level:i,selectedBlock:o,hovered:s,setHovered:a,selectBlock:r,expanded:d,darkMode:c,breakpoints:u,blockSchemas:p,containerIcons:h,dispatch:v,hasChildren:g}=e,x=null===(t=p[l.blockName])||void 0===t?void 0:t.schema,m=(null==o?void 0:o.blockId)===l.blockId,k=s===(null==l?void 0:l.blockId);return(0,n.jsxs)("div",{"data-blockid":l.blockId,"data-blockname":l.blockName,"data-selector":"block",onMouseOver:()=>{a(null==l?void 0:l.blockId),broadcastLayerHover(null==l?void 0:l.blockId)},onMouseOut:()=>{a(""),broadcastLayerHover(null)},className:"kluck-font kluck-h3 kluck-background-tile-button",onClick:()=>r(l.blockId),style:{borderRadius:"6px",width:"100%",display:"flex",alignItems:"center",marginTop:"5px",padding:"6px 10px",outline:m?"1px solid var(--color-3)":""},children:[(0,n.jsxs)("div",{style:{width:"100%",display:"flex",alignItems:"center",flexWrap:"nowrap",gap:"3px"},children:[(0,n.jsx)("span",{style:{textTransform:"capitalize",paddingLeft:"5px"},children:null==x?void 0:x.label}),getContainerIcon(l,h),(0,n.jsx)(DeviceIcon,{deviceType:l.deviceType,breakpointsLength:u.length,darkMode:c})]}),(m||k)&&(0,n.jsx)(BlockActions,{onDuplicate:()=>v({type:"DUPLICATE_BLOCK",blockId:null==l?void 0:l.blockId}),onDelete:()=>v({type:"DELETE_BLOCK",blockId:null==l?void 0:l.blockId})}),g&&(d!==l.blockId?(0,n.jsx)(t1.Z,{size:"16",color:c?"white":"black",style:{minWidth:"16px",marginLeft:"auto"}}):(0,n.jsx)(t0.Z,{size:"16",color:c?"white":"black",style:{minWidth:"16px",marginLeft:"auto"}}))]})},PageRow=e=>{var t;let{page:l,level:i,selectedBlock:o,hovered:s,setHovered:a,selectBlock:r,expanded:d,darkMode:c,dispatch:u,showExpandArrow:p}=e,h=(null==o?void 0:o.pageId)===(null==l?void 0:l.pageId),v=s===(null==l?void 0:l.pageId);return(0,n.jsxs)("div",{className:"kluck-font kluck-h3",onClick:()=>r(l.pageId,!0),style:{width:"100%",borderRadius:"6px",padding:"6px 10px",fontSize:14-(i+1)/2+"px",backgroundColor:c?"#202427":"#e0e1e3",fontWeight:"300",marginTop:"5px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsx)("span",{className:"kluck-h3",style:{textTransform:"capitalize",paddingLeft:"5px",marginRight:"auto"},children:null==l?void 0:null===(t=l.params)||void 0===t?void 0:t.pageName}),(h||v)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ld.Z,{size:"16",color:c?"white":"black",onClick:()=>u({type:"SELECTED_PAGE_HANDLER",blockPage:l}),style:{minWidth:"20px",cursor:"pointer",margin:"4px 4px 0 0"}}),(0,n.jsx)("div",{onClick:e=>{e.stopPropagation(),u({type:"DELETE_PAGE",pageId:null==l?void 0:l.pageId})},style:{marginRight:"5px",cursor:"pointer"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M14 3.98665C11.78 3.76665 9.54667 3.65332 7.32 3.65332C6 3.65332 4.68 3.71999 3.36 3.85332L2 3.98665",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.66663 3.31331L5.81329 2.43998C5.91996 1.80665 5.99996 1.33331 7.12663 1.33331H8.87329C9.99996 1.33331 10.0866 1.83331 10.1866 2.44665L10.3333 3.31331",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.5667 6.09332L12.1334 12.8067C12.06 13.8533 12 14.6667 10.14 14.6667H5.86002C4.00002 14.6667 3.94002 13.8533 3.86668 12.8067L3.43335 6.09332",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.88672 11H9.10672",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.33337 8.33331H9.66671",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),p&&(d!==(null==l?void 0:l.pageId)?(0,n.jsx)(t1.Z,{size:"16",color:c?"white":"black",style:{minWidth:"16px"}}):(0,n.jsx)(t0.Z,{size:"16",color:c?"white":"black",style:{minWidth:"16px"}}))]})},LayerSelector=e=>{let{level:t,blocks:l,darkMode:i,expandFunction:o,renderedPages:a=new Set,renderedBlocks:d=new Set,blockPath:c=[]}=e,h=(0,s.v9)(e=>e.usersList.breakpoint,p.Z),v=(0,s.v9)(e=>e.usersList.selectedBlock,p.Z),g=(0,s.v9)(e=>e.usersList.breakpoints,p.Z),x=(0,s.v9)(e=>e.usersList.blockSchemas,p.Z),m=(0,s.v9)(e=>e.usersList.kanvas,p.Z),k=(0,s.v9)(e=>e.usersList.selectedPage,p.Z),f=(0,s.v9)(e=>e.usersList.defaultBlocks,p.Z),y=(0,s.v9)(e=>e.usersList.selectedBlockPath,p.Z),b=(0,r.useMemo)(()=>{var e,i;if(0!==t||!k){let e=d.size>0?l.filter(e=>!d.has(e.blockId)):l;return{effectiveBlocks:e,renderedBlocksToPass:d}}let n=(null===(e=k.params)||void 0===e?void 0:e.defaultHeader)==="true"&&f?f.filter(e=>"Header"===e.blockName&&!l.some(t=>t.blockId===e.blockId)&&!d.has(e.blockId)):[],o=(null===(i=k.params)||void 0===i?void 0:i.defaultFooter)==="true"&&f?f.filter(e=>"Footer"===e.blockName&&!l.some(t=>t.blockId===e.blockId)&&!d.has(e.blockId)):[],s=[...n.map(e=>e.blockId),...o.map(e=>e.blockId)];return{effectiveBlocks:[...n,...l,...o],renderedBlocksToPass:new Set([...d,...s])}}
1,[t,l,k,f,d]),w=b.effectiveBlocks,j=b.renderedBlocksToPass,[C,L]=(0,r.useState)(""),[I,S]=(0,r.useState)(""),E=(0,s.I0)(),N={row:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M9.61996 12.0468L13.6666 8.0001L9.61996 3.95343",stroke:"white",strokeWidth:"1.3",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M2.33334 8L13.5533 8",stroke:"white",strokeWidth:"1.3",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),"row-reverse":(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M6.38004 3.95318L2.33337 7.99984L6.38004 12.0465",stroke:"white",strokeWidth:"1.3",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M13.6667 8L2.44666 8",stroke:"white",strokeWidth:"1.3",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),column:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M3.95318 9.62002L7.99984 13.6667L12.0465 9.62002",stroke:"white",strokeWidth:"1.3",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M8 2.33328L8 13.5533",stroke:"white",strokeWidth:"1.3",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),"column-reverse":(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M12.0468 6.38004L8.00016 2.33337L3.95349 6.38004",stroke:"white",strokeWidth:"1.3",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M8 13.6667L8 2.44666",stroke:"white",strokeWidth:"1.3",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),grid:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M5.99967 14.6693H9.99967C13.333 14.6693 14.6663 13.3359 14.6663 10.0026V6.0026C14.6663 2.66927 13.333 1.33594 9.99967 1.33594H5.99967C2.66634 1.33594 1.33301 2.66927 1.33301 6.0026V10.0026C1.33301 13.3359 2.66634 14.6693 5.99967 14.6693Z",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M8 1.33594V14.6693",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M1.33301 8H14.6663",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})},selectBlock=(e,t)=>{C===e&&(t||v.blockId===e)?L(""):L(e),t?E({type:"PAGE_SELECT",pageId:e}):E({type:"BLOCK_SELECT",blockId:e,blockPath:c})},deviceCheck=e=>(null==e?void 0:e.includes(h.value))||(null==e?void 0:e.trim())==="",expand=(e,t)=>{(w.find(t=>t.blockId===e)||t)&&L(e),o&&o()};return(0,r.useEffect)(()=>{v&&w.find(e=>e.blockId===v.blockId)&&expand(v.blockId)},[v]),(0,n.jsx)(lr.E.div,{style:{width:"100%",height:"auto",flexShrink:0,paddingInline:0===t?"10px":"0px"},animate:{x:0,opacity:1},initial:{x:-100,opacity:0},exit:{x:-100,opacity:0},transition:{ease:"linear",duration:.2},children:w.filter(e=>deviceCheck(e.deviceType)).map((e,l)=>{var o,s;return null===(o=x[e.blockName])||void 0===o||o.schema,(0,n.jsxs)("div",{style:{width:"100%"},children:[e.children.filter(e=>deviceCheck(e.deviceType)).length>0&&(0,n.jsxs)("div",{style:{width:"100%",borderRadius:"6px",cursor:"pointer"},children:[(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center"},children:[t>0&&(0,n.jsx)("span",{style:{width:10*t+"px",border:"1px solid var(--color-5)",height:"0px",marginRight:"5px"}}),(0,n.jsx)(BlockRow,{child:e,level:t,selectedBlock:v,hovered:I,setHovered:S,selectBlock:selectBlock,expanded:C,darkMode:i,breakpoints:g,blockSchemas:x,containerIcons:N,dispatch:E,hasChildren:!0})]}),(0,n.jsx)(u.Z,{in:C===e.blockId,children:(0,n.jsx)("div",{children:(0,n.jsx)(LayerSelector,{level:t+1,blocks:e.children,darkMode:i,expandFunction:()=>expand(e.blockId),renderedPages:a,renderedBlocks:j,blockPath:[...c,e.blockId]})})})]}),0===e.children.filter(e=>deviceCheck(e.deviceType)).length&&(0,n.jsxs)("div",{style:{width:"100%",display:"flex",flexDirection:"column",flexWrap:"nowrap",alignItems:"center"},children:[(0,n.jsxs)("div",{style:{width:"100%",display:"flex",alignItems:"center"},children:[t>0&&(0,n.jsx)("span",{style:{width:10*t+"px",border:"1px solid var(--color-5)",height:"0px",marginRight:"5px"}}),(0,n.jsx)(BlockRow,{child:e,level:t,selectedBlock:v,hovered:I,setHovered:S,selectBlock:selectBlock,expanded:C,darkMode:i,breakpoints:g,blockSchemas:x,containerIcons:N,dispatch:E,hasChildren:!1})]}),(null==x?void 0:null===(s=x[e.blockName])||void 0===s?void 0:s.pageDefinitions)&&x[e.blockName].pageDefinitions.filter(e=>(null==e?void 0:e.showLayer)!==!1).map((l,o)=>{let s=m.website.pages.find(t=>t.pageId===e.params[l.name]),r=(null==k?void 0:k.pageId)===(null==s?void 0:s.pageId),d=a.has(null==s?void 0:s.pageId);if(s)return(0,n.jsx)("div",{style:{width:"100%"},children:!(s.blocks.length>0)||d||r?(0,n.jsxs)("div",{className:"kluck-h3",onMouseOver:()=>S(null==s?void 0:s.pageId),onMouseOut:()=>S(""),style:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center"},children:[t>0&&(0,n.jsx)("span",{style:{width:10*t+"px",border:"1px solid var(--color-5)",height:"0px",marginRight:"5px"}}),(0,n.jsx)(PageRow,{page:s,level:t,selectedBlock:v,hovered:I,setHovered:S,selectBlock:selectBlock,expanded:C,darkMode:i,dispatch:E,showExpandArrow:!1}
1)]}):(0,n.jsxs)("div",{style:{width:"100%",borderRadius:"6px",cursor:"pointer"},children:[(0,n.jsxs)("div",{onMouseOver:()=>S(null==s?void 0:s.pageId),onMouseOut:()=>S(""),style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center"},children:[t>0&&(0,n.jsx)("span",{style:{width:10*t+"px",border:"1px solid var(--color-5)",height:"0px",marginRight:"5px"}}),(0,n.jsx)(PageRow,{page:s,level:t,selectedBlock:v,hovered:I,setHovered:S,selectBlock:selectBlock,expanded:C,darkMode:i,dispatch:E,showExpandArrow:!0})]}),(0,n.jsx)(u.Z,{in:C===(null==s?void 0:s.pageId),children:(0,n.jsx)("div",{children:(null==s?void 0:s.blocks)&&Array.isArray(s.blocks)&&(0,n.jsx)(LayerSelector,{level:t+1,blocks:s.blocks,darkMode:i,expandFunction:()=>{(!y||y.includes(e.blockId))&&expand(null==s?void 0:s.pageId,!0)},renderedPages:new Set([...a,null==s?void 0:s.pageId]),renderedBlocks:j,blockPath:[...c,e.blockId]})})})]})},o)})]})]},l)})})};var lc=l(25675),lu=l.n(lc),lp=l(1877),lh=l(34075),lv=l(3819),lg=l(51647),lx=l(11544),lm=l(46237),lk=l(16370),lf=l(4354),components_PublishModal=e=>{let{show:t,setShow:l}=e,i=(0,s.v9)(e=>e.usersList.kanvas,p.Z),o=(0,s.v9)(e=>e.usersList.urls,p.Z),a=(0,s.v9)(e=>e.usersList.globalClient,p.Z),c=(0,s.I0)(),[u,h]=(0,r.useState)(void 0),[v,g]=(0,r.useState)([]),[x,m]=(0,r.useState)(""),[k,f]=(0,r.useState)(!1),[y,b]=(0,r.useState)(!1),[j]=(0,tJ.Z)(),{parseKanvas:C}=(0,lk.ZP)(),L=a?"00000000-0000-0000-0000-000000000000":i.clientId;(0,r.useEffect)(()=>{void 0===u&&j({method:"GET",url:"".concat(o.rest,"/domains/").concat(L,"/").concat(i.kanvasId),log:{level:"ERROR",logger:"PublishModal.useEffect",sendLogs:!1}}).then(e=>{h(e.data),g(e.data)})},[t]);let createCustomDomain=()=>{if(""===x){c({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:"Please enter a domain name",autoCloseable:!0,type:"warning"}});return}if(u.find(e=>e.domainName===x)){c({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:"Domain already exists",autoCloseable:!0,type:"warning"}});return}h([...u,{domainId:(0,w.v4)(),domainName:x,clientId:L,kanvasId:i.kanvasId}]),f(!1),m("")},addDomainHandler=e=>{v.find(t=>t.domainId===e.domainId)?g([...v.filter(t=>t.domainId!==e.domainId)]):g([...v,e])},publish=async()=>{if(!y){if(v.length>0){b(!0);let a=[];for(let r=0;r<v.length;r++){var e,t,n,s;let d={...C(i),domainId:v[r].domainId,domainName:v[r].domainName};(null===(s=d.website)||void 0===s?void 0:null===(n=s.settings)||void 0===n?void 0:null===(t=n.thumbnailUrl)||void 0===t?void 0:null===(e=t.startsWith)||void 0===e?void 0:e.call(t,"data:"))&&delete d.website.settings.thumbnailUrl,d.website=JSON.stringify(d.website),a.push(j({method:"POST",url:"".concat(o.rest,"/domain/publish/").concat(L),data:d,log:{level:"ERROR",logger:"PublishModal.createRandomDomain",sendLogs:!1}}).then(()=>{var e,t,i;l(!1),c({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:"Publish To ".concat(null===(e=v[r])||void 0===e?void 0:e.domainName," Successful"),autoCloseable:!0,type:"success"}}),(0,lf.i)(null===(t=v[r])||void 0===t?void 0:t.domainName)&&fetch("/api/seo-search-console",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:null===(i=v[r])||void 0===i?void 0:i.domainName})}).catch(()=>{})}).catch(e=>{var t;console.log("error",e),c({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:"Publish To ".concat(null===(t=v[r])||void 0===t?void 0:t.domainName," Failed"),autoCloseable:!0,type:"error"}})}))}await Promise.allSettled(a),b(!1)}else c({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:"Please select 1 or more domains to publish",autoCloseable:!0,type:"warning"}})}},deleteHandler=(e,t)=>{e.stopPropagation(),j({method:"DELETE",url:"".concat(o.rest,"/domains/").concat(t.domainId,"/clients/").concat(L),log:{level:"ERROR",logger:"PublishModal.deleteHandler",sendLogs:!1}}).then(()=>{h(u.filter(e=>e.domainId!==t.domainId)),g(v.filter(e=>e.domainId!==t.domainId)),c({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:"".concat(t.domainName," deleted successfully"),autoCloseable:!0,type:"success"}})}).catch(()=>c({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:"".concat(t.domainName," delete unsuccessful"),autoCloseable:!0,type:"error"}}))},I={height:"36px",padding:"17px 30px",borderRadius:"4px",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",fontFamily:"Urbanist"},S={maxWidth:"100%",overflowWrap:"anywhere",fontSize:"13px",fontWeight:400,color:"var(--color-3-light)"};return(0,n.jsxs)(d.Z,{show:!0,className:"editorModal",backdropClassName:"editorModal",contentClassName:"editorModalContent",centered:!0,style:{backgroundColor:"rgba(var(--color-6), 0.8)",color:"var(--white)"},onHide:()=>l(!1),children:[(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row",backgroundColor:"var(--color-4)",paddingTop:"16px",paddingInline:"20px",justifyContent:"space-between"},children:[(0,n.jsx)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:(0,n.jsx)("div",{className:"kluck-font kluck-header",style:{color:"var(--white)"},children:"Domain Manager"})}),(0,n.jsx)("div",{onClick:()=>l(!1),type:"button",children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",children:[(0,n.jsx)("path",{d:"M5.75 5.75006L17.2499 17.25",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.75006 17.25L17.25 5.75006",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,n.jsx)("div",{style:{backgroundColor:"var(--color-4)",padding:"0 20px",paddingTop:"10px"},children:(0,n.jsx)("div",{style:{opacity:".1",borderTop:"1px solid var(--color-1)"}})}),(0,n.jsxs)(d.Z.Body,{style:{backgroundColor:"var(--color-4)",color:"var(--white)",padding:"20px",fontSize:"14px"},children:[(0,n.jsxs)(lx.M,{mode:"sync",children:[(0,n.jsxs)("div",{className:"kluck-font kluck-h5-bold",style:{display:"flex",alignItems:"center",gap:"7px"},children:[(0,n.jsxs)("svg",{onClick:()=>{v.length===u.length?g([]):g([...u])},xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{cursor:"pointer"},children:[v.length===(null==u?void 0:u.length)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{fill:"#259150",d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{stroke:"white",d:"M5.8125 8.99945L7.935 11.122L12.1875 6.87695",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),v.length!==(null==u?void 0:u.length)&&(0,n.jsx)("path",{d:"M11.25 15.85H6.75C4.93911 15.85 3.84058 15.4838 3.17837 14.8216C2.51616 14.1594 2.15 13.0609 2.15 11.25V6.75C2.15 4.93911 2.51616 3.84058 3.17837 3.17837C3.84058 2.51616 4.93911 2.15 6.75 2.15H11.25C13.0609 2.15 14.1594 2.51616 14.8216 3.17837C15.4838 3.84058 15.85 4.93911 15.85 6.75V11.25C15.85 13.0609 15.4838 14.1594 14.8216 14.8216C14.1594 15.4838 13.0609 15.85 11.25 15.85Z",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),"Select All"]}),(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",marginTop:"6px"},children:void 0!==u&&u.map((e,t)=>(0,n.jsx)(lr.E.div,{initial:{y:-45},animate:{y:0},style:{width:"calc((100% - 20px) / 3)"},children:(0,n.jsxs)("div",{onClick:()=>addDomainHandler(e),style:{position:"relative",width:"100%",padding:"12px 10px",borderRadius:"4px",cursor:"pointer",background:"var(--color-5)"},children:[(0,n.jsx)(lm.Z,{size:"16px",onClick:t=>deleteHandler(t,e),style:{position:"absolute",inset:"5px 5px auto auto"}}),(0,n.jsxs)("div",{className:"kluck-font kluck-h4-light",style:{width:"100%",display:"flex",flexDirection:"column",alignItems:"flex-start"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",ga
1p:"5px",fontSize:"18px",fontWeight:"400",width:"100%",paddingRight:"16px"},children:[(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{flexShrink:0},children:[v.includes(e)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{fill:"#259150",d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{stroke:"white",d:"M5.8125 8.99945L7.935 11.122L12.1875 6.87695",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),!v.includes(e)&&(0,n.jsx)("path",{d:"M11.25 15.85H6.75C4.93911 15.85 3.84058 15.4838 3.17837 14.8216C2.51616 14.1594 2.15 13.0609 2.15 11.25V6.75C2.15 4.93911 2.51616 3.84058 3.17837 3.17837C3.84058 2.51616 4.93911 2.15 6.75 2.15H11.25C13.0609 2.15 14.1594 2.51616 14.8216 3.17837C15.4838 3.84058 15.85 4.93911 15.85 6.75V11.25C15.85 13.0609 15.4838 14.1594 14.8216 14.8216C14.1594 15.4838 13.0609 15.85 11.25 15.85Z",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,n.jsx)("span",{style:{minWidth:0,overflowWrap:"anywhere",lineHeight:"18px"},children:e.domainName})]}),(0,n.jsx)("a",{href:"https://".concat(e.domainName),target:"_blank",rel:"noreferrer",onClick:e=>e.stopPropagation(),style:S,children:e.domainName}),(0,n.jsxs)("a",{href:"https://w.kluck.to/".concat(e.domainName),target:"_blank",rel:"noreferrer",onClick:e=>e.stopPropagation(),style:S,children:["w.kluck.to/",e.domainName]})]})]})},t))})]}),k&&(0,n.jsx)("input",{className:"kluck-font kluckSearchInput",onChange:e=>m(e.target.value),value:x,style:{width:"100%",height:"36px",textAlign:"center",borderRadius:"4px",marginTop:"10px",border:"none",outline:"none",backgroundColor:"var(--white)",color:"var(--color-6)",fontSize:"12px",fontWeight:500},placeholder:"Enter Your Domain..."}),(0,n.jsxs)("div",{className:"kluck-h3",style:{display:"flex",gap:"10px",marginTop:k?"10px":"18px"},children:[(0,n.jsx)("div",{onClick:()=>k?f(!1):l(!1),style:{...I,border:"1px solid var(--white)",marginRight:"auto"},children:"Cancel"}),(0,n.jsx)("div",{onClick:()=>{j({method:"GET",url:"".concat(o.rest,"/domain/random/").concat(L),log:{level:"ERROR",logger:"PublishModal.createRandomDomain",sendLogs:!1}}).then(e=>{h([...u,{domainId:(0,w.v4)(),domainName:e.data.slice(e.data.indexOf("w.kluck.to/")+11),clientId:L,kanvasId:i.kanvasId}])})},style:{...I,background:"var(--color-8)",color:"var(--color-4)"},children:"Generate Random Domain"}),(0,n.jsx)("div",{onClick:()=>k?createCustomDomain():f(!0),style:{...I,background:"var(--color-3)"},children:"Create New Domain"}),(0,n.jsx)("div",{onClick:publish,style:{...I,background:"var(--color-7)",...y?{pointerEvents:"none",opacity:.7}:{}},children:y?(0,n.jsx)("div",{className:"animationSpinner",style:{width:"16px",height:"16px",borderRadius:"50%",border:"2px solid rgba(255, 255, 255, 0.15)",borderTopColor:"var(--white)"}}):"Publish"})]})]})]})},EditorComponents_SaveAndPublish=e=>{var t,l;let{onSaveHandler:i,showPublish:o,setShowPublish:s}=e,a=(0,r.useRef)(null),[d,c]=(0,r.useState)(!1),[u,p]=(0,r.useState)(1),h=d?"kluck-success-active":"kluck-success",handleMenuItemClick=async(e,t)=>{switch(p(t),c(!1),e.target.innerText){case"Save":await i();break;case"Publish":await i(!0);break;case"Publish":await s(!0)}};return(0,n.jsxs)(n.Fragment,{children:[o&&(0,n.jsx)(components_PublishModal,{show:o,setShow:s}),(0,n.jsxs)(lp.Z,{ref:a,variant:"solid",className:h,"aria-label":"split button",style:{width:"100%",height:"36px",outline:"none",border:"none"},children:[(0,n.jsx)(tz.Z,{onClick:()=>handleMenuItemClick(event,u),className:"".concat(h," kluck-font kluck-h1"),style:{width:"100%",textAlign:"left",outline:"none",border:"none",borderRadius:"6px",textAlign:"center"},children:["","Save","Publish","Publish"][u]}),(0,n.jsx)(lh.ZP,{className:"".concat(h," kluck-font kluck-h1"),style:{borderLeft:"1px solid #292D32",minWidth:"36px",width:"36px",height:"36px",outline:"none",display:"flex",justifyContent:"center",alignItems:"center"},"aria-controls":d?"split-button-menu":void 0,"aria-expanded":d?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onMouseEnter:()=>c(!0),onClick:()=>c(!0),children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,n.jsx)("g",{id:"arrow-down",children:(0,n.jsx)("path",{id:"Vector",d:"M2.72027 10.0332L7.06694 5.68654C7.58027 5.1732 8.42027 5.1732 8.93361 5.68654L13.2803 10.0332",stroke:"white",strokeWidth:"1.3",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),(0,n.jsxs)(lv.Z,{open:d,className:"kluck-font kluck-h1 kluck-success-active",onClose:()=>c(!d),onMouseLeave:()=>c(!d),style:{zIndex:"1070",width:null==a?void 0:null===(l=a.current)||void 0===l?void 0:null===(t=l.getBoundingClientRect())||void 0===t?void 0:t.width,border:"none",height:"72px",padding:"0px",boxShadow:"none"},anchorEl:a.current,children:[(0,n.jsx)(lg.Z,{className:"kluck-font kluck-h1 kluck-success-active",style:{height:"36px",outline:"none"},selected:1===u,onClick:e=>handleMenuItemClick(e,1),children:"Save"},"Save"),(0,n.jsx)(lg.Z,{className:"kluck-font kluck-h1 kluck-success-active",style:{height:"36px",outline:"none"},selected:2===u,onClick:e=>handleMenuItemClick(e,2),children:"Publish"},"Publish"),!1]})]})},ly=l(9111),lb=l(16467),EditorComponents_UndoAndRedo=()=>{let e=(0,s.I0)();return(0,n.jsxs)(lp.Z,{variant:"solid",className:"kluck-success",style:{width:"72px",height:"36px"},children:[(0,n.jsx)(lh.ZP,{onClick:()=>e({type:"REPLACE_KANVAS",action:"undo"}),className:"kluck-utility kluck-font kluck-h1",style:{borderRight:"1px solid #292D32",height:"36px",width:"36px"},children:(0,n.jsx)(ly.Z,{size:"16"})}),(0,n.jsx)(lh.ZP,{onClick:()=>e({type:"REPLACE_KANVAS",action:"redo"}),className:"kluck-utility kluck-font kluck-h1",style:{borderLeft:"1px solid #292D32",height:"36px",width:"36px"},children:(0,n.jsx)(lb.Z,{size:"16"})})]})},lw=l(28688),lj=l(13720),lC=l(99398);let CheckTick=e=>{let{checked:t}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{width:"18px",minWidth:"18px",height:"18px"},children:(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",fill:t?"var(--color-7)":"",stroke:t?"var(--color-7)":"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),t&&(0,n.jsx)("path",{d:"M5.8125 9L7.935 11.1225L12.1875 6.8775",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})};var components_PageTransferModal=e=>{let{show:t,onHide:l}=e,i=(0,s.v9)(e=>e.usersList.kanvas,p.Z),o=(0,s.v9)(e=>e.usersList.urls,p.Z),a=(0,s.v9)(e=>e.usersList.builderUser,p.Z),c=(0,s.v9)(e=>e.usersList.blockSchemas,p.Z),u=(0,s.v9)(e=>e.usersList.breakpoints,p.Z),[h,v]=(0,r.useState)([]),[g,x]=(0,r.useState)(null),[m,k]=(0,r.useState)([]),[f,y]=(0,r.useState)(null),[b,w]=(0,r.useState)(null),[j,C]=(0,r.useState)([]),[L,I]=(0,r.useState)([]),[S,E]=(0,r.useState)(!1),[N,T]=(0,r.useState)(!1),[M,D]=(0,r.useState)(!1),[P,H]=(0,r.useState)(!1),B=(0,s.I0)(),[Z]=(0,tJ.Z)(),R=(0,l
1C.Z)(),A=(null==a?void 0:a.globalUser)===!0,getKanvasName=e=>{try{return JSON.parse(e.website).name}catch(l){var t;return(null==e?void 0:e.name)||(null==e?void 0:null===(t=e.website)||void 0===t?void 0:t.name)||(null==e?void 0:e.domainName)||(null==e?void 0:e.kanvasId)}};(0,r.useEffect)(()=>{t&&Z({method:"GET",url:"".concat(o.rest,"/clients"),log:{level:"ERROR",logger:"PageTransferModal.getClients",sendLogs:!0}}).then(e=>{let t=e.data.filter(e=>"00000000-0000-0000-0000-000000000000"!==e.clientId||A);t.sort((e,t)=>(e.clientName||"").localeCompare(t.clientName||"")),v(t),x(t.find(e=>e.clientId===i.clientId)||t[0]||null)})},[t]),(0,r.useEffect)(()=>{t&&(null==g?void 0:g.clientId)&&(D(!0),k([]),y(null),w(null),C([]),I([]),Z({method:"GET",url:"".concat(o.rest,"/kanvass/pageable/clients/").concat(g.clientId),params:{page:0,size:100,search:"*",sort:""},log:{level:"ERROR",logger:"PageTransferModal.getKanvases",sendLogs:!0}}).then(e=>{var t;let l=(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.content)||[];l.sort((e,t)=>(getKanvasName(e)||"").localeCompare(getKanvasName(t)||"")),k(l),y(l[0]||null),D(!1)}).catch(()=>D(!1)))},[null==g?void 0:g.clientId,t]),(0,r.useEffect)(()=>{t&&(null==f?void 0:f.kanvasId)&&(H(!0),w(null),C([]),I([]),Z({method:"GET",url:"".concat(o.rest,"/kanvass/").concat(f.kanvasId),log:{level:"ERROR",logger:"PageTransferModal.getKanvas",sendLogs:!0}}).then(e=>{let t=e.data,l="string"==typeof t.website?JSON.parse(t.website):t.website;w({...t,website:l}),C((null==l?void 0:l.pages)||[]),H(!1)}).catch(()=>H(!1)))},[null==f?void 0:f.kanvasId,t]);let V=j.length>0&&L.length===j.length,togglePage=e=>{I(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},tileStyle=e=>({height:"32px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px",outline:e?"1px solid var(--white)":"1px solid rgba(255, 255, 255, 0.10)",borderRadius:"4px",cursor:"pointer",backgroundColor:e?"var(--color-2)":"var(--color-5)",color:"var(--white)",fontSize:"12px",padding:"5px 10px"});return(0,n.jsxs)(d.Z,{className:"editorModal",backdropClassName:"editorModal",contentClassName:"editorModalContent",centered:!0,style:{backgroundColor:"rgba(var(--color-6), 0.8)",color:"var(--white)"},show:t,onHide:l,children:[(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row",backgroundColor:"var(--color-4)",paddingTop:"16px",paddingInline:"20px",justifyContent:"space-between"},children:[(0,n.jsx)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:(0,n.jsx)("div",{className:"kluck-font kluck-header",style:{color:"var(--white)"},children:"Transfer Pages"})}),(0,n.jsx)("div",{onClick:()=>l(),type:"button",style:{cursor:"pointer"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",children:[(0,n.jsx)("path",{d:"M5.75 5.75006L17.2499 17.25",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.75006 17.25L17.25 5.75006",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,n.jsx)("div",{style:{backgroundColor:"var(--color-4)"},children:(0,n.jsx)("hr",{style:{marginInline:"21px",opacity:".1",color:"var(--color-1)"}})}),(0,n.jsxs)(d.Z.Body,{style:{backgroundColor:"var(--color-4)",color:"var(--white)",padding:"20px",fontSize:"14px",maxHeight:"70vh",overflow:"auto"},children:[A&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"kluck-font kluck-h1",style:{textAlign:"left"},children:"Client"}),(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",margin:"6px 0 16px",gap:"10px"},children:h.map((e,t)=>{let l=(null==g?void 0:g.clientId)===e.clientId;return(0,n.jsx)("div",{title:e.clientName,className:"kluck-font",onClick:()=>x(e),style:{...tileStyle(l),width:"19%"},children:(0,n.jsx)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",fontWeight:"bold",fontSize:"13px"},children:e.clientName})},t)})})]}),(0,n.jsx)("div",{className:"kluck-font kluck-h1",style:{textAlign:"left"},children:"Site"}),(0,n.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",margin:"6px 0 16px",gap:"10px"},children:[M&&(0,n.jsx)("div",{className:"kluck-font kluck-h3",style:{opacity:.7},children:"Loading sites..."}),!M&&0===m.length&&(0,n.jsx)("div",{className:"kluck-font kluck-h3",style:{opacity:.7},children:"No sites found for this client."}),!M&&m.map((e,t)=>{let l=(null==f?void 0:f.kanvasId)===e.kanvasId;
1return(0,n.jsx)("div",{title:getKanvasName(e),className:"kluck-font",onClick:()=>y(e),style:{...tileStyle(l),width:"19%"},children:(0,n.jsx)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",fontWeight:"bold",fontSize:"13px"},children:getKanvasName(e)})},t)})]}),(0,n.jsx)("div",{className:"kluck-font kluck-h1",style:{textAlign:"left"},children:"Pages"}),P&&(0,n.jsx)("div",{className:"kluck-font kluck-h3",style:{opacity:.7,margin:"6px 0"},children:"Loading pages..."}),!P&&j.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{onClick:()=>{V?I([]):I(j.map(e=>e.pageId))},className:"kluck-font kluck-nav",style:{display:"flex",alignItems:"center",gap:"8px",margin:"6px 0 10px",cursor:"pointer",fontWeight:"bold",fontSize:"13px"},children:[(0,n.jsx)(CheckTick,{checked:V}),(0,n.jsx)("span",{children:"Select All"})]}),(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",margin:"6px 0 16px",gap:"10px"},children:j.map((e,t)=>{var l,i;let o=L.includes(e.pageId);return(0,n.jsxs)("div",{title:null===(l=e.params)||void 0===l?void 0:l.pageName,className:"kluck-font",onClick:()=>togglePage(e.pageId),style:{...tileStyle(o),width:"19%"},children:[(0,n.jsx)(CheckTick,{checked:o}),(0,n.jsx)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,minWidth:0,fontWeight:"bold",fontSize:"13px"},children:null===(i=e.params)||void 0===i?void 0:i.pageName})]},t)})})]}),!P&&f&&0===j.length&&(0,n.jsx)("div",{className:"kluck-font kluck-h3",style:{opacity:.7,margin:"6px 0"},children:"No pages found for this site."}),(0,n.jsx)("div",{style:{backgroundColor:"var(--color-4)",marginTop:"10px"},children:(0,n.jsx)("hr",{style:{opacity:".1",color:"var(--color-1)"}})}),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"10px",marginTop:"10px"},children:[(0,n.jsxs)("div",{onClick:()=>E(e=>!e),className:"kluck-font kluck-nav",style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",fontSize:"13px"},children:[(0,n.jsx)(CheckTick,{checked:S}),(0,n.jsx)("span",{children:"Copy linked pages"})]}),(0,n.jsxs)("div",{onClick:()=>T(e=>!e),className:"kluck-font kluck-nav",style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",fontSize:"13px"},children:[(0,n.jsx)(CheckTick,{checked:N}),(0,n.jsx)("span",{children:"Copy over Palette Colors"})]})]}),(0,n.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"16px"},children:(0,n.jsx)("div",{onClick:()=>{if(!b||0===L.length)return;let e=j.filter(e=>L.includes(e.pageId));if(S){let t=[],parseBlock=(e,l)=>{for(let l=0;l<u.length;l++){var i,n;let o=(null===(i=c[e.blockName])||void 0===i?void 0:i.pageDefinitions)||[];for(let i=0;i<o.length;i++){let s=null===(n=e[u[l].key])||void 0===n?void 0:n[o[i].name];if(s){let e=j.find(e=>e.pageId===s);e&&!t.includes(e.pageId)&&(t.push(e.pageId),e.blocks.forEach(t=>parseBlock(t,e)))}}}for(let t=0;t<e.children.length;t++)parseBlock(e.children[t],l)};for(let t=0;t<e.length;t++)for(let l=0;l<e[t].blocks.length;l++)parseBlock(e[t].blocks[l]);for(let l=0;l<t.length;l++){let i=j.find(e=>e.pageId===t[l]);i&&!e.find(e=>e.pageId===i.pageId)&&e.push(i)}}for(let t=0;t<e.length;t++)e[t].changes=[],e[t].params.templatePage="true";let t=R(JSON.parse(JSON.stringify(e)));if(N){var n;let e=(null===(n=b.website.settings)||void 0===n?void 0:n.paletteColors)||[];for(let t=0;t<e.length;t++){let l=e[t];i.website.settings.paletteColors||(i.website.settings.paletteColors=[]),i.website.settings.paletteColors.find(e=>e.label===l.label)||i.website.settings.paletteColors.push(l)}}B({type:"ADD_PAGES",pages:t}),l()},className:"kluck-font kluck-h2 kluck-success",style:{display:"flex",justifyContent:"center",alignItems:"center",padding:"10px 24px",borderRadius:"6px",cursor:0===L.length?"not-allowed":"pointer",opacity:0===L.length?.5:1},children:(0,n.jsx)("span",{children:"Transfer"})})})]})]})},components_KluckFilterTabs=e=>{let{tabs:t,value:l,onChange:i,style:o}=e;return(0,n.jsx)("div",{className:"kluckScrollArea",style:{display:"flex",gap:"10px",width:"100%",overflowX:"auto",overflowY:"hidden",...o},children:t.map(e=>(0,n.jsx)("div",{title:e,onClick:()=>i(e),className:"kluck-font kluck-h4-light ".concat(e===l?"kluck-warning":"kluck-background-tile-button"),style:{flex:"1 0 0",minWidth:"".concat(110,"px"),maxWidth:"".concat(180,"px"),height:"23px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",cursor:"pointer",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",padding:"0 16px"},children:e},e))})};let stripTags=e=>String(e).replace(/{{[^}]*}}/g," ").replace(/<[^>]+>/g," ").replace(/&[a-z#0-9]+;/gi," ").replace(/\s+/g," ").trim(),walkBlocks=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(Array.isArray(e))for(let i of e)i&&"object"==typeof i&&(t(i,{...i.params||{},...i.desktopParams||{}},l),walkBlocks(i.children,t,[...l,i]))},hasText=e=>"string"==typeof e&&e.trim().length>0,toCdnUrl=e=>"string"==typeof e?e.replace("https://kluck.s3.amazonaws.com/","https://cdn.getkluck.com/"):"",lL={pass:"#39c07c",warn:"#f5a623",fail:"#ff6b6b",info:"#8a8f98"},collectPageImages=e=>{let t=[];return walkBlocks(null==e?void 0:e.blocks,(e,l,i)=>{let n="true"===l.customImageBool?l.customImage:l.image,o=i.map(e=>e.blockName);"Image"===e.blockName?t.push({blockId:e.blockId,blockName:e.blockName,kind:"Image block",altParam:"altText",alt:hasText(l.altText)?l.altText:"",src:toCdnUrl(n),path:o}):"Container"===e.blockName&&"true"!==l.backgroundImageBool&&l.backgroundImage&&hasText(n)&&t.push({blockId:e.blockId,blockName:e.blockName,kind:"Container background",altParam:"imageAlt",alt:hasText(l.imageAlt)?l.imageAlt:"",src:toCdnUrl(n),path:o})}),t};var seoScore=(e,t,l)=>{var i;let n=(null==e?void 0:e.params)||{},o="false"!==n.useSEO;if("false"===n.indexSEO)return{color:lL.info,checks:[{label:"Excluded from search results (noindex)",status:"info"}],images:[]};let s=[],a=o&&n.metaTitle||"";a?a.length>60?s.push({label:"Meta title is ".concat(a.length," characters (aim for 60 or fewer)"),status:"warn"}):s.push({label:"Meta title set",status:"pass"}):s.push({label:'No custom meta title — using the "'.concat(n.pageName||"Page"," | ").concat(l,'" fallback'),status:"warn"});let r=o&&n.metaDescription||(null==t?void 0:t.description)||"";r?r.length<50||r.length>160?s.push({label:"Meta description is ".concat(r.length," characters (aim for 50–160)"),status:"warn"}):s.push({label:"Meta description set",status:"pass"}
1):s.push({label:"No meta description — Google will pick its own text",status:"fail"});let d=0;walkBlocks(null==e?void 0:e.blocks,(e,t)=>{"Text"===e.blockName&&t.html&&(d+=stripTags(t.html).split(" ").filter(Boolean).length)}),d>=40?s.push({label:"Crawlable text: ~".concat(d," words"),status:"pass"}):d>0?s.push({label:"Only ~".concat(d," words of crawlable text (aim for 40+)"),status:"warn"}):s.push({label:"No crawlable text on this page",status:"fail"});let c=collectPageImages(e),u=c.filter(e=>!e.alt).length;if(c.length>0){let e="image".concat(1===c.length?"":"s");0===u?s.push({label:"Alt text set on all ".concat(c.length," ").concat(e),status:"pass",action:"alt"}):s.push({label:"".concat(u," of ").concat(c.length," ").concat(e," missing alt text"),status:"warn",action:"alt"})}let p=o&&n.ogImage||(null==t?void 0:null===(i=t.SEO)||void 0===i?void 0:i.socialMediaShareImageUrl)||(null==t?void 0:t.thumbnailUrl)||"";p&&!String(p).startsWith("data:")?s.push({label:"Social share image available",status:"pass"}):s.push({label:"No social share image",status:"warn"});let h=s.some(e=>"fail"===e.status)?lL.fail:s.some(e=>"warn"===e.status)?lL.warn:lL.pass;return{color:h,checks:s,images:c}};let lI=["Restaurant","FoodEstablishment","BarOrPub","CafeOrCoffeeShop","Bakery","LocalBusiness","Organization"],lS=[{value:"Restaurant",label:"Restaurant"},{value:"FoodEstablishment",label:"Food Establishment"},{value:"BarOrPub",label:"Bar / Pub"},{value:"CafeOrCoffeeShop",label:"Caf\xe9 / Coffee Shop"},{value:"Bakery",label:"Bakery"},{value:"LocalBusiness",label:"Local Business"}],lE="kluck-background-tile kluck-h4 kluck-font",lN={width:"100%",border:"none",outline:"none",padding:"8px 10px",borderRadius:"4px"},lT="kluck-font kluck-h4",lM={color:"var(--white)",marginBottom:"6px"},lD={color:"var(--white)",margin:"10px 0 2px"},CloseIcon=e=>(0,n.jsx)("div",{onClick:e.onClick,type:"button",style:{cursor:"pointer",display:"flex",flexShrink:0},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",children:[(0,n.jsx)("path",{d:"M5.75 5.75006L17.2499 17.25",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.75006 17.25L17.25 5.75006",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),DraftInput=e=>{let{value:t,placeholder:l,counterMax:i,textarea:o,onCommit:s}=e,[a,d]=(0,r.useState)(null!=t?t:"");return(0,r.useEffect)(()=>{d(null!=t?t:"")},[t]),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",width:"100%"},children:[(0,n.jsx)(o?"textarea":"input",{className:lE,value:a,placeholder:l,onChange:e=>d(e.target.value),onBlur:()=>{a!==(null!=t?t:"")&&s(a)},onKeyDown:e=>{o||"Enter"!==e.key||e.target.blur()},rows:o?3:void 0,style:{...lN,resize:o?"vertical":void 0}}),i>0&&(0,n.jsxs)("span",{className:"kluck-font",style:{fontSize:"11px",color:((null==a?void 0:a.length)||0)>i?"#ff6b6b":"var(--color-1)",opacity:".65",alignSelf:"flex-end",marginTop:"3px"},children:[(null==a?void 0:a.length)||0,"/",i]})]})},ImageField=e=>{let{value:t,onOpenAssets:l,onClear:i}=e;return(0,n.jsxs)("div",{className:lE,style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"stretch",borderRadius:"4px",overflow:"hidden",padding:0},children:[(0,n.jsx)("div",{onClick:l,style:{flex:1,minWidth:0,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",padding:"8px 10px",cursor:"pointer"},children:t?t.slice(t.lastIndexOf("/")+1):"Choose from Assets"}),t&&(0,n.jsx)("div",{onClick:i,title:"Remove",style:{minWidth:"32px",width:"32px",display:"flex",justifyContent:"center",alignItems:"center",background:"var(--color-2)",cursor:"pointer"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"13px",height:"13px"},viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M2 2L14 14",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M14 2L2 14",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round"})]})})]})},SnippetPreview=e=>{let{domain:t,page:l,isHome:i,siteName:o,siteDescription:s}=e,a=(null==l?void 0:l.params)||{},r="false"!==a.useSEO,d=a.pageName||"",c=r&&a.metaTitle||(i||!d?o:"".concat(d," | ").concat(o))||d,u=r&&(a.metaDescription||a.description)||s||"",p=i||!d?"":"/"+encodeURIComponent(d.split(" ").join("").toLowerCase()),clip=(e,t)=>(null==e?void 0:e.length)>t?e.slice(0,t-1).trimEnd()+"…":e;return(0,n.jsxs)("div",{style:{borderRadius:"6px",padding:"14px 18px",background:"var(--white)",marginBottom:"16
1px",flexShrink:0},children:[(0,n.jsxs)("div",{style:{fontSize:"12px",color:"#202124",fontFamily:"arial, sans-serif"},children:[t,p]}),(0,n.jsx)("div",{style:{fontSize:"19px",color:"#1a0dab",fontFamily:"arial, sans-serif",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",margin:"2px 0"},children:clip(c,70)||"Untitled page"}),(0,n.jsx)("div",{style:{fontSize:"13px",color:"#4d5156",fontFamily:"arial, sans-serif"},children:clip(u,170)||"No description yet — Google will pick its own text from the page."})]})},AltThumb=e=>{let{src:t}=e,l=!t||t.includes("{");return(0,n.jsx)("div",{style:{width:"96px",height:"68px",flexShrink:0,borderRadius:"4px",overflow:"hidden",background:"var(--color-5)",display:"flex",alignItems:"center",justifyContent:"center"},children:l?(0,n.jsx)("span",{className:"kluck-font",style:{fontSize:"10px",color:"var(--white)",opacity:.55,textAlign:"center",padding:"0 6px"},children:"Dynamic image"}):(0,n.jsx)("img",{src:t,alt:"",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})})},AltRow=e=>{let{item:t,kindLabel:l,pathLabel:i,onCommit:o,onSelect:s}=e;return(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"14px",padding:"10px",borderRadius:"6px",flexShrink:0,background:"var(--color-6)"},children:[(0,n.jsx)(AltThumb,{src:t.src}),(0,n.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"6px"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",color:"var(--white)",minWidth:0},children:[(0,n.jsx)("span",{style:{width:"8px",height:"8px",borderRadius:"50%",background:t.alt?lL.pass:lL.warn,flexShrink:0}}),(0,n.jsx)("span",{className:"kluck-font kluck-h4",style:{whiteSpace:"nowrap"},children:l}),(0,n.jsx)("span",{className:"kluck-font kluck-h4-light",title:i,style:{opacity:.55,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i})]}),(0,n.jsx)(DraftInput,{value:t.alt,placeholder:"Describe what this image shows",onCommit:o},t.blockId)]}),(0,n.jsx)("div",{onClick:s,title:"Close the SEO Manager and select this block on the canvas",className:"kluck-font kluck-h4 kluck-background-tile-button",style:{padding:"7px 12px",borderRadius:"4px",cursor:"pointer",whiteSpace:"nowrap",flexShrink:0,outline:"1px solid rgba(255,255,255,.12)"},children:"Select in editor"})]})};var components_SeoManager=e=>{var t,l,i,o,c;let{show:u,onHide:h}=e,v=(0,s.v9)(e=>e.usersList.kanvas,p.Z),g=(0,s.v9)(e=>e.usersList.editorRerender),x=(0,s.v9)(e=>e.usersList.selectedPage,p.Z),m=(0,s.v9)(e=>e.usersList.blockSchemas,p.Z),f=(0,s.I0)(),[y,b]=(0,r.useState)("Pages"),[w,j]=(0,r.useState)("SEO On"),[C,L]=(0,r.useState)(null),[I,S]=(0,r.useState)(null),[E,N]=(0,r.useState)(!1);(0,r.useEffect)(()=>{u||N(!1)},[u]);let T=(null==v?void 0:null===(t=v.website)||void 0===t?void 0:t.settings)||{},M=T.SEO||{},D=(null==v?void 0:null===(l=v.website)||void 0===l?void 0:l.name)||"",P=T.domain&&"yourdomain.com"!==T.domain?T.domain:"yourdomain.com",H=T.homePage||(null==v?void 0:null===(c=v.website)||void 0===c?void 0:null===(o=c.pages)||void 0===o?void 0:null===(i=o[0])||void 0===i?void 0:i.pageId),B=(0,r.useMemo)(()=>{var e;return((null==v?void 0:null===(e=v.website)||void 0===e?void 0:e.pages)||[]).filter(e=>{var t,l;return(null==e?void 0:null===(t=e.params)||void 0===t?void 0:t.templatePage)!=="true"&&(null==e?void 0:null===(l=e.params)||void 0===l?void 0:l.pageName)})},[v,g]),Z="All Pages"===w?B:B.filter(e=>(0,t7.Z)(e.params)||e.pageId===C),R=Z.find(e=>e.pageId===C)||Z.find(e=>e.pageId===H)||Z[0],A=(null==R?void 0:R.params)||{},V=(null==R?void 0:R.pageId)===H,_=(0,r.useMemo)(()=>new Map(B.map(e=>[e.pageId,seoScore(e,T,D)])),[B,g]),F=_.get(null==R?void 0:R.pageId),U=(null==F?void 0:F.images)||[],z=U.filter(e=>!e.alt).length,setPageParam=(e,t,l)=>f({type:"UPDATE_PAGE_SEO",pageId:e,name:t,value:l}),commitPageField=(e,t,l)=>{var i;setPageParam(e.pageId,t,l),l&&(null==e?void 0:null===(i=e.params)||void 0===i?void 0:i.useSEO)!=="true"&&setPageParam(e.pageId,"useSEO","true")},setSetting=(e,t)=>f({type:"UPDATE_SEO_SETTINGS",name:e,value:t}),patchSeoSettings=e=>setSetting("SEO",{...M,...e}),blockLabel=e=>{var t,l;return(null==m?void 0:null===(l=m[e])||void 0===l?void 0:null===(t=l.schema)||void 0===t?void 0:t.label)||e||"Block"},commitAlt=(e,t)=>f({type:"UPDATE_PROPERTY",blockId:e.blockId,name:e.altParam,value:t,allBreakpoints:!0}),selectInEditor=e=>{R&&((null==x?void 0:x.pageId)!==R.pageId&&f({type:"SELECTED_PAGE_HANDLER",blockPage:R}),f({type:"BLOCK_SELECT",blockId:e.blockId}),N(!1),h(),setTimeout(()=>{var t,l;null===(l=(0,k.ik)())||void 0===l||null===(t=l.getElementById("myDiv"+e.blockId))||void 0===t||t.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},600))},G=Array.isArray(T.locations)?T.locations.filter(e=>(null==e?void 0:e.checked)&&(null==e?void 0:e.locationId)):[],K=Array.isArray(T.redirects)?T.redirects:[],updateRedirect=(e,t,l)=>setSetting("redirects",K.map((i,n)=>n===e?{...i,[t]:l}:i)),removeRedirect=e=>setSetting("redirects",K.filter((t,l)=>l!==e));if(!v)return null;let field=(e,t)=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:lT,style:lM,children:e}),t]}),pageField=(e,t,l,i)=>field(t,(0,n.jsx)(DraftInput,{value:A[e],placeholder:l,counterMax:i,textarea:"metaDescription"===e||"ogDescription"===e,onCommit:t=>commitPageField(R,e,t)},(null==R?void 0:R.pageId)+e));return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.Z,{className:"editorModal",backdropClassName:"editorModal kluckModalBackdrop",dialogClassName:"seoManagerModalContent",centered:!0,show:u,onHide:h,children:(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"682px",maxHeight:"88vh",backgroundColor:"var(--color-4)"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"20px",padding:"10px 20px 0",flexShrink:0},children:[(0,n.jsx)("div",{className:"kluck-font kluck-header",style:{color:"var(--white)",whiteSpace:"nowrap"},children:"SEO Manager"}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"16px"},children:[(0,n.jsx)(components_KluckFilterTabs,{tabs:["Pages","Site"],value:y,onChange:b,style:{width:"auto"}}),(0,n.jsx)(CloseIcon,{onClick:h})]})]}),(0,n.jsx)("hr",{style:{margin:"6px 20px 0",border:"none",borderTop:"1px solid var(--color-1)",opacity:".1",flexShrink:0}}),"Pages"===y&&(0,n.jsxs)("div",{style:{display:"flex",flex:1,minHeight:0},children:[(0,n.jsxs)("div",{className:"kluckScrollArea",style:{width:"268px",flexShrink:0,overflowY:"auto",padding:"14px 10px 14px 20px",display:"flex",flexDirection:"column",gap:"4px",borderRight:"1px solid rgba(255,255,255,.08)"},children:[(0,n.jsx)(components_KluckFilterTabs,{tabs:["SEO On","All Pages"],value:w,onChange:j,style:{flexShrink:0,marginBottom:"8px"}}),0===Z.length&&(0,n.jsx)("div",{className:"kluck-font kluck-h4-light",style:{color:"var(--white)",opacity:".55",padding:"8px 2px"},children:"No pages with SEO on — switch to All Pages."}),Z.map(e=>{var t,l,i,o;let s=e.pageId===(null==R?void 0:R.pageId),a=!(0,t7.Z)(e.params),r=(0,t7.q_)(null===(t=e.params)||void 0===t?void 0:t.pageType);return(0,n.jsxs)("div",{onClick:()=>L(e.pageId),title:null===(l=e.params)||void 0===l?void 0:l.pageName,className:"kluck-font kluck-h4-light ".concat(s?"kluck-warning":"kluck-background-tile-button"),style:{padding:"7px 10px",borderRadius:"4px",cursor:"pointer",display:"flex",alignItems:"center",gap:"8px",flexShrink:0,opacity:a&&!s?.55:1},children:[(0,n.jsx)("span",{style:{width:"8px",height:"8px",borderRadius:"50%",background:null===(i=_.get(e.pageId))||void 0===i?void 0:i.color,flexShrink:0}}),(0,n.jsxs)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[null===(o=e.params)||void 0===o?void 0:o.pageName,e.pageId===H?"  •  home":""]}
1),r&&(0,n.jsx)("span",{className:"kluck-font",title:"App screen — excluded from search automatically",style:{marginLeft:"auto",fontSize:"10px",padding:"1px 6px",borderRadius:"8px",background:"var(--color-2)",color:"var(--white)",flexShrink:0},children:"app"})]},e.pageId)})]}),(0,n.jsx)("div",{className:"kluckScrollArea",style:{flex:1,minWidth:0,overflowY:"auto",padding:"14px 20px"},children:R&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(SnippetPreview,{domain:P,page:R,isHome:V,siteName:D,siteDescription:T.description}),F&&(0,n.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"5px",marginBottom:"16px"},children:F.checks.map((e,t)=>(0,n.jsxs)("div",{className:"kluck-font kluck-h4-light",style:{color:"var(--white)",opacity:.85,display:"flex",alignItems:"center",gap:"8px"},children:[(0,n.jsx)("span",{style:{width:"8px",height:"8px",borderRadius:"50%",background:lL[e.status],flexShrink:0}}),e.label,"alt"===e.action&&(0,n.jsx)("div",{onClick:()=>N(!0),className:"kluck-font ".concat("pass"===e.status?"kluck-background-tile-button":"kluck-warning"),style:{marginLeft:"6px",fontSize:"11px",lineHeight:"16px",padding:"2px 10px",borderRadius:"10px",cursor:"pointer",flexShrink:0},children:"pass"===e.status?"Review":"Fix now"})]},t))}),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"14px"},children:[(0,n.jsxs)("div",{style:{maxWidth:"340px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px"},children:[(0,n.jsx)("div",{className:lT,style:{color:"var(--white)"},children:"Include in search results"}),(0,n.jsx)(editorComponents_KluckToggleSwitch,{title:"",value:(0,t7.Z)(A),setValue:e=>setPageParam(R.pageId,"indexSEO",e?"true":"false")})]}),(0,t7.q_)(A.pageType)&&(0,n.jsx)("div",{className:"kluck-font kluck-h4-light",style:{color:"var(--white)",opacity:.55,marginTop:"-8px"},children:"App screens are excluded from search and the sitemap automatically — this toggle overrides that."}),pageField("metaTitle","Meta Title",V?D:"".concat(A.pageName," | ").concat(D),60),pageField("metaDescription","Meta Description",T.description||"Describe this page for search results",160),(0,n.jsx)("div",{className:"kluck-font kluck-h3",style:lD,children:"Social Sharing"}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px 18px"},children:[pageField("ogTitle","OG Title",A.metaTitle||"Defaults to the meta title",60),field("OG Image (1200\xd7630)",(0,n.jsx)(ImageField,{value:A.ogImage,onOpenAssets:()=>S({type:"ogImage",pageId:R.pageId}),onClear:()=>setPageParam(R.pageId,"ogImage","")}))]}),pageField("ogDescription","OG Description",A.metaDescription||"Defaults to the meta description",160),(0,n.jsx)("div",{className:"kluck-font kluck-h3",style:lD,children:"Advanced"}),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 120px",gap:"14px 18px"},children:[pageField("metaKeywords","Meta Keywords","comma, separated, keywords"),pageField("canonicalUrl","Canonical URL","Defaults to this page's own URL"),field("Priority",(0,n.jsx)(DraftInput,{value:A.SEOpriority,placeholder:"0.5",onCommit:e=>setPageParam(R.pageId,"SEOpriority",e)},R.pageId+"SEOpriority")),field("Structured Data Type",(0,n.jsxs)("select",{className:lE,value:A.schemaType||"none",onChange:e=>"none"===e.target.value?setPageParam(R.pageId,"schemaType","none"):commitPageField(R,"schemaType",e.target.value),style:{...lN,cursor:"pointer"},children:[(0,n.jsx)("option",{value:"none",children:"None"}),lS.map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))]}
1)),A.schemaType&&"none"!==A.schemaType&&G.length>0&&field("Structured Data Location",(0,n.jsxs)("select",{className:lE,value:A.schemaLocationId||"",onChange:e=>""===e.target.value?setPageParam(R.pageId,"schemaLocationId",""):commitPageField(R,"schemaLocationId",e.target.value),style:{...lN,cursor:"pointer"},children:[(0,n.jsx)("option",{value:"",children:"Site default location"}),G.map(e=>(0,n.jsx)("option",{value:e.locationId,children:e.label||e.name||e.locationId},e.locationId))]}))]})]})]})})]}),"Site"===y&&(0,n.jsx)("div",{className:"kluckScrollArea",style:{flex:1,minHeight:0,overflowY:"auto",padding:"14px 20px"},children:(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"14px"},children:[(0,n.jsxs)("div",{style:{maxWidth:"340px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px"},children:[(0,n.jsx)("div",{className:lT,style:{color:"var(--white)"},children:"Show site in search engines"}),(0,n.jsx)(editorComponents_KluckToggleSwitch,{title:"",value:!1!==M.showInSearchEngines,setValue:e=>patchSeoSettings({showInSearchEngines:e})})]}),!1===M.showInSearchEngines&&(0,n.jsx)("div",{className:"kluck-font kluck-h4-light",style:{color:"var(--white)",opacity:.55,marginTop:"-8px"},children:"Every page serves noindex and the sitemap is emptied — search engines will drop the whole site."}),field("Site Description (default meta description)",(0,n.jsx)(DraftInput,{value:T.description,counterMax:160,textarea:!0,placeholder:"What this business is, where it is, and what visitors can do",onCommit:e=>setSetting("description",e)})),(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"14px 18px"},children:[field("Business Type (structured data)",(0,n.jsx)("select",{className:lE,value:M.websiteType||"Restaurant",onChange:e=>patchSeoSettings({websiteType:e.target.value}),style:{...lN,cursor:"pointer"},children:lI.map(e=>(0,n.jsx)("option",{value:e,children:e},e))})),field("Website Name (shown in Google results)",(0,n.jsx)(DraftInput,{value:M.websiteName,placeholder:D,onCommit:e=>patchSeoSettings({websiteName:e})})),field("Alternative Website Name",(0,n.jsx)(DraftInput,{value:M.alternativeWebsiteName,placeholder:"Short or abbreviated name",onCommit:e=>patchSeoSettings({alternativeWebsiteName:e})})),field("Google Logo (square)",(0,n.jsx)(ImageField,{value:M.googleLogoUrl,onOpenAssets:()=>S({type:"googleLogo"}),onClear:()=>patchSeoSettings({googleLogoUrl:"",googleLogoAssetId:""})})),field("Social Share Image (1200\xd7630)",(0,n.jsx)(ImageField,{value:M.socialMediaShareImageUrl,onOpenAssets:()=>S({type:"shareImage"}),onClear:()=>patchSeoSettings({socialMediaShareImageUrl:"",socialMediaShareImageAssetId:""})})),field("Facebook URL",(0,n.jsx)(DraftInput,{value:M.facebookUrl,placeholder:"https://www.facebook.com/...",onCommit:e=>patchSeoSettings({facebookUrl:e})})),field("Instagram URL",(0,n.jsx)(DraftInput,{value:M.instagramUrl,placeholder:"https://www.instagram.com/...",onCommit:e=>patchSeoSettings({instagramUrl:e})})),field("X / Twitter URL",(0,n.jsx)(DraftInput,{value:M.twitterUrl,placeholder:"https://x.com/...",onCommit:e=>patchSeoSettings({twitterUrl:e})})),field("Other Profile URL (Yelp, TripAdvisor...)",(0,n.jsx)(DraftInput,{value:M.otherProfileUrl,placeholder:"https://...",onCommit:e=>patchSeoSettings({otherProfileUrl:e})}))]}),(0,n.jsx)("div",{className:"kluck-font kluck-h3",style:lD,children:"Sitemaps"}),(0,n.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, minmax(180px, 260px))",gap:"10px 24px"},children:[{key:"enableSitemaps",label:"Enable sitemaps"},{key:"includePages",label:"Include pages"},{key:"includeMenuItems",label:"Include menu items"}].map(e=>{let{key:t,label:l}=e;return(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px"},children:[(0,n.jsx)("div",{className:lT,style:{color:"var(--white)"},children:l}),(0,n.jsx)(editorComponents_KluckToggleSwitch,{title:"",value:!1!==M[t],setValue:e=>patchSeoSettings({[t]:e})})]},t)})}),(0,n.jsx)("div",{className:"kluck-font kluck-h3",style:lD,children:"Redirects (301)"}),K.map((e,t)=>{var l,i;return(0,n.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 32px",gap:"10px 18px",alignItems:"center",maxWidth:"620px"},children:[(0,n.jsx)(DraftInput,{value:null==e?void 0:e.from,placeholder:"/old-page",onCommit:e=>updateRedirect(t,"from",e)},"redirect-from-".concat(t,"-").concat(null!==(l=null==e?void 0:e.from)&&void 0!==l?l:"")),(0,n.jsx)(DraftInput,{value:null==e?void 0:e.to,placeholder:"/new-page",onCommit:e=>updateRedirect(t,"to",e)},"redirect-to-".concat(t,"-").concat(null!==(i=null==e?void 0:e.to)&&void 0!==i?i:"")),(0,n.jsx)("div",{onClick:()=>removeRedirect(t),title:"Remove redirect",style:{cursor:"pointer",display:"flex",justifyContent:"center"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"13px",height:"13px"},viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M2 2L14 14",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M14 2L2 14",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round"})]})})]},t)}),(0,n.jsx)("div",{onClick:()=>setSetting("redirects",[...K,{from:"",to:"/",checked:!0}]),className:"kluck-font kluck-h4 kluck-background-tile-button",style:{padding:"7px 12px",borderRadius:"4px",cursor:"pointer",alignSelf:"flex-start"},children:"+ Add redirect"}),(0,n.jsx)("div",{className:"kluck-font kluck-h4-light",style:{color:"var(--white)",opacity:.55},children:"Renaming a page adds its redirect here automatically. Set “To” to 410 for a removed page so search engines drop it."})]})}),(0,n.jsx)("hr",{style:{margin:"0 20px",border:"none",borderTop:"1px solid var(--color-1)",opacity:".1",flexShrink:0}}),(0,n.jsx)("div",{className:"kluck-font kluck-h4-light",style:{padding:"10px 20px",color:"var(--white)",opacity:".55",flexShrink:0},children:"Empty fields use the grey fallback shown in the preview. Turning off “Include in search results” adds noindex and removes the page from the sitemap — do this for cart, checkout and other app pages. Edits apply on Save & Publish."})]})}),(0,n.jsx)(d.Z,{show:u&&E,className:"editorModal",backdropClassName:"editorModal kluckModalBackdrop",dialogClassName:"seoAltFixerModalContent",centered:!0,onHide:()=>N(!1),children:(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",maxHeight:"82vh",backgroundColor:"var(--color-4)"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"20px",padding:"10px 20px 0",flexShrink:0},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:"10px",minWidth:0},children:[(0,n.jsx)("div",{className:"kluck-font kluck-header",style:{color:"var(--white)",whiteSpace:"nowrap"},children:"Alt Text"}),(0,n.jsxs)("div",{className:"kluck-font kluck-h4-light",style:{color:"var(--white)",opacity:.55,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[A.pageName," — ",0===z?"all ".concat(U.length," set"):"".concat(z," of ").concat(U.length," missing")]})]}),(0,n.jsx)(CloseIcon,{onClick:()=>N(!1)})]}),(0,n.jsx)("hr",{style:{margin:"6px 20px 0",border:"none",borderTop:"1px solid var(--color-1)",opacity:".1",flexShrink:0}}),(0,n.jsxs)("div",{className:"kluckScrollArea",style:{overflowY:"auto",padding:"14px 20px",display:"flex",flexDirection:"column",gap:"10px",minHeight:0},children:[0===U.length&&(0,n.jsx)("div",{className:"kluck-font kluck-h4-light",style:{color:"var(--white)",opacity:.55},children:"No images on this page."}),U.map(e=>(0,n.jsx)(AltRow,{item:e,kindLabel:"Image"===e.blockName?blockLabel("Image"):"".concat(blockLabel("C
1ontainer")," background"),pathLabel:[A.pageName,...e.path.map(blockLabel)].join(" › "),onCommit:t=>commitAlt(e,t),onSelect:()=>selectInEditor(e)},e.blockId))]}),(0,n.jsx)("hr",{style:{margin:"0 20px",border:"none",borderTop:"1px solid var(--color-1)",opacity:".1",flexShrink:0}}),(0,n.jsx)("div",{className:"kluck-font kluck-h4-light",style:{padding:"10px 20px",color:"var(--white)",opacity:".55",flexShrink:0},children:"Alt text is what search engines and screen readers get instead of the picture: say what it shows, not “image of”. Each entry saves for desktop and mobile together and goes live on Save & Publish."})]})}),(0,n.jsxs)(d.Z,{show:!!I,className:"editorModal",backdropClassName:"editorModal",contentClassName:"editorModalContent",centered:!0,style:{maxWidth:"unset"},onHide:()=>S(null),children:[(0,n.jsxs)(d.Z.Header,{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["Image",(0,n.jsx)("svg",{onClick:()=>S(null),style:{width:"24px",height:"24px",cursor:"pointer"},viewBox:"0 0 24 24",children:(0,n.jsx)("path",{fill:"currentColor",d:"M13.46,12L19,17.54V19H17.54L12,13.46L6.46,19H5V17.54L10.54,12L5,6.46V5H6.46L12,10.54L17.54,5H19V6.46L13.46,12Z"})})]}),(0,n.jsx)(d.Z.Body,{children:!!I&&(0,n.jsx)(a.default,{onSelect:e=>{if(!I)return;let t=(null==e?void 0:e.source)||"";"ogImage"===I.type&&R&&commitPageField(R,"ogImage",t),"googleLogo"===I.type&&patchSeoSettings({googleLogoUrl:t,googleLogoAssetId:(null==e?void 0:e.assetId)||""}),"shareImage"===I.type&&patchSeoSettings({socialMediaShareImageUrl:t,socialMediaShareImageAssetId:(null==e?void 0:e.assetId)||""}),S(null)},allowFolderEdit:!1,nested:!0,kanvas:v})})]})]})},EditorComponents_BottomSettings=e=>{var t,l;let{onSaveHandler:i,showPublish:o,setShowPublish:a}=e,c=(0,s.v9)(e=>e.usersList.breakpoints,p.Z),u=(0,s.v9)(e=>e.usersList.kanvas,p.Z),h=(0,s.v9)(e=>e.usersList.breakpoint,p.Z),v=(0,s.v9)(e=>e.usersList.clickableLinks,p.Z),g=(0,s.v9)(e=>e.usersList.selectionGrid,p.Z),x=(0,s.v9)(e=>e.usersList.inlineTextEditor,p.Z);(0,s.v9)(e=>e.usersList.swapUI,p.Z);let m=(0,s.v9)(e=>e.usersList.responsiveStyle,p.Z),k=(0,s.v9)(e=>e.usersList.darkMode,p.Z),f=(0,s.v9)(e=>e.usersList.ignoreExpressions,p.Z),y=(0,s.v9)(e=>e.usersList.forceLoggedIn,p.Z),b=(0,s.v9)(e=>e.usersList.showMustachedContent,p.Z),w=(0,s.v9)(e=>e.usersList.selectedPage,p.Z),j=(0,s.v9)(e=>e.usersList.restToken,p.Z),[C,L]=(0,r.useState)(!1),[I,S]=(0,r.useState)("100%"),[E,N]=(0,r.useState)("100%"),[T,M]=(0,r.useState)(!1),[D,P]=(0,r.useState)(!1),[H,B]=(0,r.useState)(!1),[Z,R]=(0,r.useState)(!1),A=(0,r.useRef)(null),V=(0,r.useRef)(null),_=(0,s.I0)(),F={width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"16px",whiteSpace:"nowrap"},toggleForceLoggedIn=e=>_({type:"UPDATE_FORCE_LOGGED_IN",forceLoggedIn:e}),toggleIgnoreExpressions=e=>_({type:"UPDATE_IGNORE_EXPRESSIONS",ignoreExpressions:e}),toggleResponsiveStyle=e=>_({type:"UPDATE_RESPONSIVE_STYLE",responsiveStyle:e}),toggleClickableLinks=e=>_({type:"UPDATE_VARIABLE",name:"clickableLinks",value:e}),toggleSelectionGrid=e=>_({type:"UPDATE_VARIABLE",name:"selectionGrid",value:e}),toggleInlineTextEditor=e=>_({type:"UPDATE_VARIABLE",name:"inlineTextEditor",value:e}),changeBreakpoint=e=>_({type:"UPDATE_BREAKPOINT",breakpoint:e}),languageSelectorHandler=()=>_({type:"UPDATE_VARIABLE",name:"showLanguageSelector",value:!0}),toggleShowMustachedContent=e=>_({type:"UPDATE_SHOW_MUSTACHED_CONTENT",showMustachedContent:e}),openPageTransferModal=()=>B(!0),screenSizeHandler=()=>{L(!1),_({type:"UPDATE_SCREEN_SIZE",screenSize:{width:I,height:E}})};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(components_PageTransferModal,{show:H,onHide:()=>B(!1)}),(0,n.jsx)(components_SeoManager,{show:Z,onHide:()=>R(!1)}),(0,n.jsx)(lr.E.div,{animate:{y:0,opacity:1},initial:{y:200,opacity:0},exit:{y:200,opacity:0},transition:{ease:"linear",duration:.5},style:{width:"100%",zIndex:"100"},children:(0,n.jsxs)("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"10px",whiteSpace:"nowrap",cursor:"pointer",background:k?"#292D32":"#9d9e9f",padding:"10px"},children:[(0,n.jsx)(EditorComponents_SaveAndPublish,{onSaveHandler:i,showPublish:o,setShowPublish:a}),(0,n.jsx)(EditorComponents_UndoAndRedo,{}),(0,n.jsx)(lp.Z,{variant:"solid",className:"kluck-success",style:{width:"36px",height:"36px"},children:(0,n.jsx)(lh.ZP,{onClick:()=>{let e=new window.URL(window.location.href);e.searchParams.set("preview","true"),(null==w?void 0:w.pageId)&&e.searchParams.set("pageId",w.pageId),j&&e.searchParams.set("token",j),window.open(e.toString(),"_blank","noopener,noreferrer")},className:"kluck-neutral kluck-font kluck-h1",style:{height:"36px",width:"36px",borderRadius:"8px",padding:"none",border:"none"},children:(0,n.jsx)(lw.Z,{size:"16"})})}),(0,n.jsx)(lp.Z,{variant:"solid",ref:V,className:"kluck-success","aria-haspopup":"menu",style:{width:"36px",height:"36px"},onMouseEnter:e=>{e.preventDefault(),M(!T)},onClick:()=>M(!T),children:(0,n.jsxs)(lh.ZP,{className:"kluck-neutral kluck-font kluck-h1",style:{height:"36px",width:"36px",borderRadius:"8px",padding:"none",border:"none",outline:"none"},children:[!(0,n.jsx)(lu(),{src:h.url,style:{filter:"invert(100%)"},alt:"desktop",width:"16",height:"16"}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,n.jsx)("path",{d:"M8.15005 13.7217V11.3565C8.15005 11.106 7.94882 10.9108 7.70005 10.9108H3.50005C2.42282 10.9108 1.55005 10.0476 1.55005 8.99128V4.26085C1.55005 3.20453 2.42282 2.34128 3.50005 2.34128H11.9C12.9773 2.34128 13.85 3.20453 13.85 4.26085V4.85215C13.85 5.10262 14.0513 5.2978 14.3 5.2978C14.5488 5.2978 14.75 5.10261 14.75 4.85215V4.26085C14.75 2.70951 13.4688 1.44998 11.9 1.44998H3.50005C1.93128 1.44998 0.650049 2.70951 0.650049 4.26085V8.99128C0.650049 10.5426 1.93128 11.8021 3.50005 11.8021H7.25005V13.2761H5.00005C4.75128 13.2761 4.55005 13.4712 4.55005 13.7217C4.55005 13.9722 4.75128 14.1674 5.00005 14.1674H7.70005C7.94882 14.1674 8.15005 13.9722 8.1500
15 13.7217ZM15.35 13.1304V8.39998C15.35 7.17386 14.3388 6.18041 13.1 6.18041H11.3C10.0613 6.18041 9.05005 7.17386 9.05005 8.39998V13.1304C9.05005 14.3565 10.0613 15.35 11.3 15.35H13.1C14.3388 15.35 15.35 14.3565 15.35 13.1304ZM13.1 7.07171C13.8473 7.07171 14.45 7.66888 14.45 8.39998V13.1304C14.45 13.8615 13.8473 14.4587 13.1 14.4587H11.3C10.5528 14.4587 9.95005 13.8615 9.95005 13.1304V8.39998C9.95005 7.66888 10.5528 7.07171 11.3 7.07171H13.1Z",fill:"#292D32",stroke:"#292D32",strokeWidth:"0.3"})})]})}),(0,n.jsx)(lv.Z,{open:T,anchorEl:V.current,className:"kluck-neutral kluck-font kluck-h1",onClose:()=>M(!1),onMouseLeave:()=>{M(!T)},style:{zIndex:"1070",width:null==V?void 0:null===(l=V.current)||void 0===l?void 0:null===(t=l.getBoundingClientRect())||void 0===t?void 0:t.width,border:"none",height:String((null==c?void 0:c.length)*36)+"px",padding:"0px",boxShadow:"none"},children:c.map((e,t)=>(0,n.jsx)(lg.Z,{className:"kluck-neutral kluck-font kluck-h1",onClick:()=>changeBreakpoint(e),style:{height:"36px",width:"36px",padding:"10px",outline:"none"},children:(0,n.jsx)(lu(),{src:e.url,style:{filter:"invert(100%)"},alt:"desktop",width:"16",height:"16"})},t))}),(0,n.jsx)(lp.Z,{variant:"solid",ref:A,className:"kluck-success",style:{width:"36px",height:"36px"},onMouseEnter:e=>{e.preventDefault(),P(!D)},onClick:()=>P(!D),children:(0,n.jsx)(lh.ZP,{className:"kluck-light kluck-font kluck-h1",style:{height:"36px",width:"36px",borderRadius:"8px",padding:"none",border:"none"},children:(0,n.jsx)(lj.Z,{size:"16"})})}),(0,n.jsxs)(lv.Z,{open:D,className:"kluck-font kluck-h3",onMouseLeave:()=>{P(!D)},style:{zIndex:"1070",background:"var(--color-1)",border:"none",height:"auto",padding:"10px 0",boxShadow:"none",margin:"10px",gap:"10px"},onClose:()=>P(!1),anchorEl:A.current,children:[(0,n.jsx)(lg.Z,{onClick:()=>openPageTransferModal(),className:"kluck-light kluck-font kluck-h1",style:{outline:"none",padding:"0 10px"},children:(0,n.jsx)("div",{style:{...F},children:(0,n.jsx)("span",{children:"Transfer Pages"})})}),(0,n.jsx)(lg.Z,{onClick:()=>R(!0),className:"kluck-light kluck-font kluck-h1",style:{outline:"none",padding:"0 10px"},children:(0,n.jsx)("div",{style:{...F},children:(0,n.jsx)("span",{children:"SEO Manager"})})}),(0,n.jsx)(lg.Z,{onClick:()=>languageSelectorHandler(),className:"kluck-light kluck-font kluck-h1",style:{outline:"none",padding:"0 10px"},children:(0,n.jsx)("div",{style:{...F},children:(0,n.jsx)("span",{children:"Language"})})}),(0,n.jsx)(lg.Z,{onClick:()=>window.open("https://kluck.zendesk.com/hc/en-us","_blank"),className:"kluck-light kluck-font kluck-h1",style:{outline:"none",padding:"0 10px"},children:(0,n.jsx)("div",{style:{...F},children:(0,n.jsx)("span",{children:"Help"})})}),(0,n.jsx)(lg.Z,{onClick:()=>console.log(u),className:"kluck-light kluck-font kluck-h1",style:{outline:"none",padding:"0 10px"},children:(0,n.jsx)("div",{style:{...F},children:(0,n.jsx)("span",{children:"Debug"})})}),(0,n.jsxs)(lg.Z,{onClick:()=>toggleInlineTextEditor(!x),className:"kluck-light kluck-font kluck-h1",style:{...F,outline:"none",padding:"0 10px"},children:[(0,n.jsx)("div",{children:"Use Inline Text Editor"}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{width:"18px",minWidth:"18px",height:"18px",marginLeft:"12px"},children:(0,n.jsxs)("g",{id:"tick-square",children:[(0,n.jsx)("path",{id:"Vector",d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",fill:x?"var(--color-7)":"",stroke:x?"var(--color-7)":"black",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),x&&(0,n.jsx)("path",{id:"Vector_2",d:"M5.8125 9L7.935 11.1225L12.1875 6.8775",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,n.jsxs)(lg.Z,{onClick:()=>toggleShowMustachedContent(!b),className:"kluck-light kluck-font kluck-h1",style:{...F,outline:"none",padding:"0 10px"},children:[(0,n.jsx)("div",{children:"Show Mustached Content"}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{width:"18px",minWidth:"18px",height:"18px",marginLeft:"12px"},children:(0,n.jsxs)("g",{id:"tick-square",children:[(0,n.jsx)("path",{id:"Vector",d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",fill:b?"var(--color-7)":"",stroke:b?"var(--color-7)":"black",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),b&&(0,n.jsx)("path",{id:"Vector_2",d:"M5.8125 9L7.935 11.1225L12.1875 6.8775",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,n.jsxs)(lg.Z,{onClick:()=>
1toggleForceLoggedIn(!y),className:"kluck-light kluck-font kluck-h1",style:{...F,outline:"none",padding:"0 10px"},children:[(0,n.jsx)("div",{children:"Force Logged In"}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{width:"18px",minWidth:"18px",height:"18px",marginLeft:"12px"},children:(0,n.jsxs)("g",{id:"tick-square",children:[(0,n.jsx)("path",{id:"Vector",d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",fill:y?"var(--color-7)":"",stroke:y?"var(--color-7)":"black",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),y&&(0,n.jsx)("path",{id:"Vector_2",d:"M5.8125 9L7.935 11.1225L12.1875 6.8775",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,n.jsxs)(lg.Z,{onClick:()=>toggleIgnoreExpressions(!f),className:"kluck-light kluck-font kluck-h1",style:{...F,outline:"none",padding:"0 10px"},children:[(0,n.jsx)("div",{children:"Ignore Expressions"}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{width:"18px",minWidth:"18px",height:"18px",marginLeft:"12px"},children:(0,n.jsxs)("g",{id:"tick-square",children:[(0,n.jsx)("path",{id:"Vector",d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",fill:f?"var(--color-7)":"",stroke:f?"var(--color-7)":"black",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),f&&(0,n.jsx)("path",{id:"Vector_2",d:"M5.8125 9L7.935 11.1225L12.1875 6.8775",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,n.jsxs)(lg.Z,{onClick:()=>toggleResponsiveStyle(!m),className:"kluck-light kluck-font kluck-h1",style:{...F,outline:"none",padding:"0 10px"},children:[(0,n.jsx)("div",{children:"Responsive Style"}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{width:"18px",minWidth:"18px",height:"18px",marginLeft:"12px"},children:(0,n.jsxs)("g",{id:"tick-square",children:[(0,n.jsx)("path",{id:"Vector",d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",fill:m?"var(--color-7)":"",stroke:m?"var(--color-7)":"black",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),m&&(0,n.jsx)("path",{id:"Vector_2",d:"M5.8125 9L7.935 11.1225L12.1875 6.8775",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),!1,(0,n.jsxs)(lg.Z,{onClick:()=>toggleClickableLinks(!v),className:"kluck-light kluck-font kluck-h1",style:{...F,outline:"none",padding:"0 10px"},children:[(0,n.jsx)("div",{children:"Clickable Links"}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{width:"18px",minWidth:"18px",height:"18px",marginLeft:"12px"},children:(0,n.jsxs)("g",{id:"tick-square",children:[(0,n.jsx)("path",{id:"Vector",d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",fill:v?"var(--color-7)":"",stroke:v?"var(--color-7)":"black",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),v&&(0,n.jsx)("path",{id:"Vector_2",d:"M5.8125 9L7.935 11.1225L12.1875 6.8775",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,n.jsxs)(lg.Z,{onClick:()=>toggleSelectionGrid(!g),className:"kluck-light kluck-font kluck-h1",style:{...F,outline:"none",padding:"0 10px"},children:[(0,n.jsx)("div",{children:"Selected Grid"}),(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{width:"18px",minWidth:"18px",height:"18px",marginLeft:"12px"},children:(0,n.jsxs)("g",{id:"tick-square",children:[(0,n.jsx)("path",{id:"Vector",d:"M6.75 16.5H11.25C15 16.5 16.5 15 16.5 11.25V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5Z",fill:g?"var(--color-7)":"",stroke:g?"var(--color-7)":"black",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),g&&(0,n.jsx)("path",{id:"Vector_2",d:"M5.8125 9L7.935 11.1225L12.1875 6.8775",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})]})]})},"bottomSettingsBars"),(0,n.jsxs)(d.Z,{show:C,onHide:()=>L(!1),backdrop:"static",children:[(0,n.jsx)(d.Z.Header,{closeButton:!0,children:(0,n.jsx)(d.Z.Title,{children:"Custom Viewpoint"})}),(0,n.jsxs)(d.Z.Body,{children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",width:"100%",padding:"12px"},children:[(0,n.jsx)("div",{children:"Width"}),(0,n.jsx)("input",{style:{width:"50%"}
1,value:I,onChange:e=>S(e.target.value)})]}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",width:"100%",padding:"12px"},children:[(0,n.jsx)("div",{children:"Height"}),(0,n.jsx)("input",{style:{width:"50%"},value:E,onChange:e=>N(e.target.value)})]})]}),(0,n.jsx)(d.Z.Footer,{children:(0,n.jsx)(tz.Z,{variant:"primary",onClick:()=>screenSizeHandler(),children:"Save"})})]})]})},lP=l(86737),lH=l(61392),lB=l(12857);let lZ={height:"36px",padding:"0 30px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",cursor:"pointer",whiteSpace:"nowrap"},lO={...lZ,border:"1px solid var(--white)",color:"var(--white)"},lR={...lO,height:"24px",padding:"0 10px"},lA={opacity:".4",cursor:"not-allowed"},StatusPill=e=>{let{ok:t}=e;return(0,n.jsx)("div",{className:"kluck-font kluck-h5",style:{padding:"2px 8px",borderRadius:"4px",backgroundColor:t?"var(--color-7)":"var(--color-2)",color:"var(--white)",whiteSpace:"nowrap"},children:t?"Set":"Missing"})},ReviewRow=e=>{let{label:t,detail:l,ok:i,onFix:o}=e;return(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"10px",minHeight:"30px",padding:"0 10px"},children:[(0,n.jsx)("div",{className:"kluck-h4",style:{color:"var(--white)"},children:t}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",minWidth:0},children:[l&&(0,n.jsx)("div",{className:"kluck-h5",style:{color:"var(--white)",opacity:".7",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}),(0,n.jsx)(StatusPill,{ok:i}),!i&&o&&(0,n.jsx)("div",{onClick:o,className:"kluck-h5",style:lR,children:"Fix"})]})]})},ReviewHeading=e=>{let{children:t,first:l}=e;return(0,n.jsx)("div",{className:"kluck-h5-bold",style:{color:"var(--white)",opacity:".7",padding:l?"0 10px":"10px 10px 0"},children:t})},flattenDefinitions=e=>{let t={};for(let l of(null==e?void 0:e.definitions)||[])for(let e of(null==l?void 0:l.definitions)||[])(null==e?void 0:e.name)&&!t[e.name]&&(t[e.name]=e);return t},WizardShell=e=>{let{show:t,title:l,steps:i,step:o,warning:s,footer:a,children:r}=e,c=i[o]||{};return(0,n.jsx)(d.Z,{className:"editorModal",backdropClassName:"editorModal kluckModalBackdrop",dialogClassName:"orderWizardModalContent",centered:!0,backdrop:"static",keyboard:!1,show:t,onHide:()=>{},children:(0,n.jsxs)("div",{className:"kluck-font",style:{padding:"20px",backgroundColor:"var(--color-4)"},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"kluck-header",style:{color:"var(--white)"},children:l}),(0,n.jsxs)("div",{className:"kluck-h5",style:{color:"var(--white)",opacity:".7"},children:["Step ",o+1," of ",i.length," \xb7 ",c.title]})]}),(0,n.jsx)("div",{style:{display:"flex",gap:"6px",marginTop:"12px"},children:i.map((e,t)=>(0,n.jsx)("div",{style:{flex:1,height:"4px",borderRadius:"2px",backgroundColor:t<=o?"var(--color-7)":"var(--color-5)"}},e.title))}),(0,n.jsx)("hr",{style:{margin:"16px 0",border:"none",borderTop:"1px solid var(--white)",opacity:".1"}}),(0,n.jsx)("div",{className:"kluck-h1",style:{color:"var(--white)",marginBottom:"4px"},children:c.title}),(0,n.jsx)("div",{className:"kluck-h4",style:{color:"var(--white)",opacity:".7",marginBottom:"12px"},children:c.description}),r,s&&(0,n.jsx)("div",{className:"kluck-h5",style:{color:"var(--color-8)",marginTop:"8px"},children:s}),(0,n.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"10px",marginTop:"20px"},children:a})]})})},WizardPanel=e=>{let{children:t}=e;return(0,n.jsx)("div",{className:"kluckScrollArea kluck-dark",style:{borderRadius:"6px",padding:"10px 10px 20px",display:"flex",flexDirection:"column",gap:"10px",maxHeight:"55vh",overflowY:"auto"},children:t})},WizardFields=e=>{let{fields:t,breakpoint:l,darkMode:i,onChangeHandler:o}=e;return t.length?t.map(e=>{let{definition:t,params:s,blockId:a}=e;return(0,n.jsx)("div",{className:"kluck-font",children:(0,n.jsx)(ls,{definition:t,blockId:a,params:s,selected:"",darkMode:i,onChangeHandler:o})},"".concat(a,"_").concat(t.name,"_").concat(l.value))}):(0,n.jsx)("div",{className:"kluck-h4",style:{color:"var(--white)",opacity:".7",padding:"10px"},children:"Nothing to configure on this step."})},W=e=>({source:"WEBSITE",name:e}),O=e=>({source:"ORDER",name:e}),lV=[{title:"Location",description:"Which location the site takes orders for. Concepts and menus load from this location.",gate:"location",fields:[W("locationType"),W("location"),W("locations"),W("locationPage")]},{title:"Concept & Menu",description:"The site's default concept and the menu the Order block displays.",fields:[W("defaultConcept"),W("defaultSelectedConcept"),O("menu")]},{title:"Order Flow",description:"How and when orders are taken, and where the user lands afterwards.",fields:[O("authTime"),O("enforceHours"),O("allowFutureOrders"),O("dineInMode"),O("redirectType"),O("siteLink"),O("redirectLink")]},{title:"Payment & Tips",description:"Which merchant charges the order, gift card and cash rules, and tip defaults.",fields:[O("merchantType"),O("useGiftCards"),O("allowCashPayment"),O("defaultTipType"),O("useDefaultDriverTipPercent"),O("defaultDriverTipPercent")]},{title:"Review",description:"The Order block's required page links and the site settings chosen above.",review:!0}],stepFor=(e,t)=>
1lV.findIndex(l=>(l.fields||[]).some(l=>l.source===e&&l.name===t));var EditorComponents_OrderSetupWizard=e=>{var t,l;let{show:i,pageId:o,blockId:a,pageIds:d,onClose:c,darkMode:u}=e,h=(0,s.v9)(e=>e.usersList.kanvas,p.Z),v=(0,s.v9)(e=>e.usersList.templateKanvas,p.Z),g=(0,s.v9)(e=>e.usersList.blockSchemas,p.Z),x=(0,s.v9)(e=>e.usersList.breakpoint,p.Z),m=(0,s.v9)(e=>e.usersList.breakpoints,p.Z),k=(0,s.v9)(e=>e.usersList.state,p.Z),f=(0,s.v9)(e=>e.usersList.selectedPage,p.Z),y=(0,s.v9)(e=>e.usersList.locations,p.Z),b=(0,s.v9)(e=>e.usersList.locationValues,p.Z);(0,s.v9)(e=>e.usersList.kanvasChanges),(0,s.v9)(e=>e.usersList.editorRerender);let w=(0,s.I0)(),[j,C]=(0,r.useState)(0);(0,r.useEffect)(()=>{i&&C(0)},[i]);let L=(0,r.useMemo)(()=>{var e;return flattenDefinitions(null==g?void 0:null===(e=g.Website)||void 0===e?void 0:e.schema)},[g]),I=(0,r.useMemo)(()=>{var e;return flattenDefinitions(null==g?void 0:null===(e=g.Order)||void 0===e?void 0:e.schema)},[g]),[,S]=h&&a?(0,lB.F)(h,a):[null,null,null],E=(null==h?void 0:null===(t=h.website)||void 0===t?void 0:t.settings)||{},N=null;S&&(N={...null==g?void 0:null===(l=g.Order)||void 0===l?void 0:l.params,...S.desktopParams,...S[x.key]},"default"!==k.value&&(N={...N,...S[x.keyPart+k.keyPart]}));let T="userSelect"===E.locationType||!!E.location&&"null"!==E.location,M=lV[j],D=j===lV.length-1,P="location"!==M.gate||T,pageName=e=>{var t,l,i,n,o;let s=(null==h?void 0:null===(l=h.website)||void 0===l?void 0:null===(t=l.pages)||void 0===t?void 0:t.find(t=>t.pageId===e))||(null==v?void 0:null===(n=v.website)||void 0===n?void 0:null===(i=n.pages)||void 0===i?void 0:i.find(t=>t.pageId===e));return(null==s?void 0:null===(o=s.params)||void 0===o?void 0:o.pageName)||""},mandatoryValue=e=>{for(let l=0;l<m.length;l++){var t;let i=null==S?void 0:null===(t=S[m[l].key])||void 0===t?void 0:t[e.name];if(i||0===i)return i}return null},finish=()=>{if(S){if(o&&(null==f?void 0:f.pageId)!==o){var e,t;let l=null==h?void 0:null===(t=h.website)||void 0===t?void 0:null===(e=t.pages)||void 0===e?void 0:e.find(e=>e.pageId===o);l&&w({type:"SELECTED_PAGE_HANDLER",blockPage:l})}w({type:"BLOCK_SELECT",blockId:a})}c()},H=S?(0,n.jsxs)(n.Fragment,{children:[j>0&&(0,n.jsx)("div",{onClick:()=>C(j-1),className:"kluck-h3 kluck-neutral",style:lZ,children:"Back"}),D?(0,n.jsx)("div",{onClick:finish,className:"kluck-h3 kluck-success",style:lZ,children:"Finish"}):(0,n.jsx)("div",{onClick:()=>P&&C(j+1),className:"kluck-h3 kluck-success",style:P?lZ:{...lZ,...lA},children:"Next"})]}):(0,n.jsx)("div",{onClick:c,className:"kluck-h3",style:lO,children:"Close"}),B=S&&"location"===M.gate&&!T?"Choose a default location, or switch Location Type to User Select, to continue.":null;return(0,n.jsx)(WizardShell,{show:i,title:"Order Setup",steps:lV,step:j,warning:B,footer:H,children:S?(0,n.jsx)(WizardPanel,{children:M.review?(()=>{var e,t,l,i;let o=(null==g?void 0:null===(e=g.Order)||void 0===e?void 0:e.mandatoryDefinitions)||[],s="userSelect"===E.locationType,a=null==y?void 0:null===(t=y.find(e=>e.locationId===E.location))||void 0===t?void 0:t.locationName,r=(E.locations||[]).filter(e=>null==e?void 0:e.checked).length,d=null==b?void 0:null===(i=b.concepts)||void 0===i?void 0:null===(l=i.find(e=>{var t,l;return(null==e?void 0:null===(t=e.conceptId)||void 0===t?void 0:t.toUpperCase())===(null===(l=E.defaultConcept)||void 0===l?void 0:l.toUpperCase())}))||void 0===l?void 0:l.conceptName;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ReviewHeading,{first:!0,children:"Site"}),(0,n.jsx)(ReviewRow,{label:s?"Locations (User Select)":"Default Location",detail:s?"".concat(r," selected"):a,ok:s?r>0:!!a,onFix:()=>C(stepFor("WEBSITE","location"))}),(0,n.jsx)(ReviewRow,{label:"Default Concept",detail:d,ok:!!d,onFix:()=>C(stepFor("WEBSITE","defaultConcept"))}),(0,n.jsx)(ReviewHeading,{children:"Order block required pages"}),o.map(e=>{let t=mandatoryValue(e),l=null!==t;return(0,n.jsx)(ReviewRow,{label:e.label,detail:l&&"PAGE"===e.dataType?pageName(t):"",ok:l,onFix:finish},e.name)})]})})():(0,n.jsx)(WizardFields,{fields:(M.fields||[]).map(e=>{let t="WEBSITE"===e.source,l=t?L[e.name]:I[e.name],i=t?E:N;return l&&i&&property_compileCommandText(l.commandText,i)?{definition:l,params:i,blockId:t?"WEBSITE":a}:null}
1).filter(Boolean),breakpoint:x,darkMode:u,onChangeHandler:(e,t,l)=>{if(null==l)return;let i="WEBSITE"===e?E[t]:null==N?void 0:N[t];!compareObjects(i,l)&&(w({type:"UPDATE_PROPERTY",blockId:e,name:t,value:l}),"WEBSITE"!==e&&"menu"===t&&(null==l?void 0:l.type)==="selected"&&(null==l?void 0:l.menuId)&&(w({type:"APPLY_MENU_TO_SITE",menuId:l.menuId,options:{pageIds:d||[]}}),w({type:"UPDATE_PROPERTY",blockId:"WEBSITE",name:"siteMenu",value:{type:"selected",menuId:l.menuId,conceptId:l.conceptId}})))}})}):(0,n.jsx)("div",{className:"kluck-h4",style:{color:"var(--white)",backgroundColor:"var(--color-6)",borderRadius:"6px",padding:"20px"},children:"No Order block was found on the added pages. Close this wizard and configure the Order block from the properties panel."})})};let lW=[{value:"dateAsc",label:"Date Ascending"},{value:"dateDesc",label:"Date Descending"},{value:"nameAsc",label:"Name (A-Z)"},{value:"nameDesc",label:"Name (Z-A)"}],l_=["Order"],findBlockByName=(e,t)=>{for(let n=0;n<(null==e?void 0:e.length);n++){var l,i;if((null===(l=e[n])||void 0===l?void 0:l.blockName)===t)return e[n];let o=findBlockByName(null===(i=e[n])||void 0===i?void 0:i.children,t);if(o)return o}return null},DeleteButton=e=>{let{onClick:t}=e;return(0,n.jsx)("div",{className:"pageManagerIconButton",onClick:e=>t(e),children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{pointerEvents:"none"},children:[(0,n.jsx)("path",{d:"M14 3.98568C11.78 3.76568 9.54667 3.65234 7.32 3.65234C6 3.65234 4.68 3.71901 3.36 3.85234L2 3.98568",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.66669 3.31398L5.81335 2.44065C5.92002 1.80732 6.00002 1.33398 7.12669 1.33398H8.87335C10 1.33398 10.0867 1.83398 10.1867 2.44732L10.3334 3.31398",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.5667 6.09375L12.1334 12.8071C12.06 13.8537 12 14.6671 10.14 14.6671H5.86002C4.00002 14.6671 3.94002 13.8537 3.86668 12.8071L3.43335 6.09375",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.88666 11H9.10666",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.33331 8.33398H9.66665",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"})]})})},DuplicateButton=e=>{let{onClick:t}=e;return(0,n.jsx)("div",{className:"pageManagerIconButton",onClick:e=>t(e),children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{pointerEvents:"none"},children:[(0,n.jsx)("g",{clipPath:"url(#clip0_838_2204)",children:(0,n.jsx)("path",{d:"M10.3333 11.7917V12.375C10.3333 13.8222 9.15558 15 7.70833 15H3.625C2.17775 15 1 13.8222 1 12.375V8.29167C1 6.84442 2.17775 5.66667 3.625 5.66667H4.20833C4.36933 5.66667 4.5 5.79733 4.5 5.95833C4.5 6.11933 4.36933 6.25 4.20833 6.25H3.625C2.49917 6.25 1.58333 7.16583 1.58333 8.29167V12.375C1.58333 13.5008 2.49917 14.4167 3.625 14.4167H7.70833C8.83417 14.4167 9.75 13.5008 9.75 12.375V11.7917C9.75 11.6307 9.88067 11.5 10.0417 11.5C10.2027 11.5 10.3333 11.6307 10.3333 11.7917ZM15 3.625V7.70833C15 9.15558 13.8222 10.3333 12.375 10.3333H8.29167C6.84442 10.3333 5.66667 9.15558 5.66667 7.70833V3.625C5.66667 2.17775 6.84442 1 8.29167 1H12.375C13.8222 1 15 2.17775 15 3.625ZM14.4167 3.625C14.4167 2.49917 13.5008 1.58333 12.375 1.58333H8.29167C7.16583 1.58333 6.25 2.49917 6.25 3.625V7.70833C6.25 8.83417 7.16583 9.75 8.29167 9.75H12.375C13.5008 9.75 14.4167 8.83417 14.4167 7.70833V3.625Z",fill:"white",stroke:"white",strokeWidth:"0.3"})}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_838_2204",children:(0,n.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]})})},DeleteConfirm=e=>{let{page:t,onConfirm:l,onCancel:i}=e;return(0,n.jsxs)("div",{style:{display:"flex",height:"100%",alignItems:"stretch"},children:[(0,n.jsx)("div",{className:"kluck-font kluck-h4-bold pageManagerConfirmButton",style:{paddingInline:"7px"},onClick:e=>i(e),children:"Cancel"}),(0,n.jsx)("div",{className:"kluck-font kluck-h4-bold pageManagerConfirmButton",style:{paddingInline:"7px",backgroundColor:"var(--color-2)",borderRadius:"0px 4px 4px 0px"},onClick:e=>l(t,e),children:"Delete"})]})},AddIcon=()=>(0,n.jsx)("svg",{style:{height:"18px",width:"18px"},viewBox:"0 0 24 24",children:(0,n.jsx)("path",{fill:"currentColor",d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"})}
1),HeaderButton=e=>{let{label:t,className:l,onClick:i}=e;return(0,n.jsxs)("div",{className:"kluck-font kluck-h5 ".concat(l),style:{height:"30px",display:"flex",alignItems:"center",gap:"7px",paddingInline:"10px",borderRadius:"4px",cursor:"pointer",whiteSpace:"nowrap"},onClick:i,children:[(0,n.jsx)("span",{children:t}),(0,n.jsx)(AddIcon,{})]})},PageTile=e=>{var t,l;let{page:i,isSelected:o,isConfirmingDelete:s,isDragging:a,isDropTarget:r,backgroundColor:d,boldName:c,onSelect:u,onDuplicate:p,onDeleteClick:h,onDeleteConfirm:v,onDeleteCancel:g,dragProps:x}=e,m="1px solid rgba(255, 255, 255, 0.10)";return s?m="1px solid var(--color-2)":r&&(m="1px solid var(--color-8)"),(0,n.jsxs)("div",{...x,title:null===(t=i.params)||void 0===t?void 0:t.pageName,className:"kluck-font pageManagerTile",onClick:()=>u(i),style:{width:"19%",height:"30px",display:"flex",justifyContent:"space-between",alignItems:"center",overflow:"hidden",border:m,borderRadius:"4px",cursor:"pointer",opacity:a?.4:1,backgroundColor:o?"var(--color-2)":d,color:"var(--white)",paddingLeft:"10px",paddingRight:s?"0px":"10px"},children:[(0,n.jsx)("div",{className:c?"kluck-h5-bold":"kluck-h5",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,minWidth:0},children:null===(l=i.params)||void 0===l?void 0:l.pageName}),s?(0,n.jsx)(DeleteConfirm,{page:i,onConfirm:v,onCancel:g}):(0,n.jsxs)("div",{style:{display:"flex",gap:"3px",alignItems:"center",flexShrink:0},children:[(0,n.jsx)(DuplicateButton,{onClick:e=>{e.stopPropagation(),p(i)}}),(0,n.jsx)(DeleteButton,{onClick:e=>h(i,e)})]})]})};var EditorComponents_PageManager=e=>{var t,l,i;let{show:o,setShow:a,darkMode:c}=e,u=(0,s.v9)(e=>e.usersList.kanvas,p.Z),h=(0,s.v9)(e=>e.usersList.selectedPage,p.Z),v=(0,s.v9)(e=>e.usersList.openPopover,p.Z),g=(0,s.v9)(e=>e.usersList.blockSchemas,p.Z),x=(0,s.v9)(e=>e.usersList.templateKanvas,p.Z),m=(0,s.v9)(e=>e.usersList.breakpoints,p.Z),[k,f]=(0,r.useState)(null),[y,b]=(0,r.useState)(""),[w,j]=(0,r.useState)(0),[C,L]=(0,r.useState)(null),[I,S]=(0,r.useState)(null),[E,N]=(0,r.useState)("dateAsc"),[T,M]=(0,r.useState)(null),[D,P]=(0,r.useState)(null),[H,B]=(0,r.useState)(null),[Z,R]=(0,r.useState)(null),A=(0,s.I0)(),V=(0,lC.Z)(),setOpenPopover=e=>A({type:"UPDATE_OPEN_POPOVER",openPopover:e}),_="dateAsc"===E&&!y.trim(),deletePageHandler=e=>{A({type:"DELETE_PAGE",pageId:null==e?void 0:e.pageId}),j(e=>e+1),B(null)},handleDeleteClick=(e,t)=>{t.stopPropagation(),B(e)},handleDeleteConfirm=(e,t)=>{t.stopPropagation(),deletePageHandler(e)},handleDeleteCancel=e=>{e.stopPropagation(),B(null)},selectPage=e=>{a(!1),A({type:"SELECTED_PAGE_HANDLER",blockPage:e}),j(e=>e+1)},addPageHandler=e=>{A({type:"ADD_PAGE",page:e}),a(!1),j(e=>e+1)},duplicatePageHandler=e=>{A({type:"DUPLICATE_PAGE",pageId:null==e?void 0:e.pageId}),a(!1),j(e=>e+1)},reorderPageHandler=e=>{T&&T!==(null==e?void 0:e.pageId)&&(A({type:"REORDER_PAGES",pageId:T,targetPageId:null==e?void 0:e.pageId}),j(e=>e+1)),M(null),P(null)},getDragProps=e=>_?{draggable:!0,onDragStart:t=>{t.dataTransfer.effectAllowed="move",M(e.pageId)},onDragEnd:()=>{M(null),P(null)},onDragOver:t=>{t.preventDefault(),t.dataTransfer.dropEffect="move",D!==e.pageId&&P(e.pageId)},onDragLeave:()=>P(t=>t===e.pageId?null:t),onDrop:t=>{t.preventDefault(),reorderPageHandler(e)}}:{},toggleDynamicPageSelection=e=>{f(t=>t===e?null:e)},generateDynamicPages=()=>{let e=new Set;e.add("Uncategorized");for(let t=0;t<u.website.pages.length;t++){let l=u.website.pages[t];l.params.pagesParent&&e.add(l.params.pagesParent)}let t=[{label:"Uncategorized",pageId:"unused",params:{pageName:"Uncategorized"}}];for(let l of e){let e=u.website.pages.find(e=>e.params.pageName===l);e&&t.push(e)}return t},getChildPagesForParent=e=>{if("Uncategorized"===e){let e=[...u.website.pages];for(let t=0;t<u.website.pages.length;t++){let l=u.website.pages[t],i=u.website.pages.filter(e=>e.params.pagesParent===l.params.pageName);e=e.filter(e=>!i.includes(e))}return e.filter(e=>"Webpage"!==e.params.pageType&&void 0!==e.params.pageType)}return u.website.pages.filter(t=>t.params.pagesParent===e)},filterPagesBySearch=e=>y.trim()?e.filter(e=>{var t,l;return null===(l=e.params)||void 0===l?void 0:null===(t=l.pageName)||void 0===t?void 0:t.toLowerCase().includes(y.toLowerCase())}):e,sortPages=e=>{let t=[...e],byName=(e,t)=>
1{var l,i;return((null===(l=e.params)||void 0===l?void 0:l.pageName)||"").localeCompare((null===(i=t.params)||void 0===i?void 0:i.pageName)||"")};switch(E){case"dateDesc":return t.reverse();case"nameAsc":return t.sort(byName);case"nameDesc":return t.sort((e,t)=>byName(t,e));default:return t}};(0,r.useEffect)(()=>{var e;if(o){if(null==h?void 0:null===(e=h.params)||void 0===e?void 0:e.pagesParent){let e=h.params.pagesParent,t=generateDynamicPages(),l=t.find(t=>t.params.pageName===e);l&&f(e)}else f(null)}},[o,null==h?void 0:h.pageId]);let addTemplatePages=e=>{var t,l,i,n,o;L(null),setOpenPopover("");let s=[],r=x.website.pages.find(t=>{var l;return t.params.pageName===(null==e?void 0:null===(l=e.schema)||void 0===l?void 0:l.name)});r&&s.push(r);let d=null===(t=g[null==e?void 0:null===(l=e.schema)||void 0===l?void 0:l.name])||void 0===t?void 0:t.pageDefinitions.filter(e=>null==e?void 0:e.allowTemplate);for(let e=0;e<d.length;e++){let t=x.website.pages.filter(t=>t.params.pageType===d[e].pageType);s.push(...t)}let c=[],parseBlock=(e,t)=>{for(let t=0;t<m.length;t++){let l=g[e.blockName].pageDefinitions;for(let i=0;i<l.length;i++){let n=e[m[t].key][l[i].name];if(n){let e=x.website.pages.find(e=>e.pageId===n);e&&!c.includes(e.pageId)&&(c.push(e.pageId),e.blocks.forEach(t=>parseBlock(t,e)))}}}for(let l=0;l<e.children.length;l++)parseBlock(e.children[l],t)};for(let e=0;e<s.length;e++)for(let t=0;t<s[e].blocks.length;t++)parseBlock(s[e].blocks[t]);for(let e=0;e<c.length;e++){let t=x.website.pages.find(t=>t.pageId===c[e]);t&&!s.find(e=>e.pageId===t.pageId)&&s.push(t)}for(let e=0;e<s.length;e++)s[e].changes=[],s[e].params.templatePage="true";let p=V(JSON.parse(JSON.stringify(s))),h=null===(i=x.website.settings)||void 0===i?void 0:i.paletteColors;for(let e=0;e<h.length;e++){let t=h[e];u.website.settings.paletteColors||(u.website.settings.paletteColors=[]),u.website.settings.paletteColors.find(e=>e.label===t.label)||u.website.settings.paletteColors.push(t)}A({type:"ADD_PAGES",pages:p}),a(!1);let v=p.map(e=>e.pageId),k=null===(n=u.website.settings)||void 0===n?void 0:n.siteMenu;if((null==k?void 0:k.menuId)&&A({type:"APPLY_MENU_TO_SITE",menuId:k.menuId,options:{pageIds:v}}),(null==e?void 0:null===(o=e.schema)||void 0===o?void 0:o.name)==="Order"){let e=p.find(e=>{var t;return(null==e?void 0:null===(t=e.params)||void 0===t?void 0:t.pageName)==="Order"})||p[0],t=findBlockByName(null==e?void 0:e.blocks,"Order");R({pageId:null==e?void 0:e.pageId,blockId:null==t?void 0:t.blockId,pageIds:v})}},F=sortPages(filterPagesBySearch(u.website.pages.filter(e=>{var t,l,i;return(null==e?void 0:null===(t=e.params)||void 0===t?void 0:t.pageType)==="Webpage"||(null==e?void 0:null===(l=e.params)||void 0===l?void 0:l.pagesParent)===void 0||(null==e?void 0:null===(i=e.params)||void 0===i?void 0:i.pagesParent)===""}))),U=filterPagesBySearch(generateDynamicPages()).filter(e=>getChildPagesForParent(e.params.pageName).length>0);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(lP.ZP,{open:"pageManager_addPage"===v,anchorEl:C,onClose:()=>{setOpenPopover(""),L(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{"& .MuiPaper-root":{backgroundColor:"transparent",marginTop:"5px"}},children:(0,n.jsx)("div",{className:"kluck-font kluck-h3",style:{minWidth:"164px",color:"var(--white)",backgroundColor:"var(--color-7)",display:"flex",flexDirection:"column",gap:"10px",padding:"10px",borderRadius:"4px"},children:l_.map(e=>{var t;let l=null===(t=tG.K.find(t=>{var l;return(null==t?void 0:null===(l=t.type)||void 0===l?void 0:l.displayName)===e}))||void 0===t?void 0:t.type;return l?(0,n.jsx)("div",{onClick:()=>addTemplatePages(l),style:{width:"100%",height:"10px",display:"flex",alignItems:"center",cursor:"pointer"},children:l.displayName},e):null})})}),(0,n.jsx)(lP.ZP,{open:"pageManager_sort"===v,anchorEl:I,onClose:()=>{setOpenPopover(""),S(null)},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{"& .MuiPaper-root":{backgroundColor:"transparent",marginTop:"5px"}},children:(0,n.jsx)("div",{className:"kluck-font kluck-h5",style:{minWidth:"140px",color:"var(--color-4)",backgroundColor:"var(--white)",display:"flex",flexDirection:"column",padding:"5px",borderRadius:"4px"},children:lW.map(e=>(0,n.jsx)("div",{className:"pageManagerSortOption",style:{fontWeight:E===e.value?"700":"500"},onClick:()=>{N(e.value),setOpenPopover(""),S(null)},children:e.label},e.value))})}),(0,n.jsx)(EditorComponents_OrderSetupWizard,{show:!!Z,pageId:null==Z?void 0:Z.pageId,blockId:null==Z?void 0:Z.blockId,pageIds:null==Z?void 0:Z.pageIds,darkMode:c,onClose:()=>R(null)}),(0,n.jsxs)(d.Z,{className:"editorModal",backdropClassName:"editorModal",dialogClassName:"pageManagerModalContent",centered:!0,style:{backgroundColor:"rgba(var(--color-6), 0.8)",color:"var(--white)"},show:o,onHide:()=>a(!1),children:[(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",backgroundColor:"var(--color-4)",paddingTop:"16px",paddingInline:"20px",justifyContent:"space-between",alignItems:"center",gap:"10px 20px"},children:[(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"},children:[(0,n.jsx)("div",{className:"kluck-font kluck-header",style:{color:"var(--white)",marginRight:"10px"},children:"Page Manager"}),(0,n.jsx)(HeaderButton,{label:"New Page",className:"kluck-success",onClick:()=>addPageHandler()}),(null==x?void 0:null===(l=x.website)||void 0===l?void 0:null===(t=l.pages)||void 0===t?void 0:t.length)>0&&(0,n.jsx)(HeaderButton,{label:"Template Page",className:"kluck-neutral",onClick:e=>{L(e.currentTarget),setOpenPopover("pageManager_addPage")}})]}),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"20px"},children:[(0,n.jsxs)("div",{style:{position:"relative",display:"flex",alignItems:"center"},children:[(0,n.jsx)(lH.Z,{size:"12",color:"#1D1E21",style:{position:"absolute",left:"13px",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",zIndex:1,opacity:.5}}),(0,n.jsx)("input",{type:"text",className:"kluck-font kluck-h5 pageManagerSearchInput",placeholder:"Search Pages...",value:y,onChange:e=>b(e.target.value),style:{width:"224px",height:"30px",padding:"0px 30px 0px 30px",borderRadius:"4px",outline:"none",backgroundColor:"var(--white)",border:"none",color:"var(--color-6)"}}),y&&(0,n.jsx)("button",{onClick:()=>b(""),style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",background:"none",outline:"none",border:"none",cursor:"pointer",width:"16px",height:"16px",display:"flex",alignItems:"center",justifyContent:"center",padding:"0"},children:(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M12 4L4 12M4 4L12 12",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"7px"},children:[(0,n.jsx)("div",{className:"kluck-font kluck-h5",style:{color:"var(--white)",whiteSpace:"nowrap"},children:"Sort by:"}),(0,n.jsxs)("div",{className:"kluck-font kluck-h5",onClick:e=>{S(e.currentTarget),setOpenPopover("pageManager_sort")},style:{height:"30px",display:"flex",alignItems:"center",gap:"7px",paddingInline:"10px",borderRadius:"4px",backgroundColor:"var(--white)",color:"var(--color-4)",cursor:"pointer",whiteSpace:"nowrap"},children:[(0,n.jsx)("span",{children:null===(i=lW.find(e=>e.value===E))||void 0===i?void 0:i.label}
1),(0,n.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M2.72027 5.9668L7.06694 10.3135C7.58027 10.8268 8.42027 10.8268 8.93361 10.3135L13.2803 5.9668",stroke:"currentColor",strokeWidth:"1.8",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),(0,n.jsx)("div",{onClick:()=>a(!1),type:"button",style:{cursor:"pointer",display:"flex"},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",children:[(0,n.jsx)("path",{d:"M5.75 5.75006L17.2499 17.25",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.75006 17.25L17.25 5.75006",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})]}),(0,n.jsx)("div",{style:{backgroundColor:"var(--color-4)"},children:(0,n.jsx)("hr",{style:{marginInline:"21px",opacity:".1",color:"var(--color-1)"}})}),(0,n.jsxs)(d.Z.Body,{style:{backgroundColor:"var(--color-4)",color:"var(--white)",padding:"20px",fontSize:"14px"},children:[(0,n.jsxs)("div",{className:"kluck-font kluck-h1",style:{textAlign:"left"},children:["Static Pages",0===F.length&&(0,n.jsx)("span",{className:"kluck-h1-light",children:" (No Static Pages)"})]}),(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",margin:"6px 0",gap:"10px"},children:F.map((e,t)=>(0,n.jsx)(PageTile,{page:e,backgroundColor:"var(--color-5)",boldName:!0,isSelected:h.pageId===e.pageId,isConfirmingDelete:(null==H?void 0:H.pageId)===e.pageId,isDragging:T===e.pageId,isDropTarget:D===e.pageId&&T!==e.pageId,dragProps:getDragProps(e),onSelect:selectPage,onDuplicate:duplicatePageHandler,onDeleteClick:handleDeleteClick,onDeleteConfirm:handleDeleteConfirm,onDeleteCancel:handleDeleteCancel},e.pageId||t))}),(0,n.jsx)("div",{style:{backgroundColor:"var(--color-4)",marginTop:"20px"},children:(0,n.jsx)("hr",{style:{opacity:".1",color:"var(--color-1)"}})}),(0,n.jsxs)("div",{className:"kluck-font kluck-h1",style:{textAlign:"left",paddingTop:"20px",marginBottom:"10px"},children:["Categories",0===U.length&&(0,n.jsx)("span",{className:"kluck-h1-light",children:" (No Categories)"})]}),(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"5px",marginBottom:"10px"},children:U.map((e,t)=>{var l;let i=k===e.params.pageName,o=getChildPagesForParent(e.params.pageName).length;return(0,n.jsxs)("div",{title:null===(l=e.params)||void 0===l?void 0:l.pageName,className:"kluck-font kluck-h5 pageManagerCategory",onClick:()=>toggleDynamicPageSelection(e.params.pageName),style:{height:"30px",display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",borderRadius:"4px",cursor:"pointer",backgroundColor:i?"var(--white)":"var(--color-5)",color:i?"var(--color-4)":"var(--white)",paddingInline:"10px"},children:[(0,n.jsx)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.params.pageName}),(0,n.jsxs)("span",{style:{opacity:"0.7"},children:["(",o,")"]})]},t)})}),k&&(()=>{let e=sortPages(filterPagesBySearch(getChildPagesForParent(k)));return 0===e.length?null:(0,n.jsx)("div",{style:{backgroundColor:"var(--color-6)",padding:"10px",display:"flex",flexWrap:"wrap",gap:"10px",borderRadius:"4px"},children:e.map((e,t)=>(0,n.jsx)(PageTile,{page:e,backgroundColor:"var(--color-4)",isSelected:h.pageId===e.pageId,isConfirmingDelete:(null==H?void 0:H.pageId)===e.pageId,isDragging:T===e.pageId,isDropTarget:D===e.pageId&&T!==e.pageId,dragProps:getDragProps(e),onSelect:selectPage,onDuplicate:duplicatePageHandler,onDeleteClick:handleDeleteClick,onDeleteConfirm:handleDeleteConfirm,onDeleteCancel:handleDeleteCancel},e.pageId||t))})})()]})]})]})},lF=l(50462),lU=l(28085),lz=l(33289);let NewSiteWizard_W=e=>({source:"WEBSITE",name:e}),lG=[{title:"Location",description:"The location this new site takes orders for. Concepts and menus load from it.",gate:"location",fields:[NewSiteWizard_W("locationType"),NewSiteWizard_W("location"),NewSiteWizard_W("locations"),NewSiteWizard_W("locationPage")]},{title:"Concept",description:"The site's default concept, and the concept preselected for guests if it differs.",fields:[NewSiteWizard_W("defaultConcept"),NewSiteWizard_W("defaultSelectedConcept")]},{title:"Menu",description:"The menu every Custom Menu, Menu Item data block and Order block on the site will display. Leave it unset to keep the copied menus as they are.",menu:!0},{title:"Review",description:"The site settings chosen above and what Finish will update.",review:!0}],NewSiteWizard_stepFor=e=>lG.findIndex(t=>(t.fields||[]).some(t=>t.name===e)),lK=lG.findIndex(e=>e.menu),lY={name:"wizardMenu",label:"Menu",inputType:"MENU"},lq={type:"scheduled",menuId:"",conceptId:""},lJ={updateCustomMenu:!0,updateDataBlocks:!0,updateOrder:!0,updateFilters:!0,updateLegacyMenu:!1,updateSingleSection:!1,updateMenuItem:!1},lX={customMenu:"Custom Menu blocks",data:"Menu Item data blocks",order:"Order blocks",filter:"Menu filter / nav blocks",legacyMenu:"Menu blocks",singleSection:"Single Section blocks",menuItem:"Menu Item blocks"},sessionKey=()=>{let e=(0,lU.U)(window.location.search);return"kluckNewSiteWizard_"+(e.kanvasId||"").toUpperCase()},wasShown=()=>{try{return"1"===window.sessionStorage.getItem(sessionKey())}catch(e){return!1}},markShown=()=>{try{window.sessionStorage.setItem(sessionKey(),"1")}catch(e){}};var EditorComponents_NewSiteWizard=e=>{var t;let{darkMode:l}=e,i=(0,s.v9)(e=>e.usersList.kanvas,p.Z),o=(0,s.v9)(e=>e.usersList.mode,p.Z),a=(0,s.v9)(e=>e.usersList.blockSchemas,p.Z),d=(0,s.v9)(e=>e.usersList.breakpoint,p.Z),c=(0,s.v9)(e=>e.usersList.breakpoints,p.Z),u=(0,s.v9)(e=>e.usersList.locations,p.Z),h=(0,s.v9)(e=>e.usersList.locationValues,p.Z),v=(0,s.v9)(e=>e.usersList.menus,p.Z),g=(0,s.v9)(e=>
1e.usersList.editorCanvasReady);(0,s.v9)(e=>e.usersList.kanvasChanges),(0,s.v9)(e=>e.usersList.editorRerender);let x=(0,s.I0)(),{updateLocation:m}=(0,lF.Z)(),[k,f]=(0,r.useState)(!1),[y,b]=(0,r.useState)(0),[j,C]=(0,r.useState)(lq);(0,r.useEffect)(()=>{!("preview"!==o||!g||!(null==i?void 0:i.website)||!(null==a?void 0:a.Website)||wasShown())&&(b(0),f(!0))},[o,g,i,a]);let L=(0,r.useMemo)(()=>{var e;return flattenDefinitions(null==a?void 0:null===(e=a.Website)||void 0===e?void 0:e.schema)},[a]),I=(null==i?void 0:null===(t=i.website)||void 0===t?void 0:t.settings)||{};(0,r.useEffect)(()=>{var e;if(y!==lK||j.conceptId)return;let t=I.defaultConcept,l=null==h?void 0:null===(e=h.concepts)||void 0===e?void 0:e.some(e=>{var l;return(null==e?void 0:null===(l=e.conceptId)||void 0===l?void 0:l.toUpperCase())===(null==t?void 0:t.toUpperCase())});l&&C({...lq,conceptId:t.toLowerCase()})},[y,null==h?void 0:h.concepts]);let S="userSelect"===I.locationType||!!I.location&&"null"!==I.location,E=j.menuId?null==v?void 0:v[j.menuId]:null,N="selected"===j.type&&!!(null==E?void 0:E.menu),T=!j.conceptId||Object.values(v||{}).some(e=>{var t,l;return(null==e?void 0:null===(t=e.conceptId)||void 0===t?void 0:t.toUpperCase())===(null===(l=j.conceptId)||void 0===l?void 0:l.toUpperCase())}),M={...lz.WN,...lJ,breakpointKeys:c.map(e=>e.key)},D=k?(0,lz.Jz)((0,lz.sO)(i,M)):{},P=Object.values(D).reduce((e,t)=>e+t,0),H=lG[y],B=y===lG.length-1,Z="location"!==H.gate||S,R=(0,n.jsxs)(n.Fragment,{children:[y>0&&(0,n.jsx)("div",{onClick:()=>b(y-1),className:"kluck-h3 kluck-neutral",style:lZ,children:"Back"}),B?(0,n.jsx)("div",{onClick:()=>{N&&(x({type:"APPLY_MENU_TO_SITE",menuId:j.menuId,options:lJ}),x({type:"UPDATE_PROPERTY",blockId:"WEBSITE",name:"siteMenu",value:{type:"selected",menuId:j.menuId,conceptId:j.conceptId}}),x({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:"".concat(E.menu.menuName," applied to ").concat(P," block").concat(1===P?"":"s"),autoCloseable:!0,type:"success"}})),markShown(),f(!1)},className:"kluck-h3 kluck-success",style:lZ,children:"Finish"}):(0,n.jsx)("div",{onClick:()=>Z&&b(y+1),className:"kluck-h3 kluck-success",style:Z?lZ:{...lZ,...lA},children:"Next"})]}),A="location"!==H.gate||S?null:"Choose a default location, or switch Location Type to User Select, to continue.";return(0,n.jsx)(WizardShell,{show:k,title:"New Site Setup",steps:lG,step:y,warning:A,footer:R,children:(0,n.jsx)(WizardPanel,{children:H.review?(()=>{var e,t,l;let i="userSelect"===I.locationType,o=null==u?void 0:null===(e=u.find(e=>e.locationId===I.location))||void 0===e?void 0:e.locationName,s=(I.locations||[]).filter(e=>null==e?void 0:e.checked).length,a=null==h?void 0:null===(l=h.concepts)||void 0===l?void 0:null===(t=l.find(e=>{var t,l;return(null==e?void 0:null===(t=e.conceptId)||void 0===t?void 0:t.toUpperCase())===(null===(l=I.defaultConcept)||void 0===l?void 0:l.toUpperCase())}))||void 0===t?void 0:t.conceptName,r=N&&!(0,lz.mr)(E.menu);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ReviewHeading,{first:!0,children:"Site"}),(0,n.jsx)(ReviewRow,{label:i?"Locations (User Select)":"Default Location",detail:i?"".concat(s," selected"):o,ok:i?s>0:!!o,onFix:()=>b(NewSiteWizard_stepFor("location"))}),(0,n.jsx)(ReviewRow,{label:"Default Concept",detail:a,ok:!!a,onFix:()=>b(NewSiteWizard_stepFor("defaultConcept"))}),(0,n.jsx)(ReviewRow,{label:"Menu",detail:N?E.menu.menuName:"Not set - menus left as copied",ok:N,onFix:()=>b(lK)}),(0,n.jsx)(ReviewHeading,{children:N?"Finish will update":"Blocks that would take the menu"}),Object.keys(lX).filter(e=>D[e]).map(e=>(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:"30px",padding:"0 10px"},children:[(0,n.jsx)("div",{className:"kluck-h4",style:{color:"var(--white)"},children:lX[e]}),(0,n.jsxs)("div",{className:"kluck-h5",style:{color:"var(--white)",opacity:".7"},children:[D[e],"data"===e&&r?" (menu has no items, skipped)":""]})]},e)),!P&&(0,n.jsx)("div",{className:"kluck-h4",style:{color:"var(--white)",opacity:".7",padding:"0 10px"},children:"No menu-bound blocks on this site."})]})})():H.menu?(()=>{var e,t,i;let o=N?(0,lz.xr)(E.menu):null,s=N?(0,lz.mr)(E.menu):null,a=s?(null===(t=s.menuItem)||void 0===t?void 0:null===(e=t.menuItem)||void 0===e?void 0:e.menuItemName)||(null===(i=s.menuItem)||void 0===i?void 0:i.menuItemName)||s.menuItemName||"its first item":null;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"kluck-font",children:(0,n.jsx)(property_PropertyMenu,{definition:lY,blockId:"NEW_SITE_WIZARD",params:{wizardMenu:j},selected:"",darkMode:l,onChange:(e,t,l)=>C(l||lq)}
1)}),(0,n.jsx)("div",{className:"kluck-h5",style:{color:"var(--white)",opacity:".7",padding:"0 10px"},children:N?(0,n.jsxs)(n.Fragment,{children:["Custom Menus will show ",(0,n.jsx)("b",{children:E.menu.menuName}),o?(0,n.jsxs)(n.Fragment,{children:["; single-section ones open on ",(0,n.jsx)("b",{children:o.sectionName})]}):null,s?(0,n.jsxs)(n.Fragment,{children:["; Menu Item data blocks will show ",(0,n.jsx)("b",{children:a}),"."]}):(0,n.jsx)(n.Fragment,{children:"; this menu has no items, so Menu Item data blocks are left as they are."})]}):j.conceptId&&!T?"Loading menus for this concept...":"No menu chosen: the menus on the copied pages are left as they are. Pick a specific menu (not Scheduled) to replace them."})]})})():(0,n.jsx)(WizardFields,{fields:(H.fields||[]).map(e=>{let t=L[e.name];return t&&property_compileCommandText(t.commandText,I)?{definition:t,params:I,blockId:"WEBSITE"}:null}).filter(Boolean),breakpoint:d,darkMode:l,onChangeHandler:(e,t,l)=>{null!=l&&(compareObjects(I[t],l)||(x({type:"UPDATE_PROPERTY",blockId:"WEBSITE",name:t,value:l}),"location"===t&&"string"==typeof l&&"null"!==l&&(m(l),C(lq))))}})})})},lQ=l(11163),l$=l(46293),EditorComponents_TopComponents=e=>{let{editor:t,darkMode:l,setShowPageManager:i,showPageManager:o,onSelectedSiteHandler:a,selectedPage:r}=e,d=(0,s.I0)(),c=(0,s.v9)(e=>{var t;return null===(t=e.usersList.selectedBlock)||void 0===t?void 0:t.blockId}),activeClass=e=>e?"kluck-light":"kluck-neutral",u=!o&&"WEBSITE"===c,p=!o&&"PAGE"===c;return(0,n.jsx)("div",{style:{padding:"10px",zIndex:"999"},children:(0,n.jsx)(lx.M,{children:t.open&&(0,n.jsxs)(lr.E.div,{className:"editor",style:{width:"100%",display:"flex",gap:"10px",justifyContent:"space-between"},animate:{y:0,opacity:1},initial:{y:-200,opacity:0},exit:{y:-200,opacity:0},transition:{ease:"linear",duration:.5},children:[(0,n.jsx)(lp.Z,{variant:"solid",className:"".concat(activeClass(u)," kluck-font kluck-h1"),style:{width:"38%",height:"36px"},onMouseDown:e=>{e.preventDefault(),a()},children:(0,n.jsxs)(lh.ZP,{className:"".concat(activeClass(u)," kluck-font kluck-h3"),style:{height:"36px",width:"100%",borderRadius:"8px",padding:"none",border:"none"},children:[(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{marginRight:"5px"},children:[(0,n.jsx)("path",{d:"M7.99992 14.6666C11.6818 14.6666 14.6666 11.6819 14.6666 7.99998C14.6666 4.31808 11.6818 1.33331 7.99992 1.33331C4.31802 1.33331 1.33325 4.31808 1.33325 7.99998C1.33325 11.6819 4.31802 14.6666 7.99992 14.6666Z",stroke:"#292D32",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.33324 2H5.9999C4.6999 5.89333 4.6999 10.1067 5.9999 14H5.33324",stroke:"#292D32",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M10 2C11.3 5.89333 11.3 10.1067 10 14",stroke:"#292D32",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M2 10.6667V10C5.89333 11.3 10.1067 11.3 14 10V10.6667",stroke:"#292D32",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M2 5.99996C5.89333 4.69996 10.1067 4.69996 14 5.99996",stroke:"#292D32",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),"Site Settings"]})}),(0,n.jsx)(lp.Z,{variant:"solid",className:activeClass(p),style:{width:"38%",height:"36px"},onMouseDown:e=>{e.preventDefault(),d({type:"SELECTED_PAGE_HANDLER",blockPage:r}),d({type:"SELECT_VIEW",view:null})},children:(0,n.jsxs)(lh.ZP,{className:"".concat(activeClass(p)," kluck-font kluck-h3"),style:{height:"36px",width:"100%",borderRadius:"8px",padding:"none",border:"none"},children:[(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",style:{marginRight:"5px"},children:[(0,n.jsx)("path",{d:"M15.1666 6.66665V9.99998C15.1666 13.3333 13.8333 14.6666 10.4999 14.6666H6.49992C3.16659 14.6666 1.83325 13.3333 1.83325 9.99998V5.99998C1.83325 2.66665 3.16659 1.33331 6.49992 1.33331H9.83325",stroke:"#292D32",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M15.1666 6.66665H12.4999C10.4999 6.66665 9.83325 5.99998 9.83325 3.99998V1.33331L15.1666 6.66665Z",stroke:"#292D32",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.16675 8.66663H9.16675",stroke:"#292D32",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.16675 11.3334H7.83341",stroke:"#292D32",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),"Page Settings"]})}),(0,n.jsx)(lp.Z,{variant:"solid",className:activeClass(o),style:{width:"22.5%",height:"36px"},onMouseDown:e=>{e.preventDefault(),i(!0)},children:(0,n.jsxs)(lh.ZP,{className:"".concat(activeClass(o)," kluck-font kluck-h3"),style:{height:"36px",width:"100%",borderRadius:"8px",padding:"none",border:"none"},children:[(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{marginRight:"5px"},children:[(0,n.jsx)("path",{d:"M8.67343 1.94669L12.6068 3.69336C13.7401 4.19336 13.7401 5.02003 12.6068 5.52003L8.67343 7.26669C8.22676 7.46669 7.49343 7.46669 7.04676 7.26669L3.11343 5.52003C1.98009 5.02
1003 1.98009 4.19336 3.11343 3.69336L7.04676 1.94669C7.49343 1.74669 8.22676 1.74669 8.67343 1.94669Z",stroke:"#292D32",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M2 7.33337C2 7.89337 2.42 8.54004 2.93333 8.76671L7.46 10.78C7.80667 10.9334 8.2 10.9334 8.54 10.78L13.0667 8.76671C13.58 8.54004 14 7.89337 14 7.33337",stroke:"#292D32",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M2 10.6666C2 11.2866 2.36667 11.8466 2.93333 12.1L7.46 14.1133C7.80667 14.2666 8.2 14.2666 8.54 14.1133L13.0667 12.1C13.6333 11.8466 14 11.2866 14 10.6666",stroke:"#292D32",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),"Pages"]})})]},"bottomSettingsBar")})})},l0=l(9008),l1=l.n(l0),ContextMenu_ContextItem=e=>{let{context:t,onClickHandler:l}=e;return(0,n.jsxs)(n.Fragment,{children:[!t.line&&(0,n.jsxs)("div",{onClick:()=>l(t.action),className:t.className,style:{height:"26px",cursor:"pointer",padding:"0 10px",borderRadius:"4px",display:"flex",justifyContent:"space-between",alignItems:"center",...t.style},children:[t.text,t.icon&&(0,n.jsx)(t.icon,{size:"12px"})]}),t.line&&(0,n.jsx)("div",{style:{borderTop:"1px solid #000",margin:"2.5px 0"}})]})};let l3={37:1,38:1,39:1,40:1},preventDefault=e=>e.preventDefault(),preventDefaultForScrollKeys=e=>{if(l3[e.keyCode])return preventDefault(e),!1},l5=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){l5=!0}}))}catch(e){}let l6=!!l5&&{passive:!1};try{i="onwheel"in document.createElement("div")?"wheel":"mousewheel"}catch(e){i="mousewheel"}let scrollWindows=()=>[window,(0,k.S6)()].filter((e,t,l)=>e&&l.indexOf(e)===t),disableScroll=()=>{scrollWindows().forEach(e=>{e.addEventListener("DOMMouseScroll",preventDefault,!1),e.addEventListener(i,preventDefault,l6),e.addEventListener("touchmove",preventDefault,l6),e.addEventListener("keydown",preventDefaultForScrollKeys,!1)})},enableScroll=()=>{scrollWindows().forEach(e=>{e.removeEventListener("DOMMouseScroll",preventDefault,!1),e.removeEventListener(i,preventDefault,l6),e.removeEventListener("touchmove",preventDefault,l6),e.removeEventListener("keydown",preventDefaultForScrollKeys,!1)})};var l2=l(28682),l4=l(4961),l7=l(34843),hooks_useSearch=()=>{let accessNestedObject=(e,t)=>t.split(".").reduce((e,t)=>e&&e[t],e);return(e,t,l)=>{var i;let n=null==e?void 0:null===(i=e.trim())||void 0===i?void 0:i.split(",");for(let e=0;e<n.length;e++)if(accessNestedObject(t,n[e])&&accessNestedObject(t,n[e]).toLowerCase().includes(l.toLowerCase()))return!0;return!1}},l8=l(18866),components_KluckLoading=e=>{let{title:t,subtitle:l,size:i,style:o}=e;return(0,n.jsxs)("div",{className:"kluck-font",style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",...o},children:[(0,n.jsx)("div",{className:"animationSpinner",style:{width:i||"34px",height:i||"34px",borderRadius:"50%",border:"3px solid rgba(255, 255, 255, 0.15)",borderTopColor:"var(--white)"}}),t&&(0,n.jsx)("div",{className:"kluck-header",style:{color:"var(--white)",marginTop:"14px"},children:t}),l&&(0,n.jsx)("div",{className:"kluck-h2-light",style:{color:"var(--white)",marginTop:"6px"},children:l})]})},components_KluckSearchField=e=>{let{value:t,onChange:l,placeholder:i,width:o,style:s}=e;return(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"5px",height:"36px",width:o||"287px",backgroundColor:"var(--white)",borderRadius:"4px",padding:"10px 13px",...s},children:[(0,n.jsx)(lH.Z,{size:"12",color:"var(--color-6)",style:{flexShrink:0}}),(0,n.jsx)("input",{className:"kluck-font kluckSearchInput",type:"text",value:t,placeholder:i,onChange:e=>l(e.target.value),style:{width:"100%",minWidth:0,border:"none",outline:"none",background:"transparent",color:"var(--color-6)",fontSize:"12px",fontWeight:500}})]})},components_KluckInlinePanel=e=>{let{title:t,children:l,cancelLabel:i,confirmLabel:o,confirmClassName:s,onCancel:a,onConfirm:r,style:d}=e,{contentTop:c=48,contentHeight:u=75,actionsTop:p=133}=e,stop=(e,t)=>{e.stopPropagation(),t&&t(e)};return(0,n.jsxs)("div",{className:"kluck-font",style:{position:"relative",width:"100%",height:"100%",backgroundColor:"var(--color-6)",borderRadius:"4px",overflow:"hidden",...d},children:[(0,n.jsx)("div",{style:{position:"absolute",top:"13px",left:"10px",right:"10px",fontSize:"18px",fontWeight:700,lineHeight:"18px",color:"var(--white)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),(0,n.jsx)("div",{style:{position:"absolute",top:"38px",left:"10px",right:"10px",borderTop:"1px solid var(--white)",opacity:".1"}}),(0,n.jsx)("div",{className:"kluck-h2-light",style:{position:"absolute",top:"".concat(c,"px"),left:"10px",right:"10px",height:"".concat(u,"px"),color:"var(--white)",overflow:"hidden"},children:l}),(0,n.jsxs)("div",{style:{position:"absolute",top:"".concat(p,"px"),left:"10px",right:"10px",height:"36px",display:"flex",gap:"10px"},children:[(0,n.jsx)("div",{onClick:e=>stop(e,a),className:"kluck-h3",style:{flex:"1 0 0",minWidth:0,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--white)",borderRadius:"4px",color:"var(--white)",cursor:"pointer"},children:i||"Cancel"}),(0,n.jsx)("div",{onClick:e=>stop(e,r),className:"kluck-h3 ".concat(s||"kluck-success"),style:{flex:"1 0 0",minWidth:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",cursor:"pointer"},children:o})]})]})};let l9="00000000-0000-0000-0000-000000000000",parseTemplates=(e,t)=>{let l=[];for(let n=0;n<e.length;n++)if(t||e[n].clientId!==l9)try{l.push({...e[n],templateData:"string"==typeof e[n].templateData?JSON.parse(e[n].templateData):e[n].templateData})}catch(t){var i;console.warn("TemplateManager: skipping template with unreadable templateData",null===(i=e[n])||void 0===i?void 0:i.blokBuilderTemplateId)}return l},TemplateManager_CloseIcon=e=>(0,n.jsx)("div",{onClick:e.onClick,type:"button",style:{cursor:"pointer",display:"flex",flexShrink:0},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",children:[(0,n.jsx)("path",{d:"M5.75 5.75006L17.2499 17.25",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.75006 17.25L17.25 5.75006",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),TemplateManager_Template=e=>{let{template:t,builderUser:l,confirmId:i,setConfirmId:o,editingId:a,setEditingId:d,onDeleted:c,onRenamed:u,setShow:h}=e,v=(0,s.v9)(e=>e.usersList.selectedBlock,p.Z),g=(0,s.v9)(e=>e.usersList.urls,p.Z),x=(0,s.v9)(e=>e.usersList.kanvas,p.Z),[m,k]=(0,r.useState)(t.blokBuilderTemplateName),f=(0,s.I0)(),[y]=(0,tJ.Z)(),b=t.clientId===l9,j=!b||(null==l?void 0:l.globalUser)===!0,C=i===t.blokBuilderTemplateId,L=a===t.blokBuilderTemplateId,getDirectory=e=>{for(let t=0;t<tG.K.length;t++)if(tG.K[t].displayName===e)return tG.K[t];return null},addTemplate=(e,l)=>{e.stopPropagation();let i=t.templateData;"string"==typeof i&&(i=JSON.parse(i));let n=JSON.parse(JSON.stringify(i)),parseBlockParams=e=>{if(e.blockObject=r.createElement(getDirectory(e.blockName),e.params),e.children.length>0)for(let t=0;t<e.children.length;t++)e.children[t]=parseBlockParams(e.children[t]);return e.blockId=(0,w.v4)(),e};switch(parseBlockParams(n),l){case"above":f({type:"ADD_BLOCK",blockId:null==v?void 0:v.blockId,block:n,offset:0});break;case"inside":f({type:"ADD_BLOCK_CHILD",blockId:null==v?void 0:v.blockId,block:n});break;default:f({type:"ADD_BLOCK",blockId:null==v?void 0:v.blockId,block:n,offset:1})}h(!1)},I={width:"calc((100% - 30px) / 4)",height:"179px",borderRadius:"4px",flexShrink:0};if(C)return(0,n.jsx)("div",{style:I,children:(0,n.jsx)(components_KluckInlinePanel,{title:"Delete Template",confirmLabel:"Delete",confirmClassName:"kluck-warning",onCancel:()=>o(null),onConfirm:()=>{y({method:"DELETE",url:"".concat(g.rest,"/blokbuildertemplates/").concat(t.blokBuilderTemplateId,"/clients/").concat(b?l9:x.clientId),log:{level:"ERROR",logger:"TemplateManager.remove",sendLogs:!1}}).then(()=>{o(null),c(t),f({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:t.blokBuilderTemplateName+" block template deleted successfully.",autoCloseable:!0,type:"success"}})}).catch(()=>f({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:t.blokBuilderTemplateName+" block template delete unsuccessful.",autoCloseable:!0,type:"error"}}))},children:"Are you sure you want to delete the template? This action is final."})});if(L)return(0,n.jsx)("div",{style:I,children:(0,n.jsx)(components_KluckInlinePanel,{title:"Rename Template",confirmLabel:"Rename",confirmClassName:"kluck-success",onCancel:()=>d(null),onConfirm:()=>{let e=m.trim();if(!e)return;let l={...t,blokBuilderTemplateName:e,templateData:JSON.stringify(t.templateData)};y({method:"PUT",url:"".concat(g.rest,"/blokbuildertemplates"),data:l,log:{level:"ERROR",logger:"TemplateManager.saveRename",sendLogs:!1}}).then(()=>{d(null),u({...t,blokBuilderTemplateName:e}),f({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:e+" block template edit successful.",autoCloseable:!0,type:"success"}})}).catch(()=>f({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:t.blokBuilderTemplateName+" block template edit unsuccessful.",autoCloseable:!0,type:"error"}}))},children:(0,n.jsx)("textarea",{className:"kluck-font",value:m,autoFocus:!0,onClick:e=>e.stopPropagation(),onChange:e=>k(e.target.value),style:{width:"100%",height:"100%",boxSizing:"border-box",display:"block",backgroundColor:"var(--white)",color:"var(--color-6)",border:"none",outline:"none",borderRadius:"4px",padding:"10px",fontSize:"12px",fontWeight:500,lineHeight:"14px",resize:"none"}})})});let addButton=(e,t,l)=>(0,n.jsx)("div",{title:t,onClick:t=>addTemplate(t,e),className:"kluck-neutral",style:{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"3px",cursor:"pointer",flexShrink:0},children:l});return(0,n.jsxs)("div",{style:{...I,backgroundColor:"var(--white)",overflow:"hidden"},children:[(0,n.jsx)("div",{style:{height:"115px",display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"13px"},children:t.url?(0,n.jsx)("img",{alt:"",src:t.url,style:{width:"206px",height:"92px",objectFit:"cover",borderRadius:"4px"}}):(0,n.jsx)("div",{style:{width:"206px",height:"92px",borderRadius:"4px",backgroundColor:"var(--color-1)"}})}),(0,n.jsx)("div",{style:{height:"34px",backgroundColor:"var(--color-6)",display:"flex",alignItems:"center",justifyContent:"center",padding:"5px"},children:(0,n.jsx)("div",{className:"kluck-font",title:t.blokBuilderTemplateName,style:{fontSize:"12px",fontWeight:600,color:"var(--white)",textAlign:"center",lineHeight:"12px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t.blokBuilderTemplateName})}),(0,n.jsxs)("div",{style:{height:"30px",backgroundColor:"var(--color-6)",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"5px",borderRadius:"0 0 4px 4px"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[(0,n.jsx)("div",{className:"kluck-font kluck-h5",style:{color:"var(--white)"},children:"Add"}),(0,n.jsxs)("div",{style:{display:"flex",gap:"5px"},children:[addButton("above","Add Above",(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",children:[(0,n.jsx)("path",{d:"M9.03509 4.785L6.00009 1.75L2.96509 4.785",stroke:"#292D32",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6 10.25V1.83502",stroke:"#292D32",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]})),addButton("below","Add Below",(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",children:[(0,n.jsx)("path",{d:"M2.96491 7.215L5.99991 10.25L9.03491 7.215",stroke:"#292D32",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6 1.74998L6 10.165",stroke:"#292D32",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]})),addButton("inside","Add Inside",(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",children:[(0,n.jsx)("path",{d:"M10.9999 1L6.8999 5.1",stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.5 3.08502V5.50002H8.915",stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.5 1H4.5C2 1 1 2 1 4.5V7.5C1 10 2 11 4.5 11H7.5C10 11 11 10 11 7.5V6.5",stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round"})]}))]})]}),j&&(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[(0,n.jsxs)("div",{title:"Rename Template",onClick:e=>{e.stopPropagation(),k(t.blokBuilderTemplateName),d(t.blokBuilderTemplateId)},className:"kluck-background-tile-button",style:{height:"20px",display:"flex",alignItems:"center",gap:"5px",padding:"0 10px",borderRadius:"3px",cursor:"pointer"},children:[(0,n.jsx)("span",{className:"kluck-font kluck-h4",style:{color:"var(--white)"},children:"Rename"}),(0,n.jsx)(l8.Z,{size:"14",color:"var(--white)"})]}),(0,n.jsx)("div",{title:"Delete Template",onClick:e=>{e.stopPropagation(),o(t.blokBuilderTemplateId)},className:"kluck-warning",style:{width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"3px",cursor:"pointer",flexShrink:0},children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M14 3.98665C11.78 3.76665 9.54667 3.65332 7.32 3.65332C6 3.65332 4.68 3.71999 3.36 3.85332L2 3.98665",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.66663 3.31331L5.81329 2.43998C5.91996 1.80665 5.99996 1.33331 7.12663 1.33331H8.87329C9.99996 1.33331 10.0866 1.83331 10.1866 2.44665L10.3333 3.31331",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.5667 6.09332L12.1334 12.8067C12.06 13.8533 12 14.6667 10.
114 14.6667H5.86002C4.00002 14.6667 3.94002 13.8533 3.86668 12.8067L3.43335 6.09332",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.88672 11H9.10672",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.33337 8.33331H9.66671",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})]})]})};var editorControls_TemplateManager=e=>{let{mode:t,buttonTitle:l}=e,i=(0,s.v9)(e=>e.usersList.selectedBlock,p.Z),o=(0,s.v9)(e=>e.usersList.urls,p.Z),a=(0,s.v9)(e=>e.usersList.kanvas,p.Z),c=(0,s.v9)(e=>e.usersList.builderUser,p.Z),u=(0,s.v9)(e=>e.usersList.darkMode,p.Z),[h,v]=(0,r.useState)(!1),[g,x]=(0,r.useState)(!1),[m,f]=(0,r.useState)(!1),[y,b]=(0,r.useState)([]),[j,C]=(0,r.useState)([]),[L,I]=(0,r.useState)(""),[S,E]=(0,r.useState)(null),[N,T]=(0,r.useState)(null),[M,D]=(0,r.useState)(""),[P,H]=(0,r.useState)("All"),B=(0,r.useRef)(null),[Z]=(0,tJ.Z)(),R=(0,s.I0)();(0,r.useEffect)(()=>{h&&(D(""),H("All"),E(null),T(null))},[h]),(0,r.useEffect)(()=>{if(!h||void 0===c)return;let e=!1;0===y.length&&0===j.length&&f(!0);let t={level:"ERROR",logger:"TemplateManager.loadTemplates",sendLogs:!0};return Promise.allSettled([Z({method:"GET",url:"".concat(o.rest,"/blokbuildertemplates/blockNames/").concat(l9,"/wireframes"),log:t}),Z({method:"GET",url:"".concat(o.rest,"/blokbuildertemplates/blockNames/").concat(null==a?void 0:a.clientId,"/wireframes"),log:t})]).then(t=>{let[l,i]=t;e||("fulfilled"===l.status&&C(parseTemplates(l.value.data,!0)),"fulfilled"===i.status&&b(parseTemplates(i.value.data,!1)),("rejected"===l.status||"rejected"===i.status)&&R({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:"Some templates could not be loaded. Please try again.",autoCloseable:!0,type:"error"}}),f(!1))}),()=>{e=!0}},[h]);let onClick=()=>{if("SAVE"===t){I("My ".concat(i.blockName," Block Template")),x(!0);return}v(!0)},saveCustomTemplate=async e=>{var t;let l;B.current=null===(t=(0,k.ik)())||void 0===t?void 0:t.getElementById("myDiv"+i.blockId),await (0,l$.YM)(B.current,{cacheBust:!0,quality:.3}).then(function(e){l=e}).catch(e=>{console.error(e)});let n=JSON.parse(JSON.stringify(i)),parseBlockParams=e=>{if(e.children.length>0)for(let t=0;t<e.children.length;t++)e.children[t]=parseBlockParams(e.children[t]);return e.blockId=(0,w.v4)(),e};n.template=!0;let s=(0,w.v4)();n.templateId=s,n=parseBlockParams(n);let r={blokBuilderTemplateId:s,blokBuilderTemplateName:L,clientId:e?l9:a.clientId,userId:e?l9:c.userId,blockName:"wireframes",templateData:JSON.stringify(n),publicFlag:!1,url:l};Z({method:"POST",url:"".concat(o.rest,"/blokbuildertemplates"),data:r,log:{level:"ERROR",logger:"TemplateSave.templateSaveHandler",sendLogs:!1}}).then(()=>{x(!1),R({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:i.blockName+" block template saved successfully.",autoCloseable:!0,type:"success"}}),Z({method:"GET",url:"".concat(o.rest,"/blokbuildertemplates/blockNames/").concat(e?l9:a.clientId,"/wireframes"),log:{level:"ERROR",logger:"TemplateSave.templateSaveHandler",sendLogs:!0}}).then(t=>{e?C(parseTemplates(t.data,!0)):b(parseTemplates(t.data,!1))})}).catch(()=>R({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:i.blockName+" block template save unsuccessful.",autoCloseable:!0,type:"error"}}))},A=hooks_useSearch(),V=(0,r.useMemo)(()=>{let e=new Set,t=[...y,...j];for(let i=0;i<t.length;i++){var l;let n=null===(l=t[i].templateData)||void 0===l?void 0:l.blockName;n&&e.add(n)}return["All",...Array.from(e).sort((e,t)=>e.localeCompare(t))]},[y,j]);(0,r.useEffect)(()=>{"All"===P||V.includes(P)||H("All")},[V,P]);let replaceIn=(e,t)=>{e.clientId===l9?C(e=>t(e)):b(e=>t(e))},onDeleted=e=>replaceIn(e,t=>t.filter(t=>t.blokBuilderTemplateId!==e.blokBuilderTemplateId)),onRenamed=e=>replaceIn(e,t=>t.map(t=>t.blokBuilderTemplateId===e.blokBuilderTemplateId?e:t)),_=[...y,...j].filter(e=>{var t;return("All"===P||(null===(t=e.templateData)||void 0===t?void 0:t.blockName)===P)&&(""===M||A("templateData.blockName,templateData.deviceType,blokBuilderTemplateName",e,M))});return(0,n.jsxs)(n.Fragment,{children:["EDIT"===t&&(0,n.jsx)("div",{title:l||"Edit Template",onClick:onCl
1ick,style:{filter:u?"":"invert(100%)"},children:(0,n.jsx)("span",{children:"Template Manager"})}),"SAVE"===t&&(0,n.jsx)("div",{title:l||"Save As Template",onClick:onClick,style:{filter:u?"":"invert(100%)"},children:(0,n.jsx)("span",{children:"Save As Template"})}),(0,n.jsx)(d.Z,{className:"editorModal",backdropClassName:"editorModal kluckModalBackdrop",dialogClassName:"templateSaveModalContent",centered:!0,show:g,onHide:()=>x(!1),children:(0,n.jsxs)("div",{style:{padding:"20px",backgroundColor:"var(--color-4)"},children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsx)("div",{className:"kluck-font kluck-header",style:{color:"var(--white)"},children:"Save As Template"}),(0,n.jsx)(TemplateManager_CloseIcon,{onClick:()=>x(!1)})]}),(0,n.jsx)("hr",{style:{margin:"16px 0",border:"none",borderTop:"1px solid var(--white)",opacity:".1"}}),(0,n.jsx)("div",{className:"kluck-font kluck-h1",style:{color:"var(--white)",marginBottom:"8px"},children:"Template Name"}),(0,n.jsx)("textarea",{className:"kluck-font",value:L,onChange:e=>I(e.target.value),style:{width:"100%",height:"65px",backgroundColor:"var(--white)",color:"var(--color-6)",border:"none",outline:"none",borderRadius:"4px",padding:"10px",fontSize:"18px",resize:"none"}}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"20px"},children:[(0,n.jsx)("div",{onClick:()=>x(!1),className:"kluck-font kluck-h3",style:{height:"36px",padding:"0 30px",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--white)",borderRadius:"4px",color:"var(--white)",cursor:"pointer"},children:"Cancel"}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[(0,n.jsx)("div",{onClick:()=>saveCustomTemplate(!1),className:"kluck-font kluck-h3 kluck-success",style:{height:"36px",padding:"0 30px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",cursor:"pointer"},children:"Save"}),(null==c?void 0:c.globalUser)&&(0,n.jsx)("div",{onClick:()=>saveCustomTemplate(!0),className:"kluck-font kluck-h3 kluck-utility",style:{height:"36px",padding:"0 30px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",cursor:"pointer"},children:"Save Globally"})]})]})]})}),(0,n.jsx)(d.Z,{className:"editorModal",backdropClassName:"editorModal kluckModalBackdrop",dialogClassName:"templateManagerModalContent",centered:!0,show:h,onHide:()=>v(!1),children:(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"682px",maxHeight:"88vh",backgroundColor:"var(--color-4)"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"20px",padding:"10px 20px 0",flexShrink:0},children:[(0,n.jsx)("div",{className:"kluck-font kluck-header",style:{color:"var(--white)",whiteSpace:"nowrap"},children:"Template Manager"}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"16px"},children:[(0,n.jsx)(components_KluckSearchField,{value:M,onChange:D,placeholder:"Search Templates..."}),(0,n.jsx)(TemplateManager_CloseIcon,{onClick:()=>v(!1)})]})]}),(0,n.jsx)("hr",{style:{margin:"6px 20px 0",border:"none",borderTop:"1px solid var(--color-1)",opacity:".1",flexShrink:0}}),(0,n.jsx)("div",{style:{padding:"10px 20px 0",flexShrink:0},children:(0,n.jsx)(components_KluckFilterTabs,{tabs:V,value:P,onChange:H})}),(0,n.jsxs)("div",{className:"kluckScrollArea",style:{flex:"1 1 auto",minHeight:0,overflowY:"auto",padding:"10px 20px 20px"},children:[m&&(0,n.jsx)(components_KluckLoading,{title:"Loading Templates...",subtitle:"Please be patient."}),!m&&0===_.length&&(0,n.jsx)("div",{className:"kluck-font kluck-h1",style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--white)",opacity:".6"},children:"No templates to show."}),!m&&_.length>0&&(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",alignContent:"flex-start"},children:_.map(e=>(0,n.jsx)(TemplateManager_Template,{template:e,builderUser:c,confirmId:S,setConfirmId:E,editingId:N,setEditingId:T,onDeleted:onDeleted,onRenamed:onRenamed,setShow:v},e.blokBuilderTemplateId))})]})]})})]})},ContextMenu_ContextMenu=e=>{let{onSaveHandler:t,showPublish:l,setShowPublish:i}=e,o=(0,s.v9)(e=>e.usersList.contextMenu,p.Z),a=(0,s.v9)(e=>e.usersList.copyStyleBlock,p.Z);(0,s.v9)(e=>e.usersList.selectedBlock,p.Z);let[d,c]=(0,r.useState)([]),[u,h]=(0,r.useState)({top:0,left:0}),[v,g]=(0,r.useState)(!1),[x,m]=(0,r.useState)(!1),k=(0,r.useRef)(null),f=(0,r.useRef)(!1),y=(0,s.I0)(),b="kluck-light",w="kluck-background-tile-button",calculateMenuPosition=e=>{if(!k.current)return{top:e.clientY,left:e.clientX};let t=k.current.getBoundingClientRect(),l=window.innerWidth,i=window.innerHeight,n=e.clientY,o=e.clientX;n+t.height>
1i&&(n=e.clientY-t.height)<0&&(n=Math.max(0,i-t.height)),o+t.width>l&&(o=e.clientX-t.width)<0&&(o=Math.max(0,l-t.width));let s="".concat(n<e.clientY?"bottom":"top"," ").concat(o<e.clientX?"right":"left");return{top:n,left:o,origin:s}},j=[{text:"Delete",action:"DELETE",className:"kluck-warning"},{text:"Copy",action:"COPY",className:b},{text:"Copy Style",action:"COPY-STYLE",className:b},{text:"Paste",action:"PASTE",className:b},{text:"Duplicate",action:"DUPLICATE",className:b},{text:"Add Above",action:"ADD-ABOVE",className:w,icon:l2.Z},{text:"Add Below",action:"ADD-BELOW",className:w,icon:l4.Z},{text:"Add Inside",action:"ADD-INSIDE",className:w,icon:l7.Z},{text:"Move Up",action:"MOVE-UP",className:w,icon:t0.Z},{text:"Move Down",action:"MOVE-DOWN",className:w,icon:t1.Z}];(0,r.useLayoutEffect)(()=>{if(!o){enableScroll(),g(!1);return}disableScroll(),m(!1),g(!1),h({top:o.event.clientY,left:o.event.clientX});let e=[...j];if(a&&a.blockName===(null==o?void 0:o.blockName)){let t=e.findIndex(e=>"PASTE"===e.action);e.splice(t+1,0,{text:"Paste Style",action:"PASTE-STYLE",className:b})}c([...e])},[o]),(0,r.useLayoutEffect)(()=>{if(o&&k.current){let e=calculateMenuPosition(o.event);h(e),g(!0)}},[o,d]),(0,r.useLayoutEffect)(()=>{if(o){f.current=!0;return}if(!f.current)return;f.current=!1,m(!0);let e=setTimeout(()=>m(!1),100);return()=>clearTimeout(e)},[o]);let handleClose=()=>{y({type:"CLOSE_CONTEXT_MENU"})};(0,r.useEffect)(()=>{let handleClickOutside=e=>{!k.current||k.current.contains(e.target)||e.target.closest(".editorModal")||handleClose()};return document.addEventListener("mousedown",handleClickOutside),()=>{document.removeEventListener("mousedown",handleClickOutside)}},[]);let onClick=e=>{switch(e){case"DELETE":y({type:"DELETE_BLOCK",blockId:null==o?void 0:o.blockId});break;case"COPY":y({type:"COPY_BLOCK",blockId:null==o?void 0:o.blockId});break;case"COPY-STYLE":y({type:"COPY_STYLE",blockId:null==o?void 0:o.blockId});break;case"PASTE":y({type:"USE_COPY_BLOCK",blockId:null==o?void 0:o.blockId});break;case"PASTE-STYLE":y({type:"USE_COPY_STYLE",blockId:null==o?void 0:o.blockId});break;case"DUPLICATE":y({type:"DUPLICATE_BLOCK",blockId:null==o?void 0:o.blockId});break;case"ADD-ABOVE":y({type:"ADD_BLOCK",blockId:null==o?void 0:o.blockId,offset:0});break;case"ADD-BELOW":y({type:"ADD_BLOCK",blockId:null==o?void 0:o.blockId,offset:1});break;case"ADD-INSIDE":y({type:"ADD_BLOCK_CHILD",blockId:null==o?void 0:o.blockId});break;case"MOVE-UP":y({type:"CHANGE_BLOCK_POSITION",blockId:null==o?void 0:o.blockId,direction:-1});break;case"MOVE-DOWN":y({type:"CHANGE_BLOCK_POSITION",blockId:null==o?void 0:o.blockId,direction:1});break;default:console.log("Unknown action: ",e)}handleClose()};return(0,n.jsx)(n.Fragment,{children:(null!==o||x)&&(0,n.jsxs)(n.Fragment,{children:[null!==o&&(0,n.jsx)("div",{onMouseDown:handleClose,style:{position:"fixed",inset:0,zIndex:"1064"}}),(0,n.jsxs)("div",{ref:k,className:"kluck-context-menu kluck-font kluck-h2 ".concat(x?"kluck-context-menu-exit":v?"kluck-context-menu-enter":""),style:{position:"fixed",zIndex:"1065",top:u.top,left:u.left,transformOrigin:u.origin||"top left",visibility:v||x?"visible":"hidden",pointerEvents:x?"none":"auto",background:"var(--color-4)",padding:"5px",display:"flex",flexDirection:"column",gap:"5px",borderRadius:"6px"},children:[d.map((e,t)=>(0,n.jsx)(ContextMenu_ContextItem,{context:e,onClickHandler:onClick},t)),(0,n.jsx)("div",{className:"kluck-success",style:{height:"26px",cursor:"pointer",padding:"0 10px",borderRadius:"4px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,n.jsx)(editorControls_TemplateManager,{mode:"SAVE"})}),(0,n.jsx)("div",{className:"kluck-neutral",style:{height:"26px",cursor:"pointer",padding:"0 10px",borderRadius:"4px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,n.jsx)(editorControls_TemplateManager,{mode:"EDIT"})}),(0,n.jsxs)("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"5px",whiteSpace:"nowrap",cursor:"pointer"},children:[(0,n.jsx)(EditorComponents_SaveAndPublish,{onSaveHandler:t,showPublish:l,setShowPublish:i}),(0,n.jsx)(EditorComponents_UndoAndRedo,{})]})]})]})})},ie=l(73935),it=l(87685),il=l(48711);let ii="data-preview-emotion-mirror",pendingStyleText=(e,t)=>
1{let l;let i=e.textContent;if(i&&i.trim())return i===t.clone.textContent?null:i;try{var n;l=null===(n=e.sheet)||void 0===n?void 0:n.cssRules}catch(e){return null}if(!l||0===l.length||l.length===t.ruleCount)return null;t.ruleCount=l.length;let o="";for(let e=0;e<l.length;e++)o+=l[e].cssText+"\n";return o},createPreviewCache=e=>{let t=(0,il.Z)({key:"css",container:e.head}),l=document.createElement("style");l.setAttribute(ii,""),document.head.appendChild(l);let i=t.sheet.insert.bind(t.sheet);return t.sheet.insert=e=>{i(e);let t=l.sheet;if(t)try{t.insertRule(e,t.cssRules.length)}catch(e){}},{previewDocument:e,cache:t,dispose:()=>l.remove()}};var renderers_IFrame=e=>{var t,l,i;let{children:o,contentRef:s,onReady:a,...d}=e,c=(0,r.useRef)(null),[u,p]=(0,r.useState)(null),[h,v]=(0,r.useState)(null),g=(0,r.useRef)(null),x=(0,r.useRef)(null),m=(0,r.useRef)(new Map),f=(0,r.useRef)(a),y=(0,r.useRef)(!1);f.current=a;let b=(0,r.useCallback)(()=>{var e,t,l;let i=null===(l=c.current)||void 0===l?void 0:null===(t=l.contentWindow)||void 0===t?void 0:null===(e=t.document)||void 0===e?void 0:e.head;if(!i)return;let n=m.current,o=null;for(let e of Array.from(document.head.children)){if(e.hasAttribute(ii))continue;let t=n.get(e);t||(t={clone:e.cloneNode(!0),ruleCount:0},n.set(e,t));let l=t.clone;if("STYLE"===e.tagName){let i=pendingStyleText(e,t);null!==i&&(l.textContent=i)}(l.parentNode!==i||l.previousElementSibling!==o)&&i.insertBefore(l,o?o.nextSibling:i.firstChild),o=l}for(let[e,t]of n)e.parentNode!==document.head&&(t.clone.remove(),n.delete(e));let s=i.ownerDocument.documentElement;s&&(s.style.height="100%");let a=i.ownerDocument.body;a&&(a.style.margin="0",a.style.backgroundColor="transparent",a.style.width="100%",a.style.minHeight="100%")},[]),w=(0,r.useCallback)(function(){var e,t,l,i;let{speculative:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=null===(t=c.current)||void 0===t?void 0:null===(e=t.contentWindow)||void 0===e?void 0:e.document;(null==o?void 0:o.body)&&(!n||o.doctype)&&((null===(l=x.current)||void 0===l?void 0:l.previewDocument)!==o&&(null===(i=x.current)||void 0===i||i.dispose(),m.current=new Map,x.current=createPreviewCache(o),v(x.current.cache)),b(),(0,k.lc)(o),p(o.body),g.current&&g.current.disconnect(),g.current=new MutationObserver(b),g.current.observe(document.head,{attributes:!0,characterData:!0,childList:!0,subtree:!0}))},[b]);(0,r.useEffect)(()=>{var e,t,l;return!u&&(null===(l=c.current)||void 0===l?void 0:null===(t=l.contentWindow)||void 0===t?void 0:null===(e=t.document)||void 0===e?void 0:e.body)&&w({speculative:!0}),()=>{var e;g.current&&g.current.disconnect(),null===(e=x.current)||void 0===e||e.dispose(),x.current=null,(0,k.lc)(null)}},[]),(0,r.useEffect)(()=>{var e;if(!u||!h||y.current)return;let t=u.ownerDocument,l=null==t?void 0:t.defaultView,i=!1,n=null,o=0,finish=()=>{var e;i||(i=!0,y.current=!0,clearTimeout(s),clearTimeout(o),null==n||n.disconnect(),null===(e=f.current)||void 0===e||e.call(f))},s=setTimeout(finish,5e3),armQuietTimer=()=>{clearTimeout(o),o=setTimeout(finish,250)};return Promise.all([null===(e=t.fonts)||void 0===e?void 0:e.ready,(()=>{let e=(null==l?void 0:l.innerHeight)||0,i=Array.from(t.images||[]).filter(t=>!t.complete&&t.getBoundingClientRect().top<1.5*e).map(e=>new Promise(t=>{e.addEventListener("load",t,{once:!0}),e.addEventListener("error",t,{once:!0})}));return Promise.all(i)})()]).catch(()=>{}).then(()=>{i||((null==l?void 0:l.MutationObserver)&&t.body&&(n=new l.MutationObserver(armQuietTimer)).observe(t.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),armQuietTimer())}),()=>{i=!0,clearTimeout(s),clearTimeout(o),null==n||n.disconnect()}},[u,h]);let j=null!==(i=null===(l=c.current)||void 0===l?void 0:null===(t=l.contentWindow)||void 0===t?void 0:t.document)&&void 0!==i?i:null;return(0,n.jsx)("iframe",{...d,ref:c,srcDoc:"<!DOCTYPE html><html><head></head><body></body></html>",onLoad:()=>w(),style:{border:"none",...d.style},children:u&&h&&(0,n.jsx)(k.P8.Provider,{value:j,children:(0,n.jsx)(it.C,{value:h,children:(0,ie.createPortal)(o,u)})})})},editorControls_EditorFloatingBar=e=>{let{layerEditorOpen:t,layersHidden:l}=e,i=(0,s.v9)(e=>e.usersList.selectedBlock,p.Z),o=(0,s.v9)(e=>e.usersList.copyBlock,p.Z),a=(0,s.v9)(e=>e.usersList.state,p.Z),d=(0,s.v9)(e=>e.usersList.states,p.Z),c=(0,s.I0)(),u=(0,r.useMemo)(()=>d.reverse(),[]),h=i&&Object.keys(i).length>0&&(null==i?void 0:i.blockName)!=="Page"&&(null==i?void 0:i.blockName)!=="Website",[v,g]=(0,r.useState)({width:1200,left:0});(0,r.useEffect)(()=>{let e;let updateEditorDimensions=()=>{{let e=document.querySelector("#editorPageContainer");if(e){let t=e.getBoundingClientRect();g({width:t.width,left:t.left})}}};if(updateEditorDimensions(),window.ResizeObserver){let t=document.querySelector("#editorPageContainer");t&&(e=new ResizeObserver(()=>{updateEditorDimensions()})).observe(t)}let handleResize=()=>{updateEditorDimensions()};return window.addEventListener("resize",handleResize),()=>{e&&e.disconnect(),window.removeEventListener("resize",handleResize)}},[]);let x=v.width-(!t&&l?300:0),m=v.left+v.width/2-(l?-150:0),changeBlockPositionHandler=e=>{h&&c({type:"CHANGE_BLOCK_POSITION",blockId:i.blockId,direction:e})},addBlockHandler=e=>{h&&c({type:"ADD_BLOCK",blockId:i.blockId,offset:e})},changeState=e=>{c({type:"UPDATE_STATE",state:e})},getButtonStyle=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];
1return{borderRadius:"6px",overflow:"hidden",width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center",cursor:h&&e?"pointer":"not-allowed",pointerEvents:h&&e?"auto":"none",transition:"all 0.2s ease",":hover":{transform:h&&e?"scale(1.05)":"none"}}},k={padding:"0",display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},f={display:"flex",gap:"5px",alignItems:"center",opacity:h?"1":"0.5",transition:"all 0.2s ease"},y={fontSize:"12px",fontWeight:"400",color:"var(--color-1)",fontFamily:"Urbanist"},[b,w]=(0,r.useState)(!1),[j,C]=(0,r.useState)(!1),[L,E]=(0,r.useState)(""),onClick=(e,t)=>{if("SAVE"===e){E("My ".concat(t.blockName," Block Template")),w(!0);return}C(!0)};return(0,r.useEffect)(()=>{let e=document.getElementById("editorFloatingBar");if(e){let t=new ResizeObserver(e=>{for(let t of e){let{height:e}=t.target.getBoundingClientRect(),l=document.getElementById("editorFloatingBarBackground");l&&(l.style.height="".concat(e+10,"px"))}});return t.observe(e),()=>{t.disconnect()}}},[]),(0,n.jsx)(lx.M,{children:!t&&(0,n.jsxs)("div",{id:"editorFloatingBar",style:{backgroundColor:"var(--color-4)",position:"fixed",bottom:"5px",left:"".concat(m,"px"),transform:"translateX(-50%)",zIndex:"1064",maxWidth:"".concat(Math.max(x-40,300),"px"),padding:"5px",display:"flex",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",gap:"10px 20px",minHeight:"30px",borderRadius:"6px"},children:[(0,n.jsxs)("div",{style:{...f,opacity:"1",maxHeight:"20px"},children:[(0,n.jsx)("span",{style:y,children:"State"}),(0,n.jsx)(I.Z,{isOptionEqualToValue:(e,t)=>(null==e?void 0:e.value)===(null==t?void 0:t.value),getOptionLabel:e=>(null==e?void 0:e.label)||"",value:a||null,disableClearable:!0,onChange:(e,t)=>
1changeState(t),placeholder:(null==a?void 0:a.label)||"Default",options:u,className:"kluck-component kluck-font kluck-h3 kluck-background-tile",name:"state",renderInput:e=>(0,n.jsx)(S.Z,{...e,inputProps:{...e.inputProps,autoComplete:"new-password"}}),style:{width:"87px",padding:"4px !important",height:"100%",border:"none",outline:"none",textAlign:"center",borderRadius:"4px",margin:"0",color:"white","--Input-placeholderOpacity":"1","--Input-focusedThickness":"0px"},slotProps:{listbox:{className:"stateSelectorListbox"}},renderOption:(e,t)=>{let{key:l,...i}=e;return(0,n.jsx)("li",{...i,className:"kluck-background-tile-button kluck-h3 kluck-font kluck-hover",style:{padding:"8px",cursor:"pointer",borderRadius:"4px"},children:t.label},l)},popupIcon:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"10px",height:"5px",margin:"0 4px"},viewBox:"0 0 8 4",fill:"none",children:(0,n.jsx)("path",{d:"M6.63999 0.983398L4.46665 3.15673C4.20999 3.4134 3.78999 3.4134 3.53332 3.15673L1.35999 0.983398",stroke:"white",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,n.jsxs)("div",{style:f,children:[(0,n.jsx)("span",{style:y,children:"Add"}),(0,n.jsx)("div",{className:"kluck-neutral",onClick:()=>addBlockHandler(0),style:getButtonStyle(),title:h?"ADD BLOCK ABOVE CURRENT BLOCK":"SELECT A BLOCK TO ENABLE THIS ACTION",children:(0,n.jsx)("div",{className:"kluck-font kluck-h4-bold",style:k,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",children:[(0,n.jsx)("path",{d:"M9.03509 4.785L6.00009 1.75L2.96509 4.785",stroke:"#292D32",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6 10.25V1.83502",stroke:"#292D32",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]})})}),(0,n.jsx)("div",{className:"kluck-neutral",onClick:()=>addBlockHandler(1),style:getButtonStyle(),title:h?"ADD BLOCK BELOW CURRENT BLOCK":"SELECT A BLOCK TO ENABLE THIS ACTION",children:(0,n.jsx)("div",{className:"kluck-font kluck-h4-bold",style:k,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",children:[(0,n.jsx)("path",{d:"M2.96491 7.215L5.99991 10.25L9.03491 7.215",stroke:"#292D32",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6 1.74998L6 10.165",stroke:"#292D32",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]})})}),(0,n.jsx)("div",{className:"kluck-neutral",onClick:()=>{h&&c({type:"ADD_BLOCK_CHILD",blockId:i.blockId})},style:getButtonStyle(),title:h?"ADD BLOCK INSIDE CURRENT BLOCK":"SELECT A BLOCK TO ENABLE THIS ACTION",children:(0,n.jsx)("div",{className:"kluck-font kluck-h4-bold",style:k,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",children:[(0,n.jsx)("path",{d:"M10.9999 1L6.8999 5.1",stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.5 3.08502V5.50002H8.915",stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.5 1H4.5C2 1 1 2 1 4.5V7.5C1 10 2 11 4.5 11H7.5C10 11 11 10 11 7.5V6.5",stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]}),(0,n.jsxs)("div",{style:f,children:[(0,n.jsx)("span",{style:y,children:"Move"}),(0,n.jsx)("div",{className:"kluck-white",onClick:()=>changeBlockPositionHandler(-1),style:getButtonStyle(),title:h?"MOVE BLOCK UP IN HIERARCHY":"SELECT A BLOCK TO ENABLE THIS ACTION",children:(0,n.jsx)("div",{className:"kluck-font kluck-h4-bold",style:k,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",children:(0,n.jsx)("path",{d:"M2.03996 7.52502L5.29996 4.26502C5.68496 3.88002 6.31496 3.88002 6.69996 4.26502L9.95996 7.52502",stroke:"#292D32",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})})}),(0,n.jsx)("div",{className:"kluck-white",onClick:()=>changeBlockPositionHandler(1),style:getButtonStyle(),title:h?"MOVE BLOCK DOWN IN HIERARCHY":"SELECT A BLOCK TO ENABLE THIS ACTION",children:(0,n.jsx)("div",{className:"kluck-font kluck-h4-bold",style:k,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",children:(0,n.jsx)("path",{d:"M9.96004 4.47498L6.70004 7.73498C6.31504 8.11998 5.68504 8.11998 5.30004 7.73498L2.04004 4.47498",stroke:"#292D32",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),(0,n.jsxs)("div",{style:f,children:[(0,n.jsx)("span",{style:y,children:"Function"}),(0,n.jsx)("div",{style:f,children:(0,n.jsx)("div",{className:"kluck-warning",onClick:()=>{h&&c({type:"DELETE_BLOCK",blockId:null==i?void 0:i.blockId})},style:getButtonStyle(),title:h?"DELETE CURRENT BLOCK":"SELECT A BLOCK TO ENABLE THIS ACTION",children:(0,n.jsx)("div",{className:"kluck-font kluck-h4-bold",style:k,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M14 3.9869C11.78 3.7669 9.54667 3.65356 7.32 3.65356C6 3.65356 4.68 3.72023 3.36 3.85356L2 3.9869",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.6665 3.3135L5.81317 2.44016C5.91984 1.80683 5.99984 1.3335 7.1265 1.3335H8.87317C9.99984 1.3335 10.0865 1.8335 10.1865 2.44683L10.3332 3.3135",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.5664 6.09351L12.1331 12.8068C12.0598 13.8535 11.9998 14.6668 10.1398 14.6668H5.85977C3.99977 14.6668 3.93977 13.8535 3.86644 12.8068L3.43311 6.09351",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.88672 11H9.10672",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M6.3335 8.3335H9.66683",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"})]})})})}),(0,n.jsx)("div",{className:"kluck-muted",onClick:()=>{h&&c({type:"DUPLICATE_BLOCK",blockId:null==i?void 0:i.blockId})},style:getButtonStyle(),title:h?"DUPLICATE CURRENT BLOCK":"SELECT A BLOCK TO ENABLE THIS ACTION",children:(0,n.jsx)("div",{className:"kluck-font kluck-h4-bold",style:k,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[(0,n.jsx)("g",{clipPath:"url(#clip0_1072_3107)",children:(0,n.jsx)("path",{d:"M9.04167 10.3177V10.8281C9.04167 12.0945 8.01114 13.125 6.74479 13.125H3.17188C1.90553 13.125 0.875 12.0945 0.875 10.8281V7.25521C0.875 5.98886 1.90553 4.95833 3.17188 4.95833H3.68229C3.82317 4.95833 3.9375 5.07267 3.9375 5.21354C3.9375 5.35442 3.82317 5.46875 3.68229 5.46875H3.17188C2.18677 5.46875 1.38542 6.2701 1.38542 7.25521V10.8281C1.38542 11.8132 2.18677 12.6146 3.17188 12.6146H6.74479C7.7299 12.6146 8.53125 11.8132 8.53125 10.8281V10.3177C8.53125 10.1768 8.64558 10.0625 8.78646 10.0625C8.92733 10.0625 9.04167 10.1768 9.04167 10.3177ZM13.125 3.17188V6.74479C13.125 8.01114 12.0945 9.04167 10.8281 9.04167H7.25521C5.98886 9.04167 4.95833 8.01114 4.95833 6.74479V3.17188C4.95833 1.90553 5.98886 0.875 7.25521 0.875H10.8281C12.0945 0.875 13.125 1.90553 13.125 3.17188ZM12.6146 3.17188C12.6146 2.18677 11.8132 1.38542 10.8281 1.38542H7.25521C6.2701 1.38542 5.46875 2.18677 5.46875 3.17188V6.74479C5.46875 7.7299 6.2701 8.53125 7.25521 8.53125H10.8281C11.8132 8.53125 12.6146 7.7299 12.6146 6.74479V3.17188Z",fill:"white",stroke:"white",strokeWidth:"0.5"})}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_1072_3107",children:(0,n.jsx)("rect",{width:"14",height:"14",fill:"white"})})})]})})}),(0,n.jsx)("div",{className:"kluck-muted",onClick:()=>{h&&c({type:"COPY_BLOCK",blockId:null==i?void 0:i.blockId})},style:getButtonStyle(),title:h?"COPY CURRENT BLOCK TO CLIPBOARD":"SELECT A BLOCK TO ENABLE THIS ACTION",children:(0,n.jsx)("div",{className:"kluck-font kluck-h4-bold",style:k,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M9.99316 11.6668H10.9998C13.0132 11.6668 14.6665 10.0201 14.6665 8.0001C14.6665 5.98677 13.0198 4.33344 10.9998 4.33344H9.99316",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.99967 4.33344H4.99967C2.97967 4.33344 1.33301 5.9801 1.33301 8.0001C1.33301 10.0134 2.97967 11.6668 4.99967 11.6668H5.99967",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M5.33301 8H10.6663",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"})]})})}),(0,n.jsx)("div",{className:(null==o?void 0:o.blockId)&&h?"kluck-muted":"kluck-muted-dim",onClick:()=>{h&&(null==o?void 0:o.blockId)&&c({type:"USE_COPY_BLOCK",blockId:null==i?void 0:i.blockId})},style:getButtonStyle(null==o?void 0:o.blockId),title:h?(null==o?void 0:o.blockId)?"PASTE COPIED BLOCK":"NO BLOCK TO PASTE":"SELECT A BLOCK TO ENABLE THIS ACTION",children:(0,n.jsx)("div",{className:"kluck-font kluck-h4-bold",style:k,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[(0,n.jsx)("path",{d:"M4.87519 13.5H2.70339C1.48649 13.5 0.5 12.5135 0.5 11.2966V2.70339C0.5 1.48649 1.48649 0.5 2.70339 0.5H7.99153C9.20843 0.5 10.1949 1.48649 10.1949 2.70339",stroke:"white",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M12.0754 5.11913L13.1771 6.22083C13.3765 6.42018 13.4998 6.6956 13.4998 6.99984V12.3981C13.4998 13.0066 13.0066 13.4998 12.3981 13.4998H7.99134C7.3829 13.4998 6.88965 13.0066 6.889
165 12.3981V5.89814C6.88965 5.2897 7.3829 4.79645 7.99134 4.79645H11.2964C11.6006 4.79645 11.8761 4.91976 12.0754 5.11913Z",stroke:"white",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M7.99126 0.5L7.19407 2.0944C7.00745 2.46763 6.62598 2.70339 6.20869 2.70339H4.48572C4.06843 2.70339 3.68697 2.46763 3.50034 2.0944L2.70312 0.5",stroke:"white",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M9.09277 8.10156H11.2962",stroke:"white",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M9.09277 10.3051H11.2962",stroke:"white",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]})})})]}),(0,n.jsxs)("div",{style:f,children:[(0,n.jsx)("span",{style:y,children:"Templates"}),(0,n.jsxs)("div",{onClick:()=>onClick("SAVE",w,C,E,i),className:"kluck-success",style:{...getButtonStyle(),position:"relative"},children:[(0,n.jsx)("div",{className:"kluck-font kluck-h4-bold",style:k,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,n.jsx)("path",{d:"M4.77344 11.2448H11.2266M4.77344 8.54687H11.2266M5.84895 1.54687V4.20835C5.84895 4.8124 6.33865 5.3021 6.9427 5.3021H9.0573C9.66135 5.3021 10.1511 4.8124 10.1511 4.20835V1.54687M10.1511 1.54687H4.28366C3.55845 1.54687 2.86296 1.83497 2.35015 2.34777L2.34777 2.35018C1.83497 2.86296 1.54688 3.55847 1.54688 4.28366V11.7164C1.54688 12.4416 1.83497 13.1371 2.34777 13.6498L2.35015 13.6523C2.86296 14.1651 3.55845 14.4531 4.28366 14.4531H11.7163C12.4416 14.4531 13.137 14.1651 13.6498 13.6523L13.6522 13.6498C14.165 13.1371 14.4531 12.4416 14.4531 11.7164V5.84898C14.4531 5.16032 14.1796 4.49989 13.6926 4.01295L11.9871 2.30739C11.5001 1.82045 10.8397 1.54687 10.1511 1.54687Z",stroke:"white",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,n.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0,cursor:"pointer"},children:(0,n.jsx)(editorControls_TemplateManager,{mode:"SAVE",showSave:b,setShowSave:w,setShow:C,customName:L,setCustomName:E,selectedBlock:i,show:j,buttonTitle:h?"SAVE CURRENT BLOCK AS TEMPLATE":"SELECT A BLOCK TO ENABLE THIS ACTION"})})]}),(0,n.jsxs)("div",{onClick:()=>onClick("EDIT",w,C,E,i),className:"kluck-white",style:{...getButtonStyle(),position:"relative"},children:[(0,n.jsx)("div",{className:"kluck-font kluck-h4-bold",style:k,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsx)("path",{d:"M8.67318 1.94663L12.6065 3.6933C13.7399 4.1933 13.7399 5.01996 12.6065 5.51996L8.67318 7.26663C8.22652 7.46663 7.49318 7.46663 7.04652 7.26663L3.11318 5.51996C1.97985 5.01996 1.97985 4.1933 3.11318 3.6933L7.04652 1.94663C7.49318 1.74663 8.22652 1.74663 8.67318 1.94663Z",stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M2 7.33325C2 7.89325 2.42 8.53992 2.93333 8.76658L7.46 10.7799C7.80667 10.9333 8.2 10.9333 8.54 10.7799L13.0667 8.76658C13.58 8.53992 14 7.89325 14 7.33325",stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M2 10.6667C2 11.2867 2.36667 11.8467 2.93333 12.1001L7.46 14.1134C7.80667 14.2667 8.2 14.2667 8.54 14.1134L13.0667 12.1001C13.6333 11.8467 14 11.2867 14 10.6667",stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,n.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0,cursor:"pointer"},children:(0,n.jsx)(editorControls_TemplateManager,{mode:"EDIT",showSave:b,setShowSave:w,setShow:C,customName:L,setCustomName:E,selectedBlock:i,show:j,buttonTitle:h?"MANAGE TEMPLATES":"SELECT A BLOCK TO ENABLE THIS ACTION"})})]})]})]})})},io=l(48699),is=l(31567);let ia={};var hooks_useTranslations=()=>{let e=(0,s.v9)(e=>e.usersList.blockSchemas,p.Z),t=(0,s.v9)(e=>e.usersList.breakpoints,p.Z),l=(0,s.v9)(e=>e.usersList.languages,p.Z);(0,s.v9)(e=>e.usersList.kanvas,p.Z),(0,s.v9)(e=>e.usersList.urls,p.Z),(0,s.v9)(e=>e.usersList.builderUser,p.Z);let i=(0,s.v9)(e=>e.usersList.translationMessage,p.Z),{i18n:n}=(0,is.$)(),[o]=(0,tJ.Z)(),a=(0,r.useRef)(new Map);(0,r.useEffect)(()=>{var e;if((null==i?void 0:i.objectName)==="TRANSLATE"&&(null==i?void 0:null===(e=i.object)||void 0===e?void 0:e.translations)){let e=i.object.languageCode,t
1=i.object.translations,l=a.current.get(e);l&&(clearTimeout(l.timeoutId),l.translations[l.languageId]={...l.translations[l.languageId],...t},a.current.delete(e))}},[i]);let translate=async e=>{let t=l.map(async t=>{if(!n.getResourceBundle(t.languageCode,"translation"))return;let l=[],i=Object.keys(e[t.languageId]);for(let n=0;n<i.length;n++)null!==e[t.languageId][i[n]]||l.includes(i[n])||l.push(i[n]);if(0===l.length){console.log("No translations to translate");return}console.log("translationsArray",l)});await Promise.allSettled(t);let i=Date.now();for(;a.current.size>0&&Date.now()-i<1e4;)await new Promise(e=>setTimeout(e,100));for(let t in a.current.forEach((e,t)=>{clearTimeout(e.timeoutId),a.current.delete(t)}),e)if(e[t])for(let l in e[t])null===e[t][l]&&delete e[t][l];return e},getTranslationsFromBlock=function(i){var o,s,a,r;let d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ia,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"BLOCK";if(!e[i.blockName])return i;let u=null==e?void 0:null===(o=e[i.blockName])||void 0===o?void 0:o.translationDefinitions;for(let e=0;e<t.length;e++)for(let o=0;o<u.length;o++){let c=null===(a=i[t[e].key])||void 0===a?void 0:a[null===(s=u[o])||void 0===s?void 0:s.name],p=[];if("string"!=typeof c)continue;switch(null===(r=u[o])||void 0===r?void 0:r.inputType){case"HTML":let h=c.match(/>([^<]+)</g);if(h)for(let e=0;e<h.length;e++){let t=h[e].trim().replace(/>/g,"").replace(/</g,"");t&&p.push(t)}break;case"TEXT":p.push(c)}let v=[];for(let e=0;e<p.length;e++)if(p[e].includes("{{")&&p[e].includes("}}")){let t=p[e].match(/{{[^}]+}}/g);if(t){let l=p[e];for(let e=0;e<t.length;e++){let i=l.indexOf(t[e]),n=l.substring(0,i).trim(),o=l.substring(i+t[e].length).trim();n&&v.push(n),l=o}l&&v.push(l)}}else v.push(p[e]);p=v;for(let e=0;e<p.length;e++)for(let t=0;t<l.length;t++){let i=n.getResourceBundle(l[t].languageCode,"translation");i&&!i[p[e]]&&(d[l[t].languageId]||(d[l[t].languageId]=[]),d[l[t].languageId][p[e]]||(d[l[t].languageId][p[e]]=null))}}for(let e=0;e<i.children.length;e++)getTranslationsFromBlock(i.children[e],d,c);return"BLOCK"===c?translate(d):d},getTranslationsFromPage=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ia,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"PAGE";for(let i=0;i<e.blocks.length;i++)getTranslationsFromBlock(e.blocks[i],t,l);return"PAGE"===l?translate(t):t};return{getTranslationsFromKanvas:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ia,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"KANVAS";for(let i=0;i<e.website.pages.length;i++)getTranslationsFromPage(e.website.pages[i],t,l);return"KANVAS"===l?translate(t):t},getTranslationsFromPage,getTranslationsFromBlock}},renderers_Editor=()=>{let e=(0,s.v9)(e=>e.usersList.kanvas,p.Z),t=(0,s.v9)(e=>e.usersList.selectedPage,p.Z),l=(0,s.v9)(e=>e.usersList.selectedBlock,p.Z),i=(0,s.v9)(e=>e.usersList.editor,p.Z),a=(0,s.v9)(e=>e.usersList.urls,p.Z),d=(0,s.v9)(e=>e.usersList.mode,p.Z),c=(0,s.v9)(e=>e.usersList.blockSchemas,p.Z),u=(0,s.v9)(e=>e.usersList.breakpoints,p.Z),h=(0,s.v9)(e=>e.usersList.state,p.Z),v=(0,s.v9)(e=>e.usersList.globalClient,p.Z),g=(0,s.v9)(e=>e.usersList.breakpoint,p.Z),x=(0,s.v9)(e=>e.usersList.swapUI,p.Z),m=((0,s.v9)(e=>e.usersList.pageTypes,p.Z),(0,s.v9)(e=>e.usersList.loadingView,p.Z)),f=(0,s.v9)(e=>e.usersList.darkMode,p.Z),y=(0,s.v9)(e=>e.usersList.editorRerender,p.Z),b=(0,s.v9)(e=>e.usersList.screenSize,p.Z),j=(0,s.v9)(e=>e.usersList.kanvasChanges,p.Z),C=(0,s.v9)(e=>e.usersList.editorCanvasReady),L=(0,s.v9)(e=>e.usersList.builderUser,p.Z),I=(0,s.v9)(e=>e.usersList.restToken,p.Z),S=(0,s.I0)(),setCanvasReady=()=>S({type:"UPDATE_VARIABLE",name:"editorCanvasReady",value:!0}),[E,N]=(0,r.useState)(!1),[T,M]=(0,r.useState)(!1);(0,r.useRef)(!1);let[D,P]=(0,r.useState)(!1),[H,B]=(0,r.useState)(!1),[Z,R]=(0,r.useState)("Content"),A=(0,r.useRef)(!0),V=(0,r.useRef)(0),_=(0,r.useRef)(0),F=(0,r.useRef)(null),{parseKanvas:U}=(0,lk.ZP)(),[G]=(0,tJ.Z)(),K=(0,lQ.useRouter)(),{getTranslationsFromKanvas:Y}=hooks_useTranslations(),clearSelectedBlock=e=>S({type:"CLEAR_SELECTED_BLOCK",page:e}),undoHandler=()=>S({type:"REPLACE_KANVAS",action:"undo"}),redoHandler=()=>S({type:"REPLACE_KANVAS",action:"redo"}),editorOpen=e=>{e||clearSelectedBlock(),S({type:"UPDATE_VARIABLE",name:"editor",value:{boolean:!0,open:e}})};async function sleep(e){return new Promise(t=>setTimeout(t,e))}let handleKeyDown=e=>{"BODY"===document.activeElement.tagName&&("Delete"===e.key?S({type:"DELETE_BLOCK",blockId:null==l?void 0:l.blockId}):e.ctrlKey&&"c"===e.key?S({type:"COPY_BLOCK",blockId:null==l?void 0:l.blockId}):e.ctrlKey&&"v"===e.key?S({type:"USE_COPY_BLOCK",blockId:null==l?void 0:l.blockId}):e.ctrlKey&&"z"===e.key?undoHandler():e.ctrlKey&&"y"===e.key?redoHandler():e.ctrlKey&&"s"===e.key&&(e.preventDefault(),onSaveHandler()))};(0,r.useEffect)(()=>{let e=document.getElementsByTagName("BODY")[0];e&&e.addEventListener("keydown",handleKeyDown);let handleBeforeUnload=function(e){if(!A.current)return e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",handleBeforeUnload),()=>{window.removeEventListener("beforeunload",handleBeforeUnload);let e=document.getElementsByTagName("BODY")[0];e&&e.removeEventListener("keydown",handleKeyDown)}},[l]),(0,r.useEffect)(()=>{i.open?(document.getElementsByTagName("BODY")[0].classList.contains("editorClosed")&&document.getElementsByTagName("BODY")[0].classList.remove("editorClosed"),document.getElementsByTagName("BODY")[0].classList.add("editorOpen")):(document.getElementsByTagName("BODY")[0].classList.contains("editorOpen")&&document.getElementsByTagName("BODY")[0].classList.remove("editorOpen"),document.getElementsByTagName("BODY")[0].classList.add("editorClosed"))},[i]);let kanvasCheck=async()=>{let t=!0,parseBlock=(e,l)=>{var i,n,o;if(!t)return;let s=null===(i=c[e.blockName])||void 0===i?void 0:i.mandatoryDefinitions;for(let t=0;t<s.length;t++){let i=!1;for(let l=0;l<u.length;l++){let a=null==e?void 0:null===(n=e[null===(o=u[l])||void 0===o?void 0:o.key])||void 0===n?void 0:n[s[t].name];if(a||0===a){i=!0;break}}if(!i){let i=(0,w.v4)(),action=()=>{S({type:"SELECTED_PAGE_HANDLER",blockPage:l});let n=e.deviceType.includes("desktop")?u.find(e=>"desktop"===e.value):u.find(e=>"mobile"===e.value);S({type:"UPDATE_BREAKPOINT",breakpoint:n}),S({type:"BLOCK_SELECT",blockId:e.blockId}),R(s[t].showType),S({type:"SLICE_EDITOR_POPUP_MESSAGES",id:i}
1)};S({type:"ADD_MESSAGE",message:{id:i,message:"The ".concat(s[t].label," property on the ").concat(e.blockName," block is mandatory."),function:{name:"Fix",action:action},type:"error",autoCloseable:!0}});return}}e.children=e.children.filter(e=>c[null==e?void 0:e.blockName]);for(let i=0;i<e.children.length;i++){if(!t)return;parseBlock(e.children[i],l)}};for(let s=0;s<e.website.pages.length;s++){var l,i,n,o;e.website.pages[s].blocks=null===(i=e.website.pages[s])||void 0===i?void 0:null===(l=i.blocks)||void 0===l?void 0:l.filter(e=>c[null==e?void 0:e.blockName]);for(let l=0;l<(null===(o=e.website.pages[s])||void 0===o?void 0:null===(n=o.blocks)||void 0===n?void 0:n.length)&&t;l++)parseBlock(e.website.pages[s].blocks[l],e.website.pages[s])}let s=parseMandatoryProps();return s||(t=!1),t},parseMandatoryProps=()=>!0,onSaveHandler=async l=>{var i,n;let o=_.current;S({type:"LOADING_VIEW",value:!0});let s=await kanvasCheck();if(!s){S({type:"LOADING_VIEW",value:!1});return}await sleep(500);let captureScreen=async()=>{await (0,l$.YM)(F.current,{skipAutoScale:!0,quality:1,cacheBust:!0,backgroundColor:(0,z.ad)(t.params.backgroundColor),canvasHeight:190,canvasWidth:338}).then(function(t){e.website.settings.thumbnailUrl=t}).catch(e=>console.error(e))};if(await Promise.race([captureScreen(),sleep(5e3)]),await sleep(500),(null==e?void 0:null===(n=e.website)||void 0===n?void 0:null===(i=n.settings)||void 0===i?void 0:i.useLanguageSelector)==="true"){let t=await Y(e,e.website.translations);e.website.translations=t}let r=await U(e);v&&(r.clientId="00000000-0000-0000-0000-000000000000");let c=JSON.stringify(r.website);r.website=c,"editor"===d?await G({method:"PUT",url:"".concat(a.rest,"/kanvass"),data:r,log:{level:"ERROR",logger:"Editor.onSaveHandler",sendLogs:!1}}).then(async()=>{await S({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:"Save Successful",autoCloseable:!0,type:"success"}}),V.current=o,A.current=!0}).catch(async()=>await S({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:"Save Failed",autoCloseable:!0,type:"error"}})):"preview"===d&&await G({method:"POST",url:"".concat(a.rest,"/kanvass"),data:r,log:{level:"ERROR",logger:"Editor.onSaveHandler",sendLogs:!1}}).then(async()=>{await S({type:"UPDATE_VARIABLE",name:"mode",value:"editor"}),await S({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:"Creation Successful",autoCloseable:!0,type:"success"}}),V.current=o,A.current=!0;let t="".concat(window.location.origin,"?mode=editor&user=").concat(null==L?void 0:L.userId,"&kanvasId=").concat(e.kanvasId,"&token=").concat(I);setTimeout(()=>window.open(t,"_self","noopener,noreferrer"),5e3)}).catch(async()=>await S({type:"ADD_MESSAGE",message:{id:(0,w.v4)(),message:"Creation Failed",autoCloseable:!0,type:"error"}})),S({type:"LOADING_VIEW",value:!1}),l&&P(!0)};(0,r.useEffect)(()=>{_.current=j,j<V.current&&(V.current=j),A.current=j===V.current},[j]),(0,r.useEffect)(()=>{"mobile"===g.value&&S({type:"UPDATE_SCREEN_SIZE",screenSize:{width:"380px",height:"100%"}}),"desktop"===g.value&&S({type:"UPDATE_SCREEN_SIZE",screenSize:{width:"100%",height:"100%"}})},[g]),(0,r.useEffect)(()=>{S({type:"UPDATE_VARIABLE",name:"clickableLinks",value:!1})},[]),(0,r.useEffect)(()=>{var t,l;let i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(null==K?void 0:null===(t=K.query)||void 0===t?void 0:t.user);I&&!L&&i&&G({method:"GET",url:"".concat(a.rest,"/users/clients/").concat(e.clientId,"/").concat(null==K?void 0:null===(l=K.query)||void 0===l?void 0:l.user),log:{level:"ERROR",logger:"Editor.useEffect",sendLogs:!0}}).then(e=>S({type:"ADD_BUILDER_USER",userData:e.data}))},[I]),(0,r.useEffect)(()=>{B(m)},[m]),(0,r.useEffect)(()=>{if(C)return;let e=setTimeout(setCanvasReady,1e4);return()=>clearTimeout(e)},[C]);let hideUi=()=>{J(!1),T?(S({type:"UPDATE_VARIABLE",name:"clickableLinks",value:!1}),S({type:"UPDATE_VARIABLE",name:"selectionGrid",value:!0})):(S({type:"UPDATE_VARIABLE",name:"clickableLinks",value:!0}),S({type:"UPDATE_VARIABLE",name:"selectionGrid",value:!1})),M(!T),editorOpen(!i.open)};(0,r.useEffect)(()=>{(null==l?void 0:l.blockId)&&setTimeout(()=>{var e;let t=null===(e=(0,k.ik)())||void 0===e?void 0:e.getElementById("myDiv"+l.blockId);t&&t.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},500)},[g]);let[q,J]=(0,r.useState)(!1),X=(0,r.useMemo)(()=>{var e;if("WEBSITE"===l.blockId||"PAGE"===l.blockId)return l.params||{};let t={...null===(e=c[l.blockName])||void 0===e?void 0:e.params,...l.desktopParams,...l[g.keyPart+"Params"]};return"default"!==h.value&&(t={...t,...l[g.keyPart+h.keyPart]}),t},[l,c,g.keyPart,h.value,h.keyPart,y]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ContextMenu_ContextMenu,{showPublish:D,setShowPublish:P,onSaveHandler:onSaveHandler}),H&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{style:{height:"100vh",width:"100vw",backgroundColor:"black",opacity:".7",zIndex:"999999",position:"absolute"}}),(0,n.jsxs)("div",{className:"kluck-font",style:{height:"100vh",width:"100vw",position:"absolute",zIndex:"999999",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},children:[(0,n.jsx)(io.Z,{color:"primary",value:15,sx:{"--CircularProgress-progressColor":"white","--CircularProgress-trackColor":"rgba(255, 255, 255, 0.2)"}}),(0,n.jsx)("div",{className:"kluck-header kluck-font",style:{lineHeight:"1",color:"white",marginTop:"15p
1x"},children:"Saving..."}),(0,n.jsx)("div",{className:"kluck-h2-light kluck-font",style:{lineHeight:"1",color:"white",marginTop:"10px"},children:"Please be patient."})]})]}),(0,n.jsxs)("div",{className:f?"darkMode":"",style:{width:"100vw",height:"100vh",display:"flex",flexDirection:x?"row-reverse":"row",backgroundColor:f?"#292D32":"unset",color:f?"white":"unset"},children:[(0,n.jsx)("div",{id:"layers","data-container":"editor-area",className:"kluck-background",style:{zIndex:"1060",maxWidth:T||q?"0%":"300px",minWidth:T||q?"0%":"300px",display:"flex",flexDirection:"column",alignItems:"center",fontSize:"16px",overflow:"hidden",height:"100%",paddingBottom:"64px",boxSizing:"border-box"},children:(0,n.jsx)(lx.M,{initial:!1,children:!T&&!q&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(lr.E.div,{animate:{y:0,opacity:1},initial:{y:-100,opacity:0},exit:{y:-100,opacity:0},transition:{ease:"linear",duration:.5},style:{opacity:".8",height:"45px",padding:"15px 15px 9px",display:"flex",alignItems:"center",flexShrink:0,justifyContent:"center"},children:[(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,n.jsxs)("g",{id:"layer",children:[(0,n.jsx)("path",{id:"Vector",d:"M8.67331 1.94669L12.6066 3.69336C13.74 4.19336 13.74 5.02002 12.6066 5.52002L8.67331 7.26669C8.22664 7.46669 7.49331 7.46669 7.04664 7.26669L3.11331 5.52002C1.97997 5.02002 1.97997 4.19336 3.11331 3.69336L7.04664 1.94669C7.49331 1.74669 8.22664 1.74669 8.67331 1.94669Z",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{id:"Vector_2",d:"M2 7.33331C2 7.89331 2.42 8.53998 2.93333 8.76665L7.46 10.78C7.80667 10.9333 8.2 10.9333 8.54 10.78L13.0667 8.76665C13.58 8.53998 14 7.89331 14 7.33331",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{id:"Vector_3",d:"M2 10.6667C2 11.2867 2.36667 11.8467 2.93333 12.1L7.46 14.1134C7.80667 14.2667 8.2 14.2667 8.54 14.1134L13.0667 12.1C13.6333 11.8467 14 11.2867 14 10.6667",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,n.jsx)("div",{style:{fontSize:"18px",fontWeight:"700",fontFamily:"Urbanist",marginLeft:"5px"},children:"Layers"})]},"bottomSettingsBar"),(0,n.jsx)("div",{className:"kluckScrollArea",style:{width:"100%",flex:"1 1 auto",minHeight:0,overflowY:"auto",overflowX:"hidden"},children:(0,n.jsx)(LayerSelector,{blocks:(null==t?void 0:t.blocks)||[],level:0,darkMode:f})})]})})}),(0,n.jsxs)("div",{id:"editorPageContainer","data-container":"editor-area",style:{position:"relative",width:"100%",display:"flex",flexDirection:"column",alignItems:"center",overflowX:"scroll",background:"var(--color-5)"},children:[Object.keys(t).length>0&&!1,Object.keys(t).length>0&&(0,n.jsx)(renderers_IFrame,{contentRef:F,onReady:setCanvasReady,style:{width:b.width,maxWidth:"100%",height:"100vh",overflow:"hidden"},children:(0,n.jsx)(o.Z,{screenShotRef:F,page:t,pageWidth:"100%",pageHeight:"100%",mainPage:!0})}),(0,n.jsx)("div",{id:"editorFloatingBarBackground",style:{width:"100%",height:"40px",backgroundColor:"var(--color-4)",marginTop:"auto"}})]}),(0,n.jsx)(editorControls_EditorFloatingBar,{layerEditorOpen:T,darkMode:f,layersHidden:q}),(0,n.jsxs)("div",{className:"column propertyColumn kluck-background",style:{zIndex:"1060",display:"flex",flexDirection:"column",height:"100%",minWidth:i.open?"400px":"0%",maxWidth:i.open?"400px":"0%",borderLeft:"none",backgroundColor:f?"#292D32":"unset",justifyContent:"space-between"},children:[(0,n.jsx)(EditorComponents_TopComponents,{editor:i,darkMode:f,setShowPageManager:N,showPageManager:E,onSelectedSiteHandler:e=>S({type:"SELECTED_SITE_HANDLER",blockPage:e}),selectedPage:t}),(0,n.jsx)("div",{style:{height:"100%",overflow:"hidden"},children:(null==l?void 0:l.blockId)&&(0,n.jsx)(property_Properties,{block:l,darkMode:f,page:t,propertyFilter:Z,setPropertyFilter:R,params:X})}),(0,n.jsx)(lx.M,{initial:!1,children:(0,n.jsx)(EditorComponents_BottomSettings,{showPublish:D,setShowPublish:P,onSaveHandler:onSaveHandler})})]})]}),(0,n.jsxs)("div",{style:{display:"flex",height:"64px",gap:"10px",transition:"ease .5s",width:"300px",inset:x?"auto 0 0 auto":"auto auto 0 0",padding:"10px",cursor:"pointer",position:"fixed",zIndex:"99999"},children:[(0,n.jsx)("div",{onClick:()=>{J(!q)},className:"kluck-font kluck-h3 kluck-property-dark",style:{width:"100%",display:"flex",alignContent:"center",justifyContent:"center",height:"100%",alignItems:"center",borderRadius:"6px"},children:q?"Show Layers":"Hide Layers"}),(0,n.jsx)("div",{onClick:()=>hideUi(),className:"kluck-font kluck-h3 kluck-property-dark",style:{width:"100%",display:"flex",alignContent:"center",justifyContent:"center",height:"100%",alignItems:"center",borderRadius:"6px"},children:T?"Hide Preview":"Preview"})]}),(0,n.jsx)(EditorComponents_PageManager,{show:E,setShow:N,darkMode:f}),"preview"===d&&(0,n.jsx)(EditorComponents_NewSiteWizard,{darkMode:f}
1),(0,n.jsxs)(l1(),{children:[(0,n.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),(0,n.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:!0}),(0,n.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,100..900;1,100..900&display=swap",rel:"stylesheet"})]})]})}},59581:function(e){e.exports={myModalTemplates:"BlockTemplate_myModalTemplates__LkwnR",modalColor:"BlockTemplate_modalColor__MDs8X",modalContentTemplate:"BlockTemplate_modalContentTemplate__mroWp"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.