"use strict";(self.webpackChunkblynex=self.webpackChunkblynex||[]).push([[789],{789:function(e,t,s){var o={};s.r(o),s.d(o,{getActiveTab:function(){return L},getCategories:function(){return S},getFilters:function(){return T},getRecords:function(){return B},getTags:function(){return R}});var a={};s.r(a),s.d(a,{setActiveTab:function(){return I},setCategories:function(){return P},setFilters:function(){return M},setRecords:function(){return F},setTags:function(){return Z}});var l={};s.r(l),s.d(l,{getCategories:function(){return E},getRecords:function(){return A},getTags:function(){return D}});var r=s(143),n=s(876),i=s(87),c=s(997),d=s(723),h=s(279),p=s(490),m=s.n(p),g=s(832);const{__:__}=wp.i18n;var u=class{constructor(){this.params=window.blynexParams?.zoloblocks_installer,this.isInstalling=!1,this.isActivating=!1,this.params||(this.params={ajax_url:window.ajaxurl||"/wp-admin/admin-ajax.php",nonce:"",strings:{installing:"Installing ZoloBlocks plugin...",activating:"Activating ZoloBlocks plugin...",success:"ZoloBlocks plugin is ready!",reloading:"Reloading page to initialize ZoloBlocks plugin...",error:"Error: ",permission_error:"You do not have permission to install plugins.",plugin_required:"ZoloBlocks plugin is required to use the template library.",plugin_not_installed:"ZoloBlocks plugin is not installed. Would you like to install it now?",plugin_not_activated:"ZoloBlocks plugin is installed but not activated. Would you like to activate it now?",install_activate:"Install & Activate",activate:"Activate",cancel:"Cancel"}})}async checkPluginStatus(){if(!this.params)return console.error("ZoloBlocks installer parameters not found"),{installed:!1,activated:!1,ready:!1};try{if(!this.params.nonce)return{installed:!1,activated:!1,ready:!1};const e=await fetch(this.params.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"blynex_check_zoloblocks_status",nonce:this.params.nonce})}),t=await e.json();return{installed:t.installed||!1,activated:t.activated||!1,ready:t.ready||!1}}catch(e){return console.error("Error checking plugin status:",e),{installed:!1,activated:!1,ready:!1}}}async installPlugin(){if(this.isInstalling)return{success:!1,message:"Installation already in progress"};this.isInstalling=!0;try{this.showNotification(this.params.strings.installing,"info");const e=await fetch(this.params.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"blynex_install_zoloblocks",nonce:this.params.nonce})}),t=await e.json();return this.isInstalling=!1,t}catch(e){return this.isInstalling=!1,console.error("Error installing plugin:",e),{success:!1,message:this.params.strings.error+e.message}}}async activatePlugin(){if(this.isActivating)return{success:!1,message:"Activation already in progress"};this.isActivating=!0;try{this.showNotification(this.params.strings.activating,"info");const e=await fetch(this.params.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"blynex_activate_zoloblocks",nonce:this.params.nonce})}),t=await e.json();return this.isActivating=!1,t}catch(e){return this.isActivating=!1,console.error("Error activating plugin:",e),{success:!1,message:this.params.strings.error+e.message}}}saveTemplateContent(e){if(e&&"undefined"!=typeof window&&window.localStorage)try{return window.localStorage.setItem("zoloblocks_pending_template",e),!0}catch(e){return console.error("Error saving template content to localStorage:",e),!1}return!1}getSavedTemplateContent(){if("undefined"!=typeof window&&window.localStorage)try{return window.localStorage.getItem("zoloblocks_pending_template")}catch(e){return console.error("Error getting template content from localStorage:",e),null}return null}clearSavedTemplateContent(){if("undefined"!=typeof window&&window.localStorage)try{return window.localStorage.removeItem("zoloblocks_pending_template"),!0}catch(e){return console.error("Error clearing template content from localStorage:",e),!1}return!1}hasPendingTemplateImport(){return!("undefined"==typeof window||!window.localStorage||!window.localStorage.getItem("zoloblocks_pending_template"))}async ensurePluginReady(){if((await this.checkPluginStatus()).ready)return{success:!0,message:this.params.strings.success};const e=await this.installPlugin();if(!e.success)return e;const t=await this.activatePlugin();return t.success?e.installed||t.activated?{success:!0,message:this.params.strings.success,needsReload:!0}:{success:!0,message:this.params.strings.success}:t}showNotification(e,t="info"){if(window.wp&&window.wp.data&&window.wp.data.dispatch){const{createNotice:s}=window.wp.data.dispatch("core/notices");s(t,e,{isDismissible:!0,type:"error"===t?"error":"success"})}else alert(e)}hasPermission(){return window.blynexParams?.zoloblocks_installer?!!window.blynexParams.zoloblocks_installer.nonce:!!window.blynexParams}};const x=async(e,t)=>{try{const s=(0,g.addQueryArgs)(`/${t}`,e),o=await fetch(`${k(t)}${s}`);return await o.json()}catch(e){console.error(e)}},v=async e=>{try{const t=await fetch(`${k(e)}/${e}/categories`);return await t.json()}catch(e){console.error(e)}},w=async e=>{try{const t=await fetch(`${k(e)}/${e}/tags`);return await t.json()}catch(e){console.error(e)}},j=[{label:(0,d.__)("Demos","zoloblocks"),value:"demos"},{label:(0,d.__)("Templates","zoloblocks"),value:"templates"},{label:(0,d.__)("Pages","zoloblocks"),value:"pages"},{label:(0,d.__)("Patterns","zoloblocks"),value:"patterns"}],k=e=>{let t="https://zoloblocks.com/demo/wp-json/template-manager/v2";return"templates"!==e&&"pages"!==e||(t="https://templates.zoloblocks.com/wp-json/template-manager/v2"),t},b=(e={})=>{const{page:t,...s}=e;return s},_="SET_ACTIVE_TAB",f="SET_FILTERS",C="SET_CATEGORIES",y="SET_TAGS",N="SET_RECORDS",z={activeTab:"demos",filter:{},categories:{},tags:[],records:[]};const L=e=>e?.activeTab,T=e=>e?.filters,S=(e,t)=>e?.categories?.[t],R=(e,t)=>e?.tags?.[t],B=(e,t,s)=>{let o={[s]:b(t)},a=JSON.stringify(o);return e?.records?.[a]},I=e=>({type:_,activeTab:e}),M=e=>({type:f,filters:e}),P=(e,t)=>({type:C,categories:e,paramKey:t}),Z=(e,t)=>({type:y,tags:e,paramKey:t}),F=(e,t,s)=>({type:N,records:e,params:t,filterType:s});function A(e,t){return async({dispatch:s})=>{try{const o=await x(e,t);s(F(o,e,t))}catch(o){console.error(o),s(F([],e,t))}}}function E(e){return async({dispatch:t})=>{try{const s=await v(e);t(P(s,e))}catch(s){console.error(s),t(P([],e))}}}function D(e){return async({dispatch:t})=>{try{const s=await w(e);t(Z(s,e))}catch(s){console.error(s),t(Z([],e))}}}const W="zolo/template-library";let V;(0,r.select)(W)||(V=(0,r.createReduxStore)(W,{reducer:(e=z,t)=>{switch(t.type){case _:return{...e,activeTab:t.activeTab};case f:return{...e,filters:t.filters};case C:return{...e,categories:{...e.categories,[t.paramKey]:t.categories}};case y:return{...e,tags:{...e.tags,[t.paramKey]:t.tags}};case N:let s={[t.filterType]:b(t.params)},o=JSON.stringify(s);const a=e.records[o]||[];return{...e,records:{...e.records,[o]:[...a,...t.records]}};default:return e}},selectors:o,actions:a,resolvers:l}),(0,r.register)(V)),s(609);var H=s(942),O=s.n(H),q=s(427),G=s(790),$=({count:e=1})=>(0,G.jsx)("div",{className:"skeleton-container",children:[...Array(e)].map(((e,t)=>(0,G.jsx)("div",{className:"skeleton-control"},t)))}),U=()=>{const{setFilters:e}=(0,r.useDispatch)(W),{activeTab:t,filters:s}=(0,r.useSelect)((e=>{const{getActiveTab:t,getFilters:s}=e(W);return{activeTab:t(),filters:s()}})),{categories:o,isResolving:a,hasResolved:l}=((e=[])=>{const t=(0,r.useSelect)((t=>{const{getCategories:s,isResolving:o,hasFinishedResolution:a,hasStartedResolution:l}=t(W);return{startResolution:l("getCategories",[...e]),isResolving:o("getCategories",[...e]),categories:s(...e),hasResolved:a("getCategories",[...e])}}),[e]);return t})([t]);return(0,G.jsxs)("div",{className:"categories",children:[(0,G.jsxs)("div",{className:"demo-made-button",children:[(0,G.jsx)("button",{className:"demo-made-btn made-zoloblocks-btn",children:(0,d.__)("hand craft","zoloblocks")}),(0,G.jsxs)("button",{className:"demo-made-btn made-ai-btn",title:"upcoming",children:[(0,G.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",children:[(0,G.jsx)("path",{d:"M14.0712 9.69993L14.9982 7.55057C15.152 7.19386 15.6539 7.19843 15.8014 7.55789L16.6354 9.59063C17.172 10.8987 18.2031 11.9386 19.5112 12.4441C20.2436 12.7271 20.9451 12.9933 21.726 13.3027C22.097 13.4496 22.0896 13.979 21.716 14.1188L19.6811 14.8802C18.2774 15.4055 17.1629 16.513 16.619 17.9233L15.8161 20.0053C15.6715 20.3804 15.1465 20.3798 15.0025 20.0045L14.2087 17.9342C13.6895 16.58 12.6432 15.5009 11.3145 14.9493L9.33125 14.1259C8.97253 13.977 8.96964 13.4642 9.32666 13.3112L11.3146 12.4589C12.5487 11.9299 13.5353 10.9424 14.0712 9.69993Z",fill:"black"}),(0,G.jsx)("path",{d:"M6.01488 3.07497L6.36536 2.26453C6.51939 1.90834 7.02058 1.91291 7.16823 2.27186L7.45362 2.96564C7.9915 4.2732 9.02484 5.3084 10.3342 5.81066C10.5983 5.91198 10.8636 6.01393 11.14 6.12187C11.512 6.26717 11.505 6.79641 11.1309 6.93603L10.5019 7.17075C9.09773 7.69476 7.98233 8.80125 7.43724 10.2109L7.18294 10.8686C7.0381 11.2431 6.51378 11.2426 6.36966 10.8678L6.11046 10.1936C5.59 8.83976 4.54261 7.76153 3.21341 7.21116L2.56601 6.9431C2.20678 6.79436 2.20389 6.28094 2.56142 6.12807L3.25573 5.83122C4.49031 5.30336 5.47779 4.31692 6.01488 3.07497Z",fill:"black"}),(0,G.jsx)("path",{d:"M4.71182 15.9861L4.7511 15.8956C4.88762 15.5812 5.33013 15.5852 5.461 15.9021C5.93846 17.0583 6.85588 17.9676 8.01378 18.4132L8.10773 18.4495C8.42754 18.573 8.4217 19.0269 8.10037 19.1463C6.89622 19.5939 5.93558 20.5497 5.46676 21.7574C5.34152 22.08 4.88724 22.0809 4.76262 21.7581C4.30772 20.5795 3.39184 19.6358 2.2334 19.158C1.91983 19.0287 1.92376 18.5778 2.23586 18.4449C3.33693 17.976 4.23152 17.0924 4.71182 15.9861Z",fill:"black"})]}),"ai",(0,G.jsx)("span",{children:(0,d.__)("upcoming","zoloblocks")})]})]}),(0,G.jsxs)("div",{className:"demo-title-proFree-wrap",children:[(0,G.jsx)("h2",{className:"category-title",children:(0,d.__)("Categories","zoloblocks")}),(0,G.jsxs)("div",{className:"demo-proFree-btn",children:[(0,G.jsx)(q.Tooltip,{text:"Reset filters",position:"top",children:(0,G.jsx)("button",{className:"demo-pro-free-reset",onClick:()=>{e({})},children:(0,G.jsx)("svg",{className:"w-6 h-6 text-gray-800 dark:text-white","aria-hidden":"true",width:24,height:24,fill:"none",viewBox:"0 0 24 24",children:(0,G.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.651 7.65a7.131 7.131 0 0 0-12.68 3.15M18.001 4v4h-4m-7.652 8.35a7.13 7.13 0 0 0 12.68-3.15M6 20v-4h4"})})})}),(0,G.jsx)("button",{className:"demo-free-btn",onClick:()=>{e({package_type:"free"})},children:(0,d.__)("free","zoloblocks")}),(0,G.jsx)("button",{className:"demo-pro-btn",onClick:()=>{e({package_type:"pro"})},children:(0,d.__)("pro","zoloblocks")})]})]}),(0,G.jsxs)("div",{className:"category-list",children:[!l&&a&&(0,G.jsx)($,{count:25}),l&&o&&o.length>0&&"favorites"!==t&&o?.filter((e=>"demos"!==e?.slug))?.sort(((e,t)=>t?.count-e?.count))?.map((t=>(0,G.jsxs)("button",{className:O()("single-category",{active:s?.categories===t?.slug}),onClick:()=>{e({categories:t?.slug})},children:[(0,G.jsx)("span",{className:"single-category-text",children:t?.label}),(0,G.jsx)("span",{className:"single-category-count",children:t?.count})]},t?.slug)))]})]})},K=({setIsOpen:e})=>{const{setActiveTab:t,setFilters:s}=(0,r.useDispatch)(W),[o,a]=(0,i.useState)(),{activeTab:l,filters:n}=(0,r.useSelect)((e=>{const{getActiveTab:t,getFilters:s}=e(W);return{activeTab:t(),filters:s()}}),[]);let c;return(0,i.useEffect)((()=>{clearTimeout(c),c=setTimeout((()=>{void 0!==o&&s({search:o})}),1e3)}),[o]),(0,G.jsxs)("div",{className:"zolo-dm-head",children:[(0,G.jsxs)("div",{className:"logo-area",children:[(0,G.jsx)("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",children:(0,G.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6827 10.8669L18.9688 7.58074L18.9405 7.55241C20.7819 8.94051 22 11.0085 22 13.4448C22 15.7677 21.1785 18.204 19.5637 19.6771C17.9207 21.1785 15.9093 21.915 13.5014 21.915L6.64589 21.9433H2V14.1246L14.1813 2H20.9235L6.36261 16.3343H13.5297C14.4079 16.3343 15.1728 16.0227 15.7677 15.4278C16.3909 14.8045 16.7592 14.0113 16.7592 13.0765C16.7592 12.2833 16.1643 11.4051 15.6827 10.8669ZM2.02869 10.3003V2H10.3573L2.02869 10.3003Z",fill:"#2667FF"})}),(0,G.jsx)("div",{className:"logo-text",children:(0,d.__)("Template Library","zoloblocks")})]}),(0,G.jsx)("div",{className:"tabs-area",children:j&&j.map((e=>(0,G.jsx)("button",{className:O()("single-tab",{active:l===e.value},{fav:"favorites"===e.value}),onClick:()=>{t(e.value),s({})},children:e.label},e.value)))}),(0,G.jsxs)("div",{className:"search-close-area",children:[(0,G.jsx)("div",{className:"search",children:(0,G.jsx)("input",{type:"search",placeholder:(0,d.__)("Search","zoloblocks"),value:o||"",onChange:e=>{a(e.target.value||"")}})}),(0,G.jsx)("div",{className:"close-btn",children:(0,G.jsx)("button",{onClick:()=>e(!1),children:(0,G.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,color:"#000000",fill:"none",children:(0,G.jsx)("path",{d:"M19.0005 4.99988L5.00045 18.9999M5.00045 4.99988L19.0005 18.9999",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})]})},J=()=>{const[e,t]=(0,i.useState)(!1);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(q.Tooltip,{text:(0,d.__)("Import Demo","zoloblocks"),position:"top",children:(0,G.jsxs)("button",{className:"zolo-pro-modal-btn demo-btn import-btn",onClick:()=>t(!0),children:[(0,d.__)("Import","zoloblocks"),(0,G.jsx)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",children:(0,G.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 15v2a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3v-2m-8 1V4m0 12-4-4m4 4 4-4"})})]})}),e&&(0,G.jsxs)(q.Modal,{className:"zolo-pro-modal zolo-plugin-modal",onRequestClose:()=>t(!1),children:[(0,G.jsxs)("svg",{className:"zolo-pro-modal-icon",xmlns:"http://www.w3.org/2000/svg",width:100,height:100,viewBox:"0 0 100 100",fill:"none",children:[(0,G.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M53.63 19.21C53.63 21.0947 52.3999 22.6849 50.6914 23.2239L59.77 55.87L70.8204 36.0263C70.1551 35.6019 69.71 34.8575 69.71 34.0101C69.71 32.6901 70.78 31.6201 72.1 31.6201C73.42 31.6201 74.49 32.6901 74.49 34.0101C74.49 35.3301 73.41 36.4001 72.1 36.4001C72.0147 36.4001 71.9304 36.3956 71.8474 36.3867L70.47 57.53L85.6585 45.5442C85.3762 45.1518 85.21 44.6703 85.21 44.15C85.21 42.83 86.29 41.76 87.6 41.76C88.91 41.76 89.99 42.83 89.99 44.15C89.99 45.47 88.92 46.54 87.6 46.54C87.2548 46.54 86.9267 46.4668 86.6303 46.3352L81.99 57.53L80.57 61.13L77.74 69.59L76.32 73.19L75.32 75.73L75.31 75.74C58.63 73.36 41.63 73.59 25.05 76.74L23.65 73.2L22.24 69.6L19.39 61.14L17.97 57.54L13.3307 46.3478C13.042 46.4715 12.724 46.54 12.39 46.54C11.07 46.54 10 45.47 10 44.15C10 42.83 11.07 41.76 12.39 41.76C13.71 41.76 14.78 42.83 14.78 44.15C14.78 44.6798 14.6076 45.1694 14.3159 45.5656L29.49 57.54L28.1307 36.3994L28.1123 36.3997L28.0905 36.4L28.0699 36.4001C26.7499 36.4001 25.6799 35.3301 25.6799 34.0101C25.6799 32.6901 26.7499 31.6201 28.0699 31.6201C29.3899 31.6201 30.4599 32.6901 30.4599 34.0101C30.4599 34.9203 29.9512 35.7117 29.2025 36.1153L39.52 54.66L48.2086 23.2479C46.4643 22.7333 45.21 21.1234 45.21 19.21C45.21 16.88 47.09 15 49.41 15C51.73 15 53.63 16.88 53.63 19.21ZM75.32 78.5799L76.07 76.6699H76.09H77.84L77.75 76.8799L76.33 80.4799L75.33 83.0199C58.65 80.6399 41.65 80.8699 25.07 84.0199L23.67 80.4799L22.26 76.8799L22.17 76.6699H23.92L25.06 79.5799C41.64 76.4199 58.64 76.1899 75.32 78.5799ZM23.37 41.1001V41.1601C22.62 43.1801 22.66 46.1201 25.93 49.9801C25.93 49.9801 23.47 46.4901 23.7 42.6501C23.85 42.9801 24.02 43.2701 24.23 43.4701C28.86 48.0901 27.71 54.2801 27.71 54.2801C17.1 49.9901 23.37 41.0901 23.37 41.0901V41.1001ZM76.1369 41.4599C76.1382 41.4488 76.14 41.4399 76.14 41.4399L76.13 41.4499L76.1369 41.4599ZM76.1369 41.4599C76.1351 41.475 76.1342 41.4942 76.14 41.4999C76.88 43.5199 76.85 46.4599 73.58 50.3199C73.58 50.3199 76.03 46.8299 75.8 42.9999C75.66 43.3299 75.49 43.6199 75.27 43.8199C70.64 48.4399 71.79 54.6399 71.79 54.6399C82.194 50.4234 76.3671 41.7934 76.1369 41.4599ZM38.825 36.2463C38.8225 36.26 38.82 36.275 38.82 36.28C37.51 38 36.7 40.82 38.71 45.46C38.71 45.46 37.36 41.41 38.71 37.8C38.75 38.16 38.82 38.49 38.98 38.73C42.07 44.49 39.18 50.09 39.18 50.09C30.26 42.91 38.84 36.21 38.84 36.21L38.83 36.22C38.83 36.22 38.8275 36.2325 38.825 36.2463ZM60.4099 36.28C60.3999 36.27 60.3999 36.22 60.3999 36.22L60.3899 36.21C60.3899 36.21 68.9499 42.91 60.0499 50.09C60.0499 50.09 57.1499 44.49 60.2399 38.73C60.3899 38.49 60.4599 38.16 60.5199 37.8C61.8499 41.41 60.5099 45.46 60.5099 45.46C62.5299 40.82 61.7099 38 60.4099 36.28Z",fill:"url(#paint0_linear_1914_4408)"}),(0,G.jsx)("defs",{children:(0,G.jsxs)("linearGradient",{id:"paint0_linear_1914_4408",x1:15,y1:"45.5",x2:"87.5",y2:46,gradientUnits:"userSpaceOnUse",children:[(0,G.jsx)("stop",{stopColor:"#B47A1A"}),(0,G.jsx)("stop",{offset:"0.465234",stopColor:"#FADD55"}),(0,G.jsx)("stop",{offset:1,stopColor:"#B47A1A"})]})})]}),(0,G.jsx)("h2",{className:"zolo-pro-modal-title",children:(0,d.__)("Upgrade to Pro","zoloblocks")}),(0,G.jsx)("p",{className:"zolo-pro-modal-desc",children:(0,d.__)("Get premium resources at ZoloBlocks and save more time with stunning patterns and templates","zoloblocks")}),(0,G.jsxs)("a",{className:"zolo-pro-modal-btn",href:"https://zoloblocks.com/pricing/",target:"_blank",children:[(0,d.__)("Upgrade Now","zoloblocks"),(0,G.jsx)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:(0,G.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M18 14v4.833A1.166 1.166 0 0 1 16.833 20H5.167A1.167 1.167 0 0 1 4 18.833V7.167A1.166 1.166 0 0 1 5.167 6h4.618m4.447-2H20v5.768m-7.889 2.121 7.778-7.778"})})]})]})]})};const Y=window.blynexParams;var Q=({templates:e,handleImportTemplate:t})=>(0,G.jsx)("div",{className:"zolo-demos-wrapper",children:e&&e?.length>0&&e.map(((e,s)=>(0,G.jsxs)("div",{className:"single-demo",children:[(0,G.jsxs)("div",{className:"demo-preview",children:[e?.demo_preview&&(0,G.jsx)("img",{src:e.demo_preview,alt:e?.title,loading:"lazy",decoding:"async"}),(0,G.jsx)(G.Fragment,{children:"pro"===e?.package_type&&"inactive"===Y?.zolo_pro_status&&(0,G.jsxs)("div",{className:"demo-actions-btn-wrap",children:[e?.demo_link&&(0,G.jsx)(q.Tooltip,{text:(0,d.__)("View Demo","zoloblocks"),position:"top",children:(0,G.jsxs)("a",{className:"demo-btn view-btn",href:e?.demo_link,target:"_blank",children:[(0,d.__)("Demo","zoloblocks"),(0,G.jsxs)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",children:[(0,G.jsx)("path",{stroke:"currentColor",strokeWidth:2,d:"M21 12c0 1.2-4.03 6-9 6s-9-4.8-9-6c0-1.2 4.03-6 9-6s9 4.8 9 6Z"}),(0,G.jsx)("path",{stroke:"currentColor",strokeWidth:2,d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]})]})}),(0,G.jsx)(J,{})]})}),(0,G.jsx)("div",{className:"demo-actions-btn-wrap",children:"pro"===e?.package_type?(0,G.jsx)(G.Fragment,{children:"active"===Y?.zolo_pro_status&&(0,G.jsxs)(G.Fragment,{children:[e?.demo_link&&(0,G.jsx)(q.Tooltip,{text:(0,d.__)("View Demo","zoloblocks"),position:"top",children:(0,G.jsxs)("a",{className:"demo-btn view-btn",href:e?.demo_link,target:"_blank",children:[(0,d.__)("Demo","zoloblocks"),(0,G.jsxs)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",children:[(0,G.jsx)("path",{stroke:"currentColor",strokeWidth:2,d:"M21 12c0 1.2-4.03 6-9 6s-9-4.8-9-6c0-1.2 4.03-6 9-6s9 4.8 9 6Z"}),(0,G.jsx)("path",{stroke:"currentColor",strokeWidth:2,d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]})]})}),(0,G.jsx)(q.Tooltip,{text:(0,d.__)("Import Demo","zoloblocks"),position:"top",children:(0,G.jsxs)("button",{className:"demo-btn import-btn",onClick:()=>t(e?.content),children:[(0,d.__)("Import","zoloblocks"),(0,G.jsx)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",children:(0,G.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 15v2a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3v-2m-8 1V4m0 12-4-4m4 4 4-4"})})]})})]})}):(0,G.jsxs)(G.Fragment,{children:[e?.demo_link&&(0,G.jsx)(q.Tooltip,{text:(0,d.__)("View Demo","zoloblocks"),position:"top",children:(0,G.jsxs)("a",{className:"demo-btn view-btn",href:e?.demo_link,target:"_blank",children:[(0,d.__)("Demo","zoloblocks"),(0,G.jsxs)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",children:[(0,G.jsx)("path",{stroke:"currentColor",strokeWidth:2,d:"M21 12c0 1.2-4.03 6-9 6s-9-4.8-9-6c0-1.2 4.03-6 9-6s9 4.8 9 6Z"}),(0,G.jsx)("path",{stroke:"currentColor",strokeWidth:2,d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]})]})}),(0,G.jsx)(q.Tooltip,{text:(0,d.__)("Import Demo","zoloblocks"),position:"top",children:(0,G.jsxs)("button",{className:"demo-btn import-btn",onClick:()=>{t(e?.content)},children:[(0,d.__)("Import","zoloblocks"),(0,G.jsx)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",children:(0,G.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 15v2a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3v-2m-8 1V4m0 12-4-4m4 4 4-4"})})]})})]})})]}),(0,G.jsx)("div",{className:"demo-footer",children:(0,G.jsx)("div",{className:"footer-left",children:(0,G.jsx)("h2",{className:"demo-title",dangerouslySetInnerHTML:{__html:e.title}})})}),(0,G.jsx)("span",{className:O()("demo-badge",("pro"===e?.package_type?"pro":"free")+"-badge"),children:"pro"===e?.package_type?(0,d.__)("Pro","zoloblocks"):(0,d.__)("Free","zoloblocks")})]},s)))});const X=window.blynexParams;var ee=({templates:e,pagesPanel:t,setPagesPanel:s,handleImportTemplate:o,favIds:a,handleFavTemplate:l,templateName:r})=>(0,G.jsx)(G.Fragment,{children:t&&(0,G.jsxs)("div",{className:"zolo-pages-preview-container",children:[(0,G.jsxs)("div",{className:"header",children:[(0,G.jsxs)("button",{className:"close-btn",onClick:()=>s(!1),children:[(0,G.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"icon icon-tabler icons-tabler-outline icon-tabler-arrow-narrow-left",children:[(0,G.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,G.jsx)("path",{d:"M5 12l14 0"}),(0,G.jsx)("path",{d:"M5 12l4 4"}),(0,G.jsx)("path",{d:"M5 12l4 -4"})]}),(0,d.__)("Back","zoloblocks")]}),(0,G.jsx)("h2",{dangerouslySetInnerHTML:{__html:r||(0,d.__)("Pages Preview","zoloblocks")}})]}),(0,G.jsx)("div",{className:"zolo-demos-wrapper",children:e&&e?.length>0&&e.map(((e,t)=>(0,G.jsxs)("div",{className:"single-demo",children:[(0,G.jsxs)("div",{className:"demo-preview",children:[e?.demo_preview&&(0,G.jsx)("img",{src:e.demo_preview,alt:e?.title,loading:"lazy",decoding:"async"}),(0,G.jsx)("div",{className:"demo-actions-btn-wrap",children:"pro"===e?.package_type?(0,G.jsx)(G.Fragment,{children:"active"===X?.zolo_pro_status?(0,G.jsxs)(G.Fragment,{children:[e?.demo_link&&(0,G.jsx)(q.Tooltip,{text:(0,d.__)("View Demo","zoloblocks"),position:"top",children:(0,G.jsxs)("a",{className:"demo-btn view-btn",href:e?.demo_link,target:"_blank",children:[(0,d.__)("Demo","zoloblocks"),(0,G.jsxs)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",children:[(0,G.jsx)("path",{stroke:"currentColor",strokeWidth:2,d:"M21 12c0 1.2-4.03 6-9 6s-9-4.8-9-6c0-1.2 4.03-6 9-6s9 4.8 9 6Z"}),(0,G.jsx)("path",{stroke:"currentColor",strokeWidth:2,d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]})]})}),(0,G.jsx)(q.Tooltip,{text:(0,d.__)("Import Demo","zoloblocks"),position:"top",children:(0,G.jsxs)("button",{className:"demo-btn import-btn",onClick:()=>{console.log(e?.content),o(e?.content)},children:[(0,d.__)("Import","zoloblocks"),(0,G.jsx)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",children:(0,G.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 15v2a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3v-2m-8 1V4m0 12-4-4m4 4 4-4"})})]})})]}):(0,G.jsxs)(G.Fragment,{children:[e?.demo_link&&(0,G.jsx)(q.Tooltip,{text:(0,d.__)("View Demo","zoloblocks"),position:"top",children:(0,G.jsxs)("a",{className:"demo-btn view-btn",href:e?.demo_link,target:"_blank",children:[(0,d.__)("Demo","zoloblocks"),(0,G.jsxs)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",children:[(0,G.jsx)("path",{stroke:"currentColor",strokeWidth:2,d:"M21 12c0 1.2-4.03 6-9 6s-9-4.8-9-6c0-1.2 4.03-6 9-6s9 4.8 9 6Z"}),(0,G.jsx)("path",{stroke:"currentColor",strokeWidth:2,d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]})]})}),(0,G.jsx)(J,{})]})}):(0,G.jsxs)(G.Fragment,{children:[e?.demo_link&&(0,G.jsx)(q.Tooltip,{text:(0,d.__)("View Demo","zoloblocks"),position:"top",children:(0,G.jsxs)("a",{className:"demo-btn view-btn",href:e?.demo_link,target:"_blank",children:[(0,d.__)("Demo","zoloblocks"),(0,G.jsxs)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",children:[(0,G.jsx)("path",{stroke:"currentColor",strokeWidth:2,d:"M21 12c0 1.2-4.03 6-9 6s-9-4.8-9-6c0-1.2 4.03-6 9-6s9 4.8 9 6Z"}),(0,G.jsx)("path",{stroke:"currentColor",strokeWidth:2,d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]})]})}),(0,G.jsx)(q.Tooltip,{text:(0,d.__)("Import Demo","zoloblocks"),position:"top",children:(0,G.jsxs)("button",{className:"demo-btn import-btn",onClick:()=>{o(e?.content)},children:[(0,d.__)("Import","zoloblocks"),(0,G.jsx)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",children:(0,G.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 15v2a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3v-2m-8 1V4m0 12-4-4m4 4 4-4"})})]})})]})}),(0,G.jsx)(q.Tooltip,{text:Array.isArray(a)&&a.includes(e.id)?(0,d.__)("Remove from Favorite","zoloblocks"):(0,d.__)("Add to Favorite","zoloblocks"),placement:"top"})]}),(0,G.jsx)("div",{className:"demo-footer",children:(0,G.jsx)("div",{className:"footer-left",children:(0,G.jsx)("h2",{className:"demo-title",dangerouslySetInnerHTML:{__html:e?.title}})})})]},t)))})]})}),te=({template:e,handleImportTemplate:t,favIds:s,handleFavTemplate:o,isPro:a})=>{const l=e?.pages,r=e?.image,[n,c]=(0,i.useState)(!1);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("div",{className:"single-demo",onClick:()=>c(!n),children:[(0,G.jsx)("div",{className:"demo-preview photos-group",children:r&&""!==r?(0,G.jsx)("div",{className:"single-page-photo",children:(0,G.jsx)("img",{src:r,alt:e?.title,loading:"lazy",decoding:"async"})}):l&&l.length>0&&l.map(((e,t)=>(0,G.jsx)("div",{className:"single-page-photo",children:(0,G.jsx)("img",{src:e?.demo_preview,alt:e?.title,loading:"lazy",decoding:"async"})},t)))}),(0,G.jsxs)("div",{className:"demo-footer",children:[(0,G.jsx)("div",{className:"footer-left",children:(0,G.jsx)("h2",{className:"demo-title",dangerouslySetInnerHTML:{__html:e.title}})}),(0,G.jsx)("div",{className:"footer-right",children:(0,G.jsx)("span",{className:"total-pages",children:l&&l.length>0?`${l.length} ${(0,d.__)("Pages","zoloblocks")}`:(0,d.__)("1 Page","zoloblocks")})})]}),(0,G.jsx)("span",{className:O()("demo-badge",(a?"pro":"free")+"-badge"),children:a?(0,d.__)("Pro","zoloblocks"):(0,d.__)("Free","zoloblocks")})]}),n&&(0,G.jsx)(ee,{templates:l,pagesPanel:n,setPagesPanel:c,handleImportTemplate:t,favIds:s,handleFavTemplate:o,templateName:e?.title})]})},se=({templates:e,handleImportTemplate:t,favIds:s,handleFavTemplate:o})=>(0,G.jsx)("div",{className:"zolo-demos-wrapper zolo-pages-templates",children:e&&e?.length>0&&e.map(((e,a)=>{const l=e?.pages;return(0,G.jsx)(te,{template:e,handleImportTemplate:t,favIds:s,handleFavTemplate:o,isPro:l&&l.length>0&&l.some((e=>"pro"===e?.package_type))},a)}))}),oe=()=>(0,G.jsxs)("div",{className:"zolo-preloader-wrapper",children:[(0,G.jsxs)("div",{className:"zolo-preloader",children:[(0,G.jsx)("div",{className:"dot"}),(0,G.jsx)("div",{className:"dot"}),(0,G.jsx)("div",{className:"dot"}),(0,G.jsx)("div",{className:"dot"}),(0,G.jsx)("div",{className:"dot"})]}),(0,G.jsx)("svg",{width:0,height:0,className:"svg",children:(0,G.jsx)("defs",{children:(0,G.jsxs)("filter",{id:"uib-jelly-ooze",children:[(0,G.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:3,result:"blur"}),(0,G.jsx)("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"ooze"}),(0,G.jsx)("feBlend",{in:"SourceGraphic",in2:"ooze"})]})})})]}),ae=({handleImportTemplate:e,isLoading:t})=>{const{setFilters:s}=(0,r.useDispatch)(W),{activeTab:o,filters:a}=(0,r.useSelect)((e=>({activeTab:e(W).getActiveTab(),filters:e(W).getFilters()})),[]),{tags:l,isResolving:n,hasResolved:i,startResolution:c}=((e=[])=>{const t=(0,r.useSelect)((t=>{const{getTags:s,isResolving:o,hasFinishedResolution:a,hasStartedResolution:l}=t(W);return{startResolution:l("getTags",[...e]),isResolving:o("getTags",[...e]),tags:s(...e),hasResolved:a("getTags",[...e])}}),[e]);return t})([o]),{records:h,isResolving:p,hasResolved:m,startResolution:g}=((e=[])=>{const t=(0,r.useSelect)((t=>{const{getRecords:s,isResolving:o,hasFinishedResolution:a,hasStartedResolution:l}=t(W);return{startResolution:l("getRecords",[...e]),isResolving:o("getRecords",[...e]),records:s(...e),hasResolved:a("getRecords",[...e])}}),[e]);return t})([{...a,per_page:a?.per_page||20},o]);return(0,G.jsxs)("div",{className:"zolo-template-library-content",children:[h&&h.length>0&&(0,G.jsx)("div",{className:"zolo-secondary-head",children:(0,G.jsxs)("div",{className:"secondary-header-item",children:[(0,G.jsx)("div",{className:"secondary-item",children:(0,G.jsx)(q.SelectControl,{label:(0,d.__)("Sort By :","zoloblocks"),options:[{label:(0,d.__)("Newest","zoloblocks"),value:"DESC"},{label:(0,d.__)("Oldest","zoloblocks"),value:"ASC"}],onChange:e=>{s({order:e})},value:a?.order||"DESC"})}),(0,G.jsx)("div",{className:"secondary-item zolo-tp-tags-item",children:(0,G.jsx)(q.BaseControl,{label:(0,d.__)("Popular Tags :","zoloblocks"),className:"zolo-tags",children:(0,G.jsxs)("div",{className:"tags-wrap",children:[(0,G.jsx)("div",{className:"tags-btn-wrap",children:l&&l.length>0&&l.map((e=>(0,G.jsx)("button",{className:O()("single-tag",a?.tags===e?.slug?"active":""),onClick:()=>{s({tags:e?.slug})},children:e?.label},e.slug)))}),(0,G.jsx)("button",{className:O()("clear-tag",""!==a?.tags?"active":""),onClick:()=>{s({tags:""})},children:(0,G.jsxs)("svg",{width:"64px",height:"64px",viewBox:"0 0 21 21",xmlns:"http://www.w3.org/2000/svg",fill:"#2483ff",stroke:"#2483ff",children:[(0,G.jsx)("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),(0,G.jsx)("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),(0,G.jsx)("g",{id:"SVGRepo_iconCarrier",children:(0,G.jsxs)("g",{fill:"none",fillRule:"evenodd",stroke:"#000000",strokeLinecap:"round",strokeLinejoin:"round",transform:"matrix(0 1 1 0 2.5 2.5)",children:[(0,G.jsx)("path",{d:"m3.98652376 1.07807068c-2.38377179 1.38514556-3.98652376 3.96636605-3.98652376 6.92192932 0 4.418278 3.581722 8 8 8s8-3.581722 8-8-3.581722-8-8-8"}),(0,G.jsx)("path",{d:"m4 1v4h-4",transform:"matrix(1 0 0 -1 0 6)"})]})})]})})]})})})]})}),h&&h.length>0&&"templates"!==o&&(0,G.jsx)(Q,{templates:h,handleImportTemplate:e}),h&&h.length>0&&"templates"===o&&(0,G.jsx)(se,{templates:h,handleImportTemplate:e}),h&&h?.length>=20&&(0,G.jsx)("div",{className:"load-more-btn-wrapper",children:(0,G.jsx)("button",{className:"load-more-btn",onClick:()=>{var e;s({...a,page:(null!==(e=a?.page)&&void 0!==e?e:1)+1})},children:(0,d.__)("Load More","zoloblocks")})}),h&&void 0===h?.length&&(0,G.jsx)("div",{className:"no-found-item",children:(0,G.jsx)("h2",{children:(0,d.__)(`${h?.message}`,"zoloblocks")})}),(p||t)&&(0,G.jsx)(oe,{})]})};function le(){const[e,t]=(0,i.useState)(!1),[s,o]=(0,i.useState)(!1);(0,i.useEffect)((()=>()=>{o(!1)}),[]);const[a,l]=(0,i.useState)(!1),[h,p]=(0,i.useState)(null),[g,x]=(0,i.useState)(null),{selectedBlock:v,currentPostType:w}=(0,r.useSelect)((e=>{const{getSelectedBlock:t}=e("core/block-editor"),{getCurrentPostType:s}=e("core/editor");return{selectedBlock:t(),currentPostType:s()}}),[]),{replaceBlocks:j,insertBlocks:k}=(0,r.useDispatch)("core/block-editor"),{isPageEmpty:b}=(0,r.useSelect)((e=>{const{getBlocks:t}=e("core/block-editor"),s=t();let o=!1;if(0===s.length&&(o=!0),1==s.length){const e=s[0];"core/paragraph"===e.name&&0===(0,n.getTextContent)(e.attributes.content).length&&(o=!0)}return{isPageEmpty:o}}),[]);(0,i.useEffect)((()=>{m()((()=>{const e=document.querySelector(".editor-header__toolbar, .edit-post-header__toolbar"),s=document.querySelector(".zoloblocks-template-library-button");e&&!s&&"zolo-popup"!==w&&f(e),s&&setTimeout((()=>{b?s.classList.add("empty-page"):s.classList.remove("empty-page")}),1e3);const o=new u;if(o.hasPendingTemplateImport()){const e=o.getSavedTemplateContent();e?(C(e),o.showNotification(o.params?.strings?.success||"ZoloBlocks plugin is ready! Importing your template...","success"),o.clearSavedTemplateContent()):setTimeout((()=>{t(!0)}),500)}}))}),[w,b]);const _=()=>(0,G.jsxs)(q.Button,{onClick:()=>t(!0),className:"zolo-library-open-button",variant:"primary",children:[(0,G.jsx)("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",children:(0,G.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 4H9.22856L4.02857 9.27618L4 4ZM15.9048 11.1047L18 8.99999V9.00951C19.2953 10.1524 20 11.6476 20 13.2857C20 15.2476 19.2667 17.1333 18.0953 18.2095C16.7715 19.4 15.2 19.9809 13.2858 19.9809L4.02865 20V14.0857L14.1048 4H18.6953L6.22864 16.3333H13.2858C14.2191 16.3333 15.0286 16 15.6191 15.3809C16.2762 14.6952 16.6191 13.8666 16.6191 12.9619C16.6191 12.2476 16.2381 11.5619 15.9048 11.1047Z",fill:"white"})}),(0,G.jsx)("span",{className:"zolo-template-label",children:(0,d.__)("Template Library","zoloblocks")})]}),f=e=>{if(document.querySelector(".zoloblocks-template-library-button"))return;const t=document.createElement("div");t.classList.add("zoloblocks-template-library-button"),e.append(t),(0,i.createRoot)(t).render((0,G.jsx)(_,{}))},C=async e=>{try{o(!0);const s=new u,a=await s.checkPluginStatus();if(p(a),!a.ready)return s.hasPermission()?(x(e),l(!0),void o(!1)):(s.showNotification(s.params?.strings?.permission_error||"You do not have permission to install plugins.","error"),void o(!1));if(!e)return console.error("No content found in API response data."),void s.showNotification("Error: No content found in template data.","error");const r=(0,c.parse)(e);if(!r.length)return console.warn("No blocks were parsed. Check your content format."),void s.showNotification("Error: Failed to parse template content.","error");const n=e=>{e.innerBlocks?.length>0?e.innerBlocks.forEach(n):"zolo/advanced-paragraph"===e.name&&(e.attributes.content=y(e.attributes.content))};r.forEach(n);try{v&&"core/paragraph"===v.name?await j(v.clientId,r):await k(r,0),s.showNotification("Template imported successfully!","success"),t(!1)}catch(e){s.showNotification("Error importing template: "+e.message,"error")}}catch(e){console.error("Error during API fetch import:",e)}finally{o(!1)}},y=e=>"string"==typeof e?e.replace(/
/g,"").replace(/<\/p>/g,""):e;return(0,G.jsxs)("div",{className:"zolo-demos-modal-wrapper",children:[e&&(0,G.jsx)(q.Modal,{className:"zolo-demos-modal",onRequestClose:()=>t(!1),shouldCloseOnClickOutside:!0,shouldCloseOnEsc:!0,isOpen:e,isDismissible:!1,children:(0,G.jsxs)("div",{className:"zolo-dm-body",children:[(0,G.jsx)(U,{}),(0,G.jsxs)("div",{className:"demos-container",children:[(0,G.jsx)(K,{setIsOpen:t}),(0,G.jsx)(ae,{handleImportTemplate:C,isLoading:s})]}),s&&(0,G.jsx)(oe,{}),a&&(0,G.jsxs)(q.Modal,{className:"zolo-pro-modal zolo-plugin-modal zolo-req-modal",onRequestClose:()=>{l(!1)},children:[(0,G.jsx)("svg",{width:"50",height:"50",viewBox:"0 0 24 24",fill:"none",children:(0,G.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6827 10.8669L18.9688 7.58074L18.9405 7.55241C20.7819 8.94051 22 11.0085 22 13.4448C22 15.7677 21.1785 18.204 19.5637 19.6771C17.9207 21.1785 15.9093 21.915 13.5014 21.915L6.64589 21.9433H2V14.1246L14.1813 2H20.9235L6.36261 16.3343H13.5297C14.4079 16.3343 15.1728 16.0227 15.7677 15.4278C16.3909 14.8045 16.7592 14.0113 16.7592 13.0765C16.7592 12.2833 16.1643 11.4051 15.6827 10.8669ZM2.02869 10.3003V2H10.3573L2.02869 10.3003Z",fill:"#2667FF"})}),(0,G.jsx)("h2",{className:"zolo-pro-modal-title",children:(0,d.__)("ZoloBlocks Plugin Required","blynex")}),(0,G.jsx)("p",{className:"zolo-pro-modal-desc",children:h?.installed?(new u).params?.strings?.plugin_not_activated||(0,d.__)("The ZoloBlocks plugin is installed but not activated. Would you like to activate it now?","blynex"):(new u).params?.strings?.plugin_not_installed||(0,d.__)("The ZoloBlocks plugin is required to use the template library. Would you like to install and activate it now?","blynex")}),(0,G.jsx)("div",{className:"zolo-plugin-confirm-actions",children:(0,G.jsxs)("button",{className:"zolo-pro-modal-btn",onClick:async()=>{l(!1),o(!0);const e=new u;h?.installed?h?.activated||e.showNotification(e.params?.strings?.activating||"Activating ZoloBlocks plugin...","info"):e.showNotification(e.params?.strings?.installing||"Installing ZoloBlocks plugin...","info");const s=await e.ensurePluginReady();o(!1),s.success?(e.showNotification(e.params?.strings?.success||"ZoloBlocks plugin is ready!","success"),s.needsReload?g&&(e.saveTemplateContent(g),e.showNotification(e.params?.strings?.reloading||"Reloading page to initialize ZoloBlocks plugin...","info"),setTimeout((()=>{window.location.reload()}),1500)):g&&C(g)):(e.showNotification(s.message,"error"),t(!1))},children:[h?.installed?(new u).params?.strings?.activate||(0,d.__)("Activate","blynex"):(new u).params?.strings?.install_activate||(0,d.__)("Install & Activate","blynex"),h?.installed?(0,G.jsx)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:(0,G.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}):(0,G.jsx)("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:(0,G.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 15v2a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3v-2m-8 1V4m0 12-4-4m4 4 4-4"})})]})})]})]})}),s&&!e&&!a&&(0,G.jsx)(oe,{})]})}!function(){const e="zoloblocks-template-library-button",t="zoloBlocksTemplateLibraryRegistered";window[t]||window.wp&&window.wp.plugins&&window.wp.plugins.getPlugin&&window.wp.plugins.getPlugin(e)||(window[t]=!0,(0,h.registerPlugin)(e,{render:le}))}()}}]);