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/www/wp-content/plugins/gutenify/core/dist/blocks/info-box/index.js
(()=>{var e,t={6947:(e,t,o)=>{"use strict";const n=window.React,r=window.wp.i18n,l=window.wp.components,a=window.wp.blocks;var i=o(6942),c=o.n(i);const s=window.wp.compose,u=window.wp.data,d=window.wp.blockEditor,b=window.lodash,m=window.wp.hooks,p=JSON.parse('{"UU":"gutenify/info-box","rE":"2","uK":{"className":{"type":"string","default":"apple"},"blockClientId":{"type":"string","default":""},"blockAdvanceOptions":{"type":"object","default":{"backgroundColor":"#fff","padding":{"desktop":{"top":"40px","right":"40px","bottom":"40px","left":"40px"}}}},"layout":{"type":"string","default":"layout-1"},"iconAlign":{"type":"string"},"titleAlign":{"type":"string"},"borderRadius":{"type":"string","default":0},"borderWidth":{"type":"number","default":0}}}'),{UU:g}=p,h={name:g,blockId:g.replace("/","--"),hookPrefix:"info-box",layouts:[{name:"layout-1",label:"Layout 1",iconAlign:"center",titleAlign:"center",buttonAlign:"center"},{name:"layout-2",label:"Layout 2",iconAlign:"center",titleAlign:"left",buttonAlign:"left"},{name:"layout-3",label:"Layout 3",iconAlign:"center",titleAlign:"right",buttonAlign:"right"}]},k="gutenify",f=window?.[`_${k}_vars`]?window[`_${k}_vars`]:{},{is_pro_activated:v,pro_account_url:y,pro_license_status:C,title:_,prefix:$,slug:E,authorWebSite:x,authorDemoWebSite:w,authorWebSiteProPage:A,defaultTheme:B,authorWebSiteSupport:I,plugin_directory_url:O,brand_color:S,plugin_main_version:N,documentationsURL:F,pro_title:G,active_blocks:U,plugin_main_camel_case_name:W}=f,P=(f?.siteUrl?f.siteUrl:f.site_url,(0,r.sprintf)("Want to enjoy all feature of blocks? Checkout %1$s%2$s%3$s.",'<a href="'+A+'" target="_blank">',G,"</a>"),{pluginMainSlug:"gutenify",pluginMainCamelCaseName:W,pluginMainFunctionPrefix:"gutenify"}),{blockId:R,name:T}=h,{pluginMainSlug:j}=P;(0,m.addFilter)(`${j}--inline-styles--${R}`,`${j}--inline-styles--${R}--info-box`,(function(e,t,o=""){const{attributes:n,name:r}=t;if(r!==T)return e;const{blockAdvanceOptions:l,blockClientId:a}=n;o=o||`.${j}-section-${a}`;let i="";i+=(0,b.has)(l,"textColor")&&!(0,b.isEmpty)(l.textColor)?`color: ${l.textColor};`:"",i+=(0,b.has)(l,"backgroundColor")&&!(0,b.isEmpty)(l.backgroundColor)?`background: ${l.backgroundColor};`:"",(0,b.has)(l,"backgroundGradient")&&!(0,b.isEmpty)(l.backgroundGradient)&&(i+=`background: ${l.backgroundGradient};`),i+=(0,b.has)(l,"borderColor")&&!(0,b.isEmpty)(l.borderColor)?`border-color: ${l.borderColor};`:"",i+=(0,b.has)(l,"borderWidth")&&!(0,b.isEmpty)(l.borderWidth)?`border-width: ${l.borderWidth}px;`:"",i+=(0,b.has)(l,"borderWidth")&&!(0,b.isEmpty)(l.borderWidth)?"border-style: solid;":"",i+=(0,b.has)(l,"borderRadius")&&!(0,b.isEmpty)(l.borderRadius)?`border-radius: ${l.borderRadius};`:"",i&&(e+=`${o} { ${i} }`);let c="";return c+=(0,b.has)(l,"hoverTextColor")&&!(0,b.isEmpty)(l.hoverTextColor)?`color: ${l.hoverTextColor};`:"",c+=(0,b.has)(l,"hoverBackgroundColor")&&!(0,b.isEmpty)(l.hoverBackgroundColor)?`background: ${l.hoverBackgroundColor};`:"",(0,b.has)(l,"hoverBackgroundGradient")&&!(0,b.isEmpty)(l.hoverBackgroundGradient)&&(c+=`background: ${l.hoverBackgroundGradient};`),c+=(0,b.has)(l,"hoverBorderColor")&&!(0,b.isEmpty)(l.hoverBorderColor)?`border-color: ${l.hoverBorderColor};`:"",c&&(e+=`${o}:hover { ${c} }`),e}));const M=window.wp.element,{pluginMainSlug:V}=P,J=({layouts:e,label:t="Layouts",value:o,onChange:r,blockName:a})=>{e=(0,m.applyFilters)(`${E}--layouts--${a}`,e);const i=a.replace(new RegExp(E+"--","gi"),"");return(0,n.createElement)(n.Fragment,null,e&&e.length?(0,n.createElement)("div",{className:`${E}-template-browser`},(0,n.createElement)(l.Flex,{direction:"column",gap:"20px"},(0,n.createElement)(l.FlexBlock,null,(0,n.createElement)("h2",null,t)),(0,n.createElement)(l.FlexBlock,null,(0,n.createElement)("ul",null,e.map((e=>{let t=`${E}-template-browser-item`;return o===e.name&&(t+=` ${E}-template-browser-item-active`),(0,n.createElement)("li",{className:t,key:e.name},(0,n.createElement)("button",{className:`${E}-template-browser-selector`,onClick:()=>{r(e)}},(0,n.createElement)("img",{src:e?.thumbnailUrl?e.thumbnailUrl:`${O}/assets/images/layouts/${i}/${e.name}.png`,alt:e.name}),(0,n.createElement)("small",null,e.label)))})))))):"")},{Accordion:L}=window?.[`_${$}_vars`]?.components,{blockId:D,layouts:H}=h,{pluginMainSlug:K}=P;(0,m.addFilter)(`${K}--inspector-controls--${D}--content`,`${K}--inspector-controls--${D}--content--opitons`,((e,t)=>{const{attributes:o,setAttributes:l}=t,{layout:a}=o;return[...e,(0,n.createElement)(M.Fragment,{key:`${K}--inspector-controls--${D}--content--opitons`},(0,n.createElement)(L,{tabs:[{name:"info-box",initialOpen:!0,label:()=>(0,r.__)("Info Box"),cb:()=>(0,n.createElement)(M.Fragment,null,(0,n.createElement)(J,{layouts:H,value:a,blockName:D,onChange:e=>{const o={layout:e.name,iconAlign:e.iconAlign,titleAlign:e.titleAlign};l(o),((e,t)=>{const{clientId:o}=t;(0,u.select)("core/block-editor").getBlocksByClientId(o)[0].innerBlocks.forEach((function(t){`${V}/icon`===t.name&&(0,u.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{contentJustification:e.iconAlign}),"core/heading"===t.name&&(0,u.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{textAlign:e.titleAlign}),"core/paragraph"===t.name&&(0,u.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{align:e.titleAlign}),`${V}/buttons`===t.name&&(0,u.dispatch)("core/block-editor").updateBlockAttributes(t.clientId,{contentJustification:e.buttonAlign})}))})(e,t)}}))}]}))]}));const q=e=>{const{clearable:t=!0}=e,{colors:o}=(0,u.useSelect)((e=>({colors:e("core/block-editor").getSettings().colors||[]})));return(0,n.createElement)(l.BaseControl,{label:e.label,id:"textcolor-1"},(0,n.createElement)(l.ColorPalette,{colors:o,value:e.value,onChange:t=>{e.onChange(t)},clearable:t}))},z=e=>{const{clearable:t=!0}=e,{colors:o,gradients:r}=(0,u.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)(d.__experimentalColorGradientControl,{label:e.label,colorValue:e.colorValue,gradientValue:e.gradientValue,colors:o,gradients:r,disableCustomColors:!1,disableCustomGradients:!1,onColorChange:t=>{if((0,b.isEmpty)(t))return;const o={backgroundColor:t,backgroundGradient:void 0};e.onChange(o)},onGradientChange:t=>{if((0,b.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")))};M.Component;const{Accordion:Q}=window?.[`_${$}_vars`]?.components,{blockId:X}=h,{pluginMainSlug:Y}=P;(0,m.addFilter)(`${Y}--inspector-controls--${X}--style`,`${Y}--inspector-controls--${X}--style--opitons`,((e,t)=>{const{attributes:o,setAttributes:a}=t,{blockAdvanceOptions:i}=o;return[...e,(0,n.createElement)(M.Fragment,{key:`${Y}--inspector-controls--${X}--style--opitons`},(0,n.createElement)(Q,{tabs:[{name:"info-box",initialOpen:!0,label:()=>(0,r.__)("Info Box Style"),cb:()=>(0,n.createElement)(M.Fragment,null,(0,n.createElement)(l.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)(M.Fragment,null,"normal"===e.name&&(0,n.createElement)(M.Fragment,null,(0,n.createElement)(q,{label:(0,r.__)("Color"),onChange:e=>{const t={blockAdvanceOptions:{...i,textColor:e}};a(t)},value:i.textColor}),(0,n.createElement)(z,{label:(0,r.__)("Background Color"),colorValue:i.backgroundColor,gradientValue:i.backgroundGradient,onChange:e=>{const t={blockAdvanceOptions:{...i,...e}};a(t)}}),(0,n.createElement)(q,{label:(0,r.__)("Border Color"),onChange:e=>{const t={blockAdvanceOptions:{...i,borderColor:e}};a(t)},value:i.borderColor})),"hover"===e.name&&(0,n.createElement)(M.Fragment,null,(0,n.createElement)(q,{label:(0,r.__)("Color"),onChange:e=>{const t={blockAdvanceOptions:{...i,hoverTextColor:e}};a(t)},value:i.hoverTextColor}),(0,n.createElement)(z,{label:(0,r.__)("Background Color"),colorValue:i.hoverBackgroundColor,gradientValue:i.hoverBackgroundGradient,onChange:e=>{const t={blockAdvanceOptions:{...i,hoverBackgroundColor:e.backgroundColor,hoverBackgroundGradient:e.backgroundGradient}};a(t)}}),(0,n.createElement)(q,{label:(0,r.__)("Border Color"),onChange:e=>{const t={blockAdvanceOptions:{...i,hoverBorderColor:e}};a(t)},value:i.hoverBorderColor})),(0,n.createElement)(l.__experimentalNumberControl,{label:(0,r.__)("Border Width"),value:i.borderWidth,onChange:e=>{const t={blockAdvanceOptions:{...i,borderWidth:e}};a(t)},min:0,max:300}),(0,n.createElement)(l.__experimentalUnitControl,{label:(0,r.__)("Border Radius"),value:i.borderRadius,onChange:e=>{const t={blockAdvanceOptions:{...i,borderRadius:e}};a(t)},min:0,max:300}),(0,n.createElement)(l.__experimentalDivider,null)))))}]}))]}));const{createHigherOrderComponent:Z}=wp.compose,{Fragment:ee}=wp.element,{addFilter:te}=wp.hooks,oe=["gutenify/info-box"];te("editor.BlockEdit","extend-block-example/with-spacing-control",Z((e=>t=>oe.includes(t.name)?(t.attributes.blockClientId||!t.attributes.className||t.attributes.className.includes("has-shadow-dark")||(t.attributes.className=c()("has-shadow-dark",t.attributes.className)),(0,n.createElement)(ee,null,(0,n.createElement)(e,{...t}))):(0,n.createElement)(e,{...t})),"withSpacingControl"));const{pluginMainSlug:ne}=P,re=[`${ne}/buttons`,`${ne}/icon`],le=(0,s.compose)([(0,u.withDispatch)(((e,t)=>{const{clientId:o}=t;return{updateInnerBlocks(t){(0,u.select)("core/block-editor").getBlocksByClientId(o)[0].innerBlocks.forEach((function(o){`${ne}/icon`===o.name&&e("core/block-editor").updateBlockAttributes(o.clientId,{contentJustification:t.iconAlign}),"core/heading"===o.name&&e("core/block-editor").updateBlockAttributes(o.clientId,{textAlign:t.titleAlign}),"core/paragraph"===o.name&&e("core/block-editor").updateBlockAttributes(o.clientId,{align:t.titleAlign}),`${ne}/buttons`===o.name&&e("core/block-editor").updateBlockAttributes(o.clientId,{contentJustification:t.buttonAlign})}))}}}))])((e=>{const{attributes:t}=e,{layout:o,blockClientId:r}=t,l=(0,d.useBlockProps)({className:c()(`${ne}-info-box-${o}`,`${ne}-section-${r}`,`${p.UU.replace(/\//gm,"-")}-version-${p.rE}`)}),{children:a,...i}=(0,d.useInnerBlocksProps)(l,{allowedBlocks:re,template:[[`${ne}/icon`,{contentJustification:"center"}],["core/heading",{content:"Info box",level:3,textAlign:"center",className:`${ne}-admin-info-box-block-title`}],["core/heading",{textAlign:"center",level:4,content:"Info box subtitle",className:`${ne}-admin-info-box-block-subtitle`}],["core/paragraph",{content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet est massa. Sed enim massa, mattis at libero nec, bibendum ultricies augue.",align:"center",className:`${ne}-admin-info-box-block-content`}],[`${ne}/buttons`,{layout:{type:"flex",justifyContent:"center"},contentJustification:"center"}]],templateInsertUpdatesSelection:!1});return(0,n.createElement)("div",{...i},a)})),{infoBox:ae}=window?.[`_${$}_vars`]?.components?.Icons,{UU:ie,uK:ce}=p,se={title:(0,r.__)("Info Box"),description:(0,r.__)("Gutenify Info Box"),icon:(0,n.createElement)(l.Icon,{icon:ae}),keywords:["gutenify",(0,r.__)("Info Box")],example:{attributes:{image:{url:"",id:""}}},attributes:ce,edit:le,save:function(e){const{attributes:t}=e,{layout:o,blockClientId:r}=t,l=c()(`gutenify-info-box-${o}`,`gutenify-section-${r}`,`${p.UU.replace(/\//gm,"-")}-version-${p.rE}`),a=d.useBlockProps.save({className:l}),i=d.useInnerBlocksProps.save(a);return(0,n.createElement)("div",{...i},i.children)},supports:{html:!1}};(0,a.registerBlockType)(ie,{...se})},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=a(e,l(o)))}return e}function l(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=a(t,o));return t}function a(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 l=o[e]={exports:{}};return t[e](l,l.exports,n),l.exports}n.m=t,e=[],n.O=(t,o,r,l)=>{if(!o){var a=1/0;for(u=0;u<e.length;u++){for(var[o,r,l]=e[u],i=!0,c=0;c<o.length;c++)(!1&l||a>=l)&&Object.keys(n.O).every((e=>n.O[e](o[c])))?o.splice(c--,1):(i=!1,l<a&&(a=l));if(i){e.splice(u--,1);var s=r();void 0!==s&&(t=s)}}return t}l=l||0;for(var u=e.length;u>0&&e[u-1][2]>l;u--)e[u]=e[u-1];e[u]=[o,r,l]},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={3802:0,7486:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var r,l,[a,i,c]=o,s=0;if(a.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<a.length;s++)l=a[s],n.o(e,l)&&e[l]&&e[l][0](),e[l]=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,[7486],(()=>n(6947)));r=n.O(r)})();