Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home2/cargocap/mrbuilders.pk/wp-includes/widgets/upgrade/index.php on line 148

Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home2/cargocap/mrbuilders.pk/wp-includes/widgets/upgrade/index.php on line 266

Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home2/cargocap/mrbuilders.pk/wp-includes/widgets/upgrade/index.php on line 274
fg
/home2/cargocap/public_html/wp-content/plugins/gutenify/core/dist/blocks/button/index.js
(()=>{var e,t={5563:(e,t,o)=>{"use strict";const n=window.React,r=window.wp.i18n,a=window.wp.components,l=window.wp.blocks;var i=o(6942),c=o.n(i);const s=window.wp.blockEditor,u=JSON.parse('{"UU":"gutenify/button","rE":"2","uK":{"blockClientId":{"type":"string","default":""},"blockAdvanceOptions":{"type":"object","default":{"buttonBorderRadius":0,"buttonBorderWidth":0}},"text":{"type":"string","default":""},"placeholder":{"type":"string","default":""},"url":{"type":"string","source":"attribute","selector":"a","attribute":"href"},"linkTarget":{"type":"string","source":"attribute","selector":"a","attribute":"target"},"rel":{"type":"string","source":"attribute","selector":"a","attribute":"rel"},"icon":{"type":"object","default":{"name":"","positon":"before","spacing":""}}}}'),d=window.wp.element,b=window.wp.hooks,p=window.wp.keycodes,g=window.wp.primitives,m=(0,n.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(g.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})),k=(0,n.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(g.Path,{d:"M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z"})),{UU:h}=u,v={hookPrefix:"button",blockId:h.replace("/","--")},_="gutenify",C=window?.[`_${_}_vars`]?window[`_${_}_vars`]:{},{is_pro_activated:f,pro_account_url:y,pro_license_status:E,title:w,prefix:x,slug:$,authorWebSite:B,authorDemoWebSite:S,authorWebSiteProPage:T,defaultTheme:N,authorWebSiteSupport:O,plugin_directory_url:F,brand_color:I,plugin_main_version:A,documentationsURL:P,pro_title:G,active_blocks:R,plugin_main_camel_case_name:U}=C,W=(C?.siteUrl?C.siteUrl:C.site_url,(0,r.sprintf)("Want to enjoy all feature of blocks? Checkout %1$s%2$s%3$s.",'<a href="'+T+'" target="_blank">',G,"</a>"),{pluginMainSlug:"gutenify",pluginMainCamelCaseName:U,pluginMainFunctionPrefix:"gutenify"}),{hookPrefix:V,blockId:M}=v,{pluginMainSlug:H}=W,j="noreferrer noopener";function z({isSelected:e,url:t,updateBlock:o,opensInNewTab:l,onToggleOpenInNewTab:i,anchorRef:c}){const[u,b]=(0,d.useState)(!1),g=!!t,h=g&&e,v=()=>(b(!0),!1),_=()=>{o({url:void 0,linkTarget:void 0,rel:void 0}),b(!1)},C=(u||h)&&(0,n.createElement)(a.Popover,{placement:"top",onClose:()=>b(!1),anchorRef:c?.current,__unstableSlotName:"__unstable-block-tools-after",shift:!0},(0,n.createElement)(s.__experimentalLinkControl,{className:"wp-block-navigation-link__inline-link-input",value:{url:t,opensInNewTab:l},onChange:({url:e="",opensInNewTab:t})=>{o({url:e}),l!==t&&i(t)}}));return(0,n.createElement)(d.Fragment,null,(0,n.createElement)(s.BlockControls,{group:"block"},!g&&(0,n.createElement)(a.ToolbarButton,{name:"link",icon:m,title:(0,r.__)("Link"),shortcut:p.displayShortcut.primary("k"),onClick:v}),h&&(0,n.createElement)(a.ToolbarButton,{name:"link",icon:k,title:(0,r.__)("Unlink"),shortcut:p.displayShortcut.primaryShift("k"),onClick:_,isActive:!0})),e&&(0,n.createElement)(a.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{[p.rawShortcut.primary("k")]:v,[p.rawShortcut.primaryShift("k")]:_}}),C)}const L=e=>{const{attributes:t,isSelected:o,hasURLPicker:r=!0,setAttributes:a}=e,{url:l,linkTarget:i,rel:c}=t,s=(0,d.useCallback)((e=>{const t=e?"_blank":void 0;let o=c;t&&!c?o=j:t||c!==j||(o=void 0),a({linkTarget:t,rel:o})}),[c,a]),u=(0,d.useRef)();return(0,n.createElement)(d.Fragment,null,r&&(0,n.createElement)(z,{url:l,updateBlock:a,isSelected:o,opensInNewTab:"_blank"===i,onToggleOpenInNewTab:s,anchorRef:u}))};(0,b.addFilter)(`${H}--block-controls--${M}`,`${H}--block-controls--${M}--url-picker`,((e,t)=>[...e,(0,n.createElement)(d.Fragment,{key:`gutenify-block-${V}-options-block-control-url-picker`},(0,n.createElement)(L,{...t}))]));const{hookPrefix:Z,blockId:K}=v,{IconPickerModal:D}=window?.[`_${x}_vars`]?.components,{pluginMainSlug:J}=W,q=e=>{const{setAttributes:t,attributes:o}=e,{icon:l}=o,[i,c]=(0,d.useState)(!1);return(0,n.createElement)(d.Fragment,null,(0,n.createElement)(a.BaseControl,{id:"button-icon"},(0,n.createElement)(a.Flex,{gap:20,className:"gutenify-icon-picker-field-wrap"},(0,n.createElement)(a.FlexItem,null,(0,n.createElement)("p",null,(0,r.__)("Choose Icon"))),(0,n.createElement)(a.FlexBlock,null,(0,n.createElement)(a.Button,{onClick:()=>{c(!i)},variant:"secondary"},l?.name?(0,n.createElement)("i",{className:l?.name}):(0,r.__)("Select Icon")),(0,n.createElement)("br",null),l?.name&&(0,n.createElement)(a.Button,{variant:"link",onClick:()=>{t({icon:{...l,name:""}})}},(0,r.__)("Remove"))))),i?(0,n.createElement)(D,{closeModal:()=>{c(!i)},onChange:e=>{t({icon:{...l,name:e}})}}):"",l?.name&&(0,n.createElement)(d.Fragment,null,(0,n.createElement)(a.SelectControl,{label:(0,r.__)("Icon Position"),onChange:e=>{const o={icon:{...l,position:e}};t(o)},value:l?.position,options:[{value:"before",label:(0,r.__)("Before")},{value:"after",label:(0,r.__)("After")}]}),(0,n.createElement)(a.TextControl,{label:(0,r.__)("Icon spacing"),onChange:e=>{const o={icon:{...l,spacing:e}};t(o)},value:l?.spacing,min:0,type:"number"})))};(0,b.addFilter)(`${J}--inspector-controls--${K}--content`,`${J}--inspector-controls--${K}--content--opitons`,((e,t)=>[...e,(0,n.createElement)(d.Fragment,{key:`gutenify--${Z}--inspectorControls--tab-content-basic-wrap`},(0,n.createElement)(q,{...t}))]));const Q=window.wp.data,X=window.lodash,Y=e=>{const{clearable:t=!0}=e,{colors:o}=(0,Q.useSelect)((e=>({colors:e("core/block-editor").getSettings().colors||[]})));return(0,n.createElement)(a.BaseControl,{label:e.label,id:"textcolor-1"},(0,n.createElement)(a.ColorPalette,{colors:o,value:e.value,onChange:t=>{e.onChange(t)},clearable:t}))},ee=e=>{const{clearable:t=!0}=e,{colors:o,gradients:r}=(0,Q.useSelect)((e=>({colors:e("core/block-editor").getSettings().colors||[],gradients:e("core/block-editor").getSettings().gradients||[]})));return(0,n.createElement)("div",{className:"gutenify-color-gradient-control-wrapper"},(0,n.createElement)(s.__experimentalColorGradientControl,{label:e.label,colorValue:e.colorValue,gradientValue:e.gradientValue,colors:o,gradients:r,disableCustomColors:!1,disableCustomGradients:!1,onColorChange:t=>{if((0,X.isEmpty)(t))return;const o={backgroundColor:t,backgroundGradient:void 0};e.onChange(o)},onGradientChange:t=>{if((0,X.isEmpty)(t))return;const o={backgroundGradient:t,backgroundColor:void 0};e.onChange(o)},clearable:!1}),t&&(0,n.createElement)("div",{className:"components-circular-option-picker__custom-clear-wrapper"},(0,n.createElement)("button",{type:"button",className:"components-button components-circular-option-picker__clear is-secondary is-small",onClick:()=>{e.onChange({backgroundColor:void 0,backgroundGradient:void 0})}},"Clear")))};d.Component;const{Accordion:te}=window?.[`_${x}_vars`]?.components,{hookPrefix:oe,blockId:ne}=v,{pluginMainSlug:re}=W;(0,b.addFilter)(`${re}--inspector-controls--${ne}--style`,`${re}--inspector-controls--${ne}--style--opitons`,((e,t)=>{const{attributes:o,setAttributes:l}=t,{blockAdvanceOptions:i}=o;return[...e,(0,n.createElement)(d.Fragment,{key:`gutenify-block-${oe}-options-tab-style-basic`},(0,n.createElement)(te,{tabs:[{name:"button",initialOpen:!0,label:()=>(0,r.__)("Button Style"),cb:()=>(0,n.createElement)(d.Fragment,null,(0,n.createElement)(a.TabPanel,{className:"gutenify-editor-tab-panel gutenify-editor-tab-ovel",activeClass:"active-tab",tabs:[{name:"normal",title:(0,r.__)("Normal"),className:"gutenify-color-normal-tab"},{name:"hover",title:(0,r.__)("Hover"),className:"gutenify-color-hover-tab"}]},(e=>(0,n.createElement)(d.Fragment,null,"normal"===e.name&&(0,n.createElement)(d.Fragment,null,(0,n.createElement)(Y,{label:(0,r.__)("Text Color"),onChange:e=>{const t={blockAdvanceOptions:{...i,textColor:e}};l(t)},value:i.textColor}),(0,n.createElement)(a.ToggleControl,{label:(0,r.__)("Transparent Background"),checked:"transparent"===i.backgroundColor,onChange:()=>{const e={backgroundColor:"transparent",backgroundGradient:""};"transparent"===i.backgroundColor&&(e.backgroundColor="");const t={blockAdvanceOptions:{...i,...e}};l(t)}}),"transparent"!==i.backgroundColor&&(0,n.createElement)(ee,{label:(0,r.__)("Background Color"),colorValue:i.backgroundColor,gradientValue:i.backgroundGradient,onChange:e=>{const t={blockAdvanceOptions:{...i,...e}};l(t)}}),(0,n.createElement)(Y,{label:(0,r.__)("Border Color"),onChange:e=>{const t={blockAdvanceOptions:{...i,borderColor:e}};l(t)},value:i.borderColor})),"hover"===e.name&&(0,n.createElement)(d.Fragment,null,(0,n.createElement)(Y,{label:(0,r.__)("Text Color"),onChange:e=>{const t={blockAdvanceOptions:{...i,hoverTextColor:e}};l(t)},value:i.hoverTextColor}),(0,n.createElement)(a.ToggleControl,{label:(0,r.__)("Transparent Background"),checked:"transparent"===i.hoverBackgroundColor,onChange:()=>{const e={hoverBackgroundColor:"transparent",hoverBackgroundGradient:""};"transparent"===i.hoverBackgroundColor&&(e.hoverBackgroundColor="");const t={blockAdvanceOptions:{...i,...e}};l(t)}}),"transparent"!==i.hoverBackgroundColor&&(0,n.createElement)(ee,{label:(0,r.__)("Background Color"),colorValue:i.hoverBackgroundColor,gradientValue:i.hoverBackgroundGradient,onChange:e=>{const t={blockAdvanceOptions:{...i,hoverBackgroundColor:e.backgroundColor,hoverBackgroundGradient:e.backgroundGradient}};l(t)}}),(0,n.createElement)(Y,{label:(0,r.__)("Border Color"),onChange:e=>{const t={blockAdvanceOptions:{...i,hoverBorderColor:e}};l(t)},value:i.hoverBorderColor})),(0,n.createElement)(a.__experimentalNumberControl,{label:(0,r.__)("Border Width"),value:i.borderWidth,onChange:e=>{const t={blockAdvanceOptions:{...i,borderWidth:e}};l(t)},min:0,max:300}),(0,n.createElement)(a.__experimentalUnitControl,{label:(0,r.__)("Border Radius"),value:i.borderRadius,onChange:e=>{const t={blockAdvanceOptions:{...i,borderRadius:e}};l(t)},min:0,max:300}),(0,n.createElement)(a.__experimentalDivider,null)))))}]}))]}));const{blockId:ae}=v,{pluginMainSlug:le}=W;(0,b.addFilter)(`${le}--inline-styles--${ae}`,`${le}--inline-styles--${ae}--button`,(function(e,t,o=""){const{attributes:n,name:r}=t;if(r!==`${le}/button`)return e;const{blockAdvanceOptions:a,blockClientId:l,icon:i}=n;o=o||`.gutenify-section-${l} .gutenify-button-link`;let c="";c+=(0,X.has)(a,"textColor")&&!(0,X.isEmpty)(a.textColor)?`color: ${a.textColor};`:"",c+=(0,X.has)(a,"backgroundColor")&&!(0,X.isEmpty)(a.backgroundColor)?`background: ${a.backgroundColor};`:"",(0,X.has)(a,"backgroundGradient")&&!(0,X.isEmpty)(a.backgroundGradient)&&(c+=`background: ${a.backgroundGradient};`),c+=(0,X.has)(a,"borderColor")&&!(0,X.isEmpty)(a.borderColor)?`border-color: ${a.borderColor};`:"",c+=(0,X.has)(a,"borderWidth")&&a.borderWidth>0?`border-width: ${a.borderWidth}px;`:"",c+=(0,X.has)(a,"borderWidth")&&a.borderWidth>0?"border-style: solid;":"",c+=(0,X.has)(a,"borderRadius")&&!(0,X.isEmpty)(a.borderRadius)?`border-radius: ${a.borderRadius};`:"",c&&(e+=`${o} { ${c} }`);let s="";s+=(0,X.has)(a,"hoverTextColor")&&!(0,X.isEmpty)(a.hoverTextColor)?`color: ${a.hoverTextColor};`:"",s+=(0,X.has)(a,"hoverBackgroundColor")&&!(0,X.isEmpty)(a.hoverBackgroundColor)?`background: ${a.hoverBackgroundColor};`:"",(0,X.has)(a,"hoverBackgroundGradient")&&!(0,X.isEmpty)(a.hoverBackgroundGradient)&&(s+=`background: ${a.hoverBackgroundGradient};`),s+=(0,X.has)(a,"hoverBorderColor")&&!(0,X.isEmpty)(a.hoverBorderColor)?`border-color: ${a.hoverBorderColor};`:"",s&&(e+=`${o}:hover { ${s} }`);let u="";return u+=i?.name&&i?.position&&"after"===i.position?"flex-direction: row-reverse;":"",u+=i?.name&&i?.spacing?`gap: ${i.spacing}px;`:"",u&&(e+=`${o} { ${u} }`),(0,b.applyFilters)(`${le}--button--inline-styles`,e,t)}));const{button:ie}=window?.[`_${x}_vars`]?.components?.Icons,{UU:ce,uK:se}=u,ue={title:(0,r.__)("Button"),description:(0,r.__)("This block allows you to place an button."),icon:(0,n.createElement)(a.Icon,{icon:ie}),keywords:["gutenify",(0,r.__)("Button")],parent:["gutenify/buttons"],example:{attributes:{image:{url:"",id:""}}},attributes:se,edit:e=>{const{attributes:t,setAttributes:o,isSelected:a,className:l}=e,{text:i,placeholder:d,fontSize:b,style:p,blockClientId:g,icon:m}=t,k=(0,s.useBlockProps)({className:c()(l,{"has-custom-font-size":b||p},`gutenify-section-${g}`,"wp-block-button",`${u.UU.replace(/\//gm,"-")}-version-${u.rE}`)});return(0,n.createElement)("div",{...k},(0,n.createElement)("div",{className:c()("gutenify-button-link","wp-block-button__link")},m?.name&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("i",{className:m.name})),(0,n.createElement)(s.RichText,{"aria-label":(0,r.__)("Button text"),placeholder:d||(0,r.__)("Add text…"),value:i,onChange:e=>{o({text:e})},allowedFormats:["core/bold","core/italic"],rel:"noopener noreferrer",keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,identifier:"text"})))},save:function(e){const{attributes:t,className:o}=e,{fontSize:r,linkTarget:a,rel:l,style:i,text:d,title:b,url:p,blockClientId:g,icon:m}=t;if(!d)return null;const k=c()("gutenify-button-link","wp-block-button__link"),h=c()({"has-custom-font-size":r||i?.typography?.fontSize},"wp-block-button",`gutenify-section-${g}`,`${u.UU.replace(/\//gm,"-")}-version-${u.rE}`);return(0,n.createElement)("div",{...s.useBlockProps.save({className:h})},(0,n.createElement)("a",{href:p,title:b,target:a,className:k,rel:l},m?.name&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("i",{className:m.name})),(0,n.createElement)(s.RichText.Content,{tagName:"span",value:d})))},supports:{anchor:!0,align:!1,alignWide:!1,typography:{fontSize:!0,__experimentalFontFamily:!0}},deprecated:[{attributes:se,save(e){const{className:t}=e,{fontSize:o,linkTarget:r,rel:a,style:l,text:i,title:u,url:d,blockClientId:b}=e.attributes;if(!i)return null;const p=c()("gutenify-button-link","wp-block-button__link"),g=c()(t,{"has-custom-font-size":o||l?.typography?.fontSize},"wp-block-button",`gutenify-section-${b}`);return(0,n.createElement)("div",{...s.useBlockProps.save({className:g})},(0,n.createElement)(s.RichText.Content,{tagName:"a",className:p,href:d,title:u,value:i,target:r,rel:a}))}}]};(0,l.registerBlockType)(ce,{...ue})},6942:(e,t)=>{var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=l(e,a(o)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var o in e)n.call(e,o)&&e[o]&&(t=l(t,o));return t}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.m=t,e=[],n.O=(t,o,r,a)=>{if(!o){var l=1/0;for(u=0;u<e.length;u++){for(var[o,r,a]=e[u],i=!0,c=0;c<o.length;c++)(!1&a||l>=a)&&Object.keys(n.O).every((e=>n.O[e](o[c])))?o.splice(c--,1):(i=!1,a<l&&(l=a));if(i){e.splice(u--,1);var s=r();void 0!==s&&(t=s)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[o,r,a]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={3690:0,4382:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var r,a,[l,i,c]=o,s=0;if(l.some((t=>0!==e[t]))){for(r in i)n.o(i,r)&&(n.m[r]=i[r]);if(c)var u=c(n)}for(t&&t(o);s<l.length;s++)a=l[s],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(u)},o=globalThis.webpackChunkgutenify=globalThis.webpackChunkgutenify||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var r=n.O(void 0,[4382],(()=>n(5563)));r=n.O(r)})();