@gem-sdk/core 12.0.0-dev.65 → 12.0.0-dev.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react");require("zustand");var BuilderPreviewContext=require("../contexts/BuilderPreviewContext.js"),PageContext=require("../contexts/PageContext.js"),CreateThemeSection=require("./theme-section/CreateThemeSection.js"),Tooltip=require("./toolbar/Tooltip.js"),ThemeSectionStatus=require("./theme-section/ThemeSectionStatus.js"),Resize=require("./resize/Resize.js"),useToolbarPostPurchase=require("../hooks/useToolbarPostPurchase.js"),constant=require("./constant.js"),AIContentGenerator=require("./ai-generator/AIContentGenerator.js"),AIGenContentLoading=require("./ai-generator/AIGenContentLoading.js"),InteractionSuffix=require("./InteractionSuffix.js"),core=require("@gem-sdk/core");require("swr"),require("../helpers/convert.js");var ShopContext=require("../contexts/ShopContext.js");require("@gem-sdk/adapter-shopify"),require("swr/mutation"),require("swr/infinite"),require("vanilla-lazyload"),require("../hooks/useCartUI.js"),require("../hooks/useStickyStore.js"),require("../types/builder.js"),require("../types/custom.js"),require("../types/animations.js");const SECTION_LIMIT=25,notVisible=e=>{let t=getComputedStyle(e).overflow;return"visible"!==t},isSection=e=>{let t=e.getAttribute("data-component-tag");return"Section"===t},ComponentToolbarPreview=e=>{let{t}=core.useI18nStore(),i=e.isThemeSection,o=!!e.isShopifySection,n=ShopContext.useShopStore(e=>e.storefrontUrl),r=ShopContext.useShopStore(e=>e.pageType),l=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getParents),a=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getItem("ROOT")),s=BuilderPreviewContext.useBuilderPreviewStore(e=>e.isThemeSectionEditor),[d,u]=react.useState(null),[C,c]=react.useState(!1),[h,m]=react.useState(!1),[x,p]=react.useState([]),[j,g]=react.useState("top"),[f,v]=react.useState(!1),[b,R]=react.useState(!1),[w,S]=react.useState(""),[M,L]=react.useState(""),[P,T]=react.useState({width:"",text:""}),[y,Z]=react.useState(!1),E=PageContext.usePageStore(e=>e.interactionData),H=react.useMemo(()=>"POST_PURCHASE"===r,[r]),{checkDisableDelete:V,getTooltipText:q,checkDisableDuplicate:A}=useToolbarPostPurchase.usePostPurchase(e.uid,e.tag||""),I=["ProductTitle","ProductDescription","ProductPrice"],B=["ArticleTitle","ArticleContent","ArticleImage","ArticleAuthor","ArticleCategory","ArticleDate","ArticleExcerpt","ArticleTags"],k=[...I,...B],F=(e,t)=>{let i=x.length,o=e.getBoundingClientRect(),n=t.getBoundingClientRect();return o.top-n.top<36*i},G=(e,t)=>{let i=t||e;if(e&&!isSection(e))return notVisible(e)&&F(t,e)?e:e.parentElement?G(e.parentElement,i):void 0},$=react.useCallback(()=>a?.childrens?.length||0,[a?.childrens?.length]),O=react.useCallback(()=>{if("Section"==e.tag)return"bottom";let t=document.body.querySelector("#storefront")?.querySelector('[data-toolbar-active="true"]');if(t){let e=t.getBoundingClientRect();e.top<60?g("bottom"):g("top")}},[e.tag]),U=react.useMemo(()=>{let e=/^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;return n?n.match(e)?.[1]:""},[n]),D=react.useMemo(()=>`https://admin.shopify.com/store/${U}`,[U]),N=react.useMemo(()=>w?`${D}/products/${w}`:"",[D,w]),_=react.useMemo(()=>M?`${D}/articles/${M.replace("gid://shopify/Article/","")}`:"",[M,D]),z=react.useMemo(()=>E?.isSelectOnPage,[E?.isSelectOnPage]),W=react.useMemo(()=>E?.settingType,[E?.settingType]),J=react.useMemo(()=>E?.item?.targets?.find(t=>t.uid===e.uid&&t?.type!=="PAGE")&&"TARGET"===W,[E?.item?.targets,e.uid,W]),K=react.useMemo(()=>E?.item?.self?.uid===e.uid&&E?.item?.self.type!=="PAGE"&&"TRIGGER"===W,[E?.item?.self?.type,E?.item?.self?.uid,e.uid,W]),Q=react.useMemo(()=>!J&&!K,[J,K]),X=react.useMemo(()=>f||o,[f,o]),Y=react.useMemo(()=>y||o||$()>25&&"Section"===e.tag,[$,y,o,e.tag]),ee=react.useCallback(t=>{let i=t.detail;if(i?.articleId&&L(i.articleId),i?.productId&&S(i.productId),i?.componentUid==e.uid){R(!0),O(),H&&(v(V()),T(q()),Z(A()));let t=l(e.uid).filter(e=>!("ROOT"===e.uid||"Section"===e.tag&&s||e.editorConfigs?.toolbar?.hide||e.editorConfigs?.component?.noSetting)).slice(0,3);p(t)}else R(!1),p([]),c(!1)},[e.uid,H,l,V,q,A,s,O]);if(react.useEffect(()=>(window.addEventListener("editor:active-component",ee),()=>{window.removeEventListener("editor:active-component",ee)}),[ee]),"section"===e.type||e.editorConfigs?.toolbar?.hide)return null;let et=()=>"Section"!==e.tag?-1:a?.childrens?.length?a.childrens.findIndex(t=>t==e.uid):-1,ei=e=>{let i=e?.childrens?.length??0;if("Row"===e.label){let e=1===i?t("Row {colNumber} col",{colNumber:i}):t("Row {colNumber} cols",{colNumber:i});return e}return t(e.label)},eo=e=>{if(!x.length)return;let t=e?.target||null,i=t.closest("[data-toolbar-active]");if(!t||!i)return;if(C)m(!1),c(!1);else{let e=G(i,i);if(e)m(!0);else{let e=i.getBoundingClientRect();e.top<36*x.length?m(!0):m(!1)}c(!0)}let o=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!C}});window.dispatchEvent(o)},en=()=>{if(B.includes(e.tag)){window.open(_,"_blank");return}if(I.includes(e.tag)){window.open(N,"_blank");return}window.open(D,"_blank")},er=t=>{t.preventDefault(),t.stopPropagation();let n=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:i,isShopifySection:o}});return window.dispatchEvent(n),!1},el=t=>{t.preventDefault(),t.stopPropagation();let n=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:i,isShopifySection:o}});return window.dispatchEvent(n),!1},ea=()=>e.customLabel||e.label,es=t=>{t.preventDefault(),t.stopPropagation();let i=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:e.uid}});return window.dispatchEvent(i),!1},ed=()=>{u(null),window.removeEventListener("editor:close-add-section-popup",ed)},eu=(t,i)=>{if(t.preventDefault(),t.stopPropagation(),$()>=25)return!1;let o=t.target;if(o){u(i);let t=o.getBoundingClientRect(),n=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:e.uid,position:i,top:t.top+t.height/2}});window.dispatchEvent(n),window.addEventListener("editor:close-add-section-popup",ed)}return!1},eC=()=>{if(o)return e.name?.includes("Shopify section:")?e.name:`Shopify section: ${e.name}`;let i=e.name&&e.name===`Section ${e.uid}`;return $()>=20?`${i?"Section":e?.name} ${et()+1}/25`:i?`${t("Section")} ${et()+1}`:e?.name},ec=()=>{let{isShopifySection:t,tag:o}=e;return!t&&(!i||!!s)&&constant.ableGenerateContentElements.includes(o)};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!("Section"==e.tag&&s)&&jsxRuntime.jsxs("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==e.tag,"data-toolbar-theme-section":"Section"==e.tag&&!!i||s,"data-toolbar-shopify-section":"Section"==e.tag&&!!o,"data-toolbar-limit":et()>=25,children:[jsxRuntime.jsxs("div",{"data-toolbar-show-parent":!0,onClick:e=>eo(e),"aria-hidden":"true",children:[K&&jsxRuntime.jsx("div",{className:"gp-hidden gp-w-[12px] interaction-use-custom-element",children:jsxRuntime.jsx("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",fill:"#F9F9F9"})})}),J&&jsxRuntime.jsx("div",{className:"gp-hidden gp-w-[14px] interaction-use-custom-element",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",fill:"#F9F9F9"})})}),b&&Q&&jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==e.tag?jsxRuntime.jsxs("div",{"data-toolbar-name":!0,children:[eC(),b&&o&&!e.isShopifyVisibility&&jsxRuntime.jsxs("svg",{"data-toolbar-visibility":!0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",fill:"#F9F9F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",fill:"#F9F9F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",fill:"#F9F9F9"})]})]}):jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:t(ea())}),b&&"Section"!==e.tag&&x.length>0&&jsxRuntime.jsx("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":C,children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),b&&C&&x.map((e,t)=>jsxRuntime.jsxs("div",{"data-toolbar-parent":!0,"data-component-tag":e.tag,"data-parent-uid":e.uid,"data-toolbar-theme-section":s,"data-toolbar-parent-revert":h,style:{top:h?`${36*(t+1)}px`:`${-36*(t+1)}px`},children:[jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:ei(e)})]},e.uid)),b&&!z&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[" ","Section"===e.tag&&!e.isThemeSection&&"STATIC"!==r&&"POST_PURCHASE"!==r&&!e.isShopifySection&&25>et()&&jsxRuntime.jsx(CreateThemeSection.CreateThemeSection,{...e}),ec()&&jsxRuntime.jsx(AIContentGenerator.AIContentGenerator,{...e}),"Sticky"==e.tag&&jsxRuntime.jsx("div",{"data-toolbar-zoom-out":!0,onClick:e=>es(e),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),k.includes(e.tag)&&jsxRuntime.jsx(Tooltip.default,{"data-toolbar-title":!0,enable:!0,"data-toolbar-disable":!1,text:t("Edit content in Shopify"),position:"top",onClick:en,"aria-hidden":"true",children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.61129 2.47348C8.61129 2.47348 8.47099 2.51557 8.23248 2.59274C8.19039 2.46647 8.13427 2.30512 8.05009 2.15079C7.78352 1.6387 7.39068 1.37212 6.91366 1.36511C6.87858 1.36511 6.85052 1.36511 6.81545 1.37212C6.80843 1.36511 6.80142 1.35634 6.7944 1.34757C6.78739 1.3388 6.78037 1.33003 6.77336 1.32302C6.56992 1.09854 6.30335 0.993314 5.98768 1.00033C5.37737 1.02137 4.76706 1.46332 4.269 2.249C3.91825 2.80319 3.65869 3.49767 3.58153 4.03082C3.38823 4.09074 3.21092 4.14586 3.05516 4.19429C2.64595 4.32151 2.3851 4.40261 2.37494 4.40261C2.01718 4.51485 2.01016 4.52888 1.96106 4.85859C1.92598 5.11113 1 12.2945 1 12.2945L7.14764 13.3583C7.18955 13.118 7.30454 12.8953 7.47848 12.7214L8.70249 11.4974V2.45945C8.66741 2.45945 8.63234 2.46647 8.61129 2.47348ZM6.82948 3.02767L6.62554 3.09101C6.27515 3.19989 5.90094 3.31617 5.5317 3.42752C5.65797 2.94349 5.89648 2.46647 6.19111 2.15079C6.30335 2.03154 6.45067 1.90527 6.63306 1.8281C6.80142 2.18587 6.83649 2.68393 6.82948 3.02767ZM5.99469 1.4072C6.13499 1.4072 6.26126 1.43526 6.36649 1.50541C6.19813 1.58959 6.0438 1.71586 5.88947 1.87721C5.50364 2.29109 5.202 2.94349 5.08274 3.56783C4.74459 3.66991 4.41804 3.77199 4.10838 3.8688L4.01646 3.89753C4.22691 2.90841 5.05468 1.43526 5.99469 1.4072ZM4.80214 7.0122C4.81874 7.26957 5.09737 7.44833 5.43473 7.66478C5.95252 7.99699 6.60867 8.41798 6.66813 9.3482C6.7453 10.5548 6.02977 11.3826 4.99154 11.4457C3.7569 11.5229 3.06943 10.7933 3.06943 10.7933L3.32899 9.67791C3.32899 9.67791 4.01646 10.197 4.56363 10.1619C4.92139 10.1409 5.04767 9.84627 5.04065 9.64283C5.01607 9.26796 4.73308 9.06671 4.41569 8.84101C4.00848 8.55142 3.54465 8.22157 3.49735 7.4331C3.42018 6.24756 4.19885 5.05501 5.91051 4.94277C6.57694 4.90068 6.91366 5.06904 6.91366 5.06904L6.52082 6.53518C6.52082 6.53518 6.08589 6.33876 5.56678 6.36682C4.80915 6.41592 4.79512 6.89294 4.80214 7.0122ZM7.23635 2.9014C7.22934 2.59274 7.19426 2.15781 7.04695 1.78601C7.50994 1.87721 7.74143 2.39632 7.83964 2.71199C7.70008 2.75665 7.54275 2.80575 7.37118 2.8593L7.23635 2.9014Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.7719 3.44156C10.7757 3.47543 11.1733 6.16931 11.541 8.65883L8.95503 11.2448V2.57871C9.16548 2.78214 9.71265 3.31528 9.71265 3.31528C9.71265 3.31528 10.6106 3.32931 10.6597 3.33633C10.7088 3.34334 10.7649 3.37842 10.7719 3.44156Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M14.8056 8.644L14.0424 7.88088C13.7832 7.62163 13.3629 7.62163 13.1036 7.88088L12.1519 8.83258L13.8539 10.5345L14.8056 9.58282C15.0648 9.32357 15.0648 8.90325 14.8056 8.644Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7.85018 13.0942L11.6419 9.30246L13.3438 11.0044L9.55212 14.7961C9.43782 14.9104 9.28573 14.9791 9.1244 14.9892L7.93427 15.0641C7.73484 15.0767 7.56961 14.9114 7.58216 14.712L7.65706 13.5219C7.66721 13.3606 7.73588 13.2085 7.85018 13.0942Z",fill:"currentColor"})]})}),jsxRuntime.jsx(Tooltip.default,{enable:"Section"==e.tag&&$()>=25||o,text:o?t("Disabled. Please edit in Shopify Editor"):t("Page has reached Shopify’s 25 section-limit"),position:"bottom",width:"200px","data-toolbar-duplicate":!0,"data-toolbar-disable":Y,onClick:Y?void 0:e=>el(e),"aria-hidden":"true",className:Y?"!gp-cursor-not-allowed":"",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),jsxRuntime.jsx(Tooltip.default,{"data-toolbar-delete":!0,onClick:e=>X?null:er(e),enable:X,"data-toolbar-disable":X,text:o?t("Disabled. Please edit in Shopify Editor"):P.text,width:P.width,position:o?"bottom":j,"aria-hidden":"true",className:X?"!gp-cursor-not-allowed":"",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),jsxRuntime.jsx(InteractionSuffix.InteractionSuffix,{uid:e.uid})]},e.uid),"STATIC"!==r&&"POST_PURCHASE"!==r&&25>et()&&jsxRuntime.jsx(ThemeSectionStatus.ThemeSectionStatusWrapper,{...e}),jsxRuntime.jsx("div",{"data-outline":!0,"data-outline-section":"Section"==e.tag,"data-outline-theme-section":"Section"==e.tag&&!!i||s,"data-outline-shopify-section":"Section"==e.tag&&!!o,"data-outline-limit":et()>=25},"outline-"+e.uid),"Section"==e.tag&&!s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Tooltip.default,{enable:$()>=25,text:t("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":$()>=25,"data-toolbar-add-open":"above"==d,onClick:e=>eu(e,"above"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),jsxRuntime.jsx(Tooltip.default,{enable:$()>=25,text:t("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":$()>=25,"data-toolbar-add-open":"below"==d,onClick:e=>eu(e,"below"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),constant.ableGenerateContentElements.includes(e.tag)&&b&&jsxRuntime.jsx(AIGenContentLoading.AIGenContentLoading,{...e}),b&&jsxRuntime.jsx(Resize.default,{...e})]})};var ComponentToolbarPreview$1=react.memo(ComponentToolbarPreview);exports.default=ComponentToolbarPreview$1;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),react=require("react");require("zustand");var BuilderPreviewContext=require("../contexts/BuilderPreviewContext.js"),PageContext=require("../contexts/PageContext.js"),CreateThemeSection=require("./theme-section/CreateThemeSection.js"),Tooltip=require("./toolbar/Tooltip.js"),SectionErrorBanner=require("./toolbar/SectionErrorBanner.js"),ThemeSectionStatus=require("./theme-section/ThemeSectionStatus.js"),Resize=require("./resize/Resize.js"),useToolbarPostPurchase=require("../hooks/useToolbarPostPurchase.js"),constant=require("./constant.js"),AIContentGenerator=require("./ai-generator/AIContentGenerator.js"),AIGenContentLoading=require("./ai-generator/AIGenContentLoading.js"),InteractionSuffix=require("./InteractionSuffix.js"),core=require("@gem-sdk/core");require("swr"),require("../helpers/convert.js");var ShopContext=require("../contexts/ShopContext.js");require("@gem-sdk/adapter-shopify"),require("swr/mutation"),require("swr/infinite"),require("vanilla-lazyload"),require("../hooks/useCartUI.js"),require("../hooks/useStickyStore.js"),require("../types/builder.js"),require("../types/custom.js"),require("../types/animations.js");const SECTION_LIMIT=25,notVisible=e=>{let t=getComputedStyle(e).overflow;return"visible"!==t},isSection=e=>{let t=e.getAttribute("data-component-tag");return"Section"===t},ComponentToolbarPreview=e=>{let{t}=core.useI18nStore(),i=e.isThemeSection,o=!!e.isShopifySection,n=ShopContext.useShopStore(e=>e.storefrontUrl),r=ShopContext.useShopStore(e=>e.pageType),l=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getParents),a=BuilderPreviewContext.useBuilderPreviewStore(e=>e.getItem("ROOT")),s=BuilderPreviewContext.useBuilderPreviewStore(e=>e.isThemeSectionEditor),[d,u]=react.useState(null),[C,c]=react.useState(!1),[m,h]=react.useState(!1),[x,p]=react.useState([]),[j,g]=react.useState("top"),[f,v]=react.useState(!1),[b,w]=react.useState(!1),[R,S]=react.useState(""),[M,L]=react.useState(""),[P,T]=react.useState({width:"",text:""}),[y,Z]=react.useState(!1),E=BuilderPreviewContext.useBuilderPreviewStore(e=>e.errorSectionList),B=react.useMemo(()=>{if(!E)return null;let t=E?.find(t=>t.uid===e.uid);return t},[E,e.uid]),H=PageContext.usePageStore(e=>e.interactionData),V=react.useMemo(()=>"POST_PURCHASE"===r,[r]),{checkDisableDelete:q,getTooltipText:I,checkDisableDuplicate:A}=useToolbarPostPurchase.usePostPurchase(e.uid,e.tag||""),k=["ProductTitle","ProductDescription","ProductPrice"],F=["ArticleTitle","ArticleContent","ArticleImage","ArticleAuthor","ArticleCategory","ArticleDate","ArticleExcerpt","ArticleTags"],G=[...k,...F],$=(e,t)=>{let i=x.length,o=e.getBoundingClientRect(),n=t.getBoundingClientRect();return o.top-n.top<36*i},O=(e,t)=>{let i=t||e;if(e&&!isSection(e))return notVisible(e)&&$(t,e)?e:e.parentElement?O(e.parentElement,i):void 0},D=react.useCallback(()=>a?.childrens?.length||0,[a?.childrens?.length]),U=react.useCallback(()=>{if("Section"==e.tag)return"bottom";let t=document.body.querySelector("#storefront")?.querySelector('[data-toolbar-active="true"]');if(t){let e=t.getBoundingClientRect();e.top<60?g("bottom"):g("top")}},[e.tag]),N=react.useMemo(()=>{let e=/^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;return n?n.match(e)?.[1]:""},[n]),_=react.useMemo(()=>`https://admin.shopify.com/store/${N}`,[N]),z=react.useMemo(()=>R?`${_}/products/${R}`:"",[_,R]),W=react.useMemo(()=>M?`${_}/articles/${M.replace("gid://shopify/Article/","")}`:"",[M,_]),J=react.useMemo(()=>H?.isSelectOnPage,[H?.isSelectOnPage]),K=react.useMemo(()=>H?.settingType,[H?.settingType]),Q=react.useMemo(()=>H?.item?.targets?.find(t=>t.uid===e.uid&&t?.type!=="PAGE")&&"TARGET"===K,[H?.item?.targets,e.uid,K]),X=react.useMemo(()=>H?.item?.self?.uid===e.uid&&H?.item?.self.type!=="PAGE"&&"TRIGGER"===K,[H?.item?.self?.type,H?.item?.self?.uid,e.uid,K]),Y=react.useMemo(()=>!Q&&!X,[Q,X]),ee=react.useMemo(()=>f||o,[f,o]),et=react.useMemo(()=>y||o||D()>25&&"Section"===e.tag||!!B,[D,y,o,e.tag,B]),ei=react.useCallback(t=>{let i=t.detail;if(i?.articleId&&L(i.articleId),i?.productId&&S(i.productId),i?.componentUid==e.uid){w(!0),U(),V&&(v(q()),T(I()),Z(A()));let t=l(e.uid).filter(e=>!("ROOT"===e.uid||"Section"===e.tag&&s||e.editorConfigs?.toolbar?.hide||e.editorConfigs?.component?.noSetting)).slice(0,3);p(t)}else w(!1),p([]),c(!1)},[e.uid,V,l,q,I,A,s,U]),eo=BuilderPreviewContext.useBuilderPreviewStore(e=>e.dismissPublishError),en=react.useCallback(()=>{eo(e.uid)},[eo,e.uid]),er=react.useCallback(()=>"Section"!==e.tag?-1:a?.childrens?.length?a.childrens.findIndex(t=>t==e.uid):-1,[a?.childrens,e.uid,e.tag]),el=react.useMemo(()=>er()>=25,[er]),ea=react.useMemo(()=>!!B||el,[B,el]);if(react.useEffect(()=>(window.addEventListener("editor:active-component",ei),()=>{window.removeEventListener("editor:active-component",ei)}),[ei]),"section"===e.type||e.editorConfigs?.toolbar?.hide)return null;let es=e=>{let i=e?.childrens?.length??0;if("Row"===e.label){let e=1===i?t("Row {colNumber} col",{colNumber:i}):t("Row {colNumber} cols",{colNumber:i});return e}return t(e.label)},ed=e=>{if(!x.length)return;let t=e?.target||null,i=t.closest("[data-toolbar-active]");if(!t||!i)return;if(C)h(!1),c(!1);else{let e=O(i,i);if(e)h(!0);else{let e=i.getBoundingClientRect();e.top<36*x.length?h(!0):h(!1)}c(!0)}let o=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!C}});window.dispatchEvent(o)},eu=()=>{if(F.includes(e.tag)){window.open(W,"_blank");return}if(k.includes(e.tag)){window.open(z,"_blank");return}window.open(_,"_blank")},eC=t=>{t.preventDefault(),t.stopPropagation();let n=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:i,isShopifySection:o}});return window.dispatchEvent(n),!1},ec=t=>{t.preventDefault(),t.stopPropagation();let n=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:e.uid,isThemeSection:i,isShopifySection:o}});return window.dispatchEvent(n),!1},em=()=>e.customLabel||e.label,eh=t=>{t.preventDefault(),t.stopPropagation();let i=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:e.uid}});return window.dispatchEvent(i),!1},ex=()=>{u(null),window.removeEventListener("editor:close-add-section-popup",ex)},ep=(t,i)=>{if(t.preventDefault(),t.stopPropagation(),D()>=25)return!1;let o=t.target;if(o){u(i);let t=o.getBoundingClientRect(),n=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:e.uid,position:i,top:t.top+t.height/2}});window.dispatchEvent(n),window.addEventListener("editor:close-add-section-popup",ex)}return!1},ej=()=>{if(o)return e.name?.includes("Shopify section:")?e.name:`Shopify section: ${e.name}`;let i=e.name&&e.name===`Section ${e.uid}`;return D()>=20?`${i?"Section":e?.name} ${er()+1}/25`:i?`${t("Section")} ${er()+1}`:e?.name},eg=()=>{let{isShopifySection:t,tag:o}=e;return!t&&(!i||!!s)&&constant.ableGenerateContentElements.includes(o)&&!B},ef="Section"===e.tag&&!e.isThemeSection&&"STATIC"!==r&&"POST_PURCHASE"!==r&&!e.isShopifySection&&25>er()&&!B;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!("Section"==e.tag&&s)&&jsxRuntime.jsxs("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==e.tag,"data-toolbar-theme-section":"Section"==e.tag&&!!i||s,"data-toolbar-shopify-section":"Section"==e.tag&&!!o,"data-toolbar-limit":er()>=25||!!B,children:[jsxRuntime.jsxs("div",{"data-toolbar-show-parent":!0,onClick:e=>ed(e),"aria-hidden":"true",children:[X&&jsxRuntime.jsx("div",{className:"gp-hidden gp-w-[12px] interaction-use-custom-element",children:jsxRuntime.jsx("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",fill:"#F9F9F9"})})}),Q&&jsxRuntime.jsx("div",{className:"gp-hidden gp-w-[14px] interaction-use-custom-element",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",fill:"#F9F9F9"})})}),b&&Y&&jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==e.tag?jsxRuntime.jsxs("div",{"data-toolbar-name":!0,children:[ej(),b&&o&&!e.isShopifyVisibility&&jsxRuntime.jsxs("svg",{"data-toolbar-visibility":!0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",fill:"#F9F9F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",fill:"#F9F9F9"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",fill:"#F9F9F9"})]})]}):jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:t(em())}),b&&"Section"!==e.tag&&x.length>0&&jsxRuntime.jsx("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":C,children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),b&&C&&x.map((e,t)=>jsxRuntime.jsxs("div",{"data-toolbar-parent":!0,"data-component-tag":e.tag,"data-parent-uid":e.uid,"data-toolbar-theme-section":s,"data-toolbar-parent-revert":m,style:{top:m?`${36*(t+1)}px`:`${-36*(t+1)}px`},children:[jsxRuntime.jsx("div",{"data-toolbar-icon-drag":!0,children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[jsxRuntime.jsx("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),jsxRuntime.jsx("div",{"data-toolbar-name":!0,children:es(e)})]},e.uid)),b&&!J&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[" ",ef&&jsxRuntime.jsx(CreateThemeSection.CreateThemeSection,{...e}),eg()&&jsxRuntime.jsx(AIContentGenerator.AIContentGenerator,{...e}),"Sticky"==e.tag&&jsxRuntime.jsx("div",{"data-toolbar-zoom-out":!0,onClick:e=>eh(e),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),G.includes(e.tag)&&jsxRuntime.jsx(Tooltip.default,{"data-toolbar-title":!0,enable:!0,"data-toolbar-disable":!1,text:t("Edit content in Shopify"),position:"top",onClick:eu,"aria-hidden":"true",children:jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.61129 2.47348C8.61129 2.47348 8.47099 2.51557 8.23248 2.59274C8.19039 2.46647 8.13427 2.30512 8.05009 2.15079C7.78352 1.6387 7.39068 1.37212 6.91366 1.36511C6.87858 1.36511 6.85052 1.36511 6.81545 1.37212C6.80843 1.36511 6.80142 1.35634 6.7944 1.34757C6.78739 1.3388 6.78037 1.33003 6.77336 1.32302C6.56992 1.09854 6.30335 0.993314 5.98768 1.00033C5.37737 1.02137 4.76706 1.46332 4.269 2.249C3.91825 2.80319 3.65869 3.49767 3.58153 4.03082C3.38823 4.09074 3.21092 4.14586 3.05516 4.19429C2.64595 4.32151 2.3851 4.40261 2.37494 4.40261C2.01718 4.51485 2.01016 4.52888 1.96106 4.85859C1.92598 5.11113 1 12.2945 1 12.2945L7.14764 13.3583C7.18955 13.118 7.30454 12.8953 7.47848 12.7214L8.70249 11.4974V2.45945C8.66741 2.45945 8.63234 2.46647 8.61129 2.47348ZM6.82948 3.02767L6.62554 3.09101C6.27515 3.19989 5.90094 3.31617 5.5317 3.42752C5.65797 2.94349 5.89648 2.46647 6.19111 2.15079C6.30335 2.03154 6.45067 1.90527 6.63306 1.8281C6.80142 2.18587 6.83649 2.68393 6.82948 3.02767ZM5.99469 1.4072C6.13499 1.4072 6.26126 1.43526 6.36649 1.50541C6.19813 1.58959 6.0438 1.71586 5.88947 1.87721C5.50364 2.29109 5.202 2.94349 5.08274 3.56783C4.74459 3.66991 4.41804 3.77199 4.10838 3.8688L4.01646 3.89753C4.22691 2.90841 5.05468 1.43526 5.99469 1.4072ZM4.80214 7.0122C4.81874 7.26957 5.09737 7.44833 5.43473 7.66478C5.95252 7.99699 6.60867 8.41798 6.66813 9.3482C6.7453 10.5548 6.02977 11.3826 4.99154 11.4457C3.7569 11.5229 3.06943 10.7933 3.06943 10.7933L3.32899 9.67791C3.32899 9.67791 4.01646 10.197 4.56363 10.1619C4.92139 10.1409 5.04767 9.84627 5.04065 9.64283C5.01607 9.26796 4.73308 9.06671 4.41569 8.84101C4.00848 8.55142 3.54465 8.22157 3.49735 7.4331C3.42018 6.24756 4.19885 5.05501 5.91051 4.94277C6.57694 4.90068 6.91366 5.06904 6.91366 5.06904L6.52082 6.53518C6.52082 6.53518 6.08589 6.33876 5.56678 6.36682C4.80915 6.41592 4.79512 6.89294 4.80214 7.0122ZM7.23635 2.9014C7.22934 2.59274 7.19426 2.15781 7.04695 1.78601C7.50994 1.87721 7.74143 2.39632 7.83964 2.71199C7.70008 2.75665 7.54275 2.80575 7.37118 2.8593L7.23635 2.9014Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M10.7719 3.44156C10.7757 3.47543 11.1733 6.16931 11.541 8.65883L8.95503 11.2448V2.57871C9.16548 2.78214 9.71265 3.31528 9.71265 3.31528C9.71265 3.31528 10.6106 3.32931 10.6597 3.33633C10.7088 3.34334 10.7649 3.37842 10.7719 3.44156Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M14.8056 8.644L14.0424 7.88088C13.7832 7.62163 13.3629 7.62163 13.1036 7.88088L12.1519 8.83258L13.8539 10.5345L14.8056 9.58282C15.0648 9.32357 15.0648 8.90325 14.8056 8.644Z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M7.85018 13.0942L11.6419 9.30246L13.3438 11.0044L9.55212 14.7961C9.43782 14.9104 9.28573 14.9791 9.1244 14.9892L7.93427 15.0641C7.73484 15.0767 7.56961 14.9114 7.58216 14.712L7.65706 13.5219C7.66721 13.3606 7.73588 13.2085 7.85018 13.0942Z",fill:"currentColor"})]})}),jsxRuntime.jsx(Tooltip.default,{enable:"Section"==e.tag&&D()>=25||o,text:o?t("Disabled. Please edit in Shopify Editor"):t("Page has reached Shopify’s 25 section-limit"),position:"bottom",width:"200px","data-toolbar-duplicate":!0,"data-toolbar-disable":et,onClick:et?void 0:e=>ec(e),"aria-hidden":"true",className:et?"!gp-cursor-not-allowed":"",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),jsxRuntime.jsx(Tooltip.default,{"data-toolbar-delete":!0,onClick:e=>ee?null:eC(e),enable:ee,"data-toolbar-disable":ee,text:o?t("Disabled. Please edit in Shopify Editor"):P.text,width:P.width,position:o?"bottom":j,"aria-hidden":"true",className:ee?"!gp-cursor-not-allowed":"",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),jsxRuntime.jsx(InteractionSuffix.InteractionSuffix,{uid:e.uid})]},e.uid),"STATIC"!==r&&"POST_PURCHASE"!==r&&25>er()&&jsxRuntime.jsx(ThemeSectionStatus.ThemeSectionStatusWrapper,{...e}),jsxRuntime.jsx("div",{"data-outline":!0,"data-outline-section":"Section"==e.tag,"data-outline-theme-section":"Section"==e.tag&&!!i||s,"data-outline-shopify-section":"Section"==e.tag&&!!o,"data-outline-limit":ea,"data-outline-error":!!B},"outline-"+e.uid),"Section"==e.tag&&!s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Tooltip.default,{enable:D()>=25,text:t("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":D()>=25,"data-toolbar-add-open":"above"==d,onClick:e=>ep(e,"above"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),B&&jsxRuntime.jsx(SectionErrorBanner.SectionErrorBanner,{errorSectionInfo:B,onDismiss:en}),jsxRuntime.jsx(Tooltip.default,{enable:D()>=25,text:t("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":D()>=25,"data-toolbar-add-open":"below"==d,onClick:e=>ep(e,"below"),"aria-hidden":"true",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),constant.ableGenerateContentElements.includes(e.tag)&&b&&jsxRuntime.jsx(AIGenContentLoading.AIGenContentLoading,{...e}),b&&jsxRuntime.jsx(Resize.default,{...e})]})};var ComponentToolbarPreview$1=react.memo(ComponentToolbarPreview);exports.default=ComponentToolbarPreview$1;
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ "use strict";var jsxRuntime=require("react/jsx-runtime");const SECTION_SIZE_GUIDE_URL="https://www.google.com/",SectionErrorBanner=({errorSectionInfo:e,onDismiss:i})=>e.isDismissed?null:jsxRuntime.jsx("div",{"data-toolbar-error-banner":!0,className:"gp-flex gp-items-center gp-px-2 gp-top-0 gp-w-full gp-z-1 gp-absolute gp-bg-[#FEE4E3] gp-border-t gp-border-t-[#C3362B] gp-text-xs gp-text-[#C3362B] gp-leading-5",children:jsxRuntime.jsxs("div",{className:"gp-flex gp-items-center gp-gap-1.5 gp-w-full gp-h-10",children:[jsxRuntime.jsxs("svg",{className:"gp-flex-shrink-0",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M11 13.5C11 14.0523 10.5523 14.5 10 14.5C9.44772 14.5 9 14.0523 9 13.5C9 12.9477 9.44772 12.5 10 12.5C10.5523 12.5 11 12.9477 11 13.5Z",fill:"#C3362B"}),jsxRuntime.jsx("path",{d:"M10.75 6.25001C10.75 5.8358 10.4142 5.50001 10 5.5C9.5858 5.49999 9.25001 5.83578 9.25 6.24999L9.24994 10.75C9.24993 11.1642 9.58572 11.5 9.99993 11.5C10.4141 11.5 10.7499 11.1642 10.7499 10.75L10.75 6.25001Z",fill:"#C3362B"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17ZM10 15.5C13.0376 15.5 15.5 13.0376 15.5 10C15.5 6.96243 13.0376 4.5 10 4.5C6.96243 4.5 4.5 6.96243 4.5 10C4.5 13.0376 6.96243 15.5 10 15.5Z",fill:"#C3362B"})]}),jsxRuntime.jsxs("div",{className:"gp-w-full",children:["LIQUID_SYNTAX_ERROR"===e.type&&"This section contains a syntax error in the code. Please review and fix it, then try verifying again.","SECTION_SIZE_EXCEED_256KB"===e.type&&jsxRuntime.jsxs("div",{children:["This section is over Shopify's 256KB limit. Please follow ",jsxRuntime.jsx("a",{target:"_blank",href:SECTION_SIZE_GUIDE_URL,className:"gp-underline gp-cursor-pointer",onClick:e=>{e.preventDefault(),e.stopPropagation(),window.open(SECTION_SIZE_GUIDE_URL,"_blank")},rel:"noreferrer",children:"our guide"})," ","to optimize, then try verifying again."]}),"MISSING_SECTION_IN_THEME"===e.type&&"This section was deleted from your live theme. Please delete it from this page, or restore all sections by Force publish."]}),jsxRuntime.jsx("button",{className:"gp-p-1.5 gp-flex-shrink-0",onClick:i,type:"button",children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M11.1755 12.0243C11.4099 12.2586 11.7898 12.2586 12.0241 12.0243C12.2584 11.79 12.2584 11.4101 12.0241 11.1758L8.84833 8.00005L12.0241 4.82431C12.2584 4.59 12.2584 4.2101 12.0241 3.97579C11.7898 3.74147 11.4099 3.74147 11.1755 3.97579L7.9998 7.15152L4.82407 3.97578C4.58975 3.74147 4.20986 3.74147 3.97554 3.97578C3.74123 4.2101 3.74123 4.59 3.97554 4.82431L7.15128 8.00005L3.97554 11.1758C3.74123 11.4101 3.74123 11.79 3.97554 12.0243C4.20986 12.2586 4.58975 12.2586 4.82407 12.0243L7.9998 8.84858L11.1755 12.0243Z",fill:"#212121"})})})]})});exports.SectionErrorBanner=SectionErrorBanner;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),zustand=require("zustand"),cloneDeep=require("../helpers/clone-deep.js"),normalizeBuilderData=require("../helpers/normalize-builder-data.js");function moveByIndex(e,t,i){let r=e.splice(t,1)[0];void 0!==r&&e.splice(i,0,r)}function removeByKey(e,t){let i=t[e];i&&(delete t[e],"section"!==i.type&&i.childrens?.map(e=>removeByKey(e,t)))}const BuilderPreviewContext=react.createContext(null),root={uid:"ROOT",tag:"Root",label:"Root",childrens:[]},createBuilderPreviewProvider=(e,t,i)=>zustand.createStore((r,l)=>({state:e,loaded:!1,isThemeSectionEditor:!!i,pageName:t,dynamicProduct:null,dynamicCollection:null,addItem:e=>{let{position:t,data:i}=e,s=l().state,n=Date.now();if("section"===e.type){if(!Array.isArray(i)){let e=i.uid,l=s.ROOT;l.childrens?l.childrens.splice(t??0,0,e):l.childrens=[e],l.dateModified=n,r({state:{...s,[e]:{uid:e,type:"section",label:i.label},ROOT:cloneDeep.cloneDeep(l)}})}}else{let{id:i,data:l}=e,d=i?s[i]??s.ROOT:s.ROOT;if("section"===d.type)return;if(Array.isArray(l)){let e=l.map(e=>e.uid),i=l.reduceRight((e,t)=>{let i=normalizeBuilderData.normalizeBuilderData(t);return{...e,...i}},{});d.dateModified=n,d.childrens=d.childrens??[],d.childrens.splice(t??0,0,...e),r({state:{...s,...i,[d.uid]:cloneDeep.cloneDeep(d)}})}else{let e=normalizeBuilderData.normalizeBuilderData(l);d.dateModified=n,d.childrens=d.childrens??[],d.childrens.splice(t??0,0,l.uid),r({state:{...s,...e,[d.uid]:cloneDeep.cloneDeep(d)}})}}},changeItemProp:(e,t,i)=>{if(!i||!["setting","style","advanced"].includes(i))return;let s=l().state,n=s[e];if(n?.type!=="section"&&n){let l=Date.now();switch(n.dateModified=l,i){case"setting":r({state:{...s,[e]:{...n,settings:{...n.settings,...t}}}});break;case"style":r({state:{...s,[e]:{...n,styles:{...n.styles,...t}}}});break;case"advanced":r({state:{...s,[e]:{...n,advanced:{...n.advanced,...t}}}})}}},forceChangeItemProp:(e,t,i)=>{if(!i||!["setting","style","advanced"].includes(i))return;let s=l().state,n=s[e];if(n?.type!=="section"&&n){let l=Date.now();switch(n.dateModified=l,i){case"setting":r({state:{...s,[e]:{...n,settings:t}}});break;case"style":r({state:{...s,[e]:{...n,styles:t}}});break;case"advanced":r({state:{...s,[e]:{...n,advanced:t}}})}}},changeItemPropByKey:({id:e,key:t,data:i,group:s})=>{if(!s||!["setting","style","advanced"].includes(s))return;let n=l().state,d=n[e];if(d?.type!=="section"&&d){let l={style:d.styles??{},advanced:d.advanced??{},setting:d.settings??{}};void 0===i?(console.warn("Data is undefined"),delete l[s][t]):l[s][t]=i,r({state:{...n,[e]:{...d,settings:{...l.setting},styles:{...l.style},advanced:{...l.advanced}}}})}},getItem:e=>l().state[e],getState:()=>l().state,removeItem:e=>{if("ROOT"===e)r({state:{ROOT:root}});else{let t=l().state;removeByKey(e,t);let i=Object.entries(t).find(([,t])=>"section"!==t.type&&t.childrens?.includes(e));if(i){let l=Date.now(),[s,n]=i;if("section"===n.type)return;n.childrens=n.childrens?.filter(t=>t!==e),n.dateModified=l,r({state:{...t,[s]:cloneDeep.cloneDeep(n)}})}}},moveItem:(e,t,i)=>{let s=l().state,n=s[e],d=s[t];if(n&&d&&"section"!==d.type){if("section"===n.type){let t=s.ROOT;if(!t.childrens)return;let l=t.childrens.findIndex(t=>t===e);moveByIndex(t.childrens,l,i??0),r({state:{...s,ROOT:cloneDeep.cloneDeep(t)}})}else{let l=Object.entries(s).find(([,t])=>"section"!==t.type&&t.childrens?.includes(e));if(n&&l){let a=Date.now(),[,c]=l;if("section"===c.type)return;if(c.dateModified=a,t===c.uid&&c.childrens){let t=c.childrens.findIndex(t=>t===e);c.childrens&&t!==i&&(moveByIndex(c.childrens,t,i??0),r({state:{...s,[c.uid]:cloneDeep.cloneDeep(c)}}))}else c.childrens=c.childrens?.filter(t=>t!==e),d&&(d.dateModified=a,d.childrens=d.childrens??[],d.childrens.splice(i??0,0,n.uid),r({state:{...s,[d.uid]:cloneDeep.cloneDeep(d),[c.uid]:cloneDeep.cloneDeep(c)}}))}}}},forceChangeState:e=>{r({state:e,loaded:!0})},initState:e=>{if(Array.isArray(e)){let t=e.map(e=>e.uid),i=e.reduceRight((e,t)=>{let i=normalizeBuilderData.normalizeBuilderData(t);return{...e,...i}},{});r({loaded:!0,state:{ROOT:{...root,childrens:t},...i}})}else{let t=normalizeBuilderData.normalizeBuilderData(e);r({loaded:!0,state:{ROOT:{...root,childrens:[e.uid]},...t}})}},addSection:(e,t)=>{let i=l().state,s=i.ROOT;s.childrens||(s.childrens=[]),s.childrens.splice(t??0,0,e.uid),r({state:{...i,ROOT:cloneDeep.cloneDeep(s)}})},getParents:(e,t)=>{let i=l().state,r=[],s=0,n=e;for(;!t||!(s>=t);){let e=Object.entries(i).find(([,e])=>"section"!==e.type&&e.childrens?.includes(n));if(!e)break;let[,t]=e;if(!t)break;r.push(t),n=t.uid,s++}return r},updateItemName:(e,t)=>{let i=l().state,s=i[e];s&&(s.name=t,r({state:{...i,[e]:cloneDeep.cloneDeep(s)}}))},updateItemAttribute:(e,t,i)=>{if(!i||!["label","customLabel","isShopifyVisibility"].includes(i))return;let s=l().state,n=s[e];if(n){if("section"!==n.type){let e=Date.now();n.dateModified=e}let l={...n,[i]:t};r({state:{...s,[e]:l}})}}})),BuilderPreviewProvider=({children:e,state:t,isThemeSectionEditor:i,pageName:r,lazy:l,...s})=>{let n=l?react.Suspense:react.Fragment,d=react.useMemo(()=>createBuilderPreviewProvider(t,r,i),[t,i,r]);return jsxRuntime.jsx(n,{children:jsxRuntime.jsx(BuilderPreviewContext.Provider,{...s,value:d,children:e})})},useBuilderPreviewStore=(e,t)=>{let i=react.useContext(BuilderPreviewContext);if(!i)throw Error("useBuilderPreviewStore must be used within a BuilderPreviewProvider");return zustand.useStore(i,e,t)};exports.BuilderPreviewProvider=BuilderPreviewProvider,exports.useBuilderPreviewStore=useBuilderPreviewStore;
2
+ "use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),zustand=require("zustand"),cloneDeep=require("../helpers/clone-deep.js"),normalizeBuilderData=require("../helpers/normalize-builder-data.js");function moveByIndex(e,t,i){let r=e.splice(t,1)[0];void 0!==r&&e.splice(i,0,r)}function removeByKey(e,t){let i=t[e];i&&(delete t[e],"section"!==i.type&&i.childrens?.map(e=>removeByKey(e,t)))}const BuilderPreviewContext=react.createContext(null),root={uid:"ROOT",tag:"Root",label:"Root",childrens:[]},createBuilderPreviewProvider=(e,t,i)=>zustand.createStore((r,s)=>({state:e,loaded:!1,isThemeSectionEditor:!!i,pageName:t,dynamicProduct:null,dynamicCollection:null,errorSectionList:null,addItem:e=>{let{position:t,data:i}=e,l=s().state,n=Date.now();if("section"===e.type){if(!Array.isArray(i)){let e=i.uid,s=l.ROOT;s.childrens?s.childrens.splice(t??0,0,e):s.childrens=[e],s.dateModified=n,r({state:{...l,[e]:{uid:e,type:"section",label:i.label},ROOT:cloneDeep.cloneDeep(s)}})}}else{let{id:i,data:s}=e,d=i?l[i]??l.ROOT:l.ROOT;if("section"===d.type)return;if(Array.isArray(s)){let e=s.map(e=>e.uid),i=s.reduceRight((e,t)=>{let i=normalizeBuilderData.normalizeBuilderData(t);return{...e,...i}},{});d.dateModified=n,d.childrens=d.childrens??[],d.childrens.splice(t??0,0,...e),r({state:{...l,...i,[d.uid]:cloneDeep.cloneDeep(d)}})}else{let e=normalizeBuilderData.normalizeBuilderData(s);d.dateModified=n,d.childrens=d.childrens??[],d.childrens.splice(t??0,0,s.uid),r({state:{...l,...e,[d.uid]:cloneDeep.cloneDeep(d)}})}}},changeItemProp:(e,t,i)=>{if(!i||!["setting","style","advanced"].includes(i))return;let l=s().state,n=l[e];if(n?.type!=="section"&&n){let s=Date.now();switch(n.dateModified=s,i){case"setting":r({state:{...l,[e]:{...n,settings:{...n.settings,...t}}}});break;case"style":r({state:{...l,[e]:{...n,styles:{...n.styles,...t}}}});break;case"advanced":r({state:{...l,[e]:{...n,advanced:{...n.advanced,...t}}}})}}},forceChangeItemProp:(e,t,i)=>{if(!i||!["setting","style","advanced"].includes(i))return;let l=s().state,n=l[e];if(n?.type!=="section"&&n){let s=Date.now();switch(n.dateModified=s,i){case"setting":r({state:{...l,[e]:{...n,settings:t}}});break;case"style":r({state:{...l,[e]:{...n,styles:t}}});break;case"advanced":r({state:{...l,[e]:{...n,advanced:t}}})}}},changeItemPropByKey:({id:e,key:t,data:i,group:l})=>{if(!l||!["setting","style","advanced"].includes(l))return;let n=s().state,d=n[e];if(d?.type!=="section"&&d){let s={style:d.styles??{},advanced:d.advanced??{},setting:d.settings??{}};void 0===i?(console.warn("Data is undefined"),delete s[l][t]):s[l][t]=i,r({state:{...n,[e]:{...d,settings:{...s.setting},styles:{...s.style},advanced:{...s.advanced}}}})}},getItem:e=>s().state[e],getState:()=>s().state,removeItem:e=>{if("ROOT"===e)r({state:{ROOT:root}});else{let t=s().state;removeByKey(e,t);let i=Object.entries(t).find(([,t])=>"section"!==t.type&&t.childrens?.includes(e));if(i){let s=Date.now(),[l,n]=i;if("section"===n.type)return;n.childrens=n.childrens?.filter(t=>t!==e),n.dateModified=s,r({state:{...t,[l]:cloneDeep.cloneDeep(n)}})}}},moveItem:(e,t,i)=>{let l=s().state,n=l[e],d=l[t];if(n&&d&&"section"!==d.type){if("section"===n.type){let t=l.ROOT;if(!t.childrens)return;let s=t.childrens.findIndex(t=>t===e);moveByIndex(t.childrens,s,i??0),r({state:{...l,ROOT:cloneDeep.cloneDeep(t)}})}else{let s=Object.entries(l).find(([,t])=>"section"!==t.type&&t.childrens?.includes(e));if(n&&s){let a=Date.now(),[,c]=s;if("section"===c.type)return;if(c.dateModified=a,t===c.uid&&c.childrens){let t=c.childrens.findIndex(t=>t===e);c.childrens&&t!==i&&(moveByIndex(c.childrens,t,i??0),r({state:{...l,[c.uid]:cloneDeep.cloneDeep(c)}}))}else c.childrens=c.childrens?.filter(t=>t!==e),d&&(d.dateModified=a,d.childrens=d.childrens??[],d.childrens.splice(i??0,0,n.uid),r({state:{...l,[d.uid]:cloneDeep.cloneDeep(d),[c.uid]:cloneDeep.cloneDeep(c)}}))}}}},forceChangeState:e=>{r({state:e,loaded:!0})},initState:e=>{if(Array.isArray(e)){let t=e.map(e=>e.uid),i=e.reduceRight((e,t)=>{let i=normalizeBuilderData.normalizeBuilderData(t);return{...e,...i}},{});r({loaded:!0,state:{ROOT:{...root,childrens:t},...i}})}else{let t=normalizeBuilderData.normalizeBuilderData(e);r({loaded:!0,state:{ROOT:{...root,childrens:[e.uid]},...t}})}},addSection:(e,t)=>{let i=s().state,l=i.ROOT;l.childrens||(l.childrens=[]),l.childrens.splice(t??0,0,e.uid),r({state:{...i,ROOT:cloneDeep.cloneDeep(l)}})},getParents:(e,t)=>{let i=s().state,r=[],l=0,n=e;for(;!t||!(l>=t);){let e=Object.entries(i).find(([,e])=>"section"!==e.type&&e.childrens?.includes(n));if(!e)break;let[,t]=e;if(!t)break;r.push(t),n=t.uid,l++}return r},updateItemName:(e,t)=>{let i=s().state,l=i[e];l&&(l.name=t,r({state:{...i,[e]:cloneDeep.cloneDeep(l)}}))},updateItemAttribute:(e,t,i)=>{if(!i||!["label","customLabel","isShopifyVisibility"].includes(i))return;let l=s().state,n=l[e];if(n){if("section"!==n.type){let e=Date.now();n.dateModified=e}let s={...n,[i]:t};r({state:{...l,[e]:s}})}},dismissPublishError:e=>{let t=s().errorSectionList;if(!Array.isArray(t))return;let i=t.map(t=>t.uid===e?{...t,isDismissed:!0}:t);r({errorSectionList:i})},setErrorSectionList:e=>r({errorSectionList:e})})),BuilderPreviewProvider=({children:e,state:t,isThemeSectionEditor:i,pageName:r,lazy:s,...l})=>{let n=s?react.Suspense:react.Fragment,d=react.useMemo(()=>createBuilderPreviewProvider(t,r,i),[t,i,r]);return jsxRuntime.jsx(n,{children:jsxRuntime.jsx(BuilderPreviewContext.Provider,{...l,value:d,children:e})})},useBuilderPreviewStore=(e,t)=>{let i=react.useContext(BuilderPreviewContext);if(!i)throw Error("useBuilderPreviewStore must be used within a BuilderPreviewProvider");return zustand.useStore(i,e,t)};exports.BuilderPreviewProvider=BuilderPreviewProvider,exports.useBuilderPreviewStore=useBuilderPreviewStore;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{memo as i,useState as l,useMemo as n,useCallback as r,useEffect as a}from"react";import"zustand";import{useBuilderPreviewStore as d}from"../contexts/BuilderPreviewContext.js";import{usePageStore as C}from"../contexts/PageContext.js";import{CreateThemeSection as c}from"./theme-section/CreateThemeSection.js";import s from"./toolbar/Tooltip.js";import{ThemeSectionStatusWrapper as p}from"./theme-section/ThemeSectionStatus.js";import h from"./resize/Resize.js";import{usePostPurchase as u}from"../hooks/useToolbarPostPurchase.js";import{ableGenerateContentElements as m}from"./constant.js";import{AIContentGenerator as g}from"./ai-generator/AIContentGenerator.js";import{AIGenContentLoading as f}from"./ai-generator/AIGenContentLoading.js";import{InteractionSuffix as v}from"./InteractionSuffix.js";import{useI18nStore as b}from"@gem-sdk/core";import"swr";import"../helpers/convert.js";import{useShopStore as w}from"../contexts/ShopContext.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";let SECTION_LIMIT=25,notVisible=t=>{let e=getComputedStyle(t).overflow;return"visible"!==e},isSection=t=>{let e=t.getAttribute("data-component-tag");return"Section"===e},ComponentToolbarPreview=i=>{let{t:S}=b(),L=i.isThemeSection,M=!!i.isShopifySection,x=w(t=>t.storefrontUrl),Z=w(t=>t.pageType),y=d(t=>t.getParents),R=d(t=>t.getItem("ROOT")),H=d(t=>t.isThemeSectionEditor),[P,V]=l(null),[T,E]=l(!1),[A,j]=l(!1),[B,k]=l([]),[I,F]=l("top"),[$,O]=l(!1),[U,D]=l(!1),[N,G]=l(""),[_,z]=l(""),[q,J]=l({width:"",text:""}),[K,Q]=l(!1),W=C(t=>t.interactionData),X=n(()=>"POST_PURCHASE"===Z,[Z]),{checkDisableDelete:Y,getTooltipText:tt,checkDisableDuplicate:te}=u(i.uid,i.tag||""),to=["ProductTitle","ProductDescription","ProductPrice"],ti=["ArticleTitle","ArticleContent","ArticleImage","ArticleAuthor","ArticleCategory","ArticleDate","ArticleExcerpt","ArticleTags"],tl=[...to,...ti],tn=(t,e)=>{let o=B.length,i=t.getBoundingClientRect(),l=e.getBoundingClientRect();return i.top-l.top<36*o},tr=(t,e)=>{let o=e||t;if(t&&!isSection(t))return notVisible(t)&&tn(e,t)?t:t.parentElement?tr(t.parentElement,o):void 0},ta=r(()=>R?.childrens?.length||0,[R?.childrens?.length]),td=r(()=>{if("Section"==i.tag)return"bottom";let t=document.body.querySelector("#storefront")?.querySelector('[data-toolbar-active="true"]');if(t){let e=t.getBoundingClientRect();e.top<60?F("bottom"):F("top")}},[i.tag]),tC=n(()=>{let t=/^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;return x?x.match(t)?.[1]:""},[x]),tc=n(()=>`https://admin.shopify.com/store/${tC}`,[tC]),ts=n(()=>N?`${tc}/products/${N}`:"",[tc,N]),tp=n(()=>_?`${tc}/articles/${_.replace("gid://shopify/Article/","")}`:"",[_,tc]),th=n(()=>W?.isSelectOnPage,[W?.isSelectOnPage]),tu=n(()=>W?.settingType,[W?.settingType]),tm=n(()=>W?.item?.targets?.find(t=>t.uid===i.uid&&t?.type!=="PAGE")&&"TARGET"===tu,[W?.item?.targets,i.uid,tu]),tg=n(()=>W?.item?.self?.uid===i.uid&&W?.item?.self.type!=="PAGE"&&"TRIGGER"===tu,[W?.item?.self?.type,W?.item?.self?.uid,i.uid,tu]),tf=n(()=>!tm&&!tg,[tm,tg]),tv=n(()=>$||M,[$,M]),tb=n(()=>K||M||ta()>25&&"Section"===i.tag,[ta,K,M,i.tag]),tw=r(t=>{let e=t.detail;if(e?.articleId&&z(e.articleId),e?.productId&&G(e.productId),e?.componentUid==i.uid){D(!0),td(),X&&(O(Y()),J(tt()),Q(te()));let t=y(i.uid).filter(t=>!("ROOT"===t.uid||"Section"===t.tag&&H||t.editorConfigs?.toolbar?.hide||t.editorConfigs?.component?.noSetting)).slice(0,3);k(t)}else D(!1),k([]),E(!1)},[i.uid,X,y,Y,tt,te,H,td]);if(a(()=>(window.addEventListener("editor:active-component",tw),()=>{window.removeEventListener("editor:active-component",tw)}),[tw]),"section"===i.type||i.editorConfigs?.toolbar?.hide)return null;let tS=()=>"Section"!==i.tag?-1:R?.childrens?.length?R.childrens.findIndex(t=>t==i.uid):-1,tL=t=>{let e=t?.childrens?.length??0;if("Row"===t.label){let t=1===e?S("Row {colNumber} col",{colNumber:e}):S("Row {colNumber} cols",{colNumber:e});return t}return S(t.label)},tM=t=>{if(!B.length)return;let e=t?.target||null,o=e.closest("[data-toolbar-active]");if(!e||!o)return;if(T)j(!1),E(!1);else{let t=tr(o,o);if(t)j(!0);else{let t=o.getBoundingClientRect();t.top<36*B.length?j(!0):j(!1)}E(!0)}let i=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!T}});window.dispatchEvent(i)},tx=()=>{if(ti.includes(i.tag)){window.open(tp,"_blank");return}if(to.includes(i.tag)){window.open(ts,"_blank");return}window.open(tc,"_blank")},tZ=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:i.uid,isThemeSection:L,isShopifySection:M}});return window.dispatchEvent(e),!1},ty=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:i.uid,isThemeSection:L,isShopifySection:M}});return window.dispatchEvent(e),!1},tR=()=>i.customLabel||i.label,tH=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:i.uid}});return window.dispatchEvent(e),!1},tP=()=>{V(null),window.removeEventListener("editor:close-add-section-popup",tP)},tV=(t,e)=>{if(t.preventDefault(),t.stopPropagation(),ta()>=25)return!1;let o=t.target;if(o){V(e);let t=o.getBoundingClientRect(),l=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:i.uid,position:e,top:t.top+t.height/2}});window.dispatchEvent(l),window.addEventListener("editor:close-add-section-popup",tP)}return!1},tT=()=>{if(M)return i.name?.includes("Shopify section:")?i.name:`Shopify section: ${i.name}`;let t=i.name&&i.name===`Section ${i.uid}`;return ta()>=20?`${t?"Section":i?.name} ${tS()+1}/25`:t?`${S("Section")} ${tS()+1}`:i?.name},tE=()=>{let{isShopifySection:t,tag:e}=i;return!t&&(!L||!!H)&&m.includes(e)};return t(e,{children:[!("Section"==i.tag&&H)&&t("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==i.tag,"data-toolbar-theme-section":"Section"==i.tag&&!!L||H,"data-toolbar-shopify-section":"Section"==i.tag&&!!M,"data-toolbar-limit":tS()>=25,children:[t("div",{"data-toolbar-show-parent":!0,onClick:t=>tM(t),"aria-hidden":"true",children:[tg&&o("div",{className:"gp-hidden gp-w-[12px] interaction-use-custom-element",children:o("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",fill:"#F9F9F9"})})}),tm&&o("div",{className:"gp-hidden gp-w-[14px] interaction-use-custom-element",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",fill:"#F9F9F9"})})}),U&&tf&&o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==i.tag?t("div",{"data-toolbar-name":!0,children:[tT(),U&&M&&!i.isShopifyVisibility&&t("svg",{"data-toolbar-visibility":!0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",fill:"#F9F9F9"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",fill:"#F9F9F9"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",fill:"#F9F9F9"})]})]}):o("div",{"data-toolbar-name":!0,children:S(tR())}),U&&"Section"!==i.tag&&B.length>0&&o("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":T,children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),U&&T&&B.map((e,i)=>t("div",{"data-toolbar-parent":!0,"data-component-tag":e.tag,"data-parent-uid":e.uid,"data-toolbar-theme-section":H,"data-toolbar-parent-revert":A,style:{top:A?`${36*(i+1)}px`:`${-36*(i+1)}px`},children:[o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),o("div",{"data-toolbar-name":!0,children:tL(e)})]},e.uid)),U&&!th&&t(e,{children:[" ","Section"===i.tag&&!i.isThemeSection&&"STATIC"!==Z&&"POST_PURCHASE"!==Z&&!i.isShopifySection&&25>tS()&&o(c,{...i}),tE()&&o(g,{...i}),"Sticky"==i.tag&&o("div",{"data-toolbar-zoom-out":!0,onClick:t=>tH(t),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),tl.includes(i.tag)&&o(s,{"data-toolbar-title":!0,enable:!0,"data-toolbar-disable":!1,text:S("Edit content in Shopify"),position:"top",onClick:tx,"aria-hidden":"true",children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.61129 2.47348C8.61129 2.47348 8.47099 2.51557 8.23248 2.59274C8.19039 2.46647 8.13427 2.30512 8.05009 2.15079C7.78352 1.6387 7.39068 1.37212 6.91366 1.36511C6.87858 1.36511 6.85052 1.36511 6.81545 1.37212C6.80843 1.36511 6.80142 1.35634 6.7944 1.34757C6.78739 1.3388 6.78037 1.33003 6.77336 1.32302C6.56992 1.09854 6.30335 0.993314 5.98768 1.00033C5.37737 1.02137 4.76706 1.46332 4.269 2.249C3.91825 2.80319 3.65869 3.49767 3.58153 4.03082C3.38823 4.09074 3.21092 4.14586 3.05516 4.19429C2.64595 4.32151 2.3851 4.40261 2.37494 4.40261C2.01718 4.51485 2.01016 4.52888 1.96106 4.85859C1.92598 5.11113 1 12.2945 1 12.2945L7.14764 13.3583C7.18955 13.118 7.30454 12.8953 7.47848 12.7214L8.70249 11.4974V2.45945C8.66741 2.45945 8.63234 2.46647 8.61129 2.47348ZM6.82948 3.02767L6.62554 3.09101C6.27515 3.19989 5.90094 3.31617 5.5317 3.42752C5.65797 2.94349 5.89648 2.46647 6.19111 2.15079C6.30335 2.03154 6.45067 1.90527 6.63306 1.8281C6.80142 2.18587 6.83649 2.68393 6.82948 3.02767ZM5.99469 1.4072C6.13499 1.4072 6.26126 1.43526 6.36649 1.50541C6.19813 1.58959 6.0438 1.71586 5.88947 1.87721C5.50364 2.29109 5.202 2.94349 5.08274 3.56783C4.74459 3.66991 4.41804 3.77199 4.10838 3.8688L4.01646 3.89753C4.22691 2.90841 5.05468 1.43526 5.99469 1.4072ZM4.80214 7.0122C4.81874 7.26957 5.09737 7.44833 5.43473 7.66478C5.95252 7.99699 6.60867 8.41798 6.66813 9.3482C6.7453 10.5548 6.02977 11.3826 4.99154 11.4457C3.7569 11.5229 3.06943 10.7933 3.06943 10.7933L3.32899 9.67791C3.32899 9.67791 4.01646 10.197 4.56363 10.1619C4.92139 10.1409 5.04767 9.84627 5.04065 9.64283C5.01607 9.26796 4.73308 9.06671 4.41569 8.84101C4.00848 8.55142 3.54465 8.22157 3.49735 7.4331C3.42018 6.24756 4.19885 5.05501 5.91051 4.94277C6.57694 4.90068 6.91366 5.06904 6.91366 5.06904L6.52082 6.53518C6.52082 6.53518 6.08589 6.33876 5.56678 6.36682C4.80915 6.41592 4.79512 6.89294 4.80214 7.0122ZM7.23635 2.9014C7.22934 2.59274 7.19426 2.15781 7.04695 1.78601C7.50994 1.87721 7.74143 2.39632 7.83964 2.71199C7.70008 2.75665 7.54275 2.80575 7.37118 2.8593L7.23635 2.9014Z",fill:"currentColor"}),o("path",{d:"M10.7719 3.44156C10.7757 3.47543 11.1733 6.16931 11.541 8.65883L8.95503 11.2448V2.57871C9.16548 2.78214 9.71265 3.31528 9.71265 3.31528C9.71265 3.31528 10.6106 3.32931 10.6597 3.33633C10.7088 3.34334 10.7649 3.37842 10.7719 3.44156Z",fill:"currentColor"}),o("path",{d:"M14.8056 8.644L14.0424 7.88088C13.7832 7.62163 13.3629 7.62163 13.1036 7.88088L12.1519 8.83258L13.8539 10.5345L14.8056 9.58282C15.0648 9.32357 15.0648 8.90325 14.8056 8.644Z",fill:"currentColor"}),o("path",{d:"M7.85018 13.0942L11.6419 9.30246L13.3438 11.0044L9.55212 14.7961C9.43782 14.9104 9.28573 14.9791 9.1244 14.9892L7.93427 15.0641C7.73484 15.0767 7.56961 14.9114 7.58216 14.712L7.65706 13.5219C7.66721 13.3606 7.73588 13.2085 7.85018 13.0942Z",fill:"currentColor"})]})}),o(s,{enable:"Section"==i.tag&&ta()>=25||M,text:M?S("Disabled. Please edit in Shopify Editor"):S("Page has reached Shopify’s 25 section-limit"),position:"bottom",width:"200px","data-toolbar-duplicate":!0,"data-toolbar-disable":tb,onClick:tb?void 0:t=>ty(t),"aria-hidden":"true",className:tb?"!gp-cursor-not-allowed":"",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),o(s,{"data-toolbar-delete":!0,onClick:t=>tv?null:tZ(t),enable:tv,"data-toolbar-disable":tv,text:M?S("Disabled. Please edit in Shopify Editor"):q.text,width:q.width,position:M?"bottom":I,"aria-hidden":"true",className:tv?"!gp-cursor-not-allowed":"",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),o(v,{uid:i.uid})]},i.uid),"STATIC"!==Z&&"POST_PURCHASE"!==Z&&25>tS()&&o(p,{...i}),o("div",{"data-outline":!0,"data-outline-section":"Section"==i.tag,"data-outline-theme-section":"Section"==i.tag&&!!L||H,"data-outline-shopify-section":"Section"==i.tag&&!!M,"data-outline-limit":tS()>=25},"outline-"+i.uid),"Section"==i.tag&&!H&&t(e,{children:[o(s,{enable:ta()>=25,text:S("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":ta()>=25,"data-toolbar-add-open":"above"==P,onClick:t=>tV(t,"above"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),o(s,{enable:ta()>=25,text:S("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":ta()>=25,"data-toolbar-add-open":"below"==P,onClick:t=>tV(t,"below"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),m.includes(i.tag)&&U&&o(f,{...i}),U&&o(h,{...i})]})};var ComponentToolbarPreview$1=i(ComponentToolbarPreview);export{ComponentToolbarPreview$1 as default};
2
+ import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{memo as i,useState as n,useMemo as l,useCallback as r,useEffect as a}from"react";import"zustand";import{useBuilderPreviewStore as d}from"../contexts/BuilderPreviewContext.js";import{usePageStore as C}from"../contexts/PageContext.js";import{CreateThemeSection as c}from"./theme-section/CreateThemeSection.js";import s from"./toolbar/Tooltip.js";import{SectionErrorBanner as p}from"./toolbar/SectionErrorBanner.js";import{ThemeSectionStatusWrapper as u}from"./theme-section/ThemeSectionStatus.js";import h from"./resize/Resize.js";import{usePostPurchase as m}from"../hooks/useToolbarPostPurchase.js";import{ableGenerateContentElements as g}from"./constant.js";import{AIContentGenerator as f}from"./ai-generator/AIContentGenerator.js";import{AIGenContentLoading as b}from"./ai-generator/AIGenContentLoading.js";import{InteractionSuffix as v}from"./InteractionSuffix.js";import{useI18nStore as w}from"@gem-sdk/core";import"swr";import"../helpers/convert.js";import{useShopStore as S}from"../contexts/ShopContext.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"swr/infinite";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"../hooks/useStickyStore.js";import"../types/builder.js";import"../types/custom.js";import"../types/animations.js";let SECTION_LIMIT=25,notVisible=t=>{let e=getComputedStyle(t).overflow;return"visible"!==e},isSection=t=>{let e=t.getAttribute("data-component-tag");return"Section"===e},ComponentToolbarPreview=i=>{let{t:L}=w(),M=i.isThemeSection,x=!!i.isShopifySection,Z=S(t=>t.storefrontUrl),y=S(t=>t.pageType),R=d(t=>t.getParents),P=d(t=>t.getItem("ROOT")),H=d(t=>t.isThemeSectionEditor),[V,E]=n(null),[T,A]=n(!1),[j,B]=n(!1),[I,k]=n([]),[F,$]=n("top"),[D,O]=n(!1),[U,N]=n(!1),[G,_]=n(""),[z,q]=n(""),[J,K]=n({width:"",text:""}),[Q,W]=n(!1),X=d(t=>t.errorSectionList),Y=l(()=>{if(!X)return null;let t=X?.find(t=>t.uid===i.uid);return t},[X,i.uid]),tt=C(t=>t.interactionData),te=l(()=>"POST_PURCHASE"===y,[y]),{checkDisableDelete:to,getTooltipText:ti,checkDisableDuplicate:tn}=m(i.uid,i.tag||""),tl=["ProductTitle","ProductDescription","ProductPrice"],tr=["ArticleTitle","ArticleContent","ArticleImage","ArticleAuthor","ArticleCategory","ArticleDate","ArticleExcerpt","ArticleTags"],ta=[...tl,...tr],td=(t,e)=>{let o=I.length,i=t.getBoundingClientRect(),n=e.getBoundingClientRect();return i.top-n.top<36*o},tC=(t,e)=>{let o=e||t;if(t&&!isSection(t))return notVisible(t)&&td(e,t)?t:t.parentElement?tC(t.parentElement,o):void 0},tc=r(()=>P?.childrens?.length||0,[P?.childrens?.length]),ts=r(()=>{if("Section"==i.tag)return"bottom";let t=document.body.querySelector("#storefront")?.querySelector('[data-toolbar-active="true"]');if(t){let e=t.getBoundingClientRect();e.top<60?$("bottom"):$("top")}},[i.tag]),tp=l(()=>{let t=/^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;return Z?Z.match(t)?.[1]:""},[Z]),tu=l(()=>`https://admin.shopify.com/store/${tp}`,[tp]),th=l(()=>G?`${tu}/products/${G}`:"",[tu,G]),tm=l(()=>z?`${tu}/articles/${z.replace("gid://shopify/Article/","")}`:"",[z,tu]),tg=l(()=>tt?.isSelectOnPage,[tt?.isSelectOnPage]),tf=l(()=>tt?.settingType,[tt?.settingType]),tb=l(()=>tt?.item?.targets?.find(t=>t.uid===i.uid&&t?.type!=="PAGE")&&"TARGET"===tf,[tt?.item?.targets,i.uid,tf]),tv=l(()=>tt?.item?.self?.uid===i.uid&&tt?.item?.self.type!=="PAGE"&&"TRIGGER"===tf,[tt?.item?.self?.type,tt?.item?.self?.uid,i.uid,tf]),tw=l(()=>!tb&&!tv,[tb,tv]),tS=l(()=>D||x,[D,x]),tL=l(()=>Q||x||tc()>25&&"Section"===i.tag||!!Y,[tc,Q,x,i.tag,Y]),tM=r(t=>{let e=t.detail;if(e?.articleId&&q(e.articleId),e?.productId&&_(e.productId),e?.componentUid==i.uid){N(!0),ts(),te&&(O(to()),K(ti()),W(tn()));let t=R(i.uid).filter(t=>!("ROOT"===t.uid||"Section"===t.tag&&H||t.editorConfigs?.toolbar?.hide||t.editorConfigs?.component?.noSetting)).slice(0,3);k(t)}else N(!1),k([]),A(!1)},[i.uid,te,R,to,ti,tn,H,ts]),tx=d(t=>t.dismissPublishError),tZ=r(()=>{tx(i.uid)},[tx,i.uid]),ty=r(()=>"Section"!==i.tag?-1:P?.childrens?.length?P.childrens.findIndex(t=>t==i.uid):-1,[P?.childrens,i.uid,i.tag]),tR=l(()=>ty()>=25,[ty]),tP=l(()=>!!Y||tR,[Y,tR]);if(a(()=>(window.addEventListener("editor:active-component",tM),()=>{window.removeEventListener("editor:active-component",tM)}),[tM]),"section"===i.type||i.editorConfigs?.toolbar?.hide)return null;let tH=t=>{let e=t?.childrens?.length??0;if("Row"===t.label){let t=1===e?L("Row {colNumber} col",{colNumber:e}):L("Row {colNumber} cols",{colNumber:e});return t}return L(t.label)},tV=t=>{if(!I.length)return;let e=t?.target||null,o=e.closest("[data-toolbar-active]");if(!e||!o)return;if(T)B(!1),A(!1);else{let t=tC(o,o);if(t)B(!0);else{let t=o.getBoundingClientRect();t.top<36*I.length?B(!0):B(!1)}A(!0)}let i=new CustomEvent("editor:toolbar:show-parents",{bubbles:!0,detail:{value:!T}});window.dispatchEvent(i)},tE=()=>{if(tr.includes(i.tag)){window.open(tm,"_blank");return}if(tl.includes(i.tag)){window.open(th,"_blank");return}window.open(tu,"_blank")},tT=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:delete-component",{bubbles:!0,detail:{componentUid:i.uid,isThemeSection:M,isShopifySection:x}});return window.dispatchEvent(e),!1},tA=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:duplicate-component",{bubbles:!0,detail:{componentUid:i.uid,isThemeSection:M,isShopifySection:x}});return window.dispatchEvent(e),!1},tj=()=>i.customLabel||i.label,tB=t=>{t.preventDefault(),t.stopPropagation();let e=new CustomEvent("editor:toolbar:zoom-out-component",{bubbles:!0,detail:{componentUid:i.uid}});return window.dispatchEvent(e),!1},tI=()=>{E(null),window.removeEventListener("editor:close-add-section-popup",tI)},tk=(t,e)=>{if(t.preventDefault(),t.stopPropagation(),tc()>=25)return!1;let o=t.target;if(o){E(e);let t=o.getBoundingClientRect(),n=new CustomEvent("editor:toolbar:add-section",{bubbles:!0,detail:{componentUid:i.uid,position:e,top:t.top+t.height/2}});window.dispatchEvent(n),window.addEventListener("editor:close-add-section-popup",tI)}return!1},tF=()=>{if(x)return i.name?.includes("Shopify section:")?i.name:`Shopify section: ${i.name}`;let t=i.name&&i.name===`Section ${i.uid}`;return tc()>=20?`${t?"Section":i?.name} ${ty()+1}/25`:t?`${L("Section")} ${ty()+1}`:i?.name},t$=()=>{let{isShopifySection:t,tag:e}=i;return!t&&(!M||!!H)&&g.includes(e)&&!Y},tD="Section"===i.tag&&!i.isThemeSection&&"STATIC"!==y&&"POST_PURCHASE"!==y&&!i.isShopifySection&&25>ty()&&!Y;return t(e,{children:[!("Section"==i.tag&&H)&&t("div",{"data-toolbar":!0,"data-toolbar-section":"Section"==i.tag,"data-toolbar-theme-section":"Section"==i.tag&&!!M||H,"data-toolbar-shopify-section":"Section"==i.tag&&!!x,"data-toolbar-limit":ty()>=25||!!Y,children:[t("div",{"data-toolbar-show-parent":!0,onClick:t=>tV(t),"aria-hidden":"true",children:[tv&&o("div",{className:"gp-hidden gp-w-[12px] interaction-use-custom-element",children:o("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",fill:"#F9F9F9"})})}),tb&&o("div",{className:"gp-hidden gp-w-[14px] interaction-use-custom-element",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",fill:"#F9F9F9"})})}),U&&tw&&o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),"Section"==i.tag?t("div",{"data-toolbar-name":!0,children:[tF(),U&&x&&!i.isShopifyVisibility&&t("svg",{"data-toolbar-visibility":!0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",fill:"#F9F9F9"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",fill:"#F9F9F9"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",fill:"#F9F9F9"})]})]}):o("div",{"data-toolbar-name":!0,children:L(tj())}),U&&"Section"!==i.tag&&I.length>0&&o("div",{"data-toolbar-icon-parent":!0,"data-toolbar-icon-parent-open":T,children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M5.65522 10C5.07265 10 4.7809 9.22865 5.19284 8.77753L7.53762 6.20974C7.79298 5.93009 8.20702 5.93009 8.46238 6.20974L10.8072 8.77754C11.2191 9.22866 10.9274 10 10.3448 10H5.65522Z",fill:"currentColor"})})})]}),U&&T&&I.map((e,i)=>t("div",{"data-toolbar-parent":!0,"data-component-tag":e.tag,"data-parent-uid":e.uid,"data-toolbar-theme-section":H,"data-toolbar-parent-revert":j,style:{top:j?`${36*(i+1)}px`:`${-36*(i+1)}px`},children:[o("div",{"data-toolbar-icon-drag":!0,children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[o("path",{d:"M5.5 4.5C6.32843 4.5 7 3.82843 7 3C7 2.17157 6.32843 1.5 5.5 1.5C4.67157 1.5 4 2.17157 4 3C4 3.82843 4.67157 4.5 5.5 4.5Z",fill:"currentColor"}),o("path",{d:"M5.5 9.5C6.32843 9.5 7 8.82843 7 8C7 7.17157 6.32843 6.5 5.5 6.5C4.67157 6.5 4 7.17157 4 8C4 8.82843 4.67157 9.5 5.5 9.5Z",fill:"currentColor"}),o("path",{d:"M7 13C7 13.8284 6.32843 14.5 5.5 14.5C4.67157 14.5 4 13.8284 4 13C4 12.1716 4.67157 11.5 5.5 11.5C6.32843 11.5 7 12.1716 7 13Z",fill:"currentColor"}),o("path",{d:"M10.5 4.5C11.3284 4.5 12 3.82843 12 3C12 2.17157 11.3284 1.5 10.5 1.5C9.67157 1.5 9 2.17157 9 3C9 3.82843 9.67157 4.5 10.5 4.5Z",fill:"currentColor"}),o("path",{d:"M12 8C12 8.82843 11.3284 9.5 10.5 9.5C9.67157 9.5 9 8.82843 9 8C9 7.17157 9.67157 6.5 10.5 6.5C11.3284 6.5 12 7.17157 12 8Z",fill:"currentColor"}),o("path",{d:"M10.5 14.5C11.3284 14.5 12 13.8284 12 13C12 12.1716 11.3284 11.5 10.5 11.5C9.67157 11.5 9 12.1716 9 13C9 13.8284 9.67157 14.5 10.5 14.5Z",fill:"currentColor"})]})}),o("div",{"data-toolbar-name":!0,children:tH(e)})]},e.uid)),U&&!tg&&t(e,{children:[" ",tD&&o(c,{...i}),t$()&&o(f,{...i}),"Sticky"==i.tag&&o("div",{"data-toolbar-zoom-out":!0,onClick:t=>tB(t),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.5 7C14.7761 7 15 6.77614 15 6.5C15 6.22386 14.7761 6 14.5 6L10.7072 6L14.8536 1.85355C15.0489 1.65829 15.0489 1.34171 14.8536 1.14645C14.6584 0.951186 14.3418 0.951185 14.1465 1.14645L10 5.29297L10 1.5C10 1.22386 9.77614 1 9.5 1C9.22386 1 9 1.22386 9 1.5L9 6.5C9 6.77614 9.22386 7 9.5 7L14.5 7ZM6 10.7073L6 14.5C6 14.7761 6.22386 15 6.5 15C6.77614 15 7 14.7761 7 14.5L7 9.5C7 9.22386 6.77614 9 6.5 9H1.5C1.22386 9 1 9.22386 1 9.5C1 9.77614 1.22386 10 1.5 10H5.29306L1.14662 14.1464C0.951353 14.3417 0.951353 14.6583 1.14662 14.8536C1.34188 15.0488 1.65846 15.0488 1.85372 14.8536L6 10.7073Z",fill:"currentColor"})})}),ta.includes(i.tag)&&o(s,{"data-toolbar-title":!0,enable:!0,"data-toolbar-disable":!1,text:L("Edit content in Shopify"),position:"top",onClick:tE,"aria-hidden":"true",children:t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.61129 2.47348C8.61129 2.47348 8.47099 2.51557 8.23248 2.59274C8.19039 2.46647 8.13427 2.30512 8.05009 2.15079C7.78352 1.6387 7.39068 1.37212 6.91366 1.36511C6.87858 1.36511 6.85052 1.36511 6.81545 1.37212C6.80843 1.36511 6.80142 1.35634 6.7944 1.34757C6.78739 1.3388 6.78037 1.33003 6.77336 1.32302C6.56992 1.09854 6.30335 0.993314 5.98768 1.00033C5.37737 1.02137 4.76706 1.46332 4.269 2.249C3.91825 2.80319 3.65869 3.49767 3.58153 4.03082C3.38823 4.09074 3.21092 4.14586 3.05516 4.19429C2.64595 4.32151 2.3851 4.40261 2.37494 4.40261C2.01718 4.51485 2.01016 4.52888 1.96106 4.85859C1.92598 5.11113 1 12.2945 1 12.2945L7.14764 13.3583C7.18955 13.118 7.30454 12.8953 7.47848 12.7214L8.70249 11.4974V2.45945C8.66741 2.45945 8.63234 2.46647 8.61129 2.47348ZM6.82948 3.02767L6.62554 3.09101C6.27515 3.19989 5.90094 3.31617 5.5317 3.42752C5.65797 2.94349 5.89648 2.46647 6.19111 2.15079C6.30335 2.03154 6.45067 1.90527 6.63306 1.8281C6.80142 2.18587 6.83649 2.68393 6.82948 3.02767ZM5.99469 1.4072C6.13499 1.4072 6.26126 1.43526 6.36649 1.50541C6.19813 1.58959 6.0438 1.71586 5.88947 1.87721C5.50364 2.29109 5.202 2.94349 5.08274 3.56783C4.74459 3.66991 4.41804 3.77199 4.10838 3.8688L4.01646 3.89753C4.22691 2.90841 5.05468 1.43526 5.99469 1.4072ZM4.80214 7.0122C4.81874 7.26957 5.09737 7.44833 5.43473 7.66478C5.95252 7.99699 6.60867 8.41798 6.66813 9.3482C6.7453 10.5548 6.02977 11.3826 4.99154 11.4457C3.7569 11.5229 3.06943 10.7933 3.06943 10.7933L3.32899 9.67791C3.32899 9.67791 4.01646 10.197 4.56363 10.1619C4.92139 10.1409 5.04767 9.84627 5.04065 9.64283C5.01607 9.26796 4.73308 9.06671 4.41569 8.84101C4.00848 8.55142 3.54465 8.22157 3.49735 7.4331C3.42018 6.24756 4.19885 5.05501 5.91051 4.94277C6.57694 4.90068 6.91366 5.06904 6.91366 5.06904L6.52082 6.53518C6.52082 6.53518 6.08589 6.33876 5.56678 6.36682C4.80915 6.41592 4.79512 6.89294 4.80214 7.0122ZM7.23635 2.9014C7.22934 2.59274 7.19426 2.15781 7.04695 1.78601C7.50994 1.87721 7.74143 2.39632 7.83964 2.71199C7.70008 2.75665 7.54275 2.80575 7.37118 2.8593L7.23635 2.9014Z",fill:"currentColor"}),o("path",{d:"M10.7719 3.44156C10.7757 3.47543 11.1733 6.16931 11.541 8.65883L8.95503 11.2448V2.57871C9.16548 2.78214 9.71265 3.31528 9.71265 3.31528C9.71265 3.31528 10.6106 3.32931 10.6597 3.33633C10.7088 3.34334 10.7649 3.37842 10.7719 3.44156Z",fill:"currentColor"}),o("path",{d:"M14.8056 8.644L14.0424 7.88088C13.7832 7.62163 13.3629 7.62163 13.1036 7.88088L12.1519 8.83258L13.8539 10.5345L14.8056 9.58282C15.0648 9.32357 15.0648 8.90325 14.8056 8.644Z",fill:"currentColor"}),o("path",{d:"M7.85018 13.0942L11.6419 9.30246L13.3438 11.0044L9.55212 14.7961C9.43782 14.9104 9.28573 14.9791 9.1244 14.9892L7.93427 15.0641C7.73484 15.0767 7.56961 14.9114 7.58216 14.712L7.65706 13.5219C7.66721 13.3606 7.73588 13.2085 7.85018 13.0942Z",fill:"currentColor"})]})}),o(s,{enable:"Section"==i.tag&&tc()>=25||x,text:x?L("Disabled. Please edit in Shopify Editor"):L("Page has reached Shopify’s 25 section-limit"),position:"bottom",width:"200px","data-toolbar-duplicate":!0,"data-toolbar-disable":tL,onClick:tL?void 0:t=>tA(t),"aria-hidden":"true",className:tL?"!gp-cursor-not-allowed":"",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.08423 1.21289C5.53194 1.21289 5.08423 1.66061 5.08423 2.21289V3.78711H4.26172C3.43329 3.78711 2.76172 4.45868 2.76172 5.28711V13.2871C2.76172 14.1155 3.43329 14.7871 4.26172 14.7871H10.2617C11.0901 14.7871 11.7617 14.1155 11.7617 13.2871V12.4629H13.0842C13.6365 12.4629 14.0842 12.0152 14.0842 11.4629V2.21289C14.0842 1.66061 13.6365 1.21289 13.0842 1.21289H6.08423ZM10.7617 12.4629H6.08423C5.53194 12.4629 5.08423 12.0152 5.08423 11.4629V4.78711H4.26172C3.98558 4.78711 3.76172 5.01097 3.76172 5.28711V13.2871C3.76172 13.5633 3.98558 13.7871 4.26172 13.7871H10.2617C10.5379 13.7871 10.7617 13.5633 10.7617 13.2871V12.4629Z",fill:"currentColor"})})}),o(s,{"data-toolbar-delete":!0,onClick:t=>tS?null:tT(t),enable:tS,"data-toolbar-disable":tS,text:x?L("Disabled. Please edit in Shopify Editor"):J.text,width:J.width,position:x?"bottom":F,"aria-hidden":"true",className:tS?"!gp-cursor-not-allowed":"",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 2.88965V2.38965C11 1.56122 10.3284 0.889648 9.5 0.889648H6.5C5.67157 0.889648 5 1.56122 5 2.38965V2.88965H2C1.72386 2.88965 1.5 3.11351 1.5 3.38965C1.5 3.66579 1.72386 3.88965 2 3.88965H3.21997V13.1099C3.21997 14.2144 4.1154 15.1099 5.21997 15.1099H11.22C12.3245 15.1099 13.22 14.2144 13.22 13.1099V3.88965H14C14.2761 3.88965 14.5 3.66579 14.5 3.38965C14.5 3.11351 14.2761 2.88965 14 2.88965H11ZM6 2.88965H10V2.38965C10 2.11351 9.77614 1.88965 9.5 1.88965H6.5C6.22386 1.88965 6 2.11351 6 2.38965V2.88965ZM6.24976 6.13965C6.66397 6.13965 6.99976 6.47543 6.99976 6.88965V11.3896C6.99976 11.8039 6.66397 12.1396 6.24976 12.1396C5.83554 12.1396 5.49976 11.8039 5.49976 11.3896V6.88965C5.49976 6.47543 5.83554 6.13965 6.24976 6.13965ZM10.4998 6.88965C10.4998 6.47543 10.164 6.13965 9.74976 6.13965C9.33554 6.13965 8.99976 6.47543 8.99976 6.88965V11.3896C8.99976 11.8039 9.33554 12.1396 9.74976 12.1396C10.164 12.1396 10.4998 11.8039 10.4998 11.3896V6.88965Z",fill:"currentColor"})})})]}),o(v,{uid:i.uid})]},i.uid),"STATIC"!==y&&"POST_PURCHASE"!==y&&25>ty()&&o(u,{...i}),o("div",{"data-outline":!0,"data-outline-section":"Section"==i.tag,"data-outline-theme-section":"Section"==i.tag&&!!M||H,"data-outline-shopify-section":"Section"==i.tag&&!!x,"data-outline-limit":tP,"data-outline-error":!!Y},"outline-"+i.uid),"Section"==i.tag&&!H&&t(e,{children:[o(s,{enable:tc()>=25,text:L("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-top":!0,"data-toolbar-disable":tc()>=25,"data-toolbar-add-open":"above"==V,onClick:t=>tk(t,"above"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})}),Y&&o(p,{errorSectionInfo:Y,onDismiss:tZ}),o(s,{enable:tc()>=25,text:L("Page has reached Shopify’s 25 section-limit"),position:"top","data-toolbar-add-bottom":!0,"data-toolbar-disable":tc()>=25,"data-toolbar-add-open":"below"==V,onClick:t=>tk(t,"below"),"aria-hidden":"true",children:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:o("path",{d:"M8.45 3.95C8.45 3.70147 8.24853 3.5 8 3.5C7.75147 3.5 7.55 3.70147 7.55 3.95V7.55H3.95C3.70147 7.55 3.5 7.75147 3.5 8C3.5 8.24853 3.70147 8.45 3.95 8.45H7.55V12.05C7.55 12.2985 7.75147 12.5 8 12.5C8.24853 12.5 8.45 12.2985 8.45 12.05V8.45H12.05C12.2985 8.45 12.5 8.24853 12.5 8C12.5 7.75147 12.2985 7.55 12.05 7.55H8.45V3.95Z",fill:"#212121"})})})]}),g.includes(i.tag)&&U&&o(b,{...i}),U&&o(h,{...i})]})};var ComponentToolbarPreview$1=i(ComponentToolbarPreview);export{ComponentToolbarPreview$1 as default};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";let SECTION_SIZE_GUIDE_URL="https://www.google.com/",SectionErrorBanner=({errorSectionInfo:t,onDismiss:l})=>t.isDismissed?null:e("div",{"data-toolbar-error-banner":!0,className:"gp-flex gp-items-center gp-px-2 gp-top-0 gp-w-full gp-z-1 gp-absolute gp-bg-[#FEE4E3] gp-border-t gp-border-t-[#C3362B] gp-text-xs gp-text-[#C3362B] gp-leading-5",children:i("div",{className:"gp-flex gp-items-center gp-gap-1.5 gp-w-full gp-h-10",children:[i("svg",{className:"gp-flex-shrink-0",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M11 13.5C11 14.0523 10.5523 14.5 10 14.5C9.44772 14.5 9 14.0523 9 13.5C9 12.9477 9.44772 12.5 10 12.5C10.5523 12.5 11 12.9477 11 13.5Z",fill:"#C3362B"}),e("path",{d:"M10.75 6.25001C10.75 5.8358 10.4142 5.50001 10 5.5C9.5858 5.49999 9.25001 5.83578 9.25 6.24999L9.24994 10.75C9.24993 11.1642 9.58572 11.5 9.99993 11.5C10.4141 11.5 10.7499 11.1642 10.7499 10.75L10.75 6.25001Z",fill:"#C3362B"}),e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17ZM10 15.5C13.0376 15.5 15.5 13.0376 15.5 10C15.5 6.96243 13.0376 4.5 10 4.5C6.96243 4.5 4.5 6.96243 4.5 10C4.5 13.0376 6.96243 15.5 10 15.5Z",fill:"#C3362B"})]}),i("div",{className:"gp-w-full",children:["LIQUID_SYNTAX_ERROR"===t.type&&"This section contains a syntax error in the code. Please review and fix it, then try verifying again.","SECTION_SIZE_EXCEED_256KB"===t.type&&i("div",{children:["This section is over Shopify's 256KB limit. Please follow ",e("a",{target:"_blank",href:SECTION_SIZE_GUIDE_URL,className:"gp-underline gp-cursor-pointer",onClick:e=>{e.preventDefault(),e.stopPropagation(),window.open(SECTION_SIZE_GUIDE_URL,"_blank")},rel:"noreferrer",children:"our guide"})," ","to optimize, then try verifying again."]}),"MISSING_SECTION_IN_THEME"===t.type&&"This section was deleted from your live theme. Please delete it from this page, or restore all sections by Force publish."]}),e("button",{className:"gp-p-1.5 gp-flex-shrink-0",onClick:l,type:"button",children:e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e("path",{d:"M11.1755 12.0243C11.4099 12.2586 11.7898 12.2586 12.0241 12.0243C12.2584 11.79 12.2584 11.4101 12.0241 11.1758L8.84833 8.00005L12.0241 4.82431C12.2584 4.59 12.2584 4.2101 12.0241 3.97579C11.7898 3.74147 11.4099 3.74147 11.1755 3.97579L7.9998 7.15152L4.82407 3.97578C4.58975 3.74147 4.20986 3.74147 3.97554 3.97578C3.74123 4.2101 3.74123 4.59 3.97554 4.82431L7.15128 8.00005L3.97554 11.1758C3.74123 11.4101 3.74123 11.79 3.97554 12.0243C4.20986 12.2586 4.58975 12.2586 4.82407 12.0243L7.9998 8.84858L11.1755 12.0243Z",fill:"#212121"})})})]})});export{SectionErrorBanner};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useContext as i,createContext as s,Suspense as d,Fragment as r}from"react";import{useStore as l,createStore as n}from"zustand";import{cloneDeep as a}from"../helpers/clone-deep.js";import{normalizeBuilderData as c}from"../helpers/normalize-builder-data.js";function moveByIndex(e,t,i){let s=e.splice(t,1)[0];void 0!==s&&e.splice(i,0,s)}function removeByKey(e,t){let i=t[e];i&&(delete t[e],"section"!==i.type&&i.childrens?.map(e=>removeByKey(e,t)))}let BuilderPreviewContext=s(null),root={uid:"ROOT",tag:"Root",label:"Root",childrens:[]},createBuilderPreviewProvider=(e,t,i)=>n((s,d)=>({state:e,loaded:!1,isThemeSectionEditor:!!i,pageName:t,dynamicProduct:null,dynamicCollection:null,addItem:e=>{let{position:t,data:i}=e,r=d().state,l=Date.now();if("section"===e.type){if(!Array.isArray(i)){let e=i.uid,d=r.ROOT;d.childrens?d.childrens.splice(t??0,0,e):d.childrens=[e],d.dateModified=l,s({state:{...r,[e]:{uid:e,type:"section",label:i.label},ROOT:a(d)}})}}else{let{id:i,data:d}=e,n=i?r[i]??r.ROOT:r.ROOT;if("section"===n.type)return;if(Array.isArray(d)){let e=d.map(e=>e.uid),i=d.reduceRight((e,t)=>{let i=c(t);return{...e,...i}},{});n.dateModified=l,n.childrens=n.childrens??[],n.childrens.splice(t??0,0,...e),s({state:{...r,...i,[n.uid]:a(n)}})}else{let e=c(d);n.dateModified=l,n.childrens=n.childrens??[],n.childrens.splice(t??0,0,d.uid),s({state:{...r,...e,[n.uid]:a(n)}})}}},changeItemProp:(e,t,i)=>{if(!i||!["setting","style","advanced"].includes(i))return;let r=d().state,l=r[e];if(l?.type!=="section"&&l){let d=Date.now();switch(l.dateModified=d,i){case"setting":s({state:{...r,[e]:{...l,settings:{...l.settings,...t}}}});break;case"style":s({state:{...r,[e]:{...l,styles:{...l.styles,...t}}}});break;case"advanced":s({state:{...r,[e]:{...l,advanced:{...l.advanced,...t}}}})}}},forceChangeItemProp:(e,t,i)=>{if(!i||!["setting","style","advanced"].includes(i))return;let r=d().state,l=r[e];if(l?.type!=="section"&&l){let d=Date.now();switch(l.dateModified=d,i){case"setting":s({state:{...r,[e]:{...l,settings:t}}});break;case"style":s({state:{...r,[e]:{...l,styles:t}}});break;case"advanced":s({state:{...r,[e]:{...l,advanced:t}}})}}},changeItemPropByKey:({id:e,key:t,data:i,group:r})=>{if(!r||!["setting","style","advanced"].includes(r))return;let l=d().state,n=l[e];if(n?.type!=="section"&&n){let d={style:n.styles??{},advanced:n.advanced??{},setting:n.settings??{}};void 0===i?(console.warn("Data is undefined"),delete d[r][t]):d[r][t]=i,s({state:{...l,[e]:{...n,settings:{...d.setting},styles:{...d.style},advanced:{...d.advanced}}}})}},getItem:e=>d().state[e],getState:()=>d().state,removeItem:e=>{if("ROOT"===e)s({state:{ROOT:root}});else{let t=d().state;removeByKey(e,t);let i=Object.entries(t).find(([,t])=>"section"!==t.type&&t.childrens?.includes(e));if(i){let d=Date.now(),[r,l]=i;if("section"===l.type)return;l.childrens=l.childrens?.filter(t=>t!==e),l.dateModified=d,s({state:{...t,[r]:a(l)}})}}},moveItem:(e,t,i)=>{let r=d().state,l=r[e],n=r[t];if(l&&n&&"section"!==n.type){if("section"===l.type){let t=r.ROOT;if(!t.childrens)return;let d=t.childrens.findIndex(t=>t===e);moveByIndex(t.childrens,d,i??0),s({state:{...r,ROOT:a(t)}})}else{let d=Object.entries(r).find(([,t])=>"section"!==t.type&&t.childrens?.includes(e));if(l&&d){let c=Date.now(),[,o]=d;if("section"===o.type)return;if(o.dateModified=c,t===o.uid&&o.childrens){let t=o.childrens.findIndex(t=>t===e);o.childrens&&t!==i&&(moveByIndex(o.childrens,t,i??0),s({state:{...r,[o.uid]:a(o)}}))}else o.childrens=o.childrens?.filter(t=>t!==e),n&&(n.dateModified=c,n.childrens=n.childrens??[],n.childrens.splice(i??0,0,l.uid),s({state:{...r,[n.uid]:a(n),[o.uid]:a(o)}}))}}}},forceChangeState:e=>{s({state:e,loaded:!0})},initState:e=>{if(Array.isArray(e)){let t=e.map(e=>e.uid),i=e.reduceRight((e,t)=>{let i=c(t);return{...e,...i}},{});s({loaded:!0,state:{ROOT:{...root,childrens:t},...i}})}else{let t=c(e);s({loaded:!0,state:{ROOT:{...root,childrens:[e.uid]},...t}})}},addSection:(e,t)=>{let i=d().state,r=i.ROOT;r.childrens||(r.childrens=[]),r.childrens.splice(t??0,0,e.uid),s({state:{...i,ROOT:a(r)}})},getParents:(e,t)=>{let i=d().state,s=[],r=0,l=e;for(;!t||!(r>=t);){let e=Object.entries(i).find(([,e])=>"section"!==e.type&&e.childrens?.includes(l));if(!e)break;let[,t]=e;if(!t)break;s.push(t),l=t.uid,r++}return s},updateItemName:(e,t)=>{let i=d().state,r=i[e];r&&(r.name=t,s({state:{...i,[e]:a(r)}}))},updateItemAttribute:(e,t,i)=>{if(!i||!["label","customLabel","isShopifyVisibility"].includes(i))return;let r=d().state,l=r[e];if(l){if("section"!==l.type){let e=Date.now();l.dateModified=e}let d={...l,[i]:t};s({state:{...r,[e]:d}})}}})),BuilderPreviewProvider=({children:i,state:s,isThemeSectionEditor:l,pageName:n,lazy:a,...c})=>{let o=a?d:r,u=t(()=>createBuilderPreviewProvider(s,n,l),[s,l,n]);return e(o,{children:e(BuilderPreviewContext.Provider,{...c,value:u,children:i})})},useBuilderPreviewStore=(e,t)=>{let s=i(BuilderPreviewContext);if(!s)throw Error("useBuilderPreviewStore must be used within a BuilderPreviewProvider");return l(s,e,t)};export{BuilderPreviewProvider,useBuilderPreviewStore};
2
+ import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useContext as i,createContext as r,Suspense as s,Fragment as d}from"react";import{useStore as l,createStore as n}from"zustand";import{cloneDeep as a}from"../helpers/clone-deep.js";import{normalizeBuilderData as c}from"../helpers/normalize-builder-data.js";function moveByIndex(e,t,i){let r=e.splice(t,1)[0];void 0!==r&&e.splice(i,0,r)}function removeByKey(e,t){let i=t[e];i&&(delete t[e],"section"!==i.type&&i.childrens?.map(e=>removeByKey(e,t)))}let BuilderPreviewContext=r(null),root={uid:"ROOT",tag:"Root",label:"Root",childrens:[]},createBuilderPreviewProvider=(e,t,i)=>n((r,s)=>({state:e,loaded:!1,isThemeSectionEditor:!!i,pageName:t,dynamicProduct:null,dynamicCollection:null,errorSectionList:null,addItem:e=>{let{position:t,data:i}=e,d=s().state,l=Date.now();if("section"===e.type){if(!Array.isArray(i)){let e=i.uid,s=d.ROOT;s.childrens?s.childrens.splice(t??0,0,e):s.childrens=[e],s.dateModified=l,r({state:{...d,[e]:{uid:e,type:"section",label:i.label},ROOT:a(s)}})}}else{let{id:i,data:s}=e,n=i?d[i]??d.ROOT:d.ROOT;if("section"===n.type)return;if(Array.isArray(s)){let e=s.map(e=>e.uid),i=s.reduceRight((e,t)=>{let i=c(t);return{...e,...i}},{});n.dateModified=l,n.childrens=n.childrens??[],n.childrens.splice(t??0,0,...e),r({state:{...d,...i,[n.uid]:a(n)}})}else{let e=c(s);n.dateModified=l,n.childrens=n.childrens??[],n.childrens.splice(t??0,0,s.uid),r({state:{...d,...e,[n.uid]:a(n)}})}}},changeItemProp:(e,t,i)=>{if(!i||!["setting","style","advanced"].includes(i))return;let d=s().state,l=d[e];if(l?.type!=="section"&&l){let s=Date.now();switch(l.dateModified=s,i){case"setting":r({state:{...d,[e]:{...l,settings:{...l.settings,...t}}}});break;case"style":r({state:{...d,[e]:{...l,styles:{...l.styles,...t}}}});break;case"advanced":r({state:{...d,[e]:{...l,advanced:{...l.advanced,...t}}}})}}},forceChangeItemProp:(e,t,i)=>{if(!i||!["setting","style","advanced"].includes(i))return;let d=s().state,l=d[e];if(l?.type!=="section"&&l){let s=Date.now();switch(l.dateModified=s,i){case"setting":r({state:{...d,[e]:{...l,settings:t}}});break;case"style":r({state:{...d,[e]:{...l,styles:t}}});break;case"advanced":r({state:{...d,[e]:{...l,advanced:t}}})}}},changeItemPropByKey:({id:e,key:t,data:i,group:d})=>{if(!d||!["setting","style","advanced"].includes(d))return;let l=s().state,n=l[e];if(n?.type!=="section"&&n){let s={style:n.styles??{},advanced:n.advanced??{},setting:n.settings??{}};void 0===i?(console.warn("Data is undefined"),delete s[d][t]):s[d][t]=i,r({state:{...l,[e]:{...n,settings:{...s.setting},styles:{...s.style},advanced:{...s.advanced}}}})}},getItem:e=>s().state[e],getState:()=>s().state,removeItem:e=>{if("ROOT"===e)r({state:{ROOT:root}});else{let t=s().state;removeByKey(e,t);let i=Object.entries(t).find(([,t])=>"section"!==t.type&&t.childrens?.includes(e));if(i){let s=Date.now(),[d,l]=i;if("section"===l.type)return;l.childrens=l.childrens?.filter(t=>t!==e),l.dateModified=s,r({state:{...t,[d]:a(l)}})}}},moveItem:(e,t,i)=>{let d=s().state,l=d[e],n=d[t];if(l&&n&&"section"!==n.type){if("section"===l.type){let t=d.ROOT;if(!t.childrens)return;let s=t.childrens.findIndex(t=>t===e);moveByIndex(t.childrens,s,i??0),r({state:{...d,ROOT:a(t)}})}else{let s=Object.entries(d).find(([,t])=>"section"!==t.type&&t.childrens?.includes(e));if(l&&s){let c=Date.now(),[,o]=s;if("section"===o.type)return;if(o.dateModified=c,t===o.uid&&o.childrens){let t=o.childrens.findIndex(t=>t===e);o.childrens&&t!==i&&(moveByIndex(o.childrens,t,i??0),r({state:{...d,[o.uid]:a(o)}}))}else o.childrens=o.childrens?.filter(t=>t!==e),n&&(n.dateModified=c,n.childrens=n.childrens??[],n.childrens.splice(i??0,0,l.uid),r({state:{...d,[n.uid]:a(n),[o.uid]:a(o)}}))}}}},forceChangeState:e=>{r({state:e,loaded:!0})},initState:e=>{if(Array.isArray(e)){let t=e.map(e=>e.uid),i=e.reduceRight((e,t)=>{let i=c(t);return{...e,...i}},{});r({loaded:!0,state:{ROOT:{...root,childrens:t},...i}})}else{let t=c(e);r({loaded:!0,state:{ROOT:{...root,childrens:[e.uid]},...t}})}},addSection:(e,t)=>{let i=s().state,d=i.ROOT;d.childrens||(d.childrens=[]),d.childrens.splice(t??0,0,e.uid),r({state:{...i,ROOT:a(d)}})},getParents:(e,t)=>{let i=s().state,r=[],d=0,l=e;for(;!t||!(d>=t);){let e=Object.entries(i).find(([,e])=>"section"!==e.type&&e.childrens?.includes(l));if(!e)break;let[,t]=e;if(!t)break;r.push(t),l=t.uid,d++}return r},updateItemName:(e,t)=>{let i=s().state,d=i[e];d&&(d.name=t,r({state:{...i,[e]:a(d)}}))},updateItemAttribute:(e,t,i)=>{if(!i||!["label","customLabel","isShopifyVisibility"].includes(i))return;let d=s().state,l=d[e];if(l){if("section"!==l.type){let e=Date.now();l.dateModified=e}let s={...l,[i]:t};r({state:{...d,[e]:s}})}},dismissPublishError:e=>{let t=s().errorSectionList;if(!Array.isArray(t))return;let i=t.map(t=>t.uid===e?{...t,isDismissed:!0}:t);r({errorSectionList:i})},setErrorSectionList:e=>r({errorSectionList:e})})),BuilderPreviewProvider=({children:i,state:r,isThemeSectionEditor:l,pageName:n,lazy:a,...c})=>{let o=a?s:d,u=t(()=>createBuilderPreviewProvider(r,n,l),[r,l,n]);return e(o,{children:e(BuilderPreviewContext.Provider,{...c,value:u,children:i})})},useBuilderPreviewStore=(e,t)=>{let r=i(BuilderPreviewContext);if(!r)throw Error("useBuilderPreviewStore must be used within a BuilderPreviewProvider");return l(r,e,t)};export{BuilderPreviewProvider,useBuilderPreviewStore};
@@ -42802,8 +42802,19 @@ type BuilderProviderProps = Pick<BuilderContextProps, 'state' | 'isPostPurchase'
42802
42802
  declare const BuilderProvider: React.FC<BuilderProviderProps>;
42803
42803
  declare const useBuilderStore: <U>(selector: (state: ExtractState<StoreApi<BuilderContextProps>>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined) => U;
42804
42804
 
42805
+ type ErrorSectionType = 'SECTION_SIZE_EXCEED_256KB' | 'LIQUID_SYNTAX_ERROR' | 'MISSING_SECTION_IN_THEME';
42806
+ type ErrorSectionInfo = {
42807
+ uid: string;
42808
+ isDismissed?: boolean;
42809
+ type: ErrorSectionType;
42810
+ };
42811
+ type PublishErrorSectionListEventDetail = {
42812
+ uid: string;
42813
+ type: ErrorSectionType;
42814
+ }[] | null;
42805
42815
  type BuilderPreviewContextProps = {
42806
42816
  state: BuilderState;
42817
+ errorSectionList: ErrorSectionInfo[] | null;
42807
42818
  loaded?: boolean;
42808
42819
  pageName?: string;
42809
42820
  isThemeSectionEditor?: boolean;
@@ -42831,6 +42842,8 @@ type BuilderPreviewContextProps = {
42831
42842
  getParents: (id: string, limit?: number) => BuilderEntity[];
42832
42843
  updateItemName: (id: string, name: string) => void;
42833
42844
  updateItemAttribute: (id: string, value: string, attr: string) => void;
42845
+ dismissPublishError: (uid: string) => void;
42846
+ setErrorSectionList: (list: PublishErrorSectionListEventDetail) => void;
42834
42847
  };
42835
42848
  type BuilderPreviewProviderProps = Pick<BuilderPreviewContextProps, 'state'> & {
42836
42849
  children: React.ReactNode;
@@ -56640,4 +56653,4 @@ declare const hasPublicStoreFrontData: (publicStoreFrontData: PublicStoreFrontDa
56640
56653
  declare const DEVICES: NameDevices[];
56641
56654
  declare const EMPTY_DEVICE_VALUE: undefined;
56642
56655
 
56643
- export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AirProductReview, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, ArticlesDocument, ArticlesQueryResponse, ArticlesQueryVariables, Background, BackgroundImageValue, BackgroundMedia, BackgroundVideoValue, BaseProps, BasePropsWrap, BlockEntity, BlogsDocument, BlogsQueryResponse, BlogsQueryVariables, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CSSStateKey, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DEVICES, DeepPartial, DotStyle, Dropdown, DynamicCollection, DynamicProduct, EMPTY_DEVICE_VALUE, ExtractState, FastBundleWidgetType, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, FontStyleType, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetTypeV1, GrowaveWidgetTypeV2, HSLAColorType, HSLColorType, HexColorType, I18nProvider, I18nProviderProps, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, Interaction, InteractionCondition, InteractionElement, InteractionTarget, InteractionTargetEvent, InteractionTargetEventObject, InteractionTriggerEvent, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibrarySection, LibraryTemplate, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, LooxReviewsWidgetTypeV2, MediaSelectFragment, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OnlyOne, OpinewDesignWidgetType, OpinewWidgetType, Option$4 as Option, OptionNormalStyle, OptionSpecialStyle, Options$1 as Options, PaddingType, PageContext, PageProvider, PageProviderProps, PageSection, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreOrderNowWodWidgetType, PreviewThemePageDocument, PreviewThemePageQueryResponse, PreviewThemePageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductVariantsWithSellingPlansDocument, ProductVariantsWithSellingPlansQueryResponse, ProductVariantsWithSellingPlansQueryVariables, ProductVariantsWithSellingPlansSelectFragment, ProductWithSellingPlansSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, ProductsWithSellingPlansDetailFragment, ProductsWithSellingPlansDocument, ProductsWithSellingPlansQueryResponse, ProductsWithSellingPlansQueryVariables, PublicStoreFrontData, PublishedShopMetasDocument, PublishedShopMetasQueryResponse, PublishedShopMetasQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderModeEnv, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, SaleFunnelOffer, SaleFunnelOfferDocument, SaleFunnelOfferQueryResponse, SaleFunnelOfferQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionCategory, SectionData, SectionEntity, SectionProvider, SectionProviderProps, Setting, SettingByAnimationType, SettingByAnimationValues, SettingUIControl, SettingUIGroup, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, Shop, ShopLibraryPage, ShopLibraryPageDocument, ShopLibraryPageQueryResponse, ShopLibraryPageQueryVariables, ShopLibrarySection, ShopProvider, ShopProviderProps, ShopShopifyDocument, ShopShopifyQueryResponse, ShopShopifyQueryVariables, shop as ShopType, SizeProps, SizeSetting$1 as SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StampedWidgetTypeV2, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TagShopWidgetType, TemplateCategory, TemplatePackage, Theme, ThemePage, ThemePageDocument, ThemePageMetaDocument, ThemePageMetaQueryResponse, ThemePageMetaQueryVariables, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSection, ThemeSectionStatus$1 as ThemeSectionStatus, ThemeStyle, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Family, TypographyV2FontFamilyType, TypographyV2Props, UltimateSalesBoostWidgetType, ValidateType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, addAppBlockId, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, checkInStock, cloneDeep, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBackgroundImageCss, composeBorderCss, composeBorderResponsive, composeClasses, composeCornerCss, composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadow, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTextHoverColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertBoxShadowV1ToV2, convertDecimalToNumber, convertHTML, convertOldLayout, convertTextAlignToJustify, createStoreFrontFetcher, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterHoverVariables, filterToolbarPreview, filterTruthyStyles, flattenConnection, formatMoney, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAlignmentClasses, getAppBlocks, getAspectRatioGlobalSize, getBgByDevice, getBgImageByDevice, getBgImageSourceByDevice, getBgVideoByDevice, getBorderRadiusStyle, getBorderStyle, getCarouselContainerHeight, getCollection, getColor, getCombinedBackgroundImage, getCornerCSSFromGlobal, getCornerStyle, getCustomRadius, getFlexGrowClassByShapeGlobalSize, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getGradientImageBgrStyleByDevice, getHeightByShapeGlobalSize, getLayoutClasses, getPaddingGlobalSize, getPaddingStyleByDevice, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveStylePadding, getResponsiveStyleShadow, getResponsiveStyleShadowWithoutState, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleBackgroundImage, getStyleBgColor, getStyleBgImageSource, getStyleShadow, getStyleShadowState, getValueByDevice, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, handleConvertInputBorderColor, hasPublicStoreFrontData, hasTranslatedLiquid, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleResponsiveWidth, makeStyleResponsiveWidthWithoutAuto, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, sanitizeLiquid, shopifyPriceRounding, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFetchHandle, useFormatMoney, useHasPreSelected, useI18n, useI18nStore, useInitialSwatchesOptions, useInteraction, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePreviewSharePage, usePrevious, useProduct, useProductBundleDiscount, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductOffersQuery, useProductProperties, useProductQuery, useProductShopifyEditLink, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useRenderMode, useSection, useSectionStore, useSelectedOption, useShopStore, useShopifyLink, useStickyStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useTimezone, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
56656
+ export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AirProductReview, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, ArticlesDocument, ArticlesQueryResponse, ArticlesQueryVariables, Background, BackgroundImageValue, BackgroundMedia, BackgroundVideoValue, BaseProps, BasePropsWrap, BlockEntity, BlogsDocument, BlogsQueryResponse, BlogsQueryVariables, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CSSStateKey, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DEVICES, DeepPartial, DotStyle, Dropdown, DynamicCollection, DynamicProduct, EMPTY_DEVICE_VALUE, ExtractState, FastBundleWidgetType, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, FontStyleType, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetTypeV1, GrowaveWidgetTypeV2, HSLAColorType, HSLColorType, HexColorType, I18nProvider, I18nProviderProps, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, Interaction, InteractionCondition, InteractionElement, InteractionTarget, InteractionTargetEvent, InteractionTargetEventObject, InteractionTriggerEvent, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibrarySection, LibraryTemplate, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, LooxReviewsWidgetTypeV2, MediaSelectFragment, ModalProvider, ModalProviderProps, NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OnlyOne, OpinewDesignWidgetType, OpinewWidgetType, Option$4 as Option, OptionNormalStyle, OptionSpecialStyle, Options$1 as Options, PaddingType, PageContext, PageProvider, PageProviderProps, PageSection, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreOrderNowWodWidgetType, PreviewThemePageDocument, PreviewThemePageQueryResponse, PreviewThemePageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductVariantsWithSellingPlansDocument, ProductVariantsWithSellingPlansQueryResponse, ProductVariantsWithSellingPlansQueryVariables, ProductVariantsWithSellingPlansSelectFragment, ProductWithSellingPlansSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, ProductsWithSellingPlansDetailFragment, ProductsWithSellingPlansDocument, ProductsWithSellingPlansQueryResponse, ProductsWithSellingPlansQueryVariables, PublicStoreFrontData, PublishErrorSectionListEventDetail, PublishedShopMetasDocument, PublishedShopMetasQueryResponse, PublishedShopMetasQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderModeEnv, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, SaleFunnelOffer, SaleFunnelOfferDocument, SaleFunnelOfferQueryResponse, SaleFunnelOfferQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionCategory, SectionData, SectionEntity, SectionProvider, SectionProviderProps, Setting, SettingByAnimationType, SettingByAnimationValues, SettingUIControl, SettingUIGroup, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, Shop, ShopLibraryPage, ShopLibraryPageDocument, ShopLibraryPageQueryResponse, ShopLibraryPageQueryVariables, ShopLibrarySection, ShopProvider, ShopProviderProps, ShopShopifyDocument, ShopShopifyQueryResponse, ShopShopifyQueryVariables, shop as ShopType, SizeProps, SizeSetting$1 as SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StampedWidgetTypeV2, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TagShopWidgetType, TemplateCategory, TemplatePackage, Theme, ThemePage, ThemePageDocument, ThemePageMetaDocument, ThemePageMetaQueryResponse, ThemePageMetaQueryVariables, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSection, ThemeSectionStatus$1 as ThemeSectionStatus, ThemeStyle, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Family, TypographyV2FontFamilyType, TypographyV2Props, UltimateSalesBoostWidgetType, ValidateType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, addAppBlockId, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, checkInStock, cloneDeep, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBackgroundImageCss, composeBorderCss, composeBorderResponsive, composeClasses, composeCornerCss, composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadow, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTextHoverColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertBoxShadowV1ToV2, convertDecimalToNumber, convertHTML, convertOldLayout, convertTextAlignToJustify, createStoreFrontFetcher, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterHoverVariables, filterToolbarPreview, filterTruthyStyles, flattenConnection, formatMoney, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAlignmentClasses, getAppBlocks, getAspectRatioGlobalSize, getBgByDevice, getBgImageByDevice, getBgImageSourceByDevice, getBgVideoByDevice, getBorderRadiusStyle, getBorderStyle, getCarouselContainerHeight, getCollection, getColor, getCombinedBackgroundImage, getCornerCSSFromGlobal, getCornerStyle, getCustomRadius, getFlexGrowClassByShapeGlobalSize, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getGradientImageBgrStyleByDevice, getHeightByShapeGlobalSize, getLayoutClasses, getPaddingGlobalSize, getPaddingStyleByDevice, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveStylePadding, getResponsiveStyleShadow, getResponsiveStyleShadowWithoutState, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleBackgroundImage, getStyleBgColor, getStyleBgImageSource, getStyleShadow, getStyleShadowState, getValueByDevice, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, handleConvertInputBorderColor, hasPublicStoreFrontData, hasTranslatedLiquid, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleResponsiveWidth, makeStyleResponsiveWidthWithoutAuto, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, sanitizeLiquid, shopifyPriceRounding, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFetchHandle, useFormatMoney, useHasPreSelected, useI18n, useI18nStore, useInitialSwatchesOptions, useInteraction, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePreviewSharePage, usePrevious, useProduct, useProductBundleDiscount, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductOffersQuery, useProductProperties, useProductQuery, useProductShopifyEditLink, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useRenderMode, useSection, useSectionStore, useSelectedOption, useShopStore, useShopifyLink, useStickyStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useTimezone, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "12.0.0-dev.65",
3
+ "version": "12.0.0-dev.71",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@gem-sdk/adapter-shopify": "12.0.0-dev.53",
32
- "@gem-sdk/styles": "12.0.0-dev.53",
32
+ "@gem-sdk/styles": "12.0.0-dev.71",
33
33
  "@types/classnames": "2.3.4"
34
34
  },
35
35
  "dependencies": {