/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 y(e){return(0,r.isTag)(e)}function h(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 E(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(y(e)){var n=t?w(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(h(e)){n=t?w(e.children):[];var a=new p(r.ElementType.CDATA,n);n.forEach((function(e){return e.parent=a})),l=a}else if(E(e)){n=t?w(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 w(e){for(var t=e.map((function(e){return x(e,!0)})),l=1;l1&&(u=v(u,{key:u.key||k})),h.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}E>1&&(d.key=k),h.push(f(i.name,d,m))}else{if((c=!i.data.trim().length)&&i.parent&&!a(i.parent))continue;if(g&&c)continue;h.push(i.data)}return 1===h.length?h[0]:h}},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 y(e){return(0,r.isTag)(e)}function h(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 E(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(y(e)){var n=t?w(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(h(e)){n=t?w(e.children):[];var a=new p(r.ElementType.CDATA,n);n.forEach((function(e){return e.parent=a})),l=a}else if(E(e)){n=t?w(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 w(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{let{children:l}=t;return(0,e.createElement)("p",{className:"blockify-control-label"},l)};var c=window.wp.primitives;const u=()=>(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 120 120",xmlSpace:"preserve"},(0,e.createElement)(c.Path,{d:"M15 0h35v120H15zm55 0h35v120H70z"}));var d,m,p,v=e=>{var t;return e?null==e||null===(t=e.toLowerCase())||void 0===t?void 0:t.replace(/(?<= )[^\s]|^./g,(e=>null==e?void 0:e.toUpperCase())):""},f=(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.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 y=[{value:"ease",label:(0,t.__)("Ease","blockify")},{value:"ease-in",label:(0,t.__)("Ease In","blockify")},{value:"ease-out",label:(0,t.__)("Ease Out","blockify"),isDefault:!0},{value:"ease-in-out",label:(0,t.__)("Ease In Out","blockify")},{value:"linear",label:(0,t.__)("Linear","blockify")}],h=[{value:"",label:""}];null===(d=window)||void 0===d||null===(m=d.blockify)||void 0===m||null===(p=m.animations)||void 0===p||p.forEach((e=>{h.push({value:e,label:v(null==e?void 0:e.replace(/-/g," "))})}));const b=[{value:"enter",label:(0,t.__)("Enter","blockify"),isDefault:!0},{value:"exit",label:(0,t.__)("Exit","blockify")},{value:"infinite",label:(0,t.__)("Infinite","blockify")}],g=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.blockifyAnimation)&&void 0!==t&&t};(0,n.addFilter)("blocks.registerBlockType","blockify/add-animation-attributes",((e,t)=>(g(t)&&(e.attributes={...e.attributes,animation:{type:"object"}}),e)),0);const k=e=>{const t={};var l,n,o,i,r,a,s;return null!=e&&e.event&&(t["--animation-event"]=null!==(l=e.event)&&void 0!==l?l:"enter","infinite"===e.event&&(t.animationIterationCount="infinite")),null!=e&&e.name&&(t.animationName=null!==(n=e.name)&&void 0!==n?n:""),null!=e&&e.duration&&(t.animationDuration=(null!==(o=e.duration)&&void 0!==o?o:"1")+"s"),null!=e&&e.delay&&(t.animationDelay=(null!==(i=e.delay)&&void 0!==i?i:"0")+"s"),null!=e&&e.timingFunction&&(t.animationTimingFunction=null!==(r=null==e?void 0:e.timingFunction)&&void 0!==r?r:"ease-in-out"),null!=t&&t.animationIterationCount||(t.animationIterationCount=null!==(a=null==e?void 0:e.iterationCount)&&void 0!==a?a:"1"),null!=e&&e.playState&&(t.animationPlayState=null!==(s=null==e?void 0:e.playState)&&void 0!==s?s:"running"),t};(0,n.addFilter)("editor.BlockListBlock","blockify/with-animation-props",(0,o.createHigherOrderComponent)((t=>l=>{var n,o,i,r,s,c,u;const{attributes:d}=l,m=null!==(n=null==d?void 0:d.animation)&&void 0!==n?n:{};if(!m||null==Object||null===(o=Object.keys(m))||void 0===o||!o.length)return(0,e.createElement)(t,l);const p=k(m),v={...null==l?void 0:l.wrapperProps,className:null!==(i=null==l||null===(r=l.wrapperProps)||void 0===r?void 0:r.className)&&void 0!==i?i:"",style:{...null==l||null===(s=l.wrapperProps)||void 0===s?void 0:s.style,...p}};return l.className=(null==l||null===(c=l.className)||void 0===c?void 0:c.trim())+" has-animation",v.className=(null==v||null===(u=v.className)||void 0===u?void 0:u.trim())+" has-animation",(0,e.createElement)(t,a({},l,{wrapperProps:v}))}),"withAnimation")),(0,n.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-animation-styles",((e,t,l)=>{var n,o,i;const r=null!==(n=null==l?void 0:l.animation)&&void 0!==n?n:{};if(!r||null==Object||null===(o=Object.keys(r))||void 0===o||!o.length)return e;e.className=(null==e||null===(i=e.className)||void 0===i?void 0:i.trim())+" has-animation";const a=k(r);return{...e,style:{...null==e?void 0:e.style,...a}}}));const E=l=>{var n,o,i,a,c,d,m;let{attributes:p,setAttributes:v}=l;const g=null!==(n=null==p?void 0:p.animation)&&void 0!==n?n:{};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(s,null,(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,(0,t.__)("Animation","blockify")),(0,e.createElement)(r.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>v({animation:{}}),icon:f,iconSize:16,"aria-label":(0,t.__)("Clear Animation","blockify")}))),(0,e.createElement)(r.Flex,{justify:"flex-end"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.Button,{isSecondary:!0,isSmall:!0,icon:"running"===(null==g?void 0:g.playState)?u:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",fill:"currentColor"},(0,e.createElement)("polygon",{points:"10,5 0,10 0,0"})),iconSize:10,onClick:()=>{v({animation:{...g,playState:"running"===(null==g?void 0:g.playState)?"paused":"running"}})}},"running"===(null==g?void 0:g.playState)?(0,t.__)("Pause","blockify"):(0,t.__)("Run","blockify"))))),(0,e.createElement)(r.PanelRow,{className:"blockify-animate-controls"},(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.SelectControl,{label:(0,t.__)("Effect","blockify"),value:null!==(o=null==g?void 0:g.name)&&void 0!==o?o:"",options:h,onChange:e=>{var t;v({animation:{...g,name:e,duration:null!==(t=null==g?void 0:g.duration)&&void 0!==t?t:1}})}}))),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.SelectControl,{label:(0,t.__)("Easing","blockify"),value:null!==(i=null==g?void 0:g.timingFunction)&&void 0!==i?i:"",options:y,onChange:e=>{v({animation:{...g,timingFunction:e}})}}))),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.SelectControl,{label:(0,t.__)("Event","blockify"),value:null!==(a=null==g?void 0:g.event)&&void 0!==a?a:"enter",options:b,onChange:e=>{v({animation:{...g,event:e,iterationCount:"infinite"===e?"-1":"-1"===(null==g?void 0:g.iterationCount)?"1":null==g?void 0:g.iterationCount}})}})))),(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Duration","blockify"),help:(0,t.__)("The duration of the animation in milliseconds. Leave empty or 0 for infinite.","blockify"),value:null!==(c=null==g?void 0:g.duration)&&void 0!==c?c:1,onChange:e=>{v({animation:{...g,duration:e}})},min:0,max:100,step:.1,shifStep:10,allowReset:!0})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Delay","blockify"),help:(0,t.__)("The delay for the animation when block enters viewport.","blockify"),value:null!==(d=null==g?void 0:g.delay)&&void 0!==d?d:0,onChange:e=>{v({animation:{...g,delay:e}})},min:0,max:100,step:.1,shifStep:10,allowReset:!0})),(0,e.createElement)(r.FlexItem,null,"infinite"!==(null==g?void 0:g.event)&&(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Repeat","blockify"),help:(0,t.__)("The number of times the animation should be performed.","blockify"),value:"infinite"===(null==g?void 0:g.event)?-1:null!==(m=null==g?void 0:g.iterationCount)&&void 0!==m?m:1,onChange:e=>{v({animation:{...g,iterationCount:e}})},min:-1,max:100,step:1,allowReset:!0})))))};var x,w,_,S=(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.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"})),C=(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.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"}));const T=null!==(x=null===(w=window)||void 0===w||null===(_=w.blockify)||void 0===_?void 0:_.blockSupports)&&void 0!==x?x:{},N=e=>{var t,l;return null!==(t=null==T||null===(l=T[e])||void 0===l?void 0:l.blockifyPosition)&&void 0!==t&&t},I=["","none","block","inline-block","inline","flex","inline-flex","grid","inline-grid"],F=(l,n)=>{var o,i,a,s,c,u;const{attributes:d,setAttributes:m}=l,{style:p}=d;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.PanelRow,{className:"blockify-display-controls"},(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.SelectControl,{label:(0,t.__)("Display","blockify"),value:null!==(o=null==p||null===(i=p.display)||void 0===i?void 0:i[n])&&void 0!==o?o:"",options:I.map((e=>({label:v(null==e?void 0:e.replace("-"," ")),value:e}))),onChange:e=>{m({style:{...p,display:{...null==p?void 0:p.display,[n]:e}}})}})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Order","blockify"),value:null!==(a=null==p||null===(s=p.order)||void 0===s?void 0:s[n])&&void 0!==a?a:"",onChange:e=>{m({style:{...p,order:{...null==p?void 0:p.order,[n]:e}}})},min:-10,max:10,step:1,allowReset:!0}))),(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalUnitControl,{label:(0,t.__)("Width","blockify"),value:null==p||null===(c=p.width)||void 0===c?void 0:c[n],onChange:e=>{m({style:{...p,width:{...null==p?void 0:p.width,[n]:e}}})}})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalUnitControl,{label:(0,t.__)("Max Width","blockify"),value:null==p||null===(u=p.maxWidth)||void 0===u?void 0:u[n],onChange:e=>{m({style:{...p,maxWidth:{...null==p?void 0:p.maxWidth,[n]:e}}})}})))))},P=l=>{const{attributes:n,setAttributes:o}=l,[i,a]=(0,e.useState)("all");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(s,null,(0,e.createElement)(e.Fragment,null,(0,t.__)("Display","blockify"),(0,e.createElement)(r.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{o({style:{...null==n?void 0:n.style,display:"",order:"",width:"",maxWidth:""}})},icon:f,iconSize:16,"aria-label":(0,t.__)("Reset Display","blockify")}))),(0,e.createElement)(r.ButtonGroup,null,(0,e.createElement)(r.Button,{isSmall:!0,variant:"all"===i?"primary":"secondary",onClick:()=>a("all")},(0,t.__)("All","blockify")),(0,e.createElement)(r.Button,{isSmall:!0,variant:"mobile"===i?"primary":"secondary",onClick:()=>a("mobile"),icon:S}),(0,e.createElement)(r.Button,{isSmall:!0,variant:"desktop"===i?"primary":"secondary",onClick:()=>a("desktop"),icon:C}))),"all"===i&&F(l,i),"mobile"===i&&F(l,i),"desktop"===i&&F(l,i))},O=e=>{var t,l,n;return e&&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:""},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.blockifyFilter)&&void 0!==t&&t},A={blur:{unit:"px",min:0,max:500},brightness:{unit:"%",min:0,max:360},contrast:{unit:"%",min:0,max:200},grayscale:{unit:"%",min:0,max:100},hueRotate:{unit:"deg",min:-360,max:360},invert:{unit:"%",min:0,max:100},opacity:{unit:"%",min:0,max:100},saturate:{unit:"",min:0,max:100,step:.1},sepia:{unit:"%",min:0,max:100}};(0,n.addFilter)("blocks.registerBlockType","blockify/add-css-transform-attributes",((e,t)=>{var l,n;return B(t)?(e.attributes={...e.attributes,style:{...null!==(l=null==e||null===(n=e.attributes)||void 0===n?void 0:n.style)&&void 0!==l?l:{},filter:{type:"string"}}},e):e}));const D=e=>{let t="";return Object.keys(A).forEach((l=>{var n;null!=e&&e.hasOwnProperty(l)&&void 0!==e[l]&&(t+=" "+O(l)+"("+e[l]+(null==A||null===(n=A[l])||void 0===n?void 0:n.unit)+")")})),t?{[null!=e&&e.backdrop?"backdrop-filter":"filter"]:t.trim()}:{}};(0,n.addFilter)("editor.BlockListBlock","blockify/with-css-filter",(0,o.createHigherOrderComponent)((t=>l=>{var n,o,i,r,s;const c=null!==(n=null==l||null===(o=l.attributes)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.filter)&&void 0!==n?n:{},u=(0,e.createElement)(t,l);if(!c||c==={})return u;const d=D(c);if(!Object.keys(d).length)return u;l.style={...null!==(r=l.style)&&void 0!==r?r:{},...d};const m={...l.wrapperProps,style:{...null===(s=l.wrapperProps)||void 0===s?void 0:s.style,...d}};return(0,e.createElement)(t,a({},l,{wrapperProps:m}))}),"withCssFilter")),(0,n.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-filter-styles",((e,t,l)=>{var n,o;const i=null!==(n=null==l||null===(o=l.style)||void 0===o?void 0:o.filter)&&void 0!==n?n:{};if(!i||i==={})return e;const r=D(i);return Object.keys(r).length?{...e,style:{...null==e?void 0:e.style,...r}}:e}));const M=l=>{var n;const{attributes:o,setAttributes:i}=l,{style:a}=o;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(s,null,(0,e.createElement)(e.Fragment,null,(0,t.__)("Filter","blockify"),(0,e.createElement)(r.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{i({style:{...null==o?void 0:o.style,filter:{}}})},icon:f,iconSize:16,"aria-label":(0,t.__)("Clear Filters","blockify")}))),(0,e.createElement)(r.PanelRow,{className:"blockify-filter-settings"},Object.keys(A).map((l=>{var n,o,s,c,u,d;return(0,e.createElement)(r.__experimentalNumberControl,{label:"hueRotate"===l?(0,t.__)("Hue Rotate","blockify"):v(l),value:null==a||null===(n=a.filter)||void 0===n?void 0:n[l],onChange:e=>{var t;i({style:{...a,filter:{...null!==(t=null==a?void 0:a.filter)&&void 0!==t?t:{},[l]:e}}})},min:null!==(o=null==A||null===(s=A[l])||void 0===s?void 0:s.min)&&void 0!==o?o:0,max:null==A||null===(c=A[l])||void 0===c?void 0:c.max,step:null!==(u=null==A||null===(d=A[l])||void 0===d?void 0:d.step)&&void 0!==u?u:1,allowReset:!0})}))),(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.ToggleControl,{label:(0,t.__)("Use as backdrop filter","blockify"),checked:null==a||null===(n=a.filter)||void 0===n?void 0:n.backdrop,onChange:e=>{i({style:{...a,filter:{...null==a?void 0:a.filter,backdrop:e}}})}})))};var z,R,j,V,L,H;const G=null!==(z=null===(R=window)||void 0===R||null===(j=R.blockify)||void 0===j?void 0:j.blockSupports)&&void 0!==z?z:{},W=e=>{var t,l;return null!==(t=null==G||null===(l=G[e])||void 0===l?void 0:l.blockifyPosition)&&void 0!==t&&t},U=null!==(V=null===(L=window)||void 0===L||null===(H=L.blockify)||void 0===H?void 0:H.positionOptions)&&void 0!==V?V:{};(0,n.addFilter)("blocks.registerBlockType","blockify/add-position-attributes",((e,t)=>{if(W(t)){var l,n;let t={};Object.keys(U).forEach((e=>{t[e]={type:"object"}})),e.attributes={...e.attributes,style:{...t,...null!==(l=null==e||null===(n=e.attributes)||void 0===n?void 0:n.style)&&void 0!==l?l:{}}}}return e}),0);const $=e=>{var t;let l=[];const n=null!==(t=null==e?void 0:e.style)&&void 0!==t?t:{};return Object.keys(U).forEach((e=>{var t;const o=O(e);var i,r,a,s,c,u,d,m,p;null!=U&&null!==(t=U[e])&&void 0!==t&&t.options?(null!==(i=null==n||null===(r=n[e])||void 0===r?void 0:r.all)&&void 0!==i&&i&&l.push(`has-${o}-${O(null==n||null===(d=n[e])||void 0===d?void 0:d.all)}`),null!==(a=null==n||null===(s=n[e])||void 0===s?void 0:s.mobile)&&void 0!==a&&a&&l.push(`has-${o}-${O(null==n||null===(m=n[e])||void 0===m?void 0:m.mobile)}-mobile`),null!==(c=null==n||null===(u=n[e])||void 0===u?void 0:u.desktop)&&void 0!==c&&c&&l.push(`has-${o}-${O(null==n||null===(p=n[e])||void 0===p?void 0:p.desktop)}-desktop`)):null!=n&&n[e]&&l.push(`has-${o}`)})),l},q=e=>{var t;let l={};const n=null!==(t=null==e?void 0:e.style)&&void 0!==t?t:{};return Object.keys(U).forEach((e=>{var t,o,i,r,a,s,c;if(null!=U&&null!==(t=U[e])&&void 0!==t&&t.options)return;const u=O(e);var d,m,p;null!==(o=null==n||null===(i=n[e])||void 0===i?void 0:i.all)&&void 0!==o&&o&&(l[`--${u}`]=null==n||null===(d=n[e])||void 0===d?void 0:d.all),null!==(r=null==n||null===(a=n[e])||void 0===a?void 0:a.mobile)&&void 0!==r&&r&&(l[`--${u}-mobile`]=null==n||null===(m=n[e])||void 0===m?void 0:m.mobile),null!==(s=null==n||null===(c=n[e])||void 0===c?void 0:c.desktop)&&void 0!==s&&s&&(l[`--${u}-desktop`]=null==n||null===(p=n[e])||void 0===p?void 0:p.desktop)})),l};(0,n.addFilter)("editor.BlockListBlock","blockify/with-position-style",(0,o.createHigherOrderComponent)((t=>l=>{var n;const{name:o,attributes:i}=l;if(!W(o))return(0,e.createElement)(t,l);const r=$(i),a=q(i);let s=null!==(n=null==l?void 0:l.wrapperProps)&&void 0!==n?n:{};return l.style={...null==l?void 0:l.style,...a},s&&(s.style={...null==s?void 0:s.style,...a}),r.forEach((e=>{var t;null!=l&&null!==(t=l.className)&&void 0!==t&&t.includes(e)||(l.className=(null==l?void 0:l.className)+" "+e)})),l.wrapperProps=s,(0,e.createElement)(t,l)}),"withPositionStyle")),(0,n.addFilter)("blocks.getSaveContent.extraProps","blockify/save-position-style",(e=>{var t;const{name:l,attributes:n}=e;if(null==G||null===(t=G[l])||void 0===t||!t.blockifyPosition)return e;const o=$(n),i=q(n);return o.forEach((t=>{var l;null!=e&&null!==(l=e.className)&&void 0!==l&&l.includes(t)||(e.className=(null==e?void 0:e.className)+" "+t)})),e.style={...null==e?void 0:e.style,...i},e}),11);const X=(l,n)=>{var o,i,a,s,c,u,d,m,p,v,f,y,h,b,g,k,E,x,w,_;const{attributes:S,setAttributes:C}=l,T=null!==(o=null==S?void 0:S.style)&&void 0!==o?o:{},N=e=>{let t={};Object.keys(e).forEach((l=>{t[l]={...null==T?void 0:T[l],[n]:e[l]}})),C({style:{...T,...t}})};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.SelectControl,{label:(0,t.__)("Position","blockify"),value:null!==(i=null==T||null===(a=T.position)||void 0===a?void 0:a[n])&&void 0!==i?i:"",options:null==U||null===(s=U.position)||void 0===s?void 0:s.options,onChange:e=>{N({position:e})}})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:null==U||null===(c=U.zIndex)||void 0===c?void 0:c.label,value:null==T||null===(u=T.zIndex)||void 0===u?void 0:u[n],onChange:e=>{N({zIndex:e})},min:-100,max:100,step:1,allowReset:!0})))),(null==T?void 0:T.position)&&(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.SelectControl,{label:(0,t.__)("Overflow","blockify"),value:null!==(d=null==T||null===(m=T.overflow)||void 0===m?void 0:m[n])&&void 0!==d?d:"",options:null==U||null===(p=U.overflow)||void 0===p?void 0:p.options,onChange:e=>{N({overflow:e})}})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.SelectControl,{label:(0,t.__)("Pointer Events","blockify"),value:null!==(v=null==T||null===(f=T.pointerEvents)||void 0===f?void 0:f[n])&&void 0!==v?v:"",options:null==U||null===(y=U.pointerEvents)||void 0===y?void 0:y.options,onChange:e=>{N({pointerEvents:e})}})))),(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.__experimentalBoxControl,{className:"blockify-box-control",label:(0,t.__)("Inset","blockify"),values:{top:null!==(h=null==T||null===(b=T.top)||void 0===b?void 0:b[n])&&void 0!==h?h:"",right:null!==(g=null==T||null===(k=T.right)||void 0===k?void 0:k[n])&&void 0!==g?g:"",bottom:null!==(E=null==T||null===(x=T.bottom)||void 0===x?void 0:x[n])&&void 0!==E?E:"",left:null!==(w=null==T||null===(_=T.left)||void 0===_?void 0:_[n])&&void 0!==w?w:""},onChange:e=>{var t,l,n,o;N({top:null!==(t=null==e?void 0:e.top)&&void 0!==t?t:"",right:null!==(l=null==e?void 0:e.right)&&void 0!==l?l:"",bottom:null!==(n=null==e?void 0:e.bottom)&&void 0!==n?n:"",left:null!==(o=null==e?void 0:e.left)&&void 0!==o?o:""})},inputProps:{min:-999}})))},Y=l=>{const{attributes:n,setAttributes:o}=l,[i,a]=(0,e.useState)("all");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(s,null,(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,(0,t.__)("Position","blockify")),(0,e.createElement)(r.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{o({style:{...null==n?void 0:n.style,position:"",zIndex:"",top:"",right:"",bottom:"",left:""}})},icon:f,iconSize:16,"aria-label":(0,t.__)("Reset Position","blockify")}))),(0,e.createElement)(r.ButtonGroup,null,(0,e.createElement)(r.Button,{isSmall:!0,variant:"all"===i?"primary":"tertiary",onClick:()=>a("all")},(0,t.__)("All","blockify")),(0,e.createElement)(r.Button,{isSmall:!0,variant:"mobile"===i?"primary":"tertiary",onClick:()=>a("mobile"),icon:S}),(0,e.createElement)(r.Button,{isSmall:!0,variant:"desktop"===i?"primary":"tertiary",onClick:()=>a("desktop"),icon:C}))),"all"===i&&X(l,i),"mobile"===i&&X(l,i),"desktop"===i&&X(l,i))},Z=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};(0,n.addFilter)("blocks.registerBlockType","blockify/add-box-shadow-attributes",((e,t)=>{var l,n;return Z(t)&&(e.attributes={...e.attributes,style:{...null!==(l=null==e||null===(n=e.attributes)||void 0===n?void 0:n.style)&&void 0!==l?l:{},boxShadow:{type:"object"}}}),e}),0);const K=e=>{var t,l;const n=null!==(t=null==e||null===(l=e.style)||void 0===l?void 0:l.boxShadow)&&void 0!==t?t:{};let o={};const i={inset:"",x:"px",y:"px",blur:"px",spread:"px",color:""};return Object.keys(i).map((e=>{var t,l,r,a,s;(null!=n&&n[e]||"0"===(null==n||null===(t=n[e])||void 0===t?void 0:t.toString()))&&(o["--wp--custom--box-shadow--"+e]=(null==n?void 0:n[e])+(null==i?void 0:i[e])),(null!=n&&null!==(l=n.hover)&&void 0!==l&&l[e]||"0"===(null==n||null===(r=n.hover)||void 0===r||null===(a=r[e])||void 0===a?void 0:a.toString()))&&(o["--wp--custom--box-shadow--hover--"+e]=(null==n||null===(s=n.hover)||void 0===s?void 0:s[e])+(null==i?void 0:i[e]))})),o},J=(l,n)=>{var o,a,s;const{attributes:c,setAttributes:u}=l,{style:d}=c,m=null!==(o=null==d?void 0:d.boxShadow)&&void 0!==o?o:{},p=e=>{let t;t="default"===n?{...e}:{hover:{...null==m?void 0:m.hover,...e}},u({style:{...d,boxShadow:{...m,...t}}})};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.Flex,null,["x","y","blur","spread"].map((t=>{var l;return(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:v(t),value:"default"===n?m[t]:null==m||null===(l=m.hover)||void 0===l?void 0:l[t],step:1,shiftStep:10,onChange:e=>{p({[t]:e})}}))})))),(0,e.createElement)("br",null),(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,{style:{flex:1.5}},(0,e.createElement)(i.__experimentalPanelColorGradientSettings,{title:(0,t.__)("Color","blockify"),showTitle:!1,enableAlpha:!0,settings:[{enableAlpha:!0,colorValue:"default"===n?null==m?void 0:m.color:null==m||null===(a=m[n])||void 0===a?void 0:a.color,label:(0,t.__)("Color ","blockify")+("hover"===n?(0,t.__)(" Hover","blockify"):""),onColorChange:e=>{p({color:e})}}]})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.ToggleControl,{label:(0,t.__)("Inset","blockify"),checked:"default"===n?null==m?void 0:m.inset:null==m||null===(s=m[n])||void 0===s?void 0:s.inset,onChange:e=>{p({inset:e?"inset":""})}})))))};(0,n.addFilter)("editor.BlockListBlock","blockify/edit-box-shadow-styles",(0,o.createHigherOrderComponent)((t=>l=>{const{attributes:n,name:o}=l;if(!Z(o))return(0,e.createElement)(t,l);const i=K(n);if(!Object.keys(i).length)return(0,e.createElement)(t,l);let r={...l.wrapperProps};return l.className+=" has-box-shadow",r.className+=" has-box-shadow",l.style={...l.style,...i},r.style={...r.style,...i},(0,e.createElement)(t,a({},l,{wrapperProps:r}))}),"withBoxShadow")),(0,n.addFilter)("blocks.getSaveContent.extraProps","blockify/save-box-shadow-styles",((e,t,l)=>{const{name:n}=t;if(!Z(n))return e;const o=K(l);return Object.keys(o).length?(e.className+=" has-box-shadow",e.style={...e.style,...o},e):e}));const Q=l=>{const{attributes:n,setAttributes:o}=l,[i,a]=(0,e.useState)("default");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(s,null,(0,e.createElement)(e.Fragment,null,(0,t.__)("Shadow","blockify"),(0,e.createElement)(r.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{o({style:{...null==n?void 0:n.style,boxShadow:""}})},icon:f,iconSize:16,"aria-label":(0,t.__)("Clear Shadow","blockify")}))),(0,e.createElement)(r.ButtonGroup,null,(0,e.createElement)(r.Button,{isSmall:!0,variant:"default"===i?"primary":"secondary",onClick:()=>a("default")},(0,t.__)("Default","blockify")),(0,e.createElement)(r.Button,{isSmall:!0,variant:"hover"===i?"primary":"secondary",onClick:()=>a("hover")},(0,t.__)("Hover","blockify")))),"default"===i&&J(l,i),"hover"===i&&J(l,i))},ee=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},te={rotate:"deg",rotateX:"deg",rotateY:"deg",scale:"",scaleX:"",scaleY:"",skew:"deg",skewX:"deg",skewY:"deg",translateX:"",translateY:"",translateZ:""};(0,n.addFilter)("blocks.registerBlockType","blockify/add-css-transform-attributes",((e,t)=>{var l,n;return ee(t)?(e.attributes={...e.attributes,style:{...null!==(l=null==e||null===(n=e.attributes)||void 0===n?void 0:n.style)&&void 0!==l?l:{},transform:{type:"string"}}},e):e}));const le=e=>{let t="";return Object.keys(te).forEach((l=>{if(null!=e&&e[l]){const n=e[l];t+=` ${l}(${n}${te[l]})`}})),t?{transform:t.trim()}:{}};(0,n.addFilter)("editor.BlockListBlock","blockify/with-css-transform",(0,o.createHigherOrderComponent)((t=>l=>{var n,o;const{attributes:i,name:r}=l,s=(0,e.createElement)(t,l);if(!ee(r))return s;const{style:c}=i,u=null!==(n=null==c?void 0:c.transform)&&void 0!==n?n:{};if(!u)return s;const d=le(u);if(!Object.keys(d).length)return s;l.style={...null==l?void 0:l.style,...d};const m={...l.wrapperProps,style:{...null===(o=l.wrapperProps)||void 0===o?void 0:o.style,...d}};return(0,e.createElement)(t,a({},l,{wrapperProps:m}))}),"withCssTransform")),(0,n.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-css-transform-styles",((e,t,l)=>{var n;const{name:o}=t;if(!ee(o))return e;const{style:i}=l,r=null!==(n=null==i?void 0:i.transform)&&void 0!==n?n:{};if(!r)return e;const a=le(r);return Object.keys(a).length?{...e,style:{...null==e?void 0:e.style,...a}}:e}));const ne=l=>{var n;const{attributes:o,setAttributes:i}=l,{style:a}=o,c=null!==(n=null==a?void 0:a.transform)&&void 0!==n?n:{};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(s,null,(0,e.createElement)(e.Fragment,null,(0,t.__)("Transform","blockify"),(0,e.createElement)(r.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{i({style:{...null==o?void 0:o.style,transform:""}})},icon:f,iconSize:16,"aria-label":(0,t.__)("Clear Transforms","blockify")})))),(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Rotate","blockify"),value:null==c?void 0:c.rotate,onChange:e=>{i({style:{...a,transform:{...c,rotate:e}}})},min:-360,max:360,step:1})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Rotate X","blockify"),value:null==c?void 0:c.rotateX,onChange:e=>{i({style:{...a,transform:{...c,rotateX:e}}})},min:-360,max:360,step:1})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Rotate Y","blockify"),value:null==c?void 0:c.rotateY,onChange:e=>{i({style:{...a,transform:{...c,rotateY:e}}})},min:-360,max:360,step:1}))),(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Scale","blockify"),value:null==c?void 0:c.scale,onChange:e=>{i({style:{...a,transform:{...c,scale:e}}})},min:0,max:10,step:.1})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Scale X","blockify"),value:null==c?void 0:c.scaleX,onChange:e=>{i({style:{...a,transform:{...c,scaleX:e}}})},min:0,max:10,step:.1})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Scale Y","blockify"),value:null==c?void 0:c.scaleY,onChange:e=>{i({style:{...a,transform:{...c,scaleY:e}}})},min:0,max:10,step:.1}))),(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Skew","blockify"),value:null==c?void 0:c.skew,onChange:e=>{i({style:{...a,transform:{...c,skew:e}}})},min:-360,max:360,step:1})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Skew X","blockify"),value:null==c?void 0:c.skewX,onChange:e=>{i({style:{...a,transform:{...c,skewX:e}}})},min:-360,max:360,step:1})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Skew Y","blockify"),value:null==c?void 0:c.skewY,onChange:e=>{i({style:{...a,transform:{...c,skewY:e}}})},min:-360,max:360,step:1}))),(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalUnitControl,{label:(0,t.__)("Translate X","blockify"),value:null==c?void 0:c.translateX,onChange:e=>{i({style:{...a,transform:{...c,translateX:e}}})}})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalUnitControl,{label:(0,t.__)("Translate Y","blockify"),value:null==c?void 0:c.translateY,onChange:e=>{i({style:{...a,transform:{...c,translateY:e}}})}})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalUnitControl,{label:(0,t.__)("Translate Z","blockify"),value:null==c?void 0:c.translateZ,onChange:e=>{i({style:{...a,transform:{...c,translateZ:e}}})}}))),(0,e.createElement)("br",null))};var oe,ie,re;(0,n.addFilter)("editor.BlockEdit","blockify/custom-advanced-control",(0,o.createHigherOrderComponent)((l=>n=>{var o,a,s,c,u,d,m,p,v,f,y,h,b,k,x,w,_,S,C,T,I,F,O,A,D,z,R,j;const{attributes:V,setAttributes:L,isSelected:H,name:G}=n,{style:U}=V;if(!(e=>g(e)||N(e)||B(e)||W(e)||Z(e)||ee(e))(G))return(0,e.createElement)(l,n);const[$,q]=(0,e.useState)(null!==(o=null==U?void 0:U.boxShadow)&&void 0!==o?o:null),[X,K]=(0,e.useState)(null!==(a=null==U?void 0:U.animation)&&void 0!==a?a:null),[J,te]=(0,e.useState)(null!==(s=null!==(c=null!==(u=null==U?void 0:U.display)&&void 0!==u?u:null==U?void 0:U.order)&&void 0!==c?c:null==U?void 0:U.width)&&void 0!==s?s:null==U?void 0:U.maxWidth),[le,oe]=(0,e.useState)(null!==(d=null==U?void 0:U.filter)&&void 0!==d?d:null),[ie,re]=(0,e.useState)(null!==(m=null!==(p=null!==(v=null!==(f=null!==(y=null==U?void 0:U.position)&&void 0!==y?y:null==U?void 0:U.top)&&void 0!==f?f:null==U?void 0:U.right)&&void 0!==v?v:null==U?void 0:U.bottom)&&void 0!==p?p:null==U?void 0:U.left)&&void 0!==m?m:null==U?void 0:U.zIndex),[ae,se]=(0,e.useState)(null!==(h=null==U?void 0:U.transform)&&void 0!==h?h:null);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l,n),H&&(0,e.createElement)(i.InspectorControls,null,(0,e.createElement)(r.__experimentalToolsPanel,{label:(0,t.__)("Extra","blockify"),className:"blockify-tools-panel",resetAll:()=>{q(void 0),oe(void 0),se(void 0),re(void 0),K(void 0)}},g(G)&&(0,e.createElement)(r.__experimentalToolsPanelItem,{isShownByDefault:null!==(b=null==V?void 0:V.animation)&&void 0!==b&&b,hasValue:()=>!!X,label:(0,t.__)("Animation","blockify"),onDeselect:()=>{K(void 0)}},(0,e.createElement)(E,n)),N(G)&&(0,e.createElement)(r.__experimentalToolsPanelItem,{isShownByDefault:null!==(k=null!==(x=null!==(w=null==V||null===(_=V.style)||void 0===_?void 0:_.display)&&void 0!==w?w:null==V||null===(S=V.style)||void 0===S?void 0:S.order)&&void 0!==x?x:null==V||null===(C=V.style)||void 0===C?void 0:C.width)&&void 0!==k?k:null==V||null===(T=V.style)||void 0===T?void 0:T.maxWidth,hasValue:()=>!!J,label:(0,t.__)("Display","blockify"),onDeselect:()=>{te(void 0)}},(0,e.createElement)(P,n)),B(G)&&(0,e.createElement)(r.__experimentalToolsPanelItem,{isShownByDefault:null!==(I=null==V||null===(F=V.style)||void 0===F?void 0:F.filter)&&void 0!==I&&I,hasValue:()=>!!le,label:(0,t.__)("Filter","blockify"),onDeselect:()=>{oe(void 0)}},(0,e.createElement)(M,n)),W(G)&&(0,e.createElement)(r.__experimentalToolsPanelItem,{isShownByDefault:null!==(O=null==V||null===(A=V.style)||void 0===A?void 0:A.position)&&void 0!==O&&O,hasValue:()=>!!ie,label:(0,t.__)("Position","blockify"),onDeselect:()=>{oe(void 0)}},(0,e.createElement)(Y,n)),Z(G)&&(0,e.createElement)(r.__experimentalToolsPanelItem,{isShownByDefault:null!==(D=null==V||null===(z=V.style)||void 0===z?void 0:z.boxShadow)&&void 0!==D&&D,hasValue:()=>!!$,label:(0,t.__)("Shadow","blockify"),onDeselect:()=>{q(void 0)}},(0,e.createElement)(Q,n)),ee(G)&&(0,e.createElement)(r.__experimentalToolsPanelItem,{isShownByDefault:null!==(R=null==V||null===(j=V.style)||void 0===j?void 0:j.transform)&&void 0!==R&&R,hasValue:()=>!!ae,label:(0,t.__)("Transform","blockify"),onDeselect:()=>{se(void 0)}},(0,e.createElement)(ne,n)))))}),"withPositionEdit"));const ae=null!==(oe=null===(ie=window)||void 0===ie||null===(re=ie.blockify)||void 0===re?void 0:re.blockSupports)&&void 0!==oe?oe:{};(0,n.addFilter)("editor.BlockEdit","blockify/with-negative-margin",(0,o.createHigherOrderComponent)((t=>l=>{if((e=>{var t,l;return null!==(t=null==ae||null===(l=ae[e])||void 0===l?void 0:l.blockifyNegativeMargin)&&void 0!==t&&t})(null==l?void 0:l.name)){const e=document.querySelector('.components-input-control__input[min="0"]');e&&e.setAttribute("min","-999")}return(0,e.createElement)(t,l)}),"withMinHeightSettings"));const se=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};var ce,ue,de;(0,n.addFilter)("blocks.registerBlockType","blockify/add-onclick-attribute",((e,t)=>se(t)?(e.attributes={...e.attributes,onclick:{type:"string"}},e):e),0),(0,n.addFilter)("editor.BlockEdit","blockify/with-onclick-attribute",(0,o.createHigherOrderComponent)((l=>n=>{var o;const{attributes:a,setAttributes:s,name:c}=n;return se(c)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l,n),(0,e.createElement)(i.InspectorAdvancedControls,null,(0,e.createElement)(r.TextareaControl,{label:(0,t.__)("On-click event","blockify"),help:(0,t.__)("Enter a JavaScript function to be called when the button is clicked.","blockify"),rows:4,value:null==a||null===(o=a.onclick)||void 0===o?void 0:o.replace('"',"'"),onChange:e=>s({onclick:null==e?void 0:e.replace('"',"'")}),style:{fontFamily:"ui-monospace,Menlo,Monaco,Cascadia Code,Segoe UI Mono,Roboto Mono,Oxygen Mono,Ubuntu Monospace,Source Code Pro,Fira Code,Droid Sans Mono,DejaVu Sans Mono,Courier New,monospace",fontSize:"14px",tabSize:"1em",lineHeight:"1.5"}}))):(0,e.createElement)(l,n)}),"onclickAttribute"),99),(0,n.addFilter)("editor.BlockListBlock","blockify/with-block-gap",(0,o.createHigherOrderComponent)((t=>l=>{var n,o,i,r;if("core/query"!==(null==l?void 0:l.name))return(0,e.createElement)(t,l);if(null==l||null===(n=l.attributes)||void 0===n||null===(o=n.style)||void 0===o||null===(i=o.spacing)||void 0===i||!i.blockGap)return(0,e.createElement)(t,l);const s=null!==(r=l.wrapperProps)&&void 0!==r?r:{};return s.style={...s.style,"--wp--style--block-gap":l.attributes.style.spacing.blockGap},(0,e.createElement)(t,a({},l,{wrapperProps:s}))}),"withBlockGap")),(0,n.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-block-gap",((e,t,l)=>{var n,o;return"core/query"===t&&null!=l&&null!==(n=l.style)&&void 0!==n&&null!==(o=n.spacing)&&void 0!==o&&o.blockGap&&(e.style={...e.style,"--wp--style--block-gap":l.style.spacing.blockGap}),e}));const me=null!==(ce=null===(ue=window)||void 0===ue||null===(de=ue.blockify)||void 0===de?void 0:de.blockSupports)&&void 0!==ce?ce:{};(0,n.addFilter)("blocks.registerBlockType","blockify/block-supports",((e,t)=>(Object.keys(me).includes(t)&&(e.supports={...e.supports,...me[t]}),e)),0),(0,n.addFilter)("blocks.getSaveContent.extraProps","blockify/alignment-class",((e,t,l)=>(Object.keys(me).includes(t.name)&&null!=l&&l.align&&!e.className.includes(" align")&&(e.className+=" align"+l.align),e))),(0,n.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 pe=(0,o.createHigherOrderComponent)((t=>l=>{var n,o,i;if("core/search"!==l.name)return(0,e.createElement)(t,l);const r=document.getElementsByClassName("wp-block-search__input"),a=null==l||null===(n=l.attributes)||void 0===n||null===(o=n.style)||void 0===o||null===(i=o.spacing)||void 0===i?void 0:i.padding;return r[0]&&a&&(a.top&&(r[0].style.paddingTop=null==a?void 0:a.top),a.right&&(r[0].style.paddingRight=null==a?void 0:a.right),a.bottom&&(r[0].style.paddingBottom=null==a?void 0:a.bottom),a.left&&(r[0].style.paddingLeft=null==a?void 0:a.left)),(0,e.createElement)(t,l)}),"withInspectorControl");(0,n.addFilter)("editor.BlockEdit","blockify/with-search-padding-css",pe),(0,n.addFilter)("editor.BlockEdit","blockify/with-client-id",(0,o.createHigherOrderComponent)((t=>l=>("core/navigation-submenu"===(null==l?void 0:l.name)&&l.setAttributes({clientId:null==l?void 0:l.clientId}),(0,e.createElement)(t,l))),"withClientId")),(0,n.addFilter)("editor.BlockListBlock","blockify/with-mega-menu",(0,o.createHigherOrderComponent)((t=>l=>{var n,o;const{attributes:i,name:r,clientId:s}=l;if("core/navigation-submenu"!==r)return(0,e.createElement)(t,l);let c={};var u,d;null!=i&&i.backgroundColor&&(c["--wp--custom--submenu--background"]="var(--wp--preset--color--"+(null==i?void 0:i.backgroundColor)+")"),null!=i&&null!==(n=i.style)&&void 0!==n&&null!==(o=n.color)&&void 0!==o&&o.background&&(c["--wp--custom--submenu--background"]=null==i||null===(u=i.style)||void 0===u||null===(d=u.color)||void 0===d?void 0:d.background);let m={...null==l?void 0:l.wrapperProps};return m["data-id"]=s,c&&(m.style={...null==m?void 0:m.style,...c}),(0,e.createElement)(t,a({},l,{wrapperProps:m}))}),"withMegaMenu"));var ve=window.wp.domReady,fe=l.n(ve),ye=window.wp.blocks;fe()((()=>{var e,t,l;const n=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==n?void 0:n.unregister].forEach((e=>{(0,ye.unregisterBlockStyle)(null==e?void 0:e.type,null==e?void 0:e.name)})),[...null==n?void 0:n.register].forEach((e=>{(0,ye.registerBlockStyle)(null==e?void 0:e.type,e)}))}));var he=(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(c.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));(0,ye.registerBlockVariation)("core/list",{name:"accordion",title:(0,t.__)("Accordion","blockify"),description:(0,t.__)("Add a collapsible accordion list.","blockify"),icon:he,attributes:{className:"is-style-accordion"},isDefault:!1,isActive:(e,t)=>{var l;return e&&(null==e||null===(l=e.className)||void 0===l?void 0:l.includes(t.className))}});var be=(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.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 ge={content:(0,t.__)("Add your text here. Add your text here.","blockify"),containerSize:"150",pathSize:"100"},ke={name:"curved-text",title:(0,t.__)("Curved Text","blockify"),icon:be,isDefault:!1,category:"text",scope:["inserter","transform","block"],description:(0,t.__)("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")}};fe()((()=>{(0,ye.registerBlockVariation)("core/paragraph",ke)})),(0,n.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 Ee=function(){var t,l,n;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{curvedText:i=ge}=o,r=null!==(t=null==i?void 0:i.content)&&void 0!==t?t:ge.content,a=null!==(l=null==i?void 0:i.containerSize)&&void 0!==l?l:ge.containerSize,s=null!==(n=null==i?void 0:i.pathSize)&&void 0!==n?n:ge.pathSize,c=parseInt(a)/2,u=parseInt(s)/2,d={viewBox:`0 0 ${a} ${a}`,xmlns:"http://www.w3.org/2000/svg",enableBackground:`new 0 0 ${a} ${a}`,xmlSpace:"preserve",width:a,height:a,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,e.createElement)("svg",d,(0,e.createElement)("path",p," "),(0,e.createElement)("text",{fill:"currentColor"},(0,e.createElement)("textPath",{xlinkHref:"#circle-"+m},r)))};(0,n.addFilter)("editor.BlockEdit","blockify/with-curved-text-css",(0,o.createHigherOrderComponent)((l=>n=>{var o,s,c,u,d;const{attributes:m,setAttributes:p}=n;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"))})(m))return(0,e.createElement)(l,n);const v=null===(o=document.getElementsByClassName("edit-site-visual-editor__editor-canvas"))||void 0===o?void 0:o.item(0);let f;f=v?v.contentDocument:document;const y=null===(s=f)||void 0===s?void 0:s.getElementById("block-"+n.clientId);y&&(y.innerHTML=(0,e.renderToString)(Ee({...m,clientId:n.clientId})));const{curvedText:h=ge}=m,b=t=>{var l;const o={...t,svgString:(0,e.renderToString)((0,e.createElement)(Ee,a({},m,t,{clientId:null!==(l=n.clientId)&&void 0!==l?l:"1"})))};p({curvedText:{...h,...o}})};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l,n),(0,e.createElement)(i.InspectorControls,null,(0,e.createElement)(r.PanelBody,{className:"blockify-controls",title:(0,t.__)("Curved Text","blockify")},(0,e.createElement)(r.TextareaControl,{label:(0,t.__)("Content","blockify"),value:null!==(c=null==h?void 0:h.content)&&void 0!==c?c:ge.content,onChange:e=>{b({content:e})}}),(0,e.createElement)("p",null,(0,t.__)("Size","blockify")),(0,e.createElement)(r.PanelRow,null,(0,e.createElement)("br",null),(0,e.createElement)(r.Flex,null,(0,e.createElement)(r.FlexItem,{style:{width:"50%"}},(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Container","blockify"),value:null!==(u=null==h?void 0:h.containerSize)&&void 0!==u?u:ge.containerSize,onChange:e=>{b({containerSize:e})}})),(0,e.createElement)(r.FlexBlock,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Path","blockify"),value:null!==(d=null==h?void 0:h.pathSize)&&void 0!==d?d:ge.pathSize,onChange:e=>{b({pathSize:e})}})))))))}),"withCurvedTextSettings"),99);var xe=(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.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"}));const we={start:"0",end:"100",duration:"2",delay:"0",prefix:"",suffix:""},_e={name:"counter",title:(0,t.__)("Counter","blockify"),keywords:["counter","number","count","stats"],icon:xe,isDefault:!1,category:"text",scope:["inserter","transform","block"],description:(0,t.__)("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"))}};fe()((()=>{(0,ye.registerBlockVariation)("core/paragraph",_e)})),(0,n.addFilter)("editor.BlockEdit","blockify/with-counter-controls",(0,o.createHigherOrderComponent)((l=>n=>{var o,a,s,c,u,d,m,p,v,f;const{attributes:y,setAttributes:h}=n,b=(0,e.createElement)(l,n);if(null==y||null===(o=y.className)||void 0===o||!o.includes("is-style-counter"))return b;const{style:g}=y;let k=we;if(null!=g&&g.counter?k=g.counter:h({style:{...g,counter:we}}),null!==(a=k)&&void 0!==a&&a.prefix||null!==(s=k)&&void 0!==s&&s.end||null!==(c=k)&&void 0!==c&&c.suffix){var E,x,w;let e=null===(E=k)||void 0===E?void 0:E.end;var _,S;"string"==typeof(null===(x=k)||void 0===x?void 0:x.prefix)&&(e=(null===(_=k)||void 0===_?void 0:_.prefix)+e),"string"==typeof(null===(w=k)||void 0===w?void 0:w.suffix)&&(e+=null===(S=k)||void 0===S?void 0:S.suffix),h({content:e})}return(0,e.createElement)(e.Fragment,null,b,(0,e.createElement)(i.InspectorControls,null,(0,e.createElement)(r.PanelBody,{title:(0,t.__)("Counter Settings","blockify"),initialOpen:!0,className:"blockify-counter-settings"},(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Start","blockify"),value:null===(u=k)||void 0===u?void 0:u.start,onChange:e=>{h({style:{...g,counter:{...k,start:e}}})},step:1,shiftStep:10,isDragEnabled:!0,isShiftStepEnabled:!0})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("End","blockify"),value:null===(d=k)||void 0===d?void 0:d.end,onChange:e=>{h({style:{...g,counter:{...k,end:e}}})},step:1,shiftStep:10,isDragEnabled:!0,isShiftStepEnabled:!0})))),(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Duration (seconds)","blockify"),value:null===(m=k)||void 0===m?void 0:m.duration,onChange:e=>{h({style:{...g,counter:{...k,duration:e}}})},step:.1,shiftStep:1,isDragEnabled:!0,isShiftStepEnabled:!0})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalNumberControl,{label:(0,t.__)("Delay (seconds)","blockify"),value:null===(p=k)||void 0===p?void 0:p.delay,onChange:e=>{h({style:{...g,counter:{...k,delay:e}}})},step:.1,shiftStep:1,isDragEnabled:!0,isShiftStepEnabled:!0})))),(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.TextControl,{label:(0,t.__)("Prefix","blockify"),value:null===(v=k)||void 0===v?void 0:v.prefix,onChange:e=>{h({style:{...g,counter:{...k,prefix:e}}})}})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.TextControl,{label:(0,t.__)("Suffix","blockify"),value:null===(f=k)||void 0===f?void 0:f.suffix,onChange:e=>{h({style:{...g,counter:{...k,suffix:e}}})}})))))))}),"withCounterControls"),0);var Se=(0,e.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.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 Ce={name:"image",title:(0,t.__)("Image","blockify"),icon:Se,isDefault:!0,category:"media",scope:["inserter","transform","block"],description:(0,t.__)("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,ye.registerBlockVariation)("core/image",Ce);var Te=l(488),Ne=(Te.domToReact,Te.htmlToDOM,Te.attributesToProps,Te.Element,Te),Ie=window.wp.data,Fe=(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.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"})),Pe=window.wp.apiFetch,Oe=l.n(Pe);const Be={icons:{social:{},wordpress:{}}},Ae={setIcons(e){return{type:"SET_ICONS",icons:e}},getIcons(e){return{type:"GET_ICONS",path:e}}},De={getIcons(e){const{icons:t}=e;return t}},Me={GET_ICONS(e){return Oe()({path:e.path})}},ze={*getIcons(){const e=yield Ae.getIcons("/blockify/v1/icons/");return Ae.setIcons(e)}};(0,Ie.register)((0,Ie.createReduxStore)("blockify/icons",{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Be,t=arguments.length>1?arguments[1]:void 0;return"SET_ICONS"===t.type?{...e,icons:t.icons}:e},actions:Ae,selectors:De,controls:Me,resolvers:ze})),r.SelectControl.Option,r.CustomSelectControl.Option;const Re=e=>"core/image"===e,je={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:' '}},Ve={name:"icon",icon:Fe,title:(0,t.__)("Icon","blockify"),isDefault:!1,category:"media",scope:["inserter","transform","block"],description:(0,t.__)("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"))}};fe()((()=>{(0,ye.registerBlockVariation)("core/image",Ve)})),(0,n.addFilter)("blocks.registerBlockType","blockify/add-icon-attributes",((e,t)=>{if(Re(t)){for(const[t,l]of Object.entries(je))e.attributes[t]={type:l.type};e.attributes={...e.attributes,...je}}return e}),99),(0,n.addFilter)("editor.BlockEdit","blockify/with-icon",(0,o.createHigherOrderComponent)((l=>n=>{var o,a,s,c,u,d,m,p;const{name:v,attributes:f,setAttributes:y,isSelected:h}=n,{className:b}=f;if(!b)return(0,e.createElement)(l,n);if(null==b||!b.includes("is-style-icon"))return(0,e.createElement)(l,n);if(!Re(v))return(0,e.createElement)(l,n);var g,k,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,t.__)(" Get more icons with ","blockify")+'Blockify Pro ↗ '))})(),null!=f&&f.url||y({url:"#"}),null!=f&&f.iconSet||y({iconSet:null==je||null===(g=je.iconSet)||void 0===g?void 0:g.default}),null!=f&&f.iconName||y({iconName:null==je||null===(k=je.iconName)||void 0===k?void 0:k.default}),null!=f&&f.iconSvgString||y({iconSvgString:null==je||null===(E=je.iconSvgString)||void 0===E?void 0:E.default});const x=[];let{icons:w}=null!==(o=(0,Ie.useSelect)((e=>({icons:e("blockify/icons").getIcons()})),[]))&&void 0!==o?o:Be;const _={wordpress:[{name:null==je||null===(a=je.iconSvgString)||void 0===a?void 0:a.default,key:null==je||null===(s=je.iconName)||void 0===s?void 0:s.default}]};return Object.keys(w).forEach((e=>{var t;let l=e.split("-").join(" ");var n;l="wordpress"===l?"WordPress":l,x.push({label:l,value:e}),_[e]=[],Object.keys(w[e]).forEach((t=>{var l;t!==(null==f?void 0:f.iconName)&&_[e].push({name:Ne(null==w||null===(l=w[e])||void 0===l?void 0:l[t]),key:t})})),null!=w&&null!==(t=w[e])&&void 0!==t&&t[null==f?void 0:f.iconName]&&_[e].unshift({name:Ne(null==w||null===(n=w[e])||void 0===n?void 0:n[null==f?void 0:f.iconName]),key:null==f?void 0:f.iconName})})),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l,n),(0,e.createElement)(i.InspectorControls,null,(0,e.createElement)(r.PanelBody,{title:(0,t.__)("Icon Settings","blockify"),initialOpen:!0,className:"blockify-icon-settings"},!1,(0,e.createElement)(r.SelectControl,{label:(0,t.__)("Select Icon Set","blockify"),value:null!==(c=null==f?void 0:f.iconSet)&&void 0!==c?c:null==je?void 0:je.iconSet.default,options:x,onChange:e=>y({iconSet:e})}),(0,e.createElement)((()=>{var t,l,n,o;const i=null===(t=_[null==f?void 0:f.iconSet])||void 0===t||null===(l=t.filter((e=>(null==e?void 0:e.key)===(null==f?void 0:f.iconName))))||void 0===l||null===(n=l[0])||void 0===n?void 0:n.name;return(0,e.createElement)("div",{className:"blockify-icon-preview"},i&&(0,e.createElement)(e.Fragment,null,i,(0,e.createElement)("span",null,null==f||null===(o=f.iconName)||void 0===o?void 0:o.replace("-"," "))))}),null),(0,e.createElement)(r.CustomSelectControl,{label:(0,t.__)("Select Icon","blockify"),options:null!==(u=null==_?void 0:_[null==f?void 0:f.iconSet])&&void 0!==u?u:null==_?void 0:_.wordpress,value:null!==(d=null==f?void 0:f.iconSvgString)&&void 0!==d?d:null==je||null===(m=je.iconSvgString)||void 0===m?void 0:m.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:"";y({iconName:o}),y({iconSvgString:null==w||null===(l=w[null==f?void 0:f.iconSet])||void 0===l?void 0:l[o]})}}),(0,e.createElement)("br",null),(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.Flex,null,(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalUnitControl,{label:(0,t.__)("Icon Width","blockify"),value:null!==(p=null==f?void 0:f.iconSize)&&void 0!==p?p:"",onChange:e=>y({iconSize:e})})))))))}),"iconEdit"));const Le=e=>{var t,l,n,o,i,r,a,s,c,u,d,m,p,v,f,y;let h={},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,E;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===(E=k.color)||void 0===E?void 0:E.gradient),null!=e&&e.gradient&&(g="var(--wp--preset--gradient--"+e.gradient+",currentColor)");let x="";var w,_;if(null!=e&&null!==(i=e.style)&&void 0!==i&&null!==(r=i.color)&&void 0!==r&&r.text&&(x=null==e||null===(w=e.style)||void 0===w||null===(_=w.color)||void 0===_?void 0:_.text),null!=e&&e.textColor&&(x="var(--wp--preset--color--"+e.textColor+",currentColor)"),""!==b&&(h["--wp--custom--icon--background"]=b),x?(h["--wp--custom--icon--color"]=x,g&&(h["--wp--custom--icon--background"]=g)):g&&(h["--wp--custom--icon--color"]=g),null!=e&&null!==(a=e.style)&&void 0!==a&&null!==(s=a.spacing)&&void 0!==s&&s.padding){var S,C,T,N;const t=e.style.spacing.padding,l={top:null!==(S=null==t?void 0:t.top)&&void 0!==S?S:"0",right:null!==(C=null==t?void 0:t.right)&&void 0!==C?C:"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|","")+")")})),h["--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 I,F,P,O;const t=e.style.spacing.margin,l={top:null!==(I=null==t?void 0:t.top)&&void 0!==I?I:"",right:null!==(F=null==t?void 0:t.right)&&void 0!==F?F:"",bottom:null!==(P=null==t?void 0:t.bottom)&&void 0!==P?P:"",left:null!==(O=null==t?void 0:t.left)&&void 0!==O?O:""};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|",""))+")")})),h["--wp--custom--icon--margin"]=Object.values(l).join(" ")}let B="";var A,D,M,z;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&&(h["--wp--custom--icon--border-width"]=e.style.border.width,h["--wp--custom--icon--border-style"]=null!==(A=null===(D=e.style.border)||void 0===D?void 0:D.style)&&void 0!==A?A:"solid",h["--wp--custom--icon--border-color"]=null!==(M=null===(z=e.style.border)||void 0===z?void 0:z.color)&&void 0!==M?M:B);let R=null!==(p=null==e?void 0:e.iconSize)&&void 0!==p?p:"";""!==R&&(h["--wp--custom--icon--size"]=R);const j=null===(v=null!==(f=null==e?void 0:e.iconCustomSVG)&&void 0!==f?f:"")||void 0===v?void 0:v.replace('"',"'"),V=j&&null!=j&&j.includes("l=>{var n,o;let{attributes:i,wrapperProps:r,name:s}=l;return null!=i&&i.className&&null!=i&&null!==(n=i.className)&&void 0!==n&&n.includes("is-style-icon")&&Re(s)?(r||(r={style:{}}),r.style={...null===(o=r)||void 0===o?void 0:o.style,...Le(i)},(0,e.createElement)(t,a({},l,{wrapperProps:r}))):(0,e.createElement)(t,l)}),"withIcon")),(0,n.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")&&Re(o)?(e.style={...null==e?void 0:e.style,...Le(l)},e):e}));var He=(0,e.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.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 Ge={name:"svg",title:(0,t.__)("SVG","blockify"),icon:He,isDefault:!1,category:"media",scope:["inserter","transform","block"],description:(0,t.__)("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"))}};fe()((()=>{(0,ye.registerBlockVariation)("core/image",Ge)}));const We=e=>"url('data:image/svg+xml;utf8,"+encodeURIComponent(e)+"')",Ue=e=>"data:image/svg+xml;utf8,"+encodeURIComponent(e);(0,n.addFilter)("editor.BlockEdit","blockify/with-svg-controls",(0,o.createHigherOrderComponent)((l=>n=>{var o,a,s,c;const{attributes:u,setAttributes:d}=n;if(null==u||null===(o=u.className)||void 0===o||!o.includes("is-style-svg"))return(0,e.createElement)(l,n);const{style:m}=u,p=null!==(a=null==m?void 0:m.svgString)&&void 0!==a?a:"",v=null!==(s=null==m?void 0:m.maskSvg)&&void 0!==s&&s;null!=u&&u.url||d({url:v?"#":Ue(p)}),v&&"#"!==(null==u?void 0:u.url)&&d({url:"#"}),v||null!=u&&null!==(c=u.url)&&void 0!==c&&c.includes("data:image/svg+xml;utf8,")||d({url:Ue(p)});let f="var(--width,1em)",y="";var h;null!=u&&u.width&&(f=u.width+"px"),null!=u&&u.height&&(y=(null!==(h=u.height)&&void 0!==h?h:"")+"px"),y=""===y?f:y;const b={width:f,height:y,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":We(p),"-mask-image":We(p)};let g="";return p&&(g=Object.entries(b).map((e=>{let[t,l]=e;return`${t}:${l};`})).join("")),(0,e.createElement)(e.Fragment,null,v&&(0,e.createElement)("style",null,"#block-"+(null==n?void 0:n.clientId)+">div:first-of-type{"+g+"}"),(0,e.createElement)(l,n),(0,e.createElement)(i.InspectorControls,null,(0,e.createElement)(r.PanelBody,{title:(0,t.__)("SVG Settings","blockify-pro"),className:(0,t.__)("blockify-svg-controls","blockify-pro")},(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.TextareaControl,{label:(0,t.__)("SVG String","blockify"),help:(0,t.__)("Paste your SVG string in the field above. It is recommended to format your SVG with an optimization tool ","blockify"),value:null!=p?p:"",rows:20,onChange:e=>{const t={style:{...m,svgString:e}};t.url=v?"#":Ue(e),d(t)},style:{fontFamily:"var(--wp--preset--font-family--monospace, monospace)"}})),(0,e.createElement)(r.ExternalLink,{href:"https://jakearchibald.github.io/svgomg/",target:"_blank"},"https://jakearchibald.github.io/svgomg/"),(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.ToggleControl,{label:(0,t.__)("Mask with text color","blockify"),help:(0,t.__)("If enabled, the SVG will be masked with the text color. (Renders inline SVG on front end).","blockify"),checked:v,onChange:e=>{const t={style:{...m,maskSvg:e}};t.url=v?"#":Ue(p),d(t)}})))))}),"withSvgControls"));const $e={name:"marquee",icon:(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.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,t.__)("Marquee","blockify"),isDefault:!1,scope:["inserter","transform","block"],description:(0,t.__)("Adds a 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,ye.registerBlockVariation)("core/group",$e);const qe=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,n.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,n.addFilter)("editor.BlockEdit","blockify/with-marquee-controls",(0,o.createHigherOrderComponent)((l=>n=>{var o,a;const{attributes:s,setAttributes:c}=n;return"marquee"!==(null==s||null===(o=s.layout)||void 0===o?void 0:o.orientation)?(0,e.createElement)(l,n):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(i.InspectorControls,null,(0,e.createElement)(r.PanelBody,{title:(0,t.__)("Marquee Settings","blockify-pro"),className:(0,t.__)("blockify-width-control","blockify-pro")},(0,e.createElement)("p",null,(0,t.__)("Scroll Speed (seconds)","blockify")),(0,e.createElement)(r.PanelRow,null,(0,e.createElement)("br",null),(0,e.createElement)(r.Flex,null,(0,e.createElement)(r.FlexItem,{style:{width:"50%"}},(0,e.createElement)(r.__experimentalNumberControl,{isShiftStepEnabled:!0,label:(0,t.__)("Mobile","blockify"),onChange:e=>{c({speedMobile:e})},value:null==s?void 0:s.speedMobile})),(0,e.createElement)(r.FlexBlock,null,(0,e.createElement)(r.__experimentalNumberControl,{isShiftStepEnabled:!0,label:(0,t.__)("Desktop","blockify-pro"),onChange:e=>{c({speedDesktop:e})},value:null==s?void 0:s.speedDesktop})))),(0,e.createElement)("br",null),(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.RangeControl,{label:(0,t.__)("Repeat Items","blockify"),help:(0,t.__)("How many times should the items be duplicated and cloned.","blockify"),value:null!==(a=null==s?void 0:s.repeatItems)&&void 0!==a?a:2,onChange:e=>{c({repeatItems:e})},min:0,max:10,step:1,allowReset:!0})),(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.ToggleControl,{label:(0,t.__)("Pause on hover","blockify-pro"),checked:null==s?void 0:s.pauseOnHover,onChange:()=>c({pauseOnHover:!(null!=s&&s.pauseOnHover)})})),(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.ToggleControl,{label:(0,t.__)("Reverse direction","blockify-pro"),checked:null==s?void 0:s.reverse,onChange:()=>c({reverse:!(null!=s&&s.reverse)})})))),(0,e.createElement)(l,n))}),"withInspectorControl")),(0,n.addFilter)("editor.BlockListBlock","blockify/with-marquee",(0,o.createHigherOrderComponent)((t=>l=>{var n,o,i,r;const{attributes:s}=l;if("marquee"!==(null==s||null===(n=s.layout)||void 0===n?void 0:n.orientation))return(0,e.createElement)(t,l);l.attributes.style={...null!==(o=s.style)&&void 0!==o?o:{},...qe(s)};const c={...l.wrapperProps,style:{...null!==(i=null===(r=l.wrapperProps)||void 0===r?void 0:r.style)&&void 0!==i?i:{},...qe(s)}};return(0,e.createElement)(t,a({},l,{wrapperProps:c}))}),"withMarquee")),(0,n.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,...qe(l)}),e}));var Xe=(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.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 Ye={name:"paragraph",title:(0,t.__)("Paragraph","blockify"),icon:Xe,isDefault:!0,category:"text",scope:["inserter","transform","block"],description:(0,t.__)("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,ye.registerBlockVariation)("core/paragraph",Ye);var Ze=window.wp.richText;(0,Ze.registerFormatType)("blockify/clear-formatting",{title:(0,t.__)("Clear","blockify"),tagName:"span",className:"clear",edit:l=>{const{value:n,isActive:o,onChange:r}=l,{formatTypes:a}=(0,Ie.useSelect)((e=>({formatTypes:e("core/rich-text").getFormatTypes()})));return(0,e.createElement)(i.RichTextToolbarButton,{icon:"editor-removeformatting",title:(0,t.__)("Clear Formatting","blockify"),onClick:()=>{if(a.length>0){let e=n;a.map((t=>{e=(0,Ze.removeFormat)(e,t.name)})),r({...e})}},isActive:o})}});var Ke=(0,e.createElement)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.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 Je="blockify/gradient";(0,Ze.registerFormatType)(Je,{title:(0,t.__)("Gradient","blockify"),tagName:"span",className:"has-text-gradient",attributes:{style:"style",class:"class"},edit:l=>{let{isActive:n,value:o,onChange:a}=l;const[s,c]=(0,e.useState)(""),[u,d]=(0,e.useState)(!1),{gradients:m}=(0,Ie.useSelect)((e=>{var t;return{gradients:null===(t=e("core/block-editor").getSettings())||void 0===t?void 0:t.gradients}}));let p="",v="";return null!=o&&o.formats&&o.formats.map((e=>{var t,l;(null==e?void 0:e.type)===Je&&(p+=";"+(null==e||null===(t=e.attributes)||void 0===t?void 0:t.style),v+=null==e||null===(l=e.attributes)||void 0===l?void 0:l.class)})),(0,e.createElement)(i.BlockControls,null,(0,e.createElement)(i.RichTextShortcut,{type:"primary",character:"g",onUse:()=>{}}),(0,e.createElement)(i.RichTextToolbarButton,{icon:Ke,title:(0,t.__)("Gradient","blockify"),isActive:n,shortcutType:"primary",shortcutCharacter:"g",onClick:()=>d(!u)}),u&&(0,e.createElement)(r.Toolbar,{className:"blockify-components-toolbar"},(0,e.createElement)(r.Popover,{position:"bottom center",className:"blockify-gradient-text-control",focusOnMount:"container",onFocusOutside:()=>d(!1)},(0,e.createElement)(r.GradientPicker,{value:null!=s?s:"",gradients:m,onChange:e=>{var t;c(e);let l=p,n=v;var i,r;m.forEach((t=>{t.gradient===e&&(n+=(n?" ":"")+"has-"+t.slug+"-gradient-background")})),e&&!n.includes("-gradient-background")&&(l+=(l?l+";":"")+"background:"+e),null!==(t=n)&&void 0!==t&&t.includes("has-text-gradient")&&(n=(null===(i=n)||void 0===i||null===(r=i.replace("has-text-gradient",""))||void 0===r?void 0:r.trim())+" has-text-gradient"),a((0,Ze.applyFormat)(o,{type:Je,attributes:{style:l,class:n}}))}}))))}});var Qe=(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.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 et=e=>Object.keys(e).map((t=>`${null!=t&&t.includes("-")?t:O(t)}:${e[t]};`)).join(" "),tt=e=>{const t={};return e.split(";").map((e=>{const[l,n]=e.split(":");l&&(t[l]=n)})),t};r.CustomSelectControl.Option;const lt="blockify/typography",nt=[{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,Ze.registerFormatType)(lt,{title:(0,t.__)("Typography","blockify"),tagName:"span",className:"has-font",edit(l){var n,o,a;const{isActive:s,value:c,onChange:u}=l,{fontSizes:d}=(0,Ie.useSelect)((e=>{var t;return{fontSizes:null===(t=e("core/block-editor").getSettings())||void 0===t?void 0:t.fontSizes}})),m=null!==(n=null===(o=window)||void 0===o||null===(a=o.blockify)||void 0===a?void 0:a.fontFamilies)&&void 0!==n?n:[],p=null==m?void 0:m.map((e=>({label:v(null==e?void 0:e.replace("-"," ")),value:e})));let f="",y="";null!=c&&c.formats&&c.formats.map((e=>{var t,l;(null==e?void 0:e.type)===name&&(f+=";"+(null==e||null===(t=e.attributes)||void 0===t?void 0:t.style),y+=null==e||null===(l=e.attributes)||void 0===l?void 0:l.class)}));const[h,b]=(0,e.useState)({style:tt(f),class:y.split(" "),fontFamily:"",fontSize:"",fontAppearance:nt[0],isOpen:!1});return(0,e.createElement)(i.BlockControls,null,(0,e.createElement)(i.RichTextShortcut,{type:"primary",character:"g",onUse:()=>{}}),(0,e.createElement)(i.RichTextToolbarButton,{icon:Qe,title:(0,t.__)("Typography","blockify"),isActive:s,shortcutType:"primary",shortcutCharacter:"f",onClick:()=>b({...h,isOpen:!h.isOpen})}),(null==h?void 0:h.isOpen)&&(0,e.createElement)(r.Toolbar,{className:"blockify-components-toolbar"},(0,e.createElement)(r.Popover,{position:"bottom center",className:"blockify-font-family-control",focusOnMount:"container",onFocusOutside:()=>b({...h,isOpen:!1})},(0,e.createElement)(r.SelectControl,{label:(0,t.__)("Select Font Family","blockify"),value:null==h?void 0:h.fontFamily,options:p,onChange:e=>{var t,l;b({...h,fontFamily:e});const n="has-"+e+"-font-family";var o;null!=h&&null!==(t=h.class)&&void 0!==t&&t.includes(n)||null==h||null===(o=h.class)||void 0===o||o.push(n),u((0,Ze.applyFormat)(c,{type:lt,attributes:{style:et(null==h?void 0:h.style),class:null==h||null===(l=h.class)||void 0===l?void 0:l.join(" ")}}))}}),(0,e.createElement)(r.FontSizePicker,{fontSizes:d,fallbackFontSize:20,value:parseInt(null==h?void 0:h.fontSize),withSlider:!0,onChange:e=>{var t,l;b({...h,fontSize:e.toString()}),e&&(h.style["--wp--custom--font-size"]=e.toString()),null!=h&&null!==(t=h.class)&&void 0!==t&&t.includes("has-inline-font-size")||h.class.push("has-inline-font-size"),u((0,Ze.applyFormat)(c,{type:lt,attributes:{style:et(null==h?void 0:h.style),class:null==h||null===(l=h.class)||void 0===l?void 0:l.join(" ")}}))}}),(0,e.createElement)(r.CustomSelectControl,{label:(0,t.__)("Appearance","blockify"),value:nt.find((e=>{var t;return e.key===(null==h||null===(t=h.fontAppearance)||void 0===t?void 0:t.key)})),options:null!=nt?nt:[],onChange:e=>{var t,l,n;let{selectedItem:o}=e;var i,r,a;o&&b({...h,fontAppearance:o}),null!=o&&null!==(t=o.style)&&void 0!==t&&t.fontStyle&&(h.style["font-style"]=null==o||null===(i=o.style)||void 0===i?void 0:i.fontStyle),null!=o&&null!==(l=o.style)&&void 0!==l&&l.fontWeight&&(h.style["font-weight"]=null==o||null===(r=o.style)||void 0===r||null===(a=r.fontWeight)||void 0===a?void 0:a.toString()),u((0,Ze.applyFormat)(c,{type:lt,attributes:{style:et(null==h?void 0:h.style),class:null==h||null===(n=h.class)||void 0===n?void 0:n.join(" ")}}))}}))))}});var ot=(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.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 it="blockify/inline-svg";(0,Ze.registerFormatType)(it,{title:(0,t.__)("Inline SVG","blockify"),object:!0,tagName:"img",className:"has-inline-svg",edit(l){const{isActive:n,onChange:o,value:a}=l,[s,c]=(0,e.useState)(!1),[u,d]=(0,e.useState)({string:"",width:"1em",widthDesktop:"1em",alt:"",src:""});return(0,e.createElement)(i.BlockControls,null,(0,e.createElement)(i.RichTextShortcut,{type:"primary",character:"v",onUse:()=>{}}),(0,e.createElement)(i.RichTextToolbarButton,{icon:ot,title:(0,t.__)("Inline SVG","blockify"),isActive:n,shortcutType:"primary",shortcutCharacter:"v",onClick:()=>c(!s)}),s&&(0,e.createElement)(r.Toolbar,{className:"blockify-components-toolbar"},(0,e.createElement)(r.Popover,{position:"bottom center",className:"blockify-svg-control",focusOnMount:"container",onFocusOutside:()=>c(!1)},(0,e.createElement)(r.TextareaControl,{label:(0,t.__)("SVG String","blockify"),help:(0,t.__)("Paste your SVG string in the field above and then click the button below to insert your image.","blockify"),value:null==u?void 0:u.string,placeholder:(0,t.__)("Paste your SVG string here","blockify"),rows:20,onChange:e=>{d({...u,string:e.replace(/'/g,'"')})},style:{fontFamily:"var(--wp--preset--font-family--monospace, monospace)",width:"300px"}}),(0,e.createElement)("br",null),(0,e.createElement)(r.TextareaControl,{label:(0,t.__)("Alt Text","blockify"),placeholder:(0,t.__)("SVG description","blockify"),value:null==u?void 0:u.alt,rows:2,onChange:e=>{d({...u,alt:e})},style:{width:"300px"}}),(0,e.createElement)(r.PanelRow,null,(0,e.createElement)(r.Flex,null,(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalUnitControl,{label:(0,t.__)("Width Mobile","blockify"),value:null==u?void 0:u.width,onChange:e=>{d({...u,width:e})}})),(0,e.createElement)(r.FlexItem,null,(0,e.createElement)(r.__experimentalUnitControl,{label:(0,t.__)("Width Desktop","blockify"),value:null==u?void 0:u.widthDesktop,onChange:e=>{d({...u,widthDesktop:e})}})))),(0,e.createElement)("br",null),(0,e.createElement)(r.Button,{isPrimary:!0,text:(0,t.__)("Insert SVG","blockify"),onClick:()=>(e=>{let t=`-webkit-mask-image:url(${"data:image/svg+xml;utf8,"+encodeURIComponent(null==e?void 0:e.string)})`;null!=e&&e.width&&(t+=`;--width: ${null==e?void 0:e.width}`),null!=e&&e.widthDesktop&&(t+=`;--width-desktop: ${null==e?void 0:e.widthDesktop}`),o((0,Ze.insertObject)(a,{type:it,attributes:{style:t,alt:null==e?void 0:e.alt,role:"presentation",src:""}})),c(!1)})(u)}))))}});var rt=(0,e.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.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 at="blockify/underline",st=["none","solid","wavy","dashed","dotted","double","brush","circle"];(0,Ze.registerFormatType)(at,{title:(0,t.__)("Underline","blockify"),tagName:"u",className:"has-text-underline",attributes:{style:"style",class:"class"},edit:l=>{let{isActive:n,value:o,onChange:a}=l;const[s,c]=(0,e.useState)(""),[u,d]=(0,e.useState)(!1);let m=[],p=[];return null!=o&&o.formats&&o.formats.map((e=>{if((null==e?void 0:e.type)===at){var t,l;const n=null==e?void 0:e.attributes;m=(null!==(t=null==n?void 0:n.style)&&void 0!==t?t:"").split(";"),p=(null!==(l=null==n?void 0:n.classes)&&void 0!==l?l:"").split(" ")}})),(0,e.createElement)(i.BlockControls,null,(0,e.createElement)(i.RichTextShortcut,{type:"primary",character:"u",onUse:()=>{a((0,Ze.toggleFormat)(o,{type:at}))}}),(0,e.createElement)(i.RichTextToolbarButton,{icon:rt,title:(0,t.__)("Underline","blockify"),isActive:n,shortcutType:"primary",shortcutCharacter:"u",onClick:()=>d(!u)}),u&&(0,e.createElement)(r.Toolbar,{className:"blockify-components-toolbar"},(0,e.createElement)(r.Popover,{position:"bottom center",className:"blockify-underline-format",focusOnMount:"container",onFocusOutside:()=>d(!1)},(0,e.createElement)(r.__experimentalText,null,(0,t.__)("Underline style","blockify")),(0,e.createElement)("br",null),(0,e.createElement)(r.SelectControl,{onChange:e=>{var t,l;"none"===e&&a((0,Ze.removeFormat)(o,at)),c(e);let n=null!==(t=p)&&void 0!==t?t:[];n.forEach(((e,t)=>{e.includes("is-underline-")&&delete i.classes[t]}));const i={classes:[...n,"is-underline-"+e],styles:[...null!==(l=m)&&void 0!==l?l:[],"--wp--custom--underline--style:"+e]};a((0,Ze.applyFormat)(o,{type:at,attributes:{class:i.classes.join(" "),style:i.styles.join(";")}}))},value:s,options:st.map((e=>{return{label:(t=e,t.charAt(0).toUpperCase()+t.slice(1)),value:e};var t}))}))))}})}()}();