/i,c=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},u=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var d=new window.DOMParser;c=u=function(e,t){return t&&(e="<"+t+">"+e+""+t+">"),d.parseFromString(e,"text/html")}}if(document.implementation){var m=l(507).isIE,p=document.implementation.createHTMLDocument(m()?"html-dom-parser":void 0);c=function(e,t){return t?(p.documentElement.getElementsByTagName(t)[0].innerHTML=e,p):(p.documentElement.innerHTML=e,p)}}var v,f=document.createElement("template");f.content&&(v=function(e){return f.innerHTML=e,f.content.childNodes}),e.exports=function(e){var t,l,d,m,p=e.match(r);switch(p&&p[1]&&(t=p[1].toLowerCase()),t){case n:return l=u(e),a.test(e)||(d=l.getElementsByTagName(o)[0])&&d.parentNode.removeChild(d),s.test(e)||(d=l.getElementsByTagName(i)[0])&&d.parentNode.removeChild(d),l.getElementsByTagName(n);case o:case i:return m=c(e).getElementsByTagName(t),s.test(e)&&a.test(e)?m[0].parentNode.childNodes:m;default:return v?v(e):c(e,i).getElementsByTagName(i)[0].childNodes}}},152:function(e,t,l){var n=l(276),o=l(507).formatDOM,i=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,l=e.match(i);return l&&l[1]&&(t=l[1]),o(n(e),null,t)}},507:function(e,t,l){for(var n,o=l(885),i=l(642),r=o.CASE_SENSITIVE_TAG_NAMES,a=i.Comment,s=i.Element,c=i.ProcessingInstruction,u=i.Text,d={},m=0,p=r.length;m0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var v=function(e){function t(t){return e.call(this,r.ElementType.Root,t)||this}return o(t,e),t}(p);t.Document=v;var f=function(e){function t(t,l,n,o){void 0===n&&(n=[]),void 0===o&&(o="script"===t?r.ElementType.Script:"style"===t?r.ElementType.Style:r.ElementType.Tag);var i=e.call(this,o,n)||this;return i.name=t,i.attribs=l,i}return o(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var l,n;return{name:t,value:e.attribs[t],namespace:null===(l=e["x-attribsNamespace"])||void 0===l?void 0:l[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(p);function h(e){return(0,r.isTag)(e)}function y(e){return e.type===r.ElementType.CDATA}function b(e){return e.type===r.ElementType.Text}function g(e){return e.type===r.ElementType.Comment}function k(e){return e.type===r.ElementType.Directive}function w(e){return e.type===r.ElementType.Root}function x(e,t){var l;if(void 0===t&&(t=!1),b(e))l=new u(e.data);else if(g(e))l=new d(e.data);else if(h(e)){var n=t?E(e.children):[],o=new f(e.name,i({},e.attribs),n);n.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),l=o}else if(y(e)){n=t?E(e.children):[];var a=new p(r.ElementType.CDATA,n);n.forEach((function(e){return e.parent=a})),l=a}else if(w(e)){n=t?E(e.children):[];var s=new v(n);n.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),l=s}else{if(!k(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new m(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),l=c}return l.startIndex=e.startIndex,l.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(l.sourceCodeLocation=e.sourceCodeLocation),l}function E(e){for(var t=e.map((function(e){return x(e,!0)})),l=1;l1&&(u=v(u,{key:u.key||k})),y.push(u);else if("text"!==i.type){switch(d=i.attribs,s(i)?r(d.style,d):d&&(d=o(d)),m=null,i.type){case"script":case"style":i.children[0]&&(d.dangerouslySetInnerHTML={__html:i.children[0].data});break;case"tag":"textarea"===i.name&&i.children[0]?d.defaultValue=i.children[0].data:i.children&&i.children.length&&(m=e(i.children,l));break;default:continue}w>1&&(d.key=k),y.push(f(i.name,d,m))}else{if((c=!i.data.trim().length)&&i.parent&&!a(i.parent))continue;if(g&&c)continue;y.push(i.data)}return 1===y.length?y[0]:y}},606:function(e,t,l){var n=l(196),o=l(476).default,i={reactCompat:!0},r=n.version.split(".")[0]>=16,a=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:r,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var l,n,o="function"==typeof t,i={},r={};for(l in e)n=e[l],o&&(i=t(l,n))&&2===i.length?r[i[0]]=i[1]:"string"==typeof n&&(r[n]=l);return r},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){if(null!=e)try{t.style=o(e,i)}catch(e){t.style={}}},canTextBeChildOfNode:function(e){return!a.has(e.name)},elementsWithNoTextChildren:a}},384:function(e,t,l){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,l,n){void 0===n&&(n=l);var o=Object.getOwnPropertyDescriptor(t,l);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,n,o)}:function(e,t,l,n){void 0===n&&(n=l),e[n]=t[l]}),o=this&&this.__exportStar||function(e,t){for(var l in e)"default"===l||Object.prototype.hasOwnProperty.call(t,l)||n(t,e,l)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=l(960),r=l(79);o(l(79),t);var a=/\s+/g,s={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,l){this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(l=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=l?l:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var l=this.options.xmlMode?i.ElementType.Tag:void 0,n=new r.Element(e,t,void 0,l);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,l=this.lastNode;if(l&&l.type===i.ElementType.Text)t?l.data=(l.data+e).replace(a," "):l.data+=e,this.options.withEndIndices&&(l.endIndex=this.parser.endIndex);else{t&&(e=e.replace(a," "));var n=new r.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new r.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new r.Text(""),t=new r.NodeWithChildren(i.ElementType.CDATA,[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var l=new r.ProcessingInstruction(e,t);this.addNode(l)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],l=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),l&&(e.prev=l,l.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},79:function(e,t,l){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,l=1,n=arguments.length;l0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var v=function(e){function t(t){return e.call(this,r.ElementType.Root,t)||this}return o(t,e),t}(p);t.Document=v;var f=function(e){function t(t,l,n,o){void 0===n&&(n=[]),void 0===o&&(o="script"===t?r.ElementType.Script:"style"===t?r.ElementType.Style:r.ElementType.Tag);var i=e.call(this,o,n)||this;return i.name=t,i.attribs=l,i}return o(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var l,n;return{name:t,value:e.attribs[t],namespace:null===(l=e["x-attribsNamespace"])||void 0===l?void 0:l[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(p);function h(e){return(0,r.isTag)(e)}function y(e){return e.type===r.ElementType.CDATA}function b(e){return e.type===r.ElementType.Text}function g(e){return e.type===r.ElementType.Comment}function k(e){return e.type===r.ElementType.Directive}function w(e){return e.type===r.ElementType.Root}function x(e,t){var l;if(void 0===t&&(t=!1),b(e))l=new u(e.data);else if(g(e))l=new d(e.data);else if(h(e)){var n=t?E(e.children):[],o=new f(e.name,i({},e.attribs),n);n.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),l=o}else if(y(e)){n=t?E(e.children):[];var a=new p(r.ElementType.CDATA,n);n.forEach((function(e){return e.parent=a})),l=a}else if(w(e)){n=t?E(e.children):[];var s=new v(n);n.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),l=s}else{if(!k(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new m(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),l=c}return l.startIndex=e.startIndex,l.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(l.sourceCodeLocation=e.sourceCodeLocation),l}function E(e){for(var t=e.map((function(e){return x(e,!0)})),l=1;le.length)&&(t=e.length);for(var l=0,n=new Array(t);l{var e,t,l;const o=null!==(e=null===(t=window)||void 0===t||null===(l=t.blockify)||void 0===l?void 0:l.blockStyles)&&void 0!==e?e:{unregister:[],register:[]};[...null==o?void 0:o.unregister].forEach((e=>{(0,n.unregisterBlockStyle)(null==e?void 0:e.type,null==e?void 0:e.name)})),[...null==o?void 0:o.register].forEach((e=>{(0,n.registerBlockStyle)(null==e?void 0:e.type,e)}))}));var o,i,r,a=window.wp.element,s=window.wp.hooks,c=window.wp.compose;const u=null!==(o=null===(i=window)||void 0===i||null===(r=i.blockify)||void 0===r?void 0:r.blockSupports)&&void 0!==o?o:{};(0,s.addFilter)("blocks.registerBlockType","blockify/block-supports",((e,t)=>(Object.keys(u).includes(t)&&(e.supports={...e.supports,...u[t]}),e)),0),(0,s.addFilter)("blocks.getSaveContent.extraProps","blockify/alignment-class",((e,t,l)=>(Object.keys(u).includes(t.name)&&null!=l&&l.align&&!e.className.includes(" align")&&(e.className+=" align"+l.align),e))),(0,s.addFilter)("blocks.registerBlockType","blockify/block-attributes-search",((e,t)=>{var l,n,o;return"core/search"===t&&(e.attributes.style={...null===(l=e.attributes)||void 0===l?void 0:l.style,spacing:{...null===(n=e.attributes)||void 0===n||null===(o=n.style)||void 0===o?void 0:o.spacing,padding:{top:"1em",right:"1em",bottom:"1em",left:"2em"}}}),e}),0);const d=(0,c.createHigherOrderComponent)((e=>t=>{var l,n,o;if("core/search"!==t.name)return(0,a.createElement)(e,t);const i=document.getElementsByClassName("wp-block-search__input"),r=null==t||null===(l=t.attributes)||void 0===l||null===(n=l.style)||void 0===n||null===(o=n.spacing)||void 0===o?void 0:o.padding;return i[0]&&r&&(r.top&&(i[0].style.paddingTop=null==r?void 0:r.top),r.right&&(i[0].style.paddingRight=null==r?void 0:r.right),r.bottom&&(i[0].style.paddingBottom=null==r?void 0:r.bottom),r.left&&(i[0].style.paddingLeft=null==r?void 0:r.left)),(0,a.createElement)(e,t)}),"withInspectorControl");(0,s.addFilter)("editor.BlockEdit","blockify/with-search-padding-css",d),l(506);var m=window.wp.apiFetch,p=l.n(m),v=window.wp.data;const f={icons:{social:{},wordpress:{}}},h={setIcons(e){return{type:"SET_ICONS",icons:e}},getIcons(e){return{type:"GET_ICONS",path:e}}},y={getIcons(e){const{icons:t}=e;return t}},b={GET_ICONS(e){return p()({path:e.path})}},g={*getIcons(){const e=yield h.getIcons("/blockify/v1/icons/");return h.setIcons(e)}};(0,v.register)((0,v.createReduxStore)("blockify/icons",{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,t=arguments.length>1?arguments[1]:void 0;return"SET_ICONS"===t.type?{...e,icons:t.icons}:e},actions:h,selectors:y,controls:b,resolvers:g}));var k=window.wp.blockEditor,w=window.wp.components,x=window.wp.i18n;function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;te.toLowerCase().replace(/(?<= )[^\s]|^./g,(e=>e.toUpperCase())),C=window.wp.primitives,_=(0,a.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(C.Path,{d:"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z"}));const T=e=>{var t,l,n;return null!==(t=null==e||null===(l=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))||void 0===l||null===(n=l.join("-"))||void 0===n?void 0:n.toLowerCase())&&void 0!==t?t:""},N=e=>{let{children:t}=e;return(0,a.createElement)("p",{className:"blockify-control-label"},t)},P=e=>{var t,l,n,o,i;return null!==(t=null===(l=window)||void 0===l||null===(n=l.blockify)||void 0===n||null===(o=n.blockSupports)||void 0===o||null===(i=o[e])||void 0===i?void 0:i.blockifyFilter)&&void 0!==t&&t},O={blur:{unit:"px",max:200},brightness:{unit:"%",max:360},contrast:{unit:"%",max:200},grayscale:{unit:"",max:100},hueRotate:{unit:"deg",max:360},invert:{unit:"%",max:100},opacity:{unit:"%",max:100},saturate:{unit:"",max:100,step:.1},sepia:{unit:"%",max:100}};(0,s.addFilter)("blocks.registerBlockType","blockify/add-css-transform-attributes",((e,t)=>{var l,n;return P(t)?(e.attributes.style={...null!==(l=null===(n=e.attributes)||void 0===n?void 0:n.style)&&void 0!==l?l:{},filter:{type:"object"}},e):e}));const I=e=>{let t="";return Object.keys(O).forEach((l=>{var n;null!=e&&e.hasOwnProperty(l)&&void 0!==e[l]&&(t+=" "+T(l)+"("+e[l]+(null==O||null===(n=O[l])||void 0===n?void 0:n.unit)+")")})),t.trim()},F=e=>{var t,l,n,o;const i={default:null!=e&&e.backdrop?"backdrop":"filter",hover:null!=e&&null!==(t=e.hover)&&void 0!==t&&t.backdrop?"backdrop":"filter",animate:null!=e&&null!==(l=e.animate)&&void 0!==l&&l.backdrop?"backdrop":"filter"},r={[`--${null==i?void 0:i.default}`]:I(e),[`--${null==i?void 0:i.hover}-hover`]:I(null!==(n=null==e?void 0:e.hover)&&void 0!==n?n:{}),[`--${null==i?void 0:i.animate}-animate`]:I(null!==(o=null==e?void 0:e.animate)&&void 0!==o?o:{})};for(const[e,t]of Object.entries(r))t||delete r[e];return r};(0,s.addFilter)("editor.BlockListBlock","blockify/with-css-filter",(0,c.createHigherOrderComponent)((e=>t=>{var l,n,o,i,r;const{attributes:s,name:c}=t,u=(0,a.createElement)(e,t);if(!P(c))return u;const{style:d}=s,{filter:m}=null!=d?d:{};if(!m||m==={})return u;const p=F(m);t.style={...null!==(l=t.style)&&void 0!==l?l:{},...p};const v={...t.wrapperProps,style:{...null===(n=t.wrapperProps)||void 0===n?void 0:n.style,...p},className:null===(o=t.wrapperProps)||void 0===o?void 0:o.className};return null!=v&&null!==(i=v.className)&&void 0!==i&&i.includes("has-filter")||(v.className+=" has-filter"),null!=t&&null!==(r=t.className)&&void 0!==r&&r.includes("has-filter")||(t.className+=" has-filter"),null!=m&&m.animate&&(v.className+=" has-animation",t.className+=" has-animation"),(0,a.createElement)(e,E({},t,{wrapperProps:v}))}),"withCssFilter")),(0,s.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-filter-styles",((e,t,l)=>{var n;const{name:o}=t;if(!P(o))return e;const{style:i}=l,{filter:r}=null!=i?i:{};if(!r||r==={})return e;const a=F(r);return Object.keys(a).length?(null!=e&&null!==(n=e.className)&&void 0!==n&&n.includes("has-filter")||(e.className+=" has-filter"),{...e,style:{...null==e?void 0:e.style,...a}}):e}));const B=e=>{var t,l,n,o,i;return null!==(t=null===(l=window)||void 0===l||null===(n=l.blockify)||void 0===n||null===(o=n.blockSupports)||void 0===o||null===(i=o[e])||void 0===i?void 0:i.blockifyBoxShadow)&&void 0!==t&&t},A=e=>{let t=!1;return null!=e&&e.boxShadow?(Object.keys(D).forEach((l=>{var n;null!=e&&null!==(n=e.boxShadow)&&void 0!==n&&n[l]&&(t=!0)})),t):t},D=((0,x.__)("Default","blockify"),(0,x.__)("Hover","blockify"),{useDefault:{type:"boolean"},inset:{type:"boolean"},x:{type:"integer"},y:{type:"integer"},blur:{type:"integer"},spread:{type:"integer"},color:{type:"string"},hover:{type:"object"}});(0,s.addFilter)("blocks.registerBlockType","blockify/add-box-shadow-attributes",((e,t)=>(B(t)&&(e.attributes.boxShadow={type:"object"}),e)),0);const z=e=>{var t,l,n,o,i,r,a,s,c,u,d,m,p,v,f,h,y,b,g,k,w;const{boxShadow:x}=e;let E={},S=[null!=x&&x.inset?"inset":"",(null!==(t=null==x?void 0:x.x)&&void 0!==t?t:0)+"px",(null!==(l=null==x?void 0:x.y)&&void 0!==l?l:0)+"px",(null!==(n=null==x?void 0:x.blur)&&void 0!==n?n:0)+"px",(null!==(o=null==x?void 0:x.spread)&&void 0!==o?o:0)+"px",null!==(i=null==x?void 0:x.color)&&void 0!==i?i:""];null!=x&&x.useDefault||(E["--box-shadow"]=S.join(" "));let C=[null!=x&&x.inset?"inset":"",(null!==(r=null!==(a=null==x||null===(s=x.hover)||void 0===s?void 0:s.x)&&void 0!==a?a:null==x?void 0:x.x)&&void 0!==r?r:0)+"px",(null!==(c=null!==(u=null==x||null===(d=x.hover)||void 0===d?void 0:d.y)&&void 0!==u?u:null==x?void 0:x.y)&&void 0!==c?c:0)+"px",(null!==(m=null!==(p=null==x||null===(v=x.hover)||void 0===v?void 0:v.blur)&&void 0!==p?p:null==x?void 0:x.blur)&&void 0!==m?m:0)+"px",(null!==(f=null!==(h=null==x||null===(y=x.hover)||void 0===y?void 0:y.spread)&&void 0!==h?h:null==x?void 0:x.spread)&&void 0!==f?f:0)+"px",null!==(b=null!==(g=null==x||null===(k=x.hover)||void 0===k?void 0:k.color)&&void 0!==g?g:null==x?void 0:x.color)&&void 0!==b?b:""];null!=x&&null!==(w=x.hover)&&void 0!==w&&w.useDefault||(E["--box-shadow-hover"]=C.join(" ")),E["--box-shadow"]===E["--box-shadow-hover"]&&delete E["--box-shadow-hover"];for(const[e,t]of Object.entries(E))t&&"0px 0px 0px 0px"!==(null==t?void 0:t.trim())||delete E[e];return E},R=e=>{var t,l,n,o,i,r;return console.log(null==e||null===(t=e.boxShadow)||void 0===t?void 0:t.useDefault),null!==(l=null!==(n=null==e||null===(o=e.boxShadow)||void 0===o?void 0:o.useDefault)&&void 0!==n?n:null==e||null===(i=e.boxShadow)||void 0===i||null===(r=i.hover)||void 0===r?void 0:r.useDefault)&&void 0!==l&&l};(0,s.addFilter)("editor.BlockListBlock","blockify/edit-box-shadow-styles",(0,c.createHigherOrderComponent)((e=>t=>{const{attributes:l,name:n}=t;if(!B(n))return(0,a.createElement)(e,t);if(!A(l))return(0,a.createElement)(e,t);let o={...t.wrapperProps};const i=z(l);return(R(l)||Object.keys(i).length)&&(t.className+=" has-box-shadow",o.className+=" has-box-shadow"),t.style={...t.style,...i},o.style={...o.style,...i},(0,a.createElement)(e,E({},t,{wrapperProps:o}))}),"withBoxShadow")),(0,s.addFilter)("blocks.getSaveContent.extraProps","blockify/save-box-shadow-styles",((e,t,l)=>{const{name:n}=t;if(!B(n))return e;if(!A(l))return e;const o=z(l);return(R(l)||Object.keys(o).length)&&(e.className+=" has-box-shadow"),e.style={...e.style,...z(l)},e}));const M=e=>{var t,l,n,o,i;return null!==(t=null===(l=window)||void 0===l||null===(n=l.blockify)||void 0===n||null===(o=n.blockSupports)||void 0===o||null===(i=o[e])||void 0===i?void 0:i.blockifyTransform)&&void 0!==t&&t};(0,x.__)("Default","blockify"),(0,x.__)("Hover","blockify"),(0,x.__)("Animate","blockify"),(0,s.addFilter)("blocks.registerBlockType","blockify/add-css-transform-attributes",((e,t)=>{var l;return M(t)?(e.attributes.style={...null!==(l=e.attributes.style)&&void 0!==l?l:{},transform:{type:"object"}},e):e}));const j=e=>{let t="";return null!=e&&e.translateX&&"0px"!==(null==e?void 0:e.translateX)&&(t+=" translateX("+e.translateX+")"),null!=e&&e.translateY&&"0px"!==(null==e?void 0:e.translateY)&&(t+=" translateY("+e.translateY+")"),null!=e&&e.translateZ&&"0px"!==(null==e?void 0:e.translateZ)&&(t+=" translateZ("+e.translateZ+")"),null!=e&&e.scale&&(t+=" scale("+e.scale+")"),null!=e&&e.scaleX&&(t+=" scaleX("+e.scaleX+")"),null!=e&&e.scaleY&&(t+=" scaleY("+e.scaleY+")"),null!=e&&e.scaleZ&&(t+=" scaleZ("+e.scaleZ+")"),null!=e&&e.rotate&&(t+=" rotate("+e.rotate+"deg)"),null!=e&&e.rotateX&&(t+=" rotateX("+e.rotateX+"deg)"),null!=e&&e.rotateY&&(t+=" rotateY("+e.rotateY+"deg)"),null!=e&&e.rotateZ&&(t+=" rotateZ("+e.rotateZ+"deg)"),null!=e&&e.skewX&&(t+=" skewX("+e.skewX+"deg)"),null!=e&&e.skewY&&(t+=" skewY("+e.skewY+"deg)"),t.trim()},H=e=>{var t,l;const n={"--transform":j(e),"--transform-hover":j(null!==(t=null==e?void 0:e.hover)&&void 0!==t?t:{}),"--transform-animate":j(null!==(l=null==e?void 0:e.animate)&&void 0!==l?l:{})};for(const[e,t]of Object.entries(n))t||delete n[e];return n};(0,s.addFilter)("editor.BlockListBlock","blockify/with-css-transform",(0,c.createHigherOrderComponent)((e=>t=>{var l,n,o,i;const{attributes:r,name:s}=t,c=(0,a.createElement)(e,t);if(!M(s))return c;const{style:u}=r,{transform:d}=null!=u?u:{};if(!d)return c;const m=H(d);t.style={...null!==(l=t.style)&&void 0!==l?l:{},...m};const p={...t.wrapperProps,style:{...null===(n=t.wrapperProps)||void 0===n?void 0:n.style,...m},className:null===(o=t.wrapperProps)||void 0===o?void 0:o.className};return null!=t&&null!==(i=t.className)&&void 0!==i&&i.includes("has-transform")||(t.className+=" has-transform"),(0,a.createElement)(e,E({},t,{wrapperProps:p}))}),"withCssTransform")),(0,s.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-css-transform-styles",((e,t,l)=>{var n;const{name:o}=t;if(!M(o))return e;const{style:i}=l,{transform:r}=null!=i?i:{};if(!r)return e;const a=H(r);return Object.keys(a).length?(null!=e&&null!==(n=e.className)&&void 0!==n&&n.includes("has-transform")||(e.className+=" has-transform"),{...e,style:{...null==e?void 0:e.style,...a}}):e}));var L=(0,a.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(C.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));const V=()=>(0,a.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 120 120",xmlSpace:"preserve"},(0,a.createElement)(C.Path,{d:"M15 0h35v120H15zm55 0h35v120H70z"})),G=[{value:"linear",label:(0,x.__)("Linear","blockify")},{value:"ease",label:(0,x.__)("Ease","blockify")},{value:"ease-in",label:(0,x.__)("Ease In","blockify")},{value:"ease-out",label:(0,x.__)("Ease Out","blockify")},{value:"ease-in-out",label:(0,x.__)("Ease In Out","blockify")},{value:"step-start",label:(0,x.__)("Step Start","blockify")},{value:"step-end",label:(0,x.__)("Step End","blockify")}],W=[{value:"enter",label:(0,x.__)("Enter Viewport","blockify")},{value:"infinite",label:(0,x.__)("Infinite","blockify")},{value:"",label:(0,x.__)("None","blockify")}],U=e=>{var t;let{useDefault:l,duration:n,delay:o,timingFunction:i,iterationCount:r,playState:a=!0}=e;return l||!a?"":(""===n&&(n="1"),""===o&&(o="0"),"-1"===r&&(r="infinite"),["animate",n+"s",o+"s",null!==(t=r)&&void 0!==t?t:"1",null!=i?i:"linear"].join(" "))};(0,s.addFilter)("editor.BlockListBlock","blockify/with-animation-props",(0,c.createHigherOrderComponent)((e=>t=>{var l,n;const{attributes:o}=t,{style:i}=null!=o?o:{},{animation:r}=null!=i?i:{};if(!r||null==Object||null===(l=Object.keys(r))||void 0===l||!l.length)return(0,a.createElement)(e,t);var s;null!=t&&null!==(n=t.className)&&void 0!==n&&n.includes("has-animation")||(t.className=(null==t||null===(s=t.className)||void 0===s?void 0:s.trim())+" has-animation");const c={"--animation":U(r)};"running"!==(null==r?void 0:r.playState)&&(c.animationPlayState="paused");const u={...t,style:{...null==t?void 0:t.style,...c}};return(0,a.createElement)(e,E({},t,{wrapperProps:u}))}),"withAnimation")),(0,s.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-animation-styles",((e,t,l)=>{var n,o;const{style:i}=l,{animation:r}=null!=i?i:{};if(!r||null==Object||null===(n=Object.keys(r))||void 0===n||!n.length)return e;var a;null!=e&&null!==(o=e.className)&&void 0!==o&&o.includes("has-animation")||(e.className=(null==e||null===(a=e.className)||void 0===a?void 0:a.trim())+" has-animation");const s={"--animation":U(r)};return"running"!==(null==r?void 0:r.playState)&&(s.animationPlayState="paused"),{...e,style:{...null==e?void 0:e.style,...s}}}));const $=e=>{var t;let{attributes:l,setAttributes:n}=e;const{style:o}=l,{animation:i}=null!=o?o:{};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(N,null,(0,x.__)("Animation","blockify")),(0,a.createElement)(w.Flex,{justify:"flex-end"},(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.Button,{isSecondary:!0,isSmall:!0,icon:_,iconPosition:"left",iconSize:14,onClick:()=>{n({style:{...o,animation:{}}})}},(0,x.__)("Reset","blockify"))),(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.Button,{isSecondary:!0,isSmall:!0,icon:"running"===(null==i?void 0:i.playState)?V:L,iconPosition:"left",iconSize:14,onClick:()=>{n({style:{...o,animation:{...null==o?void 0:o.animation,playState:"running"===(null==i?void 0:i.playState)?"paused":"running"}}})}},"running"===(null==i?void 0:i.playState)?(0,x.__)("Pause","blockify"):(0,x.__)("Play","blockify"))))),(0,a.createElement)("br",null),(0,a.createElement)(w.PanelRow,{className:"blockify-animate-controls"},(0,a.createElement)(w.Flex,{className:"blockify-flex-controls"},(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalNumberControl,{label:(0,x.__)("Speed","blockify"),help:(0,x.__)("The duration of the animation in milliseconds. Leave empty or 0 for infinite.","blockify"),value:null==i?void 0:i.duration,onChange:e=>{n({style:{...o,animation:{...null==o?void 0:o.animation,duration:e}}})},min:0,max:100,step:.1,shifStep:10,allowReset:!0})),(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalNumberControl,{label:(0,x.__)("Delay","blockify"),help:(0,x.__)("The delay for the animation when block enters viewport.","blockify"),value:null==i?void 0:i.delay,onChange:e=>{n({style:{...o,animation:{...null==o?void 0:o.animation,delay:e}}})},min:0,max:100,step:.1,shifStep:10,allowReset:!0})),(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalNumberControl,{label:(0,x.__)("Repeat","blockify"),help:(0,x.__)("The number of times the animation should be performed.","blockify"),value:null==i?void 0:i.iterationCount,onChange:e=>{n({style:{...o,animation:{...null==o?void 0:o.animation,iterationCount:e}}})},min:-1,max:1e3,step:1,allowReset:!0})))),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.Flex,{className:"blockify-flex-controls"},(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.SelectControl,{label:(0,x.__)("Timing Function","blockify"),value:null==i?void 0:i.timingFunction,options:G,onChange:e=>{n({style:{...o,animation:{...null==o?void 0:o.animation,timingFunction:e}}})},style:{marginBottom:0}}))),(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.SelectControl,{label:(0,x.__)("Event","blockify"),value:"-1"===(null==i?void 0:i.iterationCount)?"infinite":null!==(t=null==i?void 0:i.event)&&void 0!==t?t:"enter",options:W,onChange:e=>{"infinite"===e&&n({style:{...o,iterationCount:"infinite"}}),n({style:{...o,animation:{...null==o?void 0:o.animation,event:e}}})},style:{marginBottom:0}}))))))};w.TabPanel.Tab;const q=[{name:"default",title:(0,x.__)("Default","blockify")},{name:"hover",title:(0,x.__)("Hover","blockify")},{name:"animate",title:(0,x.__)("Animation","blockify")}];var X,Y,Z;(0,s.addFilter)("editor.BlockEdit","blockify/with-effect-settings",(0,c.createHigherOrderComponent)((e=>t=>{const{name:l}=t;return(e=>{var t,l,n,o,i,r,a,s,c,u,d,m,p,v,f;return null!==(t=null!==(l=null!==(n=null===(o=window)||void 0===o||null===(i=o.blockify)||void 0===i||null===(r=i.blockSupports)||void 0===r||null===(a=r[e])||void 0===a?void 0:a.blockifyBoxShadow)&&void 0!==n?n:null===(s=window)||void 0===s||null===(c=s.blockify)||void 0===c||null===(u=c.blockSupports)||void 0===u||null===(d=u[e])||void 0===d?void 0:d.blockifyTransform)&&void 0!==l?l:null===(m=window)||void 0===m||null===(p=m.blockify)||void 0===p||null===(v=p.blockSupports)||void 0===v||null===(f=v[e])||void 0===f?void 0:f.blockifyFilter)&&void 0!==t&&t})(l)?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),(0,a.createElement)(k.InspectorControls,null,(0,a.createElement)(w.PanelBody,{title:(0,x.__)("Effects","blockify"),className:"blockify-controls",initialOpen:!1},(0,a.createElement)(w.TabPanel,{className:"blockify-controls-tabs",tabs:q},(e=>(0,a.createElement)(a.Fragment,null,((e,t)=>{var l;if("animate"===t)return(0,a.createElement)(a.Fragment,null);const{attributes:n,setAttributes:o}=e,i="default"===t?null==n?void 0:n.boxShadow:null==n||null===(l=n.boxShadow)||void 0===l?void 0:l[t],r=()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(N,null,(0,x.__)("Box Shadow","blockify")),(0,a.createElement)(w.Button,{isSecondary:!0,isSmall:!0,icon:_,iconPosition:"right",iconSize:14,onClick:()=>{o({boxShadow:{}})}},(0,x.__)("Clear Box Shadow","blockify"))),(0,a.createElement)("br",null),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.ToggleControl,{label:(0,x.__)("Use default","blockify"),checked:null==i?void 0:i.useDefault,onChange:e=>{o("default"===t?{boxShadow:{...i,useDefault:e}}:{boxShadow:{...null==n?void 0:n.boxShadow,[t]:{...i,useDefault:e}}})}})));return null!=i&&i.useDefault?(0,a.createElement)(r,null):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(r,null),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.ToggleControl,{label:(0,x.__)("Inset box shadow","blockify"),checked:null==i?void 0:i.inset,onChange:e=>{o("default"===t?{boxShadow:{...i,inset:e}}:{boxShadow:{...null==n?void 0:n.boxShadow,[t]:{...i,inset:e}}})}})),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.Flex,null,["x","y","blur","spread"].map((e=>(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalNumberControl,{label:S(e),value:null==i?void 0:i[e],step:1,shiftStep:10,onChange:l=>{o("default"===t?{boxShadow:{...i,[e]:l}}:{boxShadow:{...null==n?void 0:n.boxShadow,[t]:{...i,[e]:l}}})}})))))),(0,a.createElement)("br",null),(0,a.createElement)(k.__experimentalPanelColorGradientSettings,{title:(0,x.__)("Color","blockify"),showTitle:!1,enableAlpha:!0,settings:[{enableAlpha:!0,colorValue:null==i?void 0:i.color,label:(0,x.__)("Shadow Color ","blockify")+("default"===t?"":S(t)),onColorChange:e=>{o("default"===t?{boxShadow:{...i,color:e}}:{boxShadow:{...null==n?void 0:n.boxShadow,[t]:{...i,color:e}}})}}]}))})(t,e.name),"animate"===e.name&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)($,t)),((e,t)=>{var l;const{attributes:n,setAttributes:o}=e,{style:i}=n,r="default"===t?null==i?void 0:i.transform:null==i||null===(l=i.transform)||void 0===l?void 0:l[t];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("hr",null),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(N,null,(0,x.__)("Transform","blockify")),(0,a.createElement)(w.Button,{isSecondary:!0,isSmall:!0,icon:_,iconPosition:"right",iconSize:14,onClick:()=>{o({style:{...null==n?void 0:n.style,transform:{}}})}},(0,x.__)("Clear Transform","blockify"))),(0,a.createElement)("br",null),(0,a.createElement)(N,null,(0,x.__)("Translate","blockify")),(0,a.createElement)(w.Flex,{className:"blockify-flex-controls"},["translateX","translateY","translateZ"].map((e=>(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalUnitControl,{label:e.slice(-1),value:null==r?void 0:r[e],onChange:l=>{o("default"===t?{style:{...i,transform:{...r,[e]:l}}}:{style:{...i,transform:{...null==i?void 0:i.transform,[t]:{...r,[e]:l}}}})}}))))),Object.entries({scale:{scale:[0,10,.1],x:[0,10,.1],y:[0,10,.1],z:[0,10,.1]},rotate:{rotate:[-360,360,1],x:[-360,360,1],y:[-360,360,1],z:[-360,360,1]},skew:{x:[-360,360,1],y:[-360,360,1]}}).map((e=>{let[l,n]=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(N,null,S(l)),(0,a.createElement)(w.Flex,{className:"blockify-flex-controls"},Object.entries(n).map((e=>{let[n,[s,c,u]]=e;return(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalNumberControl,{label:n===l?(0,x.__)("All","blockify"):S(n),value:null==r?void 0:r[n],onChange:e=>{o("default"===t?{style:{...i,transform:{...r,[n]:e}}}:{style:{...i,transform:{...null==i?void 0:i.transform,[t]:{...r,[n]:e}}}})},min:s,max:c,step:u,allowReset:!0}))}))))})))})(t,e.name),((e,t)=>{var l;const{attributes:n,setAttributes:o}=e,{style:i}=n,r="default"===t?null==i?void 0:i.filter:null==i||null===(l=i.filter)||void 0===l?void 0:l[t];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("hr",null),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(N,null,(0,x.__)("Filter","blockify")),(0,a.createElement)(w.Button,{isSecondary:!0,isSmall:!0,icon:_,iconPosition:"right",iconSize:14,onClick:()=>{o({style:{...null==n?void 0:n.style,filter:{}}})}},(0,x.__)("Clear Filter","blockify"))),(0,a.createElement)("br",null),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.ToggleControl,{label:(0,x.__)("Use backdrop filter?","blockify"),help:(0,x.__)("Filters elements behind the current block background.","blockify"),checked:null==r?void 0:r.backdrop,onChange:e=>{o("default"===t?{style:{...i,filter:{...r,backdrop:e}}}:{style:{...i,filter:{...null==i?void 0:i.filter,[t]:{...r,backdrop:e}}}})}})),(0,a.createElement)("br",null),Object.keys(O).map((e=>{var l,n,s;return(0,a.createElement)(w.RangeControl,{label:S(e),value:null==r?void 0:r[e],onChange:l=>{o("default"===t?{style:{...i,filter:{...r,[e]:l}}}:{style:{...i,filter:{...null==i?void 0:i.filter,[t]:{...r,[e]:l}}}})},min:0,max:null==O||null===(l=O[e])||void 0===l?void 0:l.max,step:null!==(n=null==O||null===(s=O[e])||void 0===s?void 0:s.step)&&void 0!==n?n:1,allowReset:!0})})))})(t,e.name))))))):(0,a.createElement)(e,t)}),"withFilterSettings"));const K=null!==(X=null===(Y=window)||void 0===Y||null===(Z=Y.blockify)||void 0===Z?void 0:Z.blockSupports)&&void 0!==X?X:{},J=e=>{var t,l;return null!==(t=null==K||null===(l=K[e])||void 0===l?void 0:l.blockifyMinHeight)&&void 0!==t&&t};var Q,ee,te;(0,s.addFilter)("blocks.registerBlockType","blockify/min-height-attributes",((e,t)=>{if(J(t)){var l,n,o;const i=null!==(l=null==K||null===(n=K[t])||void 0===n?void 0:n.width)&&void 0!==l?l:null,r={type:"string"};"string"==typeof i&&(r.default=i),e={...e,attributes:{...null===(o=e)||void 0===o?void 0:o.attributes,minHeight:r}}}return e})),(0,s.addFilter)("editor.BlockEdit","blockify/with-min-height-css",(0,c.createHigherOrderComponent)((e=>t=>{var l,n,o;if(!J(null==t?void 0:t.name))return(0,a.createElement)(e,t);const i=S(null==t||null===(l=t.name)||void 0===l||null===(n=l.replace("-"," "))||void 0===n?void 0:n.replace("blockify/","").replace("core/","")),{setAttributes:r,attributes:s}=t;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),(0,a.createElement)(k.InspectorControls,null,(0,a.createElement)(w.PanelBody,{className:"blockify-min-height-control"},(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.__experimentalUnitControl,{label:(0,x.__)("Min height of ","blockify")+i,value:null!==(o=null==s?void 0:s.minHeight)&&void 0!==o?o:"none",onChange:e=>r({minHeight:e})})))))}),"withMinHeightSettings")),(0,s.addFilter)("editor.BlockListBlock","blockify/with-min-height",(0,c.createHigherOrderComponent)((e=>t=>{var l,n;if(!J(null==t?void 0:t.name))return(0,a.createElement)(e,t);const o=null!==(l=t.wrapperProps)&&void 0!==l?l:{};return o.style={...o.style,minHeight:null==t||null===(n=t.attributes)||void 0===n?void 0:n.minHeight},(0,a.createElement)(e,E({},t,{wrapperProps:o}))}),"withMinHeight")),(0,s.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-min-height",((e,t,l)=>(J(t)&&(e.style={...e.style,minHeight:null==l?void 0:l.minHeight}),e)));const le=null!==(Q=null===(ee=window)||void 0===ee||null===(te=ee.blockify)||void 0===te?void 0:te.blockSupports)&&void 0!==Q?Q:{};(0,s.addFilter)("editor.BlockEdit","blockify/with-negative-margin",(0,c.createHigherOrderComponent)((e=>t=>{if((e=>{var t,l;return null!==(t=null==le||null===(l=le[e])||void 0===l?void 0:l.blockifyNegativeMargin)&&void 0!==t&&t})(null==t?void 0:t.name)){const e=document.querySelector('.components-input-control__input[min="0"]');e&&e.setAttribute("min","-999")}return(0,a.createElement)(e,t)}),"withMinHeightSettings"));const ne=e=>{var t,l,n,o,i;return null!==(t=null===(l=window)||void 0===l||null===(n=l.blockify)||void 0===n||null===(o=n.blockSupports)||void 0===o||null===(i=o[e])||void 0===i?void 0:i.blockifyOnclick)&&void 0!==t&&t};(0,s.addFilter)("blocks.registerBlockType","blockify/add-onclick-attribute",((e,t)=>ne(t)?(e.attributes={...e.attributes,onclick:{type:"string"}},e):e),0),(0,s.addFilter)("editor.BlockEdit","blockify/with-onclick-attribute",(0,c.createHigherOrderComponent)((e=>t=>{var l;const{attributes:n,setAttributes:o,name:i}=t;return ne(i)?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),(0,a.createElement)(k.InspectorAdvancedControls,null,(0,a.createElement)(w.TextareaControl,{label:(0,x.__)("On-click event","blockify"),help:(0,x.__)("Enter a JavaScript function to be called when the button is clicked.","blockify"),rows:4,value:null==n||null===(l=n.onclick)||void 0===l?void 0:l.replace('"',"'"),onChange:e=>o({onclick:null==e?void 0:e.replace('"',"'")})}))):(0,a.createElement)(e,t)}),"onclickAttribute"),99);var oe,ie,re,ae,se,ce,ue=(0,a.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(C.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})),de=(0,a.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(C.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})),me=(0,a.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(C.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"}));w.TabPanel.Tab;const pe=null!==(oe=null===(ie=window)||void 0===ie||null===(re=ie.blockify)||void 0===re?void 0:re.blockSupports)&&void 0!==oe?oe:{},ve=e=>{var t,l;return null!==(t=null==pe||null===(l=pe[e])||void 0===l?void 0:l.blockifyResponsive)&&void 0!==t&&t},fe=e=>(0,a.createElement)("span",{className:"screen-reader-text"},e),he=[{name:"mobile",title:(0,a.createElement)(a.Fragment,null,fe((0,x.__)("Mobile","blockify")),ue)},{name:"desktop",title:(0,a.createElement)(a.Fragment,null,fe((0,x.__)("Desktop","blockify")),de)}],ye={mobile:(0,x.__)("The default position and display options that apply to all screen sizes 0px and above. ","blockify"),desktop:(0,x.__)("Position and display options for desktop screen sizes larger than 781px. Inherits mobile settings if empty.","blockify")},be=null!==(ae=null===(se=window)||void 0===se||null===(ce=se.blockify)||void 0===ce?void 0:ce.responsiveSettings)&&void 0!==ae?ae:{};(0,s.addFilter)("editor.BlockEdit","blockify/custom-advanced-control",(0,c.createHigherOrderComponent)((e=>t=>{const{isSelected:l,name:n}=t;return ve(n)?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),l&&(0,a.createElement)(k.InspectorControls,null,(0,a.createElement)(w.PanelBody,{title:(0,x.__)("Responsive","blockify"),initialOpen:!1,className:"blockify-controls blockify-responsive-controls"},(0,a.createElement)(w.TabPanel,{className:"blockify-controls-tabs",tabs:he},(e=>((e,t)=>{var l,n,o,i,r,s,c,u,d,m,p,v,f,h,y,b,g,k,E,S,C,_,T,N,P,O,I;const{attributes:F,setAttributes:B}=e,{style:A}=F,D=null!==(l=null==ye?void 0:ye[t])&&void 0!==l?l:"",z={position:"--position"+("mobile"===t?"":"-"+t),inset:"--inset"+("mobile"===t?"":"-"+t),zIndex:"--z-index"+("mobile"===t?"":"-"+t),pointerEvents:"--pointer-events"+("mobile"===t?"":"-"+t),overflow:"--overflow"+("mobile"===t?"":"-"+t),order:"--order"+("mobile"===t?"":"-"+t),display:"--display"+("mobile"===t?"":"-"+t),flexDirection:"--flex-direction"+("mobile"===t?"":"-"+t),width:"--width"+("mobile"===t?"":"-"+t),maxWidth:"--max-width"+("mobile"===t?"":"-"+t)},R=null!==(n=null==A||null===(o=A[z.inset])||void 0===o?void 0:o.split(" "))&&void 0!==n?n:Array(4).fill("auto");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("small",null,D),(0,a.createElement)("br",null),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.SelectControl,{label:null==be||null===(i=be.position)||void 0===i?void 0:i.label,value:null!==(r=null==A?void 0:A[null==z?void 0:z.position])&&void 0!==r?r:"",options:null==be||null===(s=be.position)||void 0===s?void 0:s.options,onChange:e=>{B({style:{...A,[z.position]:e}})}})),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.__experimentalBoxControl,{label:null==be||null===(c=be.inset)||void 0===c?void 0:c.label,values:{top:null!==(u=R[0])&&void 0!==u?u:"auto",right:null!==(d=R[1])&&void 0!==d?d:"auto",bottom:null!==(m=R[2])&&void 0!==m?m:"auto",left:null!==(p=R[3])&&void 0!==p?p:"auto"},onChange:e=>{var t,l,n,o;B({style:{...A,[z.inset]:[null!==(t=null==e?void 0:e.top)&&void 0!==t?t:"auto",null!==(l=null==e?void 0:e.right)&&void 0!==l?l:"auto",null!==(n=null==e?void 0:e.bottom)&&void 0!==n?n:"auto",null!==(o=null==e?void 0:e.left)&&void 0!==o?o:"auto"].join(" ")}})},inputProps:{min:-999}})),(0,a.createElement)("br",null),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.Flex,{className:"blockify-flex-controls"},(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalNumberControl,{label:null==be||null===(v=be.zIndex)||void 0===v?void 0:v.label,value:null==A?void 0:A[null==z?void 0:z.zIndex],onChange:e=>{B({style:{...A,[z.zIndex]:e}}),console.log(F)},min:-100,max:100,step:1,allowReset:!0})),(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalNumberControl,{label:null==be||null===(f=be.order)||void 0===f?void 0:f.label,value:null==A?void 0:A[null==z?void 0:z.order],onChange:e=>{B({style:{...A,[z.order]:e}})},min:-100,max:100,step:1,allowReset:!0})))),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.Flex,{className:"blockify-flex-controls"},(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.SelectControl,{label:null==be||null===(h=be.pointerEvents)||void 0===h?void 0:h.label,value:null!==(y=null==A?void 0:A[null==z?void 0:z.pointerEvents])&&void 0!==y?y:"",options:null==be||null===(b=be.pointerEvents)||void 0===b?void 0:b.options,onChange:e=>{B({style:{...A,[z.pointerEvents]:e}})}})),(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.SelectControl,{label:null==be||null===(g=be.overflow)||void 0===g?void 0:g.label,value:null!==(k=null==A?void 0:A[null==z?void 0:z.overflow])&&void 0!==k?k:"",options:null==be||null===(E=be.overflow)||void 0===E?void 0:E.options,onChange:e=>{B({style:{...A,[z.overflow]:e}})}})))),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.Flex,{className:"blockify-flex-controls"},(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.SelectControl,{label:null==be||null===(S=be.display)||void 0===S?void 0:S.label,value:null!==(C=null==A?void 0:A[null==z?void 0:z.display])&&void 0!==C?C:"",options:null==be||null===(_=be.display)||void 0===_?void 0:_.options,onChange:e=>{B({style:{...A,[z.display]:e}})}})),(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.SelectControl,{label:null==be||null===(T=be.flexDirection)||void 0===T?void 0:T.label,value:null!==(N=null==A?void 0:A[null==z?void 0:z.flexDirection])&&void 0!==N?N:"",options:null==be||null===(P=be.flexDirection)||void 0===P?void 0:P.options,onChange:e=>{B({style:{...A,[z.flexDirection]:e}})}})))),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.Flex,{className:"blockify-flex-controls"},(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalUnitControl,{label:null==be||null===(O=be.width)||void 0===O?void 0:O.label,value:null==A?void 0:A[null==z?void 0:z.width],onChange:e=>{B({style:{...A,[z.width]:e}})},min:-1e3,max:1e3,step:1,allowReset:!0})),(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalUnitControl,{label:null==be||null===(I=be.maxWidth)||void 0===I?void 0:I.label,value:null==A?void 0:A[null==z?void 0:z.maxWidth],onChange:e=>{B({style:{...A,[z.maxWidth]:e}})},min:-1e3,max:1e3,step:1,allowReset:!0})))),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.Button,{isSecondary:!0,isSmall:!0,icon:me,iconPosition:"right",iconSize:14,onClick:()=>{Object.keys(z).forEach((e=>{delete A[z[e]]})),B({style:A})}},(0,x.__)("Reset All","blockify"))))})(t,e.name)))))):(0,a.createElement)(e,t)}),"withPositionEdit")),(0,s.addFilter)("editor.BlockListBlock","blockify/with-position-style",(0,c.createHigherOrderComponent)((e=>t=>{var l;const{name:n}=t;if(!ve(n))return(0,a.createElement)(e,t);const{attributes:{style:o}}=t;let i={},r="";Object.keys(be).forEach((e=>{var l,n,a;e=T(e);const s=null!==(l=null==o?void 0:o[`--${e}`])&&void 0!==l?l:"",c=null!==(n=null==o?void 0:o[`--${e}-desktop`])&&void 0!==n?n:"";(s||c)&&(s&&(i[`--${e}`]=s),c&&(i[`--${e}-desktop`]=c),null!=t&&null!==(a=t.className)&&void 0!==a&&a.includes(`has-${e}`)||(r+=` has-${e}`))}));let s=null!==(l=t.wrapperProps)&&void 0!==l?l:{};return 0!==Object.keys(i).length&&(t.style={...t.style,...i},s.style={...s.style,...i},t.className=(null==t?void 0:t.className)+r,s.className=(null==s?void 0:s.className)+r),(0,a.createElement)(e,E({},t,{wrapperProps:s}))}),"withPositionStyle")),(0,s.addFilter)("blocks.getSaveContent.extraProps","blockify/save-position-style",((e,t,l)=>{var n;const{name:o}=e;if(null==pe||null===(n=pe[o])||void 0===n||!n.blockifyPosition)return e;const{style:i}=l;let r={},a="";return Object.keys(be).forEach((e=>{var t,l,n;e=T(e);const o=null!==(t=null==i?void 0:i[`--${e}`])&&void 0!==t?t:"",s=null!==(l=null==i?void 0:i[`--${e}-desktop`])&&void 0!==l?l:"";(o||s)&&(o&&(r[`--${e}`]=o),s&&(r[`--${e}-desktop`]=s),null!==(n=a)&&void 0!==n&&n.includes(`has-${e}`)||(a+=` has-${e}`))})),0!==Object.keys(r).length&&(e.className=(null==e?void 0:e.className)+a,e.style={...null==e?void 0:e.style,...r}),e}),11),(0,s.addFilter)("editor.BlockEdit","blockify/with-client-id",(0,c.createHigherOrderComponent)((e=>t=>("core/navigation-submenu"===(null==t?void 0:t.name)&&t.setAttributes({clientId:null==t?void 0:t.clientId}),(0,a.createElement)(e,t))),"withClientId")),(0,s.addFilter)("editor.BlockListBlock","blockify/with-mega-menu",(0,c.createHigherOrderComponent)((e=>t=>{var l,n;const{attributes:o,name:i,clientId:r}=t;if("core/navigation-submenu"!==i)return(0,a.createElement)(e,t);let s={};var c,u;null!=o&&o.backgroundColor&&(s["--wp--custom--submenu--background"]="var(--wp--preset--color--"+(null==o?void 0:o.backgroundColor)+")"),null!=o&&null!==(l=o.style)&&void 0!==l&&null!==(n=l.color)&&void 0!==n&&n.background&&(s["--wp--custom--submenu--background"]=null==o||null===(c=o.style)||void 0===c||null===(u=c.color)||void 0===u?void 0:u.background);let d={...null==t?void 0:t.wrapperProps};return d["data-id"]=r,s&&(d.style={...null==d?void 0:d.style,...s}),(0,a.createElement)(e,E({},t,{wrapperProps:d}))}),"withMegaMenu"));var ge=(0,a.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(C.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}));const ke={content:(0,x.__)("Add your text here. Add your text here.","blockify"),containerSize:"150",pathSize:"100"},we={name:"curved-text",title:(0,x.__)("Curved Text","blockify"),icon:ge,isDefault:!1,category:"text",scope:["inserter","transform","block"],description:(0,x.__)("Insert curved text around circular SVG path.","blockify"),attributes:{className:"is-style-curved-text"},isActive:e=>{var t;return null==e||null===(t=e.className)||void 0===t?void 0:t.includes("is-style-curved-text")}};t()((()=>{(0,n.registerBlockVariation)("core/paragraph",we)})),(0,s.addFilter)("blocks.registerBlockType","blockify/curved-text-attributes",((e,t)=>{var l;return"core/paragraph"===t&&(e={...e,attributes:{...null===(l=e)||void 0===l?void 0:l.attributes,curvedText:{type:"object"}}}),e}));const xe=function(){var e,t,l;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{curvedText:o=ke}=n,i=null!==(e=null==o?void 0:o.content)&&void 0!==e?e:ke.content,r=null!==(t=null==o?void 0:o.containerSize)&&void 0!==t?t:ke.containerSize,s=null!==(l=null==o?void 0:o.pathSize)&&void 0!==l?l:ke.pathSize,c=parseInt(r)/2,u=parseInt(s)/2,d={viewBox:`0 0 ${r} ${r}`,xmlns:"http://www.w3.org/2000/svg",enableBackground:`new 0 0 ${r} ${r}`,xmlSpace:"preserve",width:r,height:r,contentEditable:!1,x:0,y:0},m=Date.now()+Math.random(),p={id:"circle-"+m,d:`M ${c}, ${c} m -${u}, 0 a ${u},${u} 0 0,1 ${s},0 a ${u},${u} 0 0,1 -${s},0`,fill:"transparent"};return(0,a.createElement)("svg",d,(0,a.createElement)("path",p," "),(0,a.createElement)("text",{fill:"currentColor"},(0,a.createElement)("textPath",{xlinkHref:"#circle-"+m},i)))};(0,s.addFilter)("editor.BlockEdit","blockify/with-curved-text-css",(0,c.createHigherOrderComponent)((e=>t=>{var l,n,o,i,r;const{attributes:s,setAttributes:c}=t;if(!(e=>{var t;return!(null==e||!e.className||"string"!=typeof(null==e?void 0:e.className))&&(null==e||null===(t=e.className)||void 0===t?void 0:t.includes("is-style-curved-text"))})(s))return(0,a.createElement)(e,t);const u=null===(l=document.getElementsByClassName("edit-site-visual-editor__editor-canvas"))||void 0===l?void 0:l.item(0);let d;d=u?u.contentDocument:document;const m=null===(n=d)||void 0===n?void 0:n.getElementById("block-"+t.clientId);m&&(m.innerHTML=(0,a.renderToString)(xe({...s,clientId:t.clientId})));const{curvedText:p=ke}=s,v=e=>{var l;const n={...e,svgString:(0,a.renderToString)((0,a.createElement)(xe,E({},s,e,{clientId:null!==(l=t.clientId)&&void 0!==l?l:"1"})))};c({curvedText:{...p,...n}})};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),(0,a.createElement)(k.InspectorControls,null,(0,a.createElement)(w.PanelBody,{className:"blockify-controls",title:(0,x.__)("Curved Text","blockify")},(0,a.createElement)(w.TextareaControl,{label:(0,x.__)("Content","blockify"),value:null!==(o=null==p?void 0:p.content)&&void 0!==o?o:ke.content,onChange:e=>{v({content:e})}}),(0,a.createElement)("p",null,(0,x.__)("Size","blockify")),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)("br",null),(0,a.createElement)(w.Flex,null,(0,a.createElement)(w.FlexItem,{style:{width:"50%"}},(0,a.createElement)(w.__experimentalNumberControl,{label:(0,x.__)("Container","blockify"),value:null!==(i=null==p?void 0:p.containerSize)&&void 0!==i?i:ke.containerSize,onChange:e=>{v({containerSize:e})}})),(0,a.createElement)(w.FlexBlock,null,(0,a.createElement)(w.__experimentalNumberControl,{label:(0,x.__)("Path","blockify"),value:null!==(r=null==p?void 0:p.pathSize)&&void 0!==r?r:ke.pathSize,onChange:e=>{v({pathSize:e})}})))))))}),"withCurvedTextSettings"),99);const Ee={start:"0",end:"100",duration:"2",delay:"0",prefix:"",suffix:""},Se={name:"counter",title:(0,x.__)("Counter","blockify"),icon:me,isDefault:!1,category:"text",scope:["inserter","transform","block"],description:(0,x.__)("Insert counter animation.","blockify"),attributes:{className:"is-style-counter"},isActive:e=>{var t;return e&&(null==e||null===(t=e.className)||void 0===t?void 0:t.includes("is-style-counter"))}};t()((()=>{(0,n.registerBlockVariation)("core/paragraph",Se)})),(0,s.addFilter)("editor.BlockEdit","blockify/with-counter-controls",(0,c.createHigherOrderComponent)((e=>t=>{var l,n,o,i,r,s,c,u,d,m;const{attributes:p,setAttributes:v}=t,f=(0,a.createElement)(e,t);if(null==p||null===(l=p.className)||void 0===l||!l.includes("is-style-counter"))return f;const{style:h}=p;let y=Ee;if(null!=h&&h.counter?y=h.counter:v({style:{...h,counter:Ee}}),null!==(n=y)&&void 0!==n&&n.prefix||null!==(o=y)&&void 0!==o&&o.end||null!==(i=y)&&void 0!==i&&i.suffix){var b,g,E;let e=null===(b=y)||void 0===b?void 0:b.end;var S,C;"string"==typeof(null===(g=y)||void 0===g?void 0:g.prefix)&&(e=(null===(S=y)||void 0===S?void 0:S.prefix)+e),"string"==typeof(null===(E=y)||void 0===E?void 0:E.suffix)&&(e+=null===(C=y)||void 0===C?void 0:C.suffix),v({content:e})}return(0,a.createElement)(a.Fragment,null,f,(0,a.createElement)(k.InspectorControls,null,(0,a.createElement)(w.PanelBody,{title:(0,x.__)("Counter Settings","blockify"),initialOpen:!0,className:"blockify-counter-settings"},(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.Flex,{className:"blockify-flex-controls"},(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalNumberControl,{label:(0,x.__)("Start","blockify"),value:null===(r=y)||void 0===r?void 0:r.start,onChange:e=>{v({style:{...h,counter:{...y,start:e}}})},step:1,shiftStep:10,isDragEnabled:!0,isShiftStepEnabled:!0})),(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalNumberControl,{label:(0,x.__)("End","blockify"),value:null===(s=y)||void 0===s?void 0:s.end,onChange:e=>{v({style:{...h,counter:{...y,end:e}}})},step:1,shiftStep:10,isDragEnabled:!0,isShiftStepEnabled:!0})))),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.Flex,{className:"blockify-flex-controls"},(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalNumberControl,{label:(0,x.__)("Duration (seconds)","blockify"),value:null===(c=y)||void 0===c?void 0:c.duration,onChange:e=>{v({style:{...h,counter:{...y,duration:e}}})},step:.1,shiftStep:1,isDragEnabled:!0,isShiftStepEnabled:!0})),(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalNumberControl,{label:(0,x.__)("Delay (seconds)","blockify"),value:null===(u=y)||void 0===u?void 0:u.delay,onChange:e=>{v({style:{...h,counter:{...y,delay:e}}})},step:.1,shiftStep:1,isDragEnabled:!0,isShiftStepEnabled:!0})))),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.Flex,{className:"blockify-flex-controls"},(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.TextControl,{label:(0,x.__)("Prefix","blockify"),value:null===(d=y)||void 0===d?void 0:d.prefix,onChange:e=>{v({style:{...h,counter:{...y,prefix:e}}})}})),(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.TextControl,{label:(0,x.__)("Suffix","blockify"),value:null===(m=y)||void 0===m?void 0:m.suffix,onChange:e=>{v({style:{...h,counter:{...y,suffix:e}}})}})))))))}),"withCounterControls"),0);var Ce=(0,a.createElement)(C.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(C.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"}));const _e={name:"image",title:(0,x.__)("Image","blockify"),icon:Ce,isDefault:!0,category:"media",scope:["inserter","transform","block"],description:(0,x.__)("Insert an image to make a visual statement.","blockify"),attributes:{className:""},isActive:e=>{var t,l;return null==e||!e.className||!(null!=e&&null!==(t=e.className)&&void 0!==t&&t.includes("is-style-icon")||null!=e&&null!==(l=e.className)&&void 0!==l&&l.includes("is-style-svg"))}};(0,n.registerBlockVariation)("core/image",_e);var Te=l(488),Ne=(Te.domToReact,Te.htmlToDOM,Te.attributesToProps,Te.Element,Te),Pe=(0,a.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(C.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));w.SelectControl.Option,w.CustomSelectControl.Option;const Oe=e=>{var t,l,n,o,i;return null!==(t=null===(l=window)||void 0===l||null===(n=l.blockify)||void 0===n||null===(o=n.blockSupports)||void 0===o||null===(i=o[e])||void 0===i?void 0:i.blockifyIcon)&&void 0!==t&&t},Ie={iconSet:{type:"string",default:"wordpress"},iconName:{type:"string",default:"star-empty"},iconColor:{type:"string"},iconGradient:{type:"string"},iconSize:{type:"string"},iconCustomSVG:{type:"string"},iconSvgString:{type:"string",default:' '}},Fe={name:"icon",icon:Pe,title:(0,x.__)("Icon","blockify"),isDefault:!1,category:"media",scope:["inserter","transform","block"],description:(0,x.__)("Insert a customizable SVG icon.","blockify"),attributes:{className:"is-style-icon",iconSet:"wordpress",iconName:"star-empty",iconSvgString:' '},isActive:e=>{var t;return e&&(null==e||null===(t=e.className)||void 0===t?void 0:t.includes("is-style-icon"))}};t()((()=>{(0,n.registerBlockVariation)("core/image",Fe)})),(0,s.addFilter)("blocks.registerBlockType","blockify/add-icon-attributes",((e,t)=>{if(Oe(t)){for(const[t,l]of Object.entries(Ie))e.attributes[t]={type:l.type};e.attributes={...e.attributes,...Ie}}return e}),99),(0,s.addFilter)("editor.BlockEdit","blockify/with-icon",(0,c.createHigherOrderComponent)((e=>t=>{var l,n,o,i,r,s,c,u;const{name:d,attributes:m,setAttributes:p,isSelected:h}=t,{className:y}=m;if(!y)return(0,a.createElement)(e,t);if(null==y||!y.includes("is-style-icon"))return(0,a.createElement)(e,t);if(!Oe(d))return(0,a.createElement)(e,t);var b,g,E;h&&(()=>{const e=document.getElementsByClassName("block-editor-block-card__description").item(0);e&&(document.getElementsByClassName("blockify-pro-icon-link").item(0)||(e.innerHTML=e.innerHTML+(0,x.__)(" Get more icons with ","blockify")+'Blockify Pro ↗ '))})(),null!=m&&m.url||p({url:"#"}),null!=m&&m.iconSet||p({iconSet:null==Ie||null===(b=Ie.iconSet)||void 0===b?void 0:b.default}),null!=m&&m.iconName||p({iconName:null==Ie||null===(g=Ie.iconName)||void 0===g?void 0:g.default}),null!=m&&m.iconSvgString||p({iconSvgString:null==Ie||null===(E=Ie.iconSvgString)||void 0===E?void 0:E.default});const S=[];let{icons:C}=null!==(l=(0,v.useSelect)((e=>({icons:e("blockify/icons").getIcons()})),[]))&&void 0!==l?l:f;const _={wordpress:[{name:null==Ie||null===(n=Ie.iconSvgString)||void 0===n?void 0:n.default,key:null==Ie||null===(o=Ie.iconName)||void 0===o?void 0:o.default}]};return Object.keys(C).forEach((e=>{var t;let l=e.split("-").join(" ");var n;l="wordpress"===l?"WordPress":l,S.push({label:l,value:e}),_[e]=[],Object.keys(C[e]).forEach((t=>{var l;t!==(null==m?void 0:m.iconName)&&_[e].push({name:Ne(null==C||null===(l=C[e])||void 0===l?void 0:l[t]),key:t})})),null!=C&&null!==(t=C[e])&&void 0!==t&&t[null==m?void 0:m.iconName]&&_[e].unshift({name:Ne(null==C||null===(n=C[e])||void 0===n?void 0:n[null==m?void 0:m.iconName]),key:null==m?void 0:m.iconName})})),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(e,t),(0,a.createElement)(k.InspectorControls,null,(0,a.createElement)(w.PanelBody,{title:(0,x.__)("Icon Settings","blockify"),initialOpen:!0,className:"blockify-icon-settings"},!1,(0,a.createElement)(w.SelectControl,{label:(0,x.__)("Select Icon Set","blockify"),value:null!==(i=null==m?void 0:m.iconSet)&&void 0!==i?i:null==Ie?void 0:Ie.iconSet.default,options:S,onChange:e=>p({iconSet:e})}),(0,a.createElement)((()=>{var e,t,l,n;const o=null===(e=_[null==m?void 0:m.iconSet])||void 0===e||null===(t=e.filter((e=>(null==e?void 0:e.key)===(null==m?void 0:m.iconName))))||void 0===t||null===(l=t[0])||void 0===l?void 0:l.name;return(0,a.createElement)("div",{className:"blockify-icon-preview"},o&&(0,a.createElement)(a.Fragment,null,o,(0,a.createElement)("span",null,null==m||null===(n=m.iconName)||void 0===n?void 0:n.replace("-"," "))))}),null),(0,a.createElement)(w.CustomSelectControl,{label:(0,x.__)("Select Icon","blockify"),options:null!==(r=null==_?void 0:_[null==m?void 0:m.iconSet])&&void 0!==r?r:null==_?void 0:_.wordpress,value:null!==(s=null==m?void 0:m.iconSvgString)&&void 0!==s?s:null==Ie||null===(c=Ie.iconSvgString)||void 0===c?void 0:c.default,className:"blockify-icon-setting",onChange:e=>{var t,l;let{selectedItem:n}=e;const o=null!==(t=null==n?void 0:n.key)&&void 0!==t?t:"";p({iconName:o}),p({iconSvgString:null==C||null===(l=C[null==m?void 0:m.iconSet])||void 0===l?void 0:l[o]})}}),(0,a.createElement)("br",null),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.Flex,null,(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalUnitControl,{label:(0,x.__)("Icon Width","blockify"),value:null!==(u=null==m?void 0:m.iconSize)&&void 0!==u?u:"",onChange:e=>p({iconSize:e})})))))))}),"iconEdit"));const Be=e=>{var t,l,n,o,i,r,a,s,c,u,d,m,p,v,f,h;let y={},b="";null!=e&&null!==(t=e.style)&&void 0!==t&&null!==(l=t.color)&&void 0!==l&&l.background&&(b=e.style.color.background),null!=e&&e.backgroundColor&&(b="var(--wp--preset--color--"+e.backgroundColor+", currentColor)");let g="";var k,w;null!=e&&null!==(n=e.style)&&void 0!==n&&null!==(o=n.color)&&void 0!==o&&o.gradient&&(g=null==e||null===(k=e.style)||void 0===k||null===(w=k.color)||void 0===w?void 0:w.gradient),null!=e&&e.gradient&&(g="var(--wp--preset--gradient--"+e.gradient+",currentColor)");let x="";var E,S;if(null!=e&&null!==(i=e.style)&&void 0!==i&&null!==(r=i.color)&&void 0!==r&&r.text&&(x=null==e||null===(E=e.style)||void 0===E||null===(S=E.color)||void 0===S?void 0:S.text),null!=e&&e.textColor&&(x="var(--wp--preset--color--"+e.textColor+",currentColor)"),""!==b&&(y["--wp--custom--icon--background"]=b),x?(y["--wp--custom--icon--color"]=x,g&&(y["--wp--custom--icon--background"]=g)):g&&(y["--wp--custom--icon--color"]=g),null!=e&&null!==(a=e.style)&&void 0!==a&&null!==(s=a.spacing)&&void 0!==s&&s.padding){var C,_,T,N;const t=e.style.spacing.padding,l={top:null!==(C=null==t?void 0:t.top)&&void 0!==C?C:"0",right:null!==(_=null==t?void 0:t.right)&&void 0!==_?_:"0",bottom:null!==(T=null==t?void 0:t.bottom)&&void 0!==T?T:"0",left:null!==(N=null==t?void 0:t.left)&&void 0!==N?N:"0"};Object.keys(l).forEach((e=>{var t;const n=null!==(t=null==l?void 0:l[e])&&void 0!==t?t:"";n&&null!=n&&n.includes("var:preset")&&(l[e]="var(--wp--preset--spacing--"+n.replace("var:preset|spacing|","")+")")})),y["--wp--custom--icon--padding"]=Object.values(l).join(" ")}if(null!=e&&null!==(c=e.style)&&void 0!==c&&null!==(u=c.spacing)&&void 0!==u&&u.margin){var P,O,I,F;const t=e.style.spacing.margin,l={top:null!==(P=null==t?void 0:t.top)&&void 0!==P?P:"",right:null!==(O=null==t?void 0:t.right)&&void 0!==O?O:"",bottom:null!==(I=null==t?void 0:t.bottom)&&void 0!==I?I:"",left:null!==(F=null==t?void 0:t.left)&&void 0!==F?F:""};Object.keys(l).forEach((e=>{var t;const n=null!==(t=null==l?void 0:l[e])&&void 0!==t?t:"";null!=n&&n.includes("var:preset")&&(l[e]="var(--wp--preset--spacing--"+(null==n?void 0:n.replace("var:preset|spacing|",""))+")")})),y["--wp--custom--icon--margin"]=Object.values(l).join(" ")}let B="";var A,D,z,R;null!=e&&e.borderColor&&(B="var(--wp--preset--color--"+(null==e?void 0:e.borderColor)+")"),null!=e&&null!==(d=e.style)&&void 0!==d&&null!==(m=d.border)&&void 0!==m&&m.width&&(y["--wp--custom--icon--border-width"]=e.style.border.width,y["--wp--custom--icon--border-style"]=null!==(A=null===(D=e.style.border)||void 0===D?void 0:D.style)&&void 0!==A?A:"solid",y["--wp--custom--icon--border-color"]=null!==(z=null===(R=e.style.border)||void 0===R?void 0:R.color)&&void 0!==z?z:B);let M=null!==(p=null==e?void 0:e.iconSize)&&void 0!==p?p:"";""!==M&&(y["--wp--custom--icon--size"]=M);const j=null===(v=null!==(f=null==e?void 0:e.iconCustomSVG)&&void 0!==f?f:"")||void 0===v?void 0:v.replace('"',"'"),H=j&&null!=j&&j.includes("t=>{var l,n;let{attributes:o,wrapperProps:i,name:r}=t;return null!=o&&o.className&&null!=o&&null!==(l=o.className)&&void 0!==l&&l.includes("is-style-icon")&&Oe(r)?(i||(i={style:{}}),i.style={...null===(n=i)||void 0===n?void 0:n.style,...Be(o)},(0,a.createElement)(e,E({},t,{wrapperProps:i}))):(0,a.createElement)(e,t)}),"withIcon")),(0,s.addFilter)("blocks.getSaveContent.extraProps","blockify/save-icon-styles",((e,t,l)=>{var n;if(null==l||!l.className)return e;const{name:o}=t;return null!=l&&null!==(n=l.className)&&void 0!==n&&n.includes("is-style-icon")&&Oe(o)?(e.style={...null==e?void 0:e.style,...Be(l)},e):e}));var Ae=(0,a.createElement)(C.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(C.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));const De={name:"svg",title:(0,x.__)("SVG","blockify"),icon:Ae,isDefault:!1,category:"media",scope:["inserter","transform","block"],description:(0,x.__)("Insert an inline SVG.","blockify"),attributes:{className:"is-style-svg"},isActive:e=>{var t;return!(null==e||!e.className)&&(null==e?void 0:e.className)&&(null==e||null===(t=e.className)||void 0===t?void 0:t.includes("is-style-svg"))}};t()((()=>{(0,n.registerBlockVariation)("core/image",De)}));const ze=e=>"url('data:image/svg+xml;utf8,"+encodeURIComponent(e)+"')",Re=e=>"data:image/svg+xml;utf8,"+encodeURIComponent(e);(0,s.addFilter)("editor.BlockEdit","blockify/with-svg-controls",(0,c.createHigherOrderComponent)((e=>t=>{var l,n,o,i;const{attributes:r,setAttributes:s}=t;if(null==r||null===(l=r.className)||void 0===l||!l.includes("is-style-svg"))return(0,a.createElement)(e,t);const{style:c}=r,u=null!==(n=null==c?void 0:c.svgString)&&void 0!==n?n:"",d=null!==(o=null==c?void 0:c.maskSvg)&&void 0!==o&&o;null!=r&&r.url||s({url:d?"#":Re(u)}),d&&"#"!==(null==r?void 0:r.url)&&s({url:"#"}),d||null!=r&&null!==(i=r.url)&&void 0!==i&&i.includes("data:image/svg+xml;utf8,")||s({url:Re(u)});let m="var(--width,1em)",p="";var v;null!=r&&r.width&&(m=r.width+"px"),null!=r&&r.height&&(p=(null!==(v=r.height)&&void 0!==v?v:"")+"px"),p=""===p?m:p;const f={width:m,height:p,display:"inline-flex",background:"currentColor",overflow:"hidden","-webkit-mask-repeat":"no-repeat","-mask-repeat":"no-repeat","-webkit-mask-size":"100% 100%","-mask-size":"100% 100%","-webkit-mask-position":"center","-mask-position":"center bottom","-webkit-mask-image":ze(u),"-mask-image":ze(u)};let h="";return u&&(h=Object.entries(f).map((e=>{let[t,l]=e;return`${t}:${l};`})).join("")),(0,a.createElement)(a.Fragment,null,d&&(0,a.createElement)("style",null,"#block-"+(null==t?void 0:t.clientId)+">div:first-of-type{"+h+"}"),(0,a.createElement)(e,t),(0,a.createElement)(k.InspectorControls,null,(0,a.createElement)(w.PanelBody,{title:(0,x.__)("SVG Settings","blockify-pro"),className:(0,x.__)("blockify-svg-controls","blockify-pro")},(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.TextareaControl,{label:(0,x.__)("SVG String","blockify"),help:(0,x.__)("Paste your SVG string in the field above. It is recommended to format your SVG with an optimization tool ","blockify"),value:null!=u?u:"",rows:20,onChange:e=>{const t={style:{...c,svgString:e}};t.url=d?"#":Re(e),s(t)},style:{fontFamily:"var(--wp--preset--font-family--monospace, monospace)"}})),(0,a.createElement)(w.ExternalLink,{href:"https://jakearchibald.github.io/svgomg/",target:"_blank"},"https://jakearchibald.github.io/svgomg/"),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.ToggleControl,{label:(0,x.__)("Mask with text color","blockify"),help:(0,x.__)("If enabled, the SVG will be masked with the text color. (Renders inline SVG on front end).","blockify"),checked:d,onChange:e=>{const t={style:{...c,maskSvg:e}};t.url=d?"#":Re(u),s(t)}})))))}),"withSvgControls"));const Me={name:"marquee",icon:(0,a.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(C.Path,{d:"M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z"})),title:(0,x.__)("Marquee","blockify"),isDefault:!1,scope:["inserter","transform","block"],description:(0,x.__)("Adds an horizontal infinite scrolling marquee banner.","blockify"),innerBlocks:[["core/group",{layout:{type:"flex",flexWrap:"nowrap",orientation:"horizontal",justifyContent:"center"}},[["core/paragraph"]]]],attributes:{marquee:{},align:"full",speedMobile:20,speedDesktop:30,pauseOnHover:!0,reverse:!1,spacing:{padding:{right:"0",left:"0"}},layout:{type:"flex",flexWrap:"nowrap",orientation:"marquee",justifyContent:"center"}},isActive:(e,t)=>{var l,n;return(null===(l=e.layout)||void 0===l?void 0:l.orientation)===(null===(n=t.layout)||void 0===n?void 0:n.orientation)}};(0,n.registerBlockVariation)("core/group",Me);const je=e=>{var t,l;return{"--marquee-speed-mobile":(null!==(t=null==e?void 0:e.speedMobile)&&void 0!==t?t:20)+"s","--marquee-speed-desktop":(null!==(l=null==e?void 0:e.speedDesktop)&&void 0!==l?l:30)+"s","--marquee-direction":null!=e&&e.reverse?"reverse":"forwards","--marquee-pause":null!=e&&e.pauseOnHover?"paused":"running"}};(0,s.addFilter)("blocks.registerBlockType","blockify/marquee-attributes",((e,t)=>("core/group"===t&&(e={...e,attributes:{...e.attributes,speedMobile:{type:"string"},speedDesktop:{type:"string"},reverse:{type:"boolean"},pauseOnHover:{type:"boolean"},repeatItems:{type:"number"}}}),e)),0),(0,s.addFilter)("editor.BlockEdit","blockify/with-marquee-controls",(0,c.createHigherOrderComponent)((e=>t=>{var l,n;const{attributes:o,setAttributes:i}=t;return"marquee"!==(null==o||null===(l=o.layout)||void 0===l?void 0:l.orientation)?(0,a.createElement)(e,t):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(k.InspectorControls,null,(0,a.createElement)(w.PanelBody,{title:(0,x.__)("Marquee Settings","blockify-pro"),className:(0,x.__)("blockify-width-control","blockify-pro")},(0,a.createElement)("p",null,(0,x.__)("Scroll Speed (seconds)","blockify")),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)("br",null),(0,a.createElement)(w.Flex,null,(0,a.createElement)(w.FlexItem,{style:{width:"50%"}},(0,a.createElement)(w.__experimentalNumberControl,{isShiftStepEnabled:!0,label:(0,x.__)("Mobile","blockify"),onChange:e=>{i({speedMobile:e})},value:null==o?void 0:o.speedMobile})),(0,a.createElement)(w.FlexBlock,null,(0,a.createElement)(w.__experimentalNumberControl,{isShiftStepEnabled:!0,label:(0,x.__)("Desktop","blockify-pro"),onChange:e=>{i({speedDesktop:e})},value:null==o?void 0:o.speedDesktop})))),(0,a.createElement)("br",null),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.RangeControl,{label:(0,x.__)("Repeat Items","blockify"),help:(0,x.__)("How many times should the items be duplicated and cloned.","blockify"),value:null!==(n=null==o?void 0:o.repeatItems)&&void 0!==n?n:2,onChange:e=>{i({repeatItems:e})},min:0,max:10,step:1,allowReset:!0})),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.ToggleControl,{label:(0,x.__)("Pause on hover","blockify-pro"),checked:null==o?void 0:o.pauseOnHover,onChange:()=>i({pauseOnHover:!(null!=o&&o.pauseOnHover)})})),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.ToggleControl,{label:(0,x.__)("Reverse direction","blockify-pro"),checked:null==o?void 0:o.reverse,onChange:()=>i({reverse:!(null!=o&&o.reverse)})})))),(0,a.createElement)(e,t))}),"withInspectorControl")),(0,s.addFilter)("editor.BlockListBlock","blockify/with-marquee",(0,c.createHigherOrderComponent)((e=>t=>{var l,n,o,i;const{attributes:r}=t;if("marquee"!==(null==r||null===(l=r.layout)||void 0===l?void 0:l.orientation))return(0,a.createElement)(e,t);t.attributes.style={...null!==(n=r.style)&&void 0!==n?n:{},...je(r)};const s={...t.wrapperProps,style:{...null!==(o=null===(i=t.wrapperProps)||void 0===i?void 0:i.style)&&void 0!==o?o:{},...je(r)}};return(0,a.createElement)(e,E({},t,{wrapperProps:s}))}),"withMarquee")),(0,s.addFilter)("blocks.getSaveContent.extraProps","blockify/save-marquee-styles",((e,t,l)=>{var n;return"marquee"!==(null==l||null===(n=l.layout)||void 0===n?void 0:n.orientation)||(e.style={...null==e?void 0:e.style,...je(l)}),e}));var He=(0,a.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(C.Path,{d:"M18.3 4H9.9v-.1l-.9.2c-2.3.4-4 2.4-4 4.8s1.7 4.4 4 4.8l.7.1V20h1.5V5.5h2.9V20h1.5V5.5h2.7V4z"}));const Le={name:"paragraph",title:(0,x.__)("Paragraph","blockify"),icon:He,isDefault:!0,category:"text",scope:["inserter","transform","block"],description:(0,x.__)("Insert an image to make a visual statement.","blockify"),attributes:{className:""},isActive:e=>{var t,l;return!(null!=e&&null!==(t=e.className)&&void 0!==t&&t.includes("is-style-curved-text")||null!=e&&null!==(l=e.className)&&void 0!==l&&l.includes("is-style-counter"))}};(0,n.registerBlockVariation)("core/paragraph",Le);var Ve=window.wp.richText;(0,Ve.registerFormatType)("blockify/clear-formatting",{title:(0,x.__)("Clear","blockify"),tagName:"span",className:"clear",edit:e=>{const{value:t,isActive:l,onChange:n}=e,{formatTypes:o}=(0,v.useSelect)((e=>({formatTypes:e("core/rich-text").getFormatTypes()})));return(0,a.createElement)(k.RichTextToolbarButton,{icon:"editor-removeformatting",title:(0,x.__)("Clear Formatting","blockify"),onClick:()=>{if(o.length>0){let e=t;o.map((t=>{e=(0,Ve.removeFormat)(e,t.name)})),n({...e})}},isActive:l})}});var Ge=(0,a.createElement)(C.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(C.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"}));const We="blockify/gradient";(0,Ve.registerFormatType)(We,{title:(0,x.__)("Gradient","blockify"),tagName:"span",className:"has-text-gradient",attributes:{style:"style",class:"class"},edit:e=>{let{isActive:t,value:l,onChange:n}=e;const[o,i]=(0,a.useState)(""),[r,s]=(0,a.useState)(!1),{gradients:c}=(0,v.useSelect)((e=>{var t;return{gradients:null===(t=e("core/block-editor").getSettings())||void 0===t?void 0:t.gradients}}));let u="",d="";return null!=l&&l.formats&&l.formats.map((e=>{var t,l;(null==e?void 0:e.type)===We&&(u+=";"+(null==e||null===(t=e.attributes)||void 0===t?void 0:t.style),d+=null==e||null===(l=e.attributes)||void 0===l?void 0:l.class)})),(0,a.createElement)(k.BlockControls,null,(0,a.createElement)(k.RichTextShortcut,{type:"primary",character:"g",onUse:()=>{}}),(0,a.createElement)(k.RichTextToolbarButton,{icon:Ge,title:(0,x.__)("Gradient","blockify"),isActive:t,shortcutType:"primary",shortcutCharacter:"g",onClick:()=>s(!r)}),r&&(0,a.createElement)(w.Toolbar,{className:"blockify-components-toolbar"},(0,a.createElement)(w.Popover,{position:"bottom center",className:"blockify-gradient-text-control",focusOnMount:"container",onFocusOutside:()=>s(!1)},(0,a.createElement)(w.GradientPicker,{value:null!=o?o:"",gradients:c,onChange:e=>{var t;i(e);let o=u,r=d;var a,s;c.forEach((t=>{t.gradient===e&&(r+=(r?" ":"")+"has-"+t.slug+"-gradient-background")})),e&&!r.includes("-gradient-background")&&(o+=(o?o+";":"")+"background:"+e),null!==(t=r)&&void 0!==t&&t.includes("has-text-gradient")&&(r=(null===(a=r)||void 0===a||null===(s=a.replace("has-text-gradient",""))||void 0===s?void 0:s.trim())+" has-text-gradient"),n((0,Ve.applyFormat)(l,{type:We,attributes:{style:o,class:r}}))}}))))}});var Ue=(0,a.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(C.Path,{d:"M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z"}));const $e=e=>Object.keys(e).map((t=>`${null!=t&&t.includes("-")?t:T(t)}:${e[t]};`)).join(" "),qe=e=>{const t={};return e.split(";").map((e=>{const[l,n]=e.split(":");l&&(t[l]=n)})),t};w.CustomSelectControl.Option;const Xe="blockify/typography",Ye=[{key:"Default",name:"Default",style:{}},{key:"Thin",name:"Thin",style:{fontStyle:"normal",fontWeight:100}},{key:"Extra Light",name:"Extra Light",style:{fontStyle:"normal",fontWeight:200}},{key:"Light",name:"Light",style:{fontStyle:"normal",fontWeight:300}},{key:"Regular",name:"Regular",style:{fontStyle:"normal",fontWeight:400}},{key:"Medium",name:"Medium",style:{fontStyle:"normal",fontWeight:500}},{key:"Semi Bold",name:"Semi Bold",style:{fontStyle:"normal",fontWeight:600}},{key:"Bold",name:"Bold",style:{fontStyle:"normal",fontWeight:700}},{key:"Extra Bold",name:"Extra Bold",style:{fontStyle:"normal",fontWeight:800}},{key:"Black",name:"Black",style:{fontStyle:"normal",fontWeight:900}},{key:"Thin Italic",name:"Thin Italic",style:{fontStyle:"italic",fontWeight:100}},{key:"Extra Light Italic",name:"Extra Light Italic",style:{fontStyle:"italic",fontWeight:200}},{key:"Light Italic",name:"Light Italic",style:{fontStyle:"italic",fontWeight:300}},{key:"Regular Italic",name:"Regular Italic",style:{fontStyle:"italic",fontWeight:400}},{key:"Medium Italic",name:"Medium Italic",style:{fontStyle:"italic",fontWeight:500}},{key:"Semi Bold Italic",name:"Semi Bold Italic",style:{fontStyle:"italic",fontWeight:600}},{key:"Bold Italic",name:"Bold Italic",style:{fontStyle:"italic",fontWeight:700}},{key:"Extra Bold Italic",name:"Extra Bold Italic",style:{fontStyle:"italic",fontWeight:800}},{key:"Black Italic",name:"Black Italic",style:{fontStyle:"italic",fontWeight:900}}];(0,Ve.registerFormatType)(Xe,{title:(0,x.__)("Typography","blockify"),tagName:"span",className:"has-font",edit(e){var t,l,n;const{isActive:o,value:i,onChange:r}=e,{fontSizes:s}=(0,v.useSelect)((e=>{var t;return{fontSizes:null===(t=e("core/block-editor").getSettings())||void 0===t?void 0:t.fontSizes}})),c=null!==(t=null===(l=window)||void 0===l||null===(n=l.blockify)||void 0===n?void 0:n.fontFamilies)&&void 0!==t?t:[],u=null==c?void 0:c.map((e=>({label:S(null==e?void 0:e.replace("-"," ")),value:e})));let d="",m="";null!=i&&i.formats&&i.formats.map((e=>{var t,l;(null==e?void 0:e.type)===name&&(d+=";"+(null==e||null===(t=e.attributes)||void 0===t?void 0:t.style),m+=null==e||null===(l=e.attributes)||void 0===l?void 0:l.class)}));const[p,f]=(0,a.useState)({style:qe(d),class:m.split(" "),fontFamily:"",fontSize:"",fontAppearance:Ye[0],isOpen:!1});return(0,a.createElement)(k.BlockControls,null,(0,a.createElement)(k.RichTextShortcut,{type:"primary",character:"g",onUse:()=>{}}),(0,a.createElement)(k.RichTextToolbarButton,{icon:Ue,title:(0,x.__)("Typography","blockify"),isActive:o,shortcutType:"primary",shortcutCharacter:"f",onClick:()=>f({...p,isOpen:!p.isOpen})}),(null==p?void 0:p.isOpen)&&(0,a.createElement)(w.Toolbar,{className:"blockify-components-toolbar"},(0,a.createElement)(w.Popover,{position:"bottom center",className:"blockify-font-family-control",focusOnMount:"container",onFocusOutside:()=>f({...p,isOpen:!1})},(0,a.createElement)(w.SelectControl,{label:(0,x.__)("Select Font Family","blockify"),value:null==p?void 0:p.fontFamily,options:u,onChange:e=>{var t,l;f({...p,fontFamily:e});const n="has-"+e+"-font-family";var o;null!=p&&null!==(t=p.class)&&void 0!==t&&t.includes(n)||null==p||null===(o=p.class)||void 0===o||o.push(n),r((0,Ve.applyFormat)(i,{type:Xe,attributes:{style:$e(null==p?void 0:p.style),class:null==p||null===(l=p.class)||void 0===l?void 0:l.join(" ")}}))}}),(0,a.createElement)(w.FontSizePicker,{fontSizes:s,fallbackFontSize:20,value:parseInt(null==p?void 0:p.fontSize),withSlider:!0,onChange:e=>{var t,l;f({...p,fontSize:e.toString()}),e&&(p.style["--wp--custom--font-size"]=e.toString()),null!=p&&null!==(t=p.class)&&void 0!==t&&t.includes("has-inline-font-size")||p.class.push("has-inline-font-size"),r((0,Ve.applyFormat)(i,{type:Xe,attributes:{style:$e(null==p?void 0:p.style),class:null==p||null===(l=p.class)||void 0===l?void 0:l.join(" ")}}))}}),(0,a.createElement)(w.CustomSelectControl,{label:(0,x.__)("Appearance","blockify"),value:Ye.find((e=>{var t;return e.key===(null==p||null===(t=p.fontAppearance)||void 0===t?void 0:t.key)})),options:null!=Ye?Ye:[],onChange:e=>{var t,l,n;let{selectedItem:o}=e;var a,s,c;o&&f({...p,fontAppearance:o}),null!=o&&null!==(t=o.style)&&void 0!==t&&t.fontStyle&&(p.style["font-style"]=null==o||null===(a=o.style)||void 0===a?void 0:a.fontStyle),null!=o&&null!==(l=o.style)&&void 0!==l&&l.fontWeight&&(p.style["font-weight"]=null==o||null===(s=o.style)||void 0===s||null===(c=s.fontWeight)||void 0===c?void 0:c.toString()),r((0,Ve.applyFormat)(i,{type:Xe,attributes:{style:$e(null==p?void 0:p.style),class:null==p||null===(n=p.class)||void 0===n?void 0:n.join(" ")}}))}}))))}});var Ze=(0,a.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(C.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));const Ke="blockify/inline-svg";(0,Ve.registerFormatType)(Ke,{title:(0,x.__)("Inline SVG","blockify"),object:!0,tagName:"img",className:"has-inline-svg",edit(e){const{isActive:t,onChange:l,value:n}=e,[o,i]=(0,a.useState)(!1),[r,s]=(0,a.useState)({string:"",width:"1em",widthDesktop:"1em",alt:"",src:""});return(0,a.createElement)(k.BlockControls,null,(0,a.createElement)(k.RichTextShortcut,{type:"primary",character:"v",onUse:()=>{}}),(0,a.createElement)(k.RichTextToolbarButton,{icon:Ze,title:(0,x.__)("Inline SVG","blockify"),isActive:t,shortcutType:"primary",shortcutCharacter:"v",onClick:()=>i(!o)}),o&&(0,a.createElement)(w.Toolbar,{className:"blockify-components-toolbar"},(0,a.createElement)(w.Popover,{position:"bottom center",className:"blockify-svg-control",focusOnMount:"container",onFocusOutside:()=>i(!1)},(0,a.createElement)(w.TextareaControl,{label:(0,x.__)("SVG String","blockify"),help:(0,x.__)("Paste your SVG string in the field above and then click the button below to insert your image.","blockify"),value:null==r?void 0:r.string,placeholder:(0,x.__)("Paste your SVG string here","blockify"),rows:20,onChange:e=>{s({...r,string:e.replace(/'/g,'"')})},style:{fontFamily:"var(--wp--preset--font-family--monospace, monospace)",width:"300px"}}),(0,a.createElement)("br",null),(0,a.createElement)(w.TextareaControl,{label:(0,x.__)("Alt Text","blockify"),placeholder:(0,x.__)("SVG description","blockify"),value:null==r?void 0:r.alt,rows:2,onChange:e=>{s({...r,alt:e})},style:{width:"300px"}}),(0,a.createElement)(w.PanelRow,null,(0,a.createElement)(w.Flex,null,(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalUnitControl,{label:(0,x.__)("Width Mobile","blockify"),value:null==r?void 0:r.width,onChange:e=>{s({...r,width:e})}})),(0,a.createElement)(w.FlexItem,null,(0,a.createElement)(w.__experimentalUnitControl,{label:(0,x.__)("Width Desktop","blockify"),value:null==r?void 0:r.widthDesktop,onChange:e=>{s({...r,widthDesktop:e})}})))),(0,a.createElement)("br",null),(0,a.createElement)(w.Button,{isPrimary:!0,text:(0,x.__)("Insert SVG","blockify"),onClick:()=>(e=>{let t="data:image/svg+xml;utf8,"+encodeURIComponent(e.string),o="";null!=e&&e.width&&(o+=`;--width: ${null==e?void 0:e.width}`),null!=e&&e.widthDesktop&&(o+=`;--width-desktop: ${null==e?void 0:e.widthDesktop}`),l((0,Ve.insertObject)(n,{type:Ke,attributes:{style:o,alt:null==e?void 0:e.alt,role:"presentation",src:t}})),i(!1)})(r)}))))}});var Je=(0,a.createElement)(C.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(C.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"}));const Qe="blockify/underline",et=["none","solid","wavy","dashed","dotted","double","brush","circle"];(0,Ve.registerFormatType)(Qe,{title:(0,x.__)("Underline","blockify"),tagName:"u",className:"has-text-underline",attributes:{style:"style",class:"class"},edit:e=>{let{isActive:t,value:l,onChange:n}=e;const[o,i]=(0,a.useState)(""),[r,s]=(0,a.useState)(!1);let c=[],u=[];return null!=l&&l.formats&&l.formats.map((e=>{if((null==e?void 0:e.type)===Qe){var t,l;const n=null==e?void 0:e.attributes;c=(null!==(t=null==n?void 0:n.style)&&void 0!==t?t:"").split(";"),u=(null!==(l=null==n?void 0:n.classes)&&void 0!==l?l:"").split(" ")}})),(0,a.createElement)(k.BlockControls,null,(0,a.createElement)(k.RichTextShortcut,{type:"primary",character:"u",onUse:()=>{n((0,Ve.toggleFormat)(l,{type:Qe}))}}),(0,a.createElement)(k.RichTextToolbarButton,{icon:Je,title:(0,x.__)("Underline","blockify"),isActive:t,shortcutType:"primary",shortcutCharacter:"u",onClick:()=>s(!r)}),r&&(0,a.createElement)(w.Toolbar,{className:"blockify-components-toolbar"},(0,a.createElement)(w.Popover,{position:"bottom center",className:"blockify-underline-format",focusOnMount:"container",onFocusOutside:()=>s(!1)},(0,a.createElement)(w.__experimentalText,null,(0,x.__)("Underline style","blockify")),(0,a.createElement)("br",null),(0,a.createElement)(w.SelectControl,{onChange:e=>{var t,o;"none"===e&&n((0,Ve.removeFormat)(l,Qe)),i(e);let r=null!==(t=u)&&void 0!==t?t:[];r.forEach(((e,t)=>{e.includes("is-underline-")&&delete a.classes[t]}));const a={classes:[...r,"is-underline-"+e],styles:[...null!==(o=c)&&void 0!==o?o:[],"--wp--custom--underline--style:"+e]};n((0,Ve.applyFormat)(l,{type:Qe,attributes:{class:a.classes.join(" "),style:a.styles.join(";")}}))},value:o,options:et.map((e=>{return{label:(t=e,t.charAt(0).toUpperCase()+t.slice(1)),value:e};var t}))}))))}})}()}();