(()=>{"use strict";var e={n:t=>{var l=t&&t.__esModule?()=>t.default:()=>t;return e.d(l,{a:l}),l},d:(t,l)=>{for(var n in l)e.o(l,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:l[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.blocks,l=window.wp.domReady;e.n(l)()((()=>{var e,l,n;const o=null!==(e=null===(l=window)||void 0===l||null===(n=l.blockify)||void 0===n?void 0:n.blockStyles)&&void 0!==e?e:{unregister:[],register:[]};[...null==o?void 0:o.unregister].forEach((e=>{(0,t.unregisterBlockStyle)(null==e?void 0:e.type,null==e?void 0:e.name)})),[...null==o?void 0:o.register].forEach((e=>{(0,t.registerBlockStyle)(null==e?void 0:e.type,e)}))}));const n=window.wp.element,o=window.wp.hooks,a=window.wp.compose;var r,i,s;const c=null!==(r=null===(i=window)||void 0===i||null===(s=i.blockify)||void 0===s?void 0:s.blockSupports)&&void 0!==r?r:{};(0,o.addFilter)("blocks.registerBlockType","blockify/block-supports",((e,t)=>(Object.keys(c).includes(t)&&(e.supports={...e.supports,...c[t]}),e)),0),(0,o.addFilter)("blocks.getSaveContent.extraProps","blockify/alignment-class",((e,t,l)=>(Object.keys(c).includes(t.name)&&null!=l&&l.align&&(e.className+=" align"+l.align),e))),(0,o.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 u=(0,a.createHigherOrderComponent)((e=>t=>{var l,o,a;if("core/search"!==t.name)return(0,n.createElement)(e,t);const r=document.getElementsByClassName("wp-block-search__input"),i=null==t||null===(l=t.attributes)||void 0===l||null===(o=l.style)||void 0===o||null===(a=o.spacing)||void 0===a?void 0:a.padding;return r[0]&&i&&(i.top&&(r[0].style.paddingTop=null==i?void 0:i.top),i.right&&(r[0].style.paddingRight=null==i?void 0:i.right),i.bottom&&(r[0].style.paddingBottom=null==i?void 0:i.bottom),i.left&&(r[0].style.paddingLeft=null==i?void 0:i.left)),(0,n.createElement)(e,t)}),"withInspectorControl");(0,o.addFilter)("editor.BlockEdit","blockify/with-search-padding-css",u);const d=window.wp.i18n,m=window.wp.data,b=window.wp.plugins,p=window.wp.editor,h=window.wp.editPost,g=window.wp.components;function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{postTitle:e,template:t}=(0,m.useSelect)((e=>({postTitle:e(p.store).getEditedPostAttribute("title"),template:e(p.store).getEditedPostAttribute("template")})),[]);"landing-page"===t?document.body.classList.add("page-template-landing-page"):document.body.classList.remove("page-template-landing-page");const{editPost:l}=(0,m.useDispatch)(p.store);return(0,n.createElement)("div",null,(0,n.createElement)(h.PluginPostStatusInfo,null,(0,n.createElement)(g.TextControl,{label:(0,d.__)("Title","blockify"),value:null!=e?e:"",min:1,onChange:e=>l({title:e}),required:!0})))}});const v=window.wp.blockEditor;var w;const f=null!==(w=window.blockify.blockSupports)&&void 0!==w?w:{};(0,o.addFilter)("blocks.registerBlockType","blockify/add-box-shadow-attributes",((e,t)=>{var l,n,o;return null!=f&&null!==(l=f[t])&&void 0!==l&&l.boxShadow?(null!=e&&null!==(n=e.attributes)&&void 0!==n&&n.boxShadowColor||null!=e&&null!==(o=e.attributes)&&void 0!==o&&o.boxShadowGradient||(e.attributes=Object.assign(e.attributes,{useDefaultBoxShadow:{type:"boolean"},boxShadowX:{type:"integer"},boxShadowY:{type:"integer"},boxShadowBlur:{type:"integer"},boxShadowSpread:{type:"integer"},boxShadowColor:{type:"string"},boxShadowGradient:{type:"string"},boxShadowZIndex:{type:"integer"}})),e):e}));const k=(0,a.createHigherOrderComponent)((e=>t=>{var l;const{attributes:o,setAttributes:a,name:r}=t;if(null==f||null===(l=f[r])||void 0===l||!l.boxShadow)return(0,n.createElement)(e,t);const{useDefaultBoxShadow:i,boxShadowX:s,boxShadowY:c,boxShadowBlur:u,boxShadowSpread:m,boxShadowColor:b,boxShadowGradient:p,boxShadowZIndex:h}=o;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t),(0,n.createElement)(v.InspectorControls,null,(0,n.createElement)(g.PanelBody,{title:(0,d.__)("Box Shadow","blockify"),initialOpen:!1,className:"blockify-controls"},(0,n.createElement)(g.PanelRow,null,(0,n.createElement)(g.ToggleControl,{label:(0,d.__)("Use default box shadow?","blockify"),help:(0,d.__)("Inherit custom properties defined in the theme.json file","blockify"),checked:null!=i&&i,onChange:e=>a({useDefaultBoxShadow:e})})),!i&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(g.PanelRow,null,(0,n.createElement)(g.Flex,null,(0,n.createElement)(g.FlexItem,null,(0,n.createElement)(g.__experimentalNumberControl,{label:(0,d.__)("X","blockify"),value:null!=s?s:0,step:1,shiftStep:10,onChange:e=>a({boxShadowX:parseInt(e)})})),(0,n.createElement)(g.FlexItem,null,(0,n.createElement)(g.__experimentalNumberControl,{label:(0,d.__)("Y","blockify"),value:null!=c?c:0,step:1,shiftStep:10,onChange:e=>a({boxShadowY:parseInt(e)})})),(0,n.createElement)(g.FlexItem,null,(0,n.createElement)(g.__experimentalNumberControl,{label:(0,d.__)("Blur","blockify"),value:null!=u?u:0,step:1,shiftStep:10,min:0,onChange:e=>a({boxShadowBlur:parseInt(e)})})),(0,n.createElement)(g.FlexItem,null,(0,n.createElement)(g.__experimentalNumberControl,{label:(0,d.__)("Spread","blockify"),step:1,shiftStep:10,value:null!=m?m:0,onChange:e=>a({boxShadowSpread:parseInt(e)})})))),(0,n.createElement)(v.__experimentalPanelColorGradientSettings,{title:(0,d.__)("Color","blockify"),showTitle:!1,settings:[{colorValue:null!=b?b:"",gradientValue:null!=p?p:"",label:(0,d.__)("Box Shadow Color","blockify"),onColorChange:e=>a({boxShadowColor:e}),onGradientChange:e=>a({boxShadowGradient:e})}]}),(0,n.createElement)(g.PanelRow,null,(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Box shadow z index","blockify"),value:null!=h?h:-1,onChange:e=>a({boxShadowZIndex:e}),min:-10,max:10}))))))}),"boxShadowEdit");(0,o.addFilter)("editor.BlockEdit","blockify/with-box-shadows",k,99);const x=(e,t)=>{var l,n,o,a,r,i,s;let c="inherit";var u,d;return null!=t&&null!==(l=t.style)&&void 0!==l&&null!==(n=l.border)&&void 0!==n&&n.radius&&(c=(parseInt(null==t||null===(u=t.style)||void 0===u||null===(d=u.border)||void 0===d?void 0:d.radius)+parseInt(null==t?void 0:t.boxShadowSpread)/2).toString()+"px"),null!=t&&t.boxShadowGradient&&(e.style["--wp--custom--box-shadow--gradient"]=null==t?void 0:t.boxShadowGradient),null!=t&&t.boxShadowColor&&(e.style["--wp--custom--box-shadow--color"]=null==t?void 0:t.boxShadowColor),{...e.style,"--wp--custom--box-shadow--x":(null!==(o=null==t?void 0:t.boxShadowX)&&void 0!==o?o:0)+"px","--wp--custom--box-shadow--y":(null!==(a=null==t?void 0:t.boxShadowY)&&void 0!==a?a:0)+"px","--wp--custom--box-shadow--blur":(null!==(r=null==t?void 0:t.boxShadowBlur)&&void 0!==r?r:0)+"px","--wp--custom--box-shadow--spread":(null!==(i=null==t?void 0:t.boxShadowSpread)&&void 0!==i?i:0)+"px","--wp--custom--box-shadow--radius":c,"--wp--custom--box-shadow--z-index":null!==(s=null==t?void 0:t.boxShadowZIndex)&&void 0!==s?s:-1}},E=(0,a.createHigherOrderComponent)((e=>t=>{var l;const{attributes:o,name:a}=t;if(null==f||null===(l=f[a])||void 0===l||!l.boxShadow)return(0,n.createElement)(e,t);const{useDefaultBoxShadow:r,boxShadowColor:i,boxShadowGradient:s}=o;let c={...t.wrapperProps};return c.className+=" has-box-shadow",r?(0,n.createElement)(e,y({},t,c)):s||i?(t.className+=" has-box-shadow",c.style=x(c.style,o),(0,n.createElement)(e,y({},t,{wrapperProps:c}))):(0,n.createElement)(e,t)}),"withBoxShadow");(0,o.addFilter)("editor.BlockListBlock","blockify/edit-box-shadow-styles",E),(0,o.addFilter)("blocks.getSaveContent.extraProps","blockify/save-box-shadow-styles",((e,t,l)=>{var n;if(null==f||null===(n=f[null==t?void 0:t.name])||void 0===n||!n.boxShadow)return e;const{useDefaultBoxShadow:o,boxShadowColor:a,boxShadowGradient:r}=l;return o?(e.className+=" has-box-shadow",e):r||a?(e.className+=" has-box-shadow",e.style=x(e.style,l),e):e}));const _=["core/separator","core/paragraph"];(0,o.addFilter)("blocks.registerBlockType","blockify/add-width-attribute",((e,t)=>(_.includes(t)&&(e.attributes.width={type:"string"},e.attributes.height={type:"string"}),e)));const S=(0,a.createHigherOrderComponent)((e=>t=>{var l;const o=(0,n.createElement)(e,t);if(!_.includes(t.name))return o;const{attributes:a,setAttributes:r}=t;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t),(0,n.createElement)(v.InspectorControls,null,(0,n.createElement)(g.PanelBody,{title:(0,d.__)("Dimensions","blockify"),initialOpen:!1,className:"blockify-controls"},(0,n.createElement)(g.__experimentalUnitControl,{label:(0,d.__)("Width","blockify"),value:null!==(l=a.width)&&void 0!==l?l:"auto",onChange:e=>r({width:e})}))))}),"withWidthCss"),C=e=>{let t="";return null!=e&&e.width&&(t+="width:"+e.width),t.trim()};(0,o.addFilter)("editor.BlockEdit","blockify/with-width-css",S);const F=(0,a.createHigherOrderComponent)((e=>t=>{const{attributes:l,name:o,clientId:a}=t,r=(0,n.createElement)(e,t);if(!_.includes(o))return r;let i=C(l);return i?(0,n.createElement)(n.Fragment,null,(0,n.createElement)("style",null,"#block-"+a+"{"+i+"}"),(0,n.createElement)(e,t)):r}),"withWidth");(0,o.addFilter)("editor.BlockListBlock","blockify/with-css-filter",F),(0,o.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-css-filter-styles",(function(e,t,l){if(void 0!==l&&_.includes(t.name)){let t=C(l);t&&(e={...e,style:{...e.style,styles:t}})}return e}));const B=["core/image","core/group"],R={blur:{type:"integer"},brightness:{type:"integer"},contrast:{type:"integer"},grayscale:{type:"integer"},hueRotate:{type:"integer"},invert:{type:"integer"},opacity:{type:"integer"},saturate:{type:"integer"},sepia:{type:"integer"}};(0,o.addFilter)("blocks.registerBlockType","blockify/add-css-filter-attributes",((e,t)=>(B.includes(t)&&Object.keys(R).map((t=>{e.attributes[t]=R[t]})),e)));const I=(0,a.createHigherOrderComponent)((e=>t=>{var l,o,a,r,i,s,c,u,m;const b=(0,n.createElement)(e,t);if(!B.includes(t.name))return b;const{attributes:p,setAttributes:h}=t;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t),(0,n.createElement)(v.InspectorControls,null,(0,n.createElement)(g.PanelBody,{title:(0,d.__)("Filter","blockify"),initialOpen:!1,className:"blockify-controls"},(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Blur","blockify"),value:null!==(l=null==p?void 0:p.blur)&&void 0!==l?l:0,onChange:e=>h({blur:e}),min:0,max:100,step:1,shiftStep:10,isShiftStepEnabled:!0,withInputField:!0,allowReset:!0}),(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Brightness","blockify"),value:null!==(o=null==p?void 0:p.brightness)&&void 0!==o?o:100,onChange:e=>h({brightness:e}),min:0,max:1e3,step:1,shiftStep:10,isShiftStepEnabled:!0,withInputField:!0,allowReset:!0}),(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Contrast","blockify"),value:null!==(a=null==p?void 0:p.contrast)&&void 0!==a?a:100,onChange:e=>h({contrast:e}),min:0,max:1e3,step:1,shiftStep:10,isShiftStepEnabled:!0,withInputField:!0,allowReset:!0}),(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Grayscale","blockify"),value:null!==(r=null==p?void 0:p.grayscale)&&void 0!==r?r:0,onChange:e=>h({grayscale:e}),min:0,max:100,step:1,shiftStep:10,isShiftStepEnabled:!0,withInputField:!0,allowReset:!0}),(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Hue Rotate","blockify"),value:null!==(i=null==p?void 0:p.hueRotate)&&void 0!==i?i:0,onChange:e=>h({hueRotate:e}),min:0,max:360,step:1,shiftStep:10,isShiftStepEnabled:!0,withInputField:!0,allowReset:!0}),(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Invert","blockify"),value:null!==(s=null==p?void 0:p.invert)&&void 0!==s?s:0,onChange:e=>h({invert:e}),min:0,max:100,step:1,shiftStep:10,isShiftStepEnabled:!0,withInputField:!0,allowReset:!0}),(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Opacity","blockify"),value:null!==(c=null==p?void 0:p.opacity)&&void 0!==c?c:100,onChange:e=>h({opacity:e}),min:0,max:100,step:1,shiftStep:10,isShiftStepEnabled:!0,withInputField:!0,allowReset:!0}),(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Saturate","blockify"),value:null!==(u=null==p?void 0:p.saturate)&&void 0!==u?u:100,onChange:e=>h({saturate:e}),min:0,max:1e3,step:1,shiftStep:10,isShiftStepEnabled:!0,withInputField:!0,allowReset:!0}),(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Sepia","blockify"),value:null!==(m=null==p?void 0:p.sepia)&&void 0!==m?m:0,onChange:e=>h({sepia:e}),min:0,max:100,step:1,shiftStep:10,isShiftStepEnabled:!0,withInputField:!0,allowReset:!0}))))}),"withCssFilter"),T=e=>{let t="";return null!=e&&e.blur&&(t+=" blur("+e.blur+"px)"),null!=e&&e.brightness&&(t+=" brightness("+e.brightness+"%)"),null!=e&&e.contrast&&(t+=" contrast("+e.contrast+"%)"),null!=e&&e.grayscale&&(t+=" grayscale("+e.grayscale+"%)"),null!=e&&e.hueRotate&&(t+=" hue-rotate("+e.hueRotate+"deg)"),null!=e&&e.invert&&(t+=" invert("+e.invert+"%)"),null!=e&&e.opacity&&(t+=" opacity("+e.opacity+"%)"),null!=e&&e.saturate&&(t+=" saturate("+e.saturate+"%)"),null!=e&&e.sepia&&(t+=" sepia("+e.sepia+"%)"),t.trim()};(0,o.addFilter)("editor.BlockEdit","blockify/with-css-transforms",I);const P=(0,a.createHigherOrderComponent)((e=>t=>{const{attributes:l,name:o,clientId:a}=t,r=(0,n.createElement)(e,t);if(!B.includes(o))return r;let i=T(l);return i?(0,n.createElement)(n.Fragment,null,(0,n.createElement)("style",null,"#block-"+a+"{filter:"+i+"}"),(0,n.createElement)(e,t)):r}),"withCssTransform");(0,o.addFilter)("editor.BlockListBlock","blockify/with-css-filter",P),(0,o.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-css-filter-styles",(function(e,t,l){if(void 0!==l&&B.includes(t.name)){let t=T(l);t&&(e={...e,style:{...e.style,filter:t}})}return e})),(0,o.addFilter)("blocks.registerBlockType","blockify/block-attributes-position",(e=>{var t;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&t.position||(e.attributes=Object.assign(e.attributes,{position:{type:"string"},inset:{type:"object"},zIndex:{type:"integer"}})),e}));const O=(0,a.createHigherOrderComponent)((e=>t=>{const{attributes:l,setAttributes:o,isSelected:a}=t;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t),a&&(0,n.createElement)(v.InspectorControls,null,(0,n.createElement)(g.PanelBody,{title:(0,d.__)("Position","blockify"),initialOpen:!1,className:"blockify-controls"},((e,t)=>{var l,o,a,r;const{position:i,inset:s,zIndex:c}=e,u=[{label:(0,d.__)("Default","blockify"),value:""},{label:(0,d.__)("Relative","blockify"),value:"relative"},{label:(0,d.__)("Absolute","blockify"),value:"absolute"},{label:(0,d.__)("Sticky","blockify"),value:"sticky"},{label:(0,d.__)("Fixed","blockify"),value:"fixed"},{label:(0,d.__)("Static","blockify"),value:"static"}];return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(g.PanelRow,null,(0,n.createElement)(g.SelectControl,{label:(0,d.__)("Position","blockify"),value:null!=i?i:"",options:u,onChange:e=>t({position:e})})),(0,n.createElement)(g.PanelRow,null,(0,n.createElement)(g.Flex,null,(0,n.createElement)(g.FlexItem,null,(0,n.createElement)(g.__experimentalUnitControl,{label:(0,d.__)("Top","blockify"),value:null!==(l=null==s?void 0:s.top)&&void 0!==l?l:"",onChange:e=>t({inset:{...s,top:e}})})),(0,n.createElement)(g.FlexItem,null,(0,n.createElement)(g.__experimentalUnitControl,{label:(0,d.__)("Right","blockify"),value:null!==(o=null==s?void 0:s.right)&&void 0!==o?o:"",onChange:e=>t({inset:{...s,right:e}})})),(0,n.createElement)(g.FlexItem,null,(0,n.createElement)(g.__experimentalUnitControl,{label:(0,d.__)("Bottom","blockify"),value:null!==(a=null==s?void 0:s.bottom)&&void 0!==a?a:"",onChange:e=>t({inset:{...s,bottom:e}})})),(0,n.createElement)(g.FlexItem,null,(0,n.createElement)(g.__experimentalUnitControl,{label:(0,d.__)("Left","blockify"),value:null!==(r=null==s?void 0:s.left)&&void 0!==r?r:"",onChange:e=>t({inset:{...s,left:e}})})))),(0,n.createElement)(g.PanelRow,null,(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Z Index","blockify"),onChange:e=>t({zIndex:e}),value:c,min:-10,max:10,step:1,shiftStep:!0,allowReset:!0})))})(l,o))))}),"withAdvancedControls");(0,o.addFilter)("editor.BlockEdit","blockify/custom-advanced-control",O);const X=e=>{const{position:t,inset:l,zIndex:n,transform:o,opacity:a}=e;let r={};return t&&(r.position=t),null!=l&&l.top&&(r.top=l.top),null!=l&&l.right&&(r.right=l.right),null!=l&&l.bottom&&(r.bottom=l.bottom),null!=l&&l.left&&(r.left=l.left),n&&(r.zIndex=n),r},Y=(0,a.createHigherOrderComponent)((e=>t=>{const{attributes:l}=t,o=X(l);let a={...t.wrapperProps};return o&&(a.style={...a.style,...o}),(0,n.createElement)(e,y({},t,{wrapperProps:a}))}),"withPositionStyle");(0,o.addFilter)("editor.BlockListBlock","blockify/with-position-style",Y),(0,o.addFilter)("blocks.getSaveContent.extraProps","blockify/add-position-style",((e,t,l)=>{const n=X(l);return n&&(e.style={...e.style,...n}),e})),window.blockify.blockSupports;const N=["core/columns","core/cover","core/group","core/media-text","core/row","core/stack"];(0,o.addFilter)("blocks.registerBlockType","blockify/reverse-mobile-attributes",((e,t)=>(N.includes(t)&&(e.attributes.reverseMobile={type:"boolean"}),e)));const Z=(0,a.createHigherOrderComponent)((e=>t=>{const l=(0,n.createElement)(e,t);if(!N.includes(t.name))return l;const{attributes:o,setAttributes:a}=t,{reverseMobile:r}=o;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t),(0,n.createElement)(v.InspectorControls,null,(0,n.createElement)(g.PanelRow,{className:"blockify-reverse-mobile"},(0,n.createElement)(g.ToggleControl,{label:(0,d.__)("Reverse on mobile","blockify"),checked:null!=r&&r,onChange:()=>a({reverseMobile:!r})}))))}),"editReverseMobile");(0,o.addFilter)("editor.BlockEdit","blockify/edit-reverse-mobile",Z,0);const A=(0,a.createHigherOrderComponent)((e=>t=>{const{attributes:l,name:o}=t,a=(0,n.createElement)(e,t);return N.includes(o)?(null!=l&&l.reverseMobile&&(t.className+=" is-reverse-on-mobile"),(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t))):a}),"withReverseMobile");(0,o.addFilter)("editor.BlockListBlock","blockify/with-reverse-mobile",A),(0,o.addFilter)("blocks.getSaveContent.extraProps","blockify/save-reverse-mobile",(function(e,t,l){return void 0!==l&&N.includes(t.name)&&null!=l&&l.reverseMobile&&(e.className+=" is-reverse-on-mobile"),e}));const z=["core/group","core/image"],H={translateX:{type:"object"},translateY:{type:"object"},translateZ:{type:"object"},scale:{type:"integer"},scaleX:{type:"integer"},scaleY:{type:"integer"},scaleZ:{type:"integer"},rotate:{type:"integer"},rotateX:{type:"integer"},rotateY:{type:"integer"},rotateZ:{type:"integer"},skewX:{type:"integer"},skewY:{type:"integer"}};(0,o.addFilter)("blocks.registerBlockType","blockify/add-css-transform-attributes",((e,t)=>(z.includes(t)&&Object.keys(H).map((t=>{e.attributes[t]=H[t]})),e)));const G=(0,a.createHigherOrderComponent)((e=>t=>{var l,o,a,r,i,s,c,u,m,b,p,h,y;const w=(0,n.createElement)(e,t);if(!z.includes(t.name))return w;const{attributes:f,setAttributes:k}=t;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t),(0,n.createElement)(v.InspectorControls,null,(0,n.createElement)(g.PanelBody,{title:(0,d.__)("Transform","blockify"),initialOpen:!1,className:"blockify-controls"},(0,n.createElement)(g.__experimentalText,null,(0,d.__)("Translate","blockify")),(0,n.createElement)("br",null),(0,n.createElement)(g.Flex,null,(0,n.createElement)(g.FlexItem,null,(0,n.createElement)(g.__experimentalUnitControl,{label:(0,d.__)("X","blockify"),value:null!==(l=f.translateX)&&void 0!==l?l:"0px",onChange:e=>k({translateX:e})})),(0,n.createElement)(g.FlexItem,null,(0,n.createElement)(g.__experimentalUnitControl,{label:(0,d.__)("Y","blockify"),value:null!==(o=null==f?void 0:f.translateY)&&void 0!==o?o:"0px",onChange:e=>k({translateY:e})})),(0,n.createElement)(g.FlexItem,null,(0,n.createElement)(g.__experimentalUnitControl,{label:(0,d.__)("Z","blockify"),value:null!==(a=null==f?void 0:f.translateZ)&&void 0!==a?a:"0px",onChange:e=>k({translateZ:e})}))),(0,n.createElement)("br",null),(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Scale","blockify"),value:null!==(r=null==f?void 0:f.scale)&&void 0!==r?r:1,onChange:e=>k({scale:e}),min:-10,max:10,step:.1,shiftStep:1,isShiftStepEnabled:!0,withInputField:!0,allowReset:!0}),(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Scale X","blockify"),value:null!==(i=null==f?void 0:f.scaleX)&&void 0!==i?i:1,onChange:e=>k({scaleX:e}),min:-10,max:10,step:.1,shiftStep:1,isShiftStepEnabled:!0,withInputField:!0,allowReset:!0}),(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Scale Y","blockify"),value:null!==(s=null==f?void 0:f.scaleY)&&void 0!==s?s:1,onChange:e=>k({scaleY:e}),min:-10,max:10,step:.1,shiftStep:1,isShiftStepEnabled:!0,withInputField:!0,allowReset:!0}),(0,n.createElement)(g.RangeControl,{label:(0,d.__)("Scale Z","blockify"),value:null!==(c=null==f?void 0:f.scaleZ)&&void 0!==c?c:1,onChange:e=>k({scaleZ:e}),min:-10,max:10,step:.1,shiftStep:1,isShiftStepEnabled:!0,withInputField:!0,allowReset:!0}),(0,n.createElement)(g.AnglePickerControl,{label:(0,d.__)("Rotate","blockify"),value:null!==(u=null==f?void 0:f.rotate)&&void 0!==u?u:0,onChange:e=>k({rotate:e})}),(0,n.createElement)(g.AnglePickerControl,{label:(0,d.__)("RotateX","blockify"),value:null!==(m=null==f?void 0:f.rotateX)&&void 0!==m?m:0,onChange:e=>k({rotateX:e})}),(0,n.createElement)(g.AnglePickerControl,{label:(0,d.__)("RotateY","blockify"),value:null!==(b=null==f?void 0:f.rotateY)&&void 0!==b?b:0,onChange:e=>k({rotateY:e})}),(0,n.createElement)(g.AnglePickerControl,{label:(0,d.__)("RotateZ","blockify"),value:null!==(p=null==f?void 0:f.rotateZ)&&void 0!==p?p:0,onChange:e=>k({rotateZ:e})}),(0,n.createElement)("br",null),(0,n.createElement)(g.AnglePickerControl,{label:(0,d.__)("Skew X","blockify"),value:null!==(h=null==f?void 0:f.skewX)&&void 0!==h?h:0,onChange:e=>k({skewX:e})}),(0,n.createElement)(g.AnglePickerControl,{label:(0,d.__)("Skew Y","blockify"),value:null!==(y=null==f?void 0:f.skewY)&&void 0!==y?y:0,onChange:e=>k({skewY:e})}))))}),"withCssTransforms"),j=e=>{let t="";return null!=e&&e.translateX&&"0px"!==e.translateX&&(t+=" translateX("+e.translateX+")"),null!=e&&e.translateY&&"0px"!==e.translateY&&(t+=" translateY("+e.translateY+")"),null!=e&&e.translateZ&&"0px"!==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()};(0,o.addFilter)("editor.BlockEdit","blockify/with-css-transforms",G);const M=(0,a.createHigherOrderComponent)((e=>t=>{const{attributes:l,name:o,clientId:a}=t,r=(0,n.createElement)(e,t);if(!z.includes(o))return r;const i=j(l);return i?(0,n.createElement)(n.Fragment,null,(0,n.createElement)("style",null,"#block-"+a+"{transform:"+i+"}"),(0,n.createElement)(e,t)):r}),"withCssTransform");(0,o.addFilter)("editor.BlockListBlock","blockify/with-css-transform",M),(0,o.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-css-transform-styles",(function(e,t,l){if(void 0!==l&&z.includes(t.name)){const t=j(l);t&&(e={...e,style:{...e.style,transform:t}})}return e}));const U=window.lodash,L=window.wp.richText;class V extends n.Component{render(){const{value:e,isActive:t,onChange:l,formatTypes:o}=this.props;return(0,n.createElement)(v.RichTextToolbarButton,{icon:"editor-removeformatting",title:(0,d.__)("Clear Formatting","blockify"),onClick:()=>{if(o.length>0){let t=e;(0,U.map)(o,(e=>{t=(0,L.removeFormat)(t,e.name)})),l({...t})}},isActive:t})}}const D=(0,a.compose)((0,m.withSelect)((e=>({formatTypes:e("core/rich-text").getFormatTypes()}))))(V);(0,L.registerFormatType)("blockify/clear-formatting",{title:(0,d.__)("Clear","blockify"),tagName:"span",className:"clear",edit:e=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(D,e))});const W=window.wp.primitives,q=(0,n.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(W.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})),J=(0,n.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(W.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})),K="blockify/small";(0,L.registerFormatType)(K,{title:(0,d.__)("Small","blockify"),tagName:"small",className:null,edit(e){let{isActive:t,value:l,onChange:o}=e;const a=()=>{o((0,L.toggleFormat)(l,{type:K}))};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(v.RichTextShortcut,{type:"primary",character:"sm",onUse:a}),(0,n.createElement)(v.RichTextToolbarButton,{icon:q,title:(0,d.__)("Small","blockify"),onClick:a,isActive:t,shortcutType:"primary",shortcutCharacter:"sm"}))}});const Q="blockify/big";(0,L.registerFormatType)(Q,{title:(0,d.__)("Big","blockify"),tagName:"big",className:null,edit(e){let{isActive:t,value:l,onChange:o}=e;const a=()=>{o((0,L.toggleFormat)(l,{type:Q}))};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(v.RichTextShortcut,{type:"primary",character:"+",onUse:a}),(0,n.createElement)(v.RichTextToolbarButton,{icon:J,title:(0,d.__)("Big","blockify"),onClick:a,isActive:t,shortcutType:"primary",shortcutCharacter:"+"}))}});const $=(0,n.createElement)(W.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(W.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"})),ee="blockify/gradient",te=[{gradient:"linear-gradient(0deg,var(--wp--preset--color--black) 0%,var(--wp--preset--color--white) 100%)",slug:"black-white",name:"Black White"}];(0,L.registerFormatType)(ee,{title:(0,d.__)("Gradient","blockify"),tagName:"span",className:"has-gradient-text",attributes:{style:"style",class:"class"},edit:(0,a.compose)((0,m.withSelect)((e=>{const{gradients:t}=e("core/block-editor").getSettings();return{gradients:t||te}})))((e=>{let{isActive:t,value:l,onChange:o,gradients:a}=e;const[r,i]=(0,n.useState)(""),[s,c]=(0,n.useState)(!1);return(0,n.createElement)(v.BlockControls,null,(0,n.createElement)(v.RichTextShortcut,{type:"primary",character:"g"}),(0,n.createElement)(v.RichTextToolbarButton,{icon:$,title:(0,d.__)("Gradient","blockify"),isActive:t,shortcutType:"primary",shortcutCharacter:"g",onClick:()=>c(!s)}),s&&(0,n.createElement)(g.Toolbar,{className:"blockify-components-toolbar"},(0,n.createElement)(g.Popover,{position:"bottom center",className:"blockify-gradient-text-control",focusOnMount:"container",onFocusOutside:()=>c(!1)},(0,n.createElement)(g.GradientPicker,{value:r,gradients:a,onChange:e=>{i(e),o((0,L.applyFormat)(l,{type:ee,attributes:{style:"background:"+e,class:"has-gradient-text"}}))}}))))}))});const le=(0,n.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(W.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"})),ne="blockify/underline";(0,L.registerFormatType)(ne,{title:(0,d.__)("Underline","blockify"),tagName:"u",className:null,edit:e=>{let{isActive:t,value:l,onChange:o}=e;const a=()=>{o((0,L.toggleFormat)(l,{type:ne}))};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(v.RichTextShortcut,{type:"primary",character:"u",onUse:a}),(0,n.createElement)(v.RichTextToolbarButton,{icon:le,title:(0,d.__)("Underline","blockify"),onClick:a,isActive:t,shortcutType:"primary",shortcutCharacter:"u"}))}})})();