!function(){vare,t={656:function(e,t,r){"use strict";vara={};functionn(e){returnn="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},n(e)}functioni(e){vart=function(e,t){if("object"!=n(e)||!e)returne;varr=e[Symbol.toPrimitive];if(void0!==r){vara=r.call(e,"string");if("object"!=n(a))returna;thrownewTypeError("@@toPrimitive must return a primitive value.")}returnString(e)}(e);return"symbol"==n(t)?t:String(t)}functiono(e,t,r){return(t=i(t))ine?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.r(a),r.d(a,{FILE:function(){return$o},HTML:function(){returnYo},TEXT:function(){returnqo},URL:function(){returnWo}});vars=r(280),l=window.wp.element,c=window.wp.components;functionu(e,t){varr=Object.keys(e);if(Object.getOwnPropertySymbols){vara=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}returnr}functiong(e){for(vart=1;t<arguments.length;t++){varr=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}returne}vard={extend:function(e){vart=arguments.length>1&&void0!==arguments[1]?arguments[1]:{};returnwp.customize.Control.extend(Object.assign({},{ready:function(){vare=this;e.setting.bind((function(){e.renderContent()}))},embed:function(){vare=this,t=e.section();t&&wp.customize.section(t,(function(t){t.expanded.bind((function(t){t&&e.actuallyEmbed()}))}))},actuallyEmbed:function(){vare=this;"resolved"!==e.deferred.embedded.state()&&(e.renderContent(),e.deferred.embedded.resolve())},initialize:function(e,t){varr=this;r.setNotificationContainer=r.setNotificationContainer.bind(r),wp.customize.Control.prototype.initialize.call(r,e,t),wp.customize.control.bind("removed",(functione(t){r===t&&(r.destroy(),r.container.remove(),wp.customize.control.unbind("removed",e))}))},setNotificationContainer:function(e){this.notifications.container=jQuery(e),this.notifications.render()},getWrapper:function(){vare=this,t=e.container[0];if(e.params.choices.wrapper){varr=document.getElementById(e.params.choices.wrapper+"--wrapper");r&&(t=r,e.container.hide())}returnt},renderContent:function(){vart=this,r=t.setting.get(),a=(0,s.createElement)(c.SlotFillProvider,null,(0,s.createElement)(e,g(g({},t.params),{},{value:r,setNotificationContainer:t.setNotificationContainer,customizerSetting:t.setting,control:t,choices:t.params.choices,default:t.params.defaultValue})),(0,s.createElement)(c.Popover.Slot,null)),n=t.getWrapper();(0,l.render)(a,n)},destroy:function(){(0,l.unmountComponentAtNode)(this.container[0]),wp.customize.Control.prototype.destroy&&wp.customize.Control.prototype.destroy.call(this)}},t))}},f=d,p=window.wp.i18n;functionv(e,t){(null==t||t>e.length)&&(t=e.length);for(varr=0,a=newArray(t);r<t;r++)a[r]=e[r];returna}functionh(e,t){if(e){if("string"==typeofe)returnv(e,t);varr=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void0}}functiony(e,t){returnfunction(e){if(Array.isArray(e))returne}(e)||function(e,t){varr=null==e?null:"undefined"!=typeofSymbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){vara,n,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}elsefor(;!(l=(a=i.call(r)).done)&&(s.push(a.value),s.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)thrown}}returns}}(e,t)||h(e,t)||function(){thrownewTypeError("Invalidattempttodestructurenon-iterableinstance.\nInordertobeiterable,non-arrayobjectsmusthavea
/* translators: Unit type (px, em, %) */,{text:(0,p.sprintf)((0,p.__)("%s Preview","generatepress"),t),key:e},(0,s.createElement)(c.Button,{key:e,className:"components-generate-control-button__units--"+e,isSmall:!0
/* translators: %s: values associated with CSS syntax, 'Pixel', 'Em', 'Percentage' */,"aria-label":t,onClick:function(){wp.customize.previewedDevice.set(e),r(e),o(e)}},Ne(e)))})))))},ei=r(80),ti=r.n(ei);functionri(e){vart=e.value,r=e.onChange,a=e.units,n=void0===a?[]:a,i=e.disabled;returnn.length?(n.includes(t)||(n[n.length-1]=t),(0,s.createElement)(s.Fragment,null,(0,s.createElement)(c.DropdownMenu,{className:"gblocks-unit-control-units",label:(0,p.__)("Select a unit","generatepress"),icon:null,toggleProps:{children:t||String.fromCharCode(8212),disabled:i},popoverProps:{className:"gblocks-unit-control-popover",focusOnMount:!0,noArrow:!1}},(function(e){vara=e.onClose;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(c.MenuGroup,null,n.map((function(e){return(0,s.createElement)(c.MenuItem,{key:e,onClick:function(){r(e),a()},isSelected:e===t,variant:e===t?"primary":""},e||String.fromCharCode(8212))})),(0,s.createElement)(c.MenuItem,{onClick:function(){window.open("https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units","_blank").focus()},label:(0,p.__)("Learn more about units","generatepress"),showTooltip:!0},Ne("info"))))})))):null}varai=["px","em","%","rem","vw","vh","ch","cm","mm","in","pt","pc","ex","lh","rlh","vmin","vmax","vb","vi","svw","svh","svb","svi","svmax","svmin","lvw","lvh","lvb","lvi","lvmax","lvmin","dvw","dvh","dvb","dvi","dvmax","dvmin","fr"];functionni(e){vart=e.label,r=e.units,a=void0===r?[]:r,n=e.defaultUnit,i=void0===n?"":n,o=e.unitCount,u=void0===o?7:o,g=e.id,d=e.disabled,f=void0!==d&&d,p=e.overrideValue,v=void0===p?null:p,h=e.overrideAction,m=void0===h?function(){returnnull}:h,b=e.onChange,S=e.value,w=e.placeholder,O=e.help,C=void0===O?"":O,E=e.focusOnMount,D=void0!==E&&E,N=e.onFocus,x=void0===N?function(){returnnull}:N,T=a.concat(ai).slice(0,u),I=y((0,l.useState)(""),2),M=I[0],k=I[1],P=y((0,l.useState)(""),2),_=P[0],R=P[1],L=y((0,l.useState)(""),2),A=L[0],j=L[1],F=(0,l.useRef)(!1),B=(0,l.useRef)(!1),V=(0,l.useRef)(!1),H=function(e){vart=ai.join("|"),r=newRegExp("(".concat(t,")"));returne?e.toString().toLowerCase().split(r).filter((function(e){return""!==e})):[]},z=function(e){returne.length>0?e[0].trim():""},G=i||T[0],U=function(e){returne.length>1?e[1]:e.length>0?"":e.length?void0:G},K=function(e){return/^([-]?\d|[-]?\.)/.test(e)},$=function(){if(!S){vare=H(v||w);j(z(e)),k(U(e))}};return(0,l.useEffect)((function(){vare=v&&f?v:S;if(K(e)){vart=H(e);R(z(t)),k(U(t))}elseR(e),k("");$()}),[S,v]),(0,l.useEffect)((function(){if(F.current){vare=!!v&&!!f,t=K(_)?_+M:_;t||(M!==U(H(w))?j(""):$()),e||t===S||b(t)}elseF.current=!0}),[_,M]),(0,l.useEffect)((function(){D&&null!=V&&V.current&&V.current.focus()}),[t]),(0,s.createElement)(c.BaseControl,{label:t,help:C,id:g,className:ti()({"gblocks-unit-control":!0,"gblocks-unit-control__disabled":!!f})},(0,s.createElement)("div",{className:"gblocks-unit-control__input",ref:B},(0,s.createElement)(c.TextControl,{type:"text",value:_,placeholder:A,id:g,autoComplete:"off",disabled:f,onChange:function(e){returnR(e)},onFocus:function(){x()},ref:V}),(0,s.createElement)("div",{className:"gblocks-unit-control__input--action"},!!m&&(0,s.createElement)("div",{className:"gblocks-unit-control__override-action"},m()," "),(K(_)||!_&&(!A||K(A)))&&(0,s.createElement)(ri,{value:M,disabled:f||1===T.length,units:T,onChange:function(e){returnk(e)}}))))}varii=function(e){vart=e.label,r=e.units,a=e.defaultUnit,n=void0===a?"":a,i=e.desktopValue,o=e.desktopInitial,u=e.desktopOnChange,g=e.tabletValue,d=e.tabletInitial,f=e.tabletOnChange,p=e.mobileInitial,v=e.mobileValue,h=e.mobileOnChange,m=y((0,l.useState)("desktop"),2),b=m[0],S=m[1];return(0,s.createElement)(c.BaseControl,null,(0,s.createElement)(Qn,{label:t,devices:["desktop","tablet","mobile"],onClick:function(e){returnS(e)}}),(0,s.createElement)("div",{className:"generate-component-input-with-unit"},(0,s.createElement)("div",{className:"generate-component-device-field","data-device":"desktop"},(0,s.createElement)(ni,{key:b,units:r,value:i,placeholder:o,onChange