PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / 2.1.8
bBlocks – Essential Gutenberg Blocks & Patterns Collection v2.1.8
2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.43 2.0.42 2.0.41 2.0.40 2.0.39 2.0.38 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.5.1 1.5.2 1.5.3 All 108 releases
← All changes | build/whatsapp-chat/view.js +2 -1 2.1.7 → 2.1.8 View file →
@@ -1 +1,2 @@
1 -(()=>{"use strict";const t=window.ReactDOM,n="@media only screen and (max-width: 1024px)",o="@media only screen and (max-width: 640px)",e="linear-gradient(135deg, #0040E3, #18D4FD)";window.React;const a=t=>{const n=(t=>{try{const n=new URL(t);return["http:","https:"].includes(n.protocol)?n.toString():null}catch(n){return"string"==typeof t&&t.startsWith("/")&&!t.startsWith("//")?t:null}})(t);return n?`url('${n.replace(/['"()]/g,"")}')`:"none"},s=(t,n)=>{return null==(o=n)||""===o||Array.isArray(o)&&0===o.length||"object"==typeof o&&0===Object.keys(o).length||"string"==typeof o&&""===o.trim()||"number"==typeof o&&0===o?"":`${t}: ${n};`;var o},r=(t,n=!0,o=!0,r=!0)=>{const{type:l="solid",color:i="",gradient:c=e,image:p={},position:b="center center",attachment:d="",repeat:h="no-repeat",size:$="",overlayColor:u=""}=t||{};return"gradient"===l&&o?s("background",c):"image"===l&&r?`background: ${a(p?.url)};\n\t\t\t\t${s("background-color",u)}\n\t\t\t\t${s("background-position",b)}\n\t\t\t\t${s("background-size",$)}\n\t\t\t\t${s("background-repeat",h)}\n\t\t\t\t${s("background-attachment",d)}\n\t\t\t\t${s("background-repeat",h)}\n\t\t\t\tbackground-blend-mode: overlay;`:n&&s("background",i)},l=t=>{if(!t)return"";const n=t=>{const{color:n="#000000",style:o="solid",width:e="0px"}=t;return`${e} ${o} ${n}`};return"object"!=typeof t||Array.isArray(t)?"":t.hasOwnProperty("top")||t.hasOwnProperty("right")||t.hasOwnProperty("bottom")||t.hasOwnProperty("left")?["top","right","bottom","left"].map((o=>t[o]?`border-${o}: ${n(t[o])};`:"")).join(" ").trim():s("border",n(t))},i=(t,n="box")=>{const{hOffset:o="0px",vOffset:e="0px",blur:a="0px",spreed:s="0px",color:r="#7090b0",isInset:l=!1}=t||{},i=`${o} ${e} ${a}`;return("text"===n?`${i} ${r}`:`${i} ${s} ${r} ${l?"inset":""}`)||"none"},c=(t,e,a=!0)=>{const{fontFamily:r="Default",fontCategory:l="sans-serif",fontVariant:i=400,fontWeight:c,isUploadFont:p=!0,fontSize:b={desktop:null,tablet:null,mobile:null},fontStyle:d,textTransform:h,textDecoration:$,lineHeight:u,letterSpace:g}=e||{},m=!a||!r||"Default"===r,k=b?.desktop||b,w=b?.tablet||k,f=b?.mobile||w,x=t=>{const n=String(t);return["px","em","rem","%","vh","vw"].some((t=>n.endsWith(t)))?n:"number"==typeof t?`${n}px`:""},y=`\n\t\t${m?"":`font-family: '${r}', ${l};`}\n\t\t${s("font-weight",c)}\n\t\t${s("font-size",x(k))}\n\t\t${s("font-style",d)}\n\t\t${s("text-transform",h)}\n\t\t${s("text-decoration",$)}\n\t\t${s("line-height",u)}\n\t\t${s("letter-spacing",g)}\n\t`,v=i&&400!==i?"400i"===i?":ital@1":i?.includes("00i")?`: ital, wght@1, ${i?.replace("00i","00")} `:`: wght@${i} `:"",B=m?"":`https://fonts.googleapis.com/css2?family=${r?.split(" ").join("+")}${v.replace(/ /g,"")}&display=swap`;return{googleFontLink:!p||m?"":`@import url(${B});`,styles:`${t}{\n\t\t\t${y}\n\t\t}\n\t\t${n} {\n\t\t\t${t}{\n\t\t\t\t${s("font-size",x(w))}\n\t\t\t}\n\t\t}\n\t\t${o} {\n\t\t\t${t}{\n\t\t\t\t${s("font-size",x(f))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},p=t=>{if(!t)return"";if("string"==typeof t)return t;if("object"==typeof t&&!Array.isArray(t)){const n=["top","right","bottom","left"];return n.map((n=>t[n]||"")).every((t=>!t))?"":n.map((n=>t[n]||"0")).join(" ")}return""},b=window.ReactJSXRuntime,d=({attributes:t,id:e})=>{const{alignment:a,styles:d}=t,{normal:h,hover:$,desktop:u,tablet:g,mobile:m,typo:k}=d,w=`#${e}.wp-block-b-blocks-whatsapp-chat`,f=`${w} .bBlocks-whatsapp-block-wrapper`,x=`${w} .bBlocks-whatsapp-block-btn`,y=`${x}.bBlocks-whatsapp-block-btn--pulse`,v=`${x} .bBlocks-whatsapp-block-btn__text`,B=`${x} .bBlocks-whatsapp-block-btn__icon`,j=`${x} .bBlocks-whatsapp-block-btn__status-dot`;return(0,b.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${c("",k).googleFontLink}\n\t\t${c(v,k).styles}\n\n\t\t${f}{\n\t\t\t${s("align-items",a)}\n\t\t}\n\n\t\t${y} {\n\t\t\tanimation: bBlocks-whatsapp-block-pulse 2s infinite;\n\t\t}\n\n\t\t@keyframes bBlocks-whatsapp-block-pulse {\n\t\t\t0% {\n\t\t\t\tbox-shadow: 0 0 0 0 ${d.pulseColor};\n\t\t\t}\n\n\t\t\t70% {\n\t\t\t\tbox-shadow: 0 0 0 12px rgba(37, 211, 102, 0);\n\t\t\t}\n\n\t\t\t100% {\n\t\t\t\tbox-shadow: 0 0 0 0 rgba(37, 211, 102, 0);\n\t\t\t}\n\t\t}\n\n\t\t${x}{\n\t\t\t${s("margin",p(u.margin))}\n\t\t\t${s("padding",p(u.padding))}\n\t\t\t${r(h.bg)}\n\t\t\t${s("color",h.color)}\n\t\t\t${l(h.border)}\n\t\t\t${s("border-radius",p(h.radius))}\n\t\t\t${i(h.shadow)}\n\t\t\ttransition: all ${$.transition}s ease-in-out;\n\t\t}\n\t\t${x}:hover{\n\t\t\t${r($.bg)}\n\t\t\t${l($.border)}\n\t\t\t${s("color",$.color)}\n\t\t\t${s("border-radius",p($.radius))}\n\t\t\t${i($.shadow)}\n\t\t}\n\n\t\t${v}{\n\t\t\t${s("color",h.color)}\n\t\t}\n\n\t\t${x}:hover .bBlocks-whatsapp-block-btn__text{\n\t\t\t${s("color",$.color)}\n\t\t}\n\n\t\t${B}>svg{\n\t\t\t${s("width",d.icon.size)}\n\t\t\t${s("fill",d.icon.normal.color)}\n\t\t}\n\n\t\t${x}:hover .bBlocks-whatsapp-block-btn__icon>svg{\n\t\t\t${s("fill",d.icon.hover.color)}\n\t\t}\n\t\t\n\t\t${j}{\n\t\t\t${r(d.status.color)}\n\t\t\t${s("width",d.status.size)}\n\t\t\t${s("height",d.status.size)}\n\t\t\t${s("left",d.status.position.x)}\n\t\t\t${s("top",d.status.position.y)}\n\t\t}\n\t\t\n\t\t${n}{\n\t\t\t${x}{\n\t\t\t\t${s("margin",p(g.margin))}\n\t\t\t\t${s("padding",p(g.padding))}\n\t\t\t}\n\t\t}\n\t\t${o}{\n\t\t\t${x}{\n\t\t\t\t${s("margin",p(m.margin))}\n\t\t\t\t${s("padding",p(m.padding))}\n\t\t\t}\n\t\t}\n\t\t\n\t\t`.replace(/\s+/g," ")}})},h=(0,b.jsx)("span",{className:"bBlocks-whatsapp-block-btn__icon","aria-hidden":"true",children:(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,b.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})}),$=({attributes:t})=>{const{phoneNumber:n,buttonText:o,prefillMessage:e,showIcon:a,showStatusDot:s,tooltipText:r,buttonSize:l,hoverAnimation:i,openInNewTab:c,fullWidth:p,iconPosition:d,shadow:$,pulseAnimation:u}=t,g={small:"bBlocks-whatsapp-block-btn--small",medium:"bBlocks-whatsapp-block-btn--medium",large:"bBlocks-whatsapp-block-btn--large"},m=["bBlocks-whatsapp-block-btn",g[l]||g.medium,p?"bBlocks-whatsapp-block-btn--full":"",i?"bBlocks-whatsapp-block-btn--hover-anim":"",$?"bBlocks-whatsapp-block-btn--shadow":"",u?"bBlocks-whatsapp-block-btn--pulse":""].filter(Boolean).join(" ");let k="https://wa.me/";return n&&(k+=encodeURIComponent(n)),e&&(k+="?text="+encodeURIComponent(e)),(0,b.jsx)("div",{children:(0,b.jsxs)("span",{className:"bBlocks-whatsapp-block-wrapper",children:[(0,b.jsxs)("a",{href:k,className:m,target:c?"_blank":void 0,rel:c?"noopener noreferrer":void 0,role:"button","aria-label":o,"data-tooltip":r||void 0,children:[a&&"left"===d&&h,(0,b.jsx)("span",{className:"bBlocks-whatsapp-block-btn__text",children:o}),a&&"right"===d&&h,s&&(0,b.jsx)("span",{className:"bBlocks-whatsapp-block-btn__status-dot","aria-hidden":"true"})]}),r&&(0,b.jsx)("span",{className:"bBlocks-whatsapp-block-tooltip","aria-hidden":"true",children:r})]})})};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-whatsapp-chat").forEach((n=>{const o=JSON.parse(n.dataset.attributes);(0,t.createRoot)(n).render((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d,{attributes:o,id:n.id}),(0,b.jsx)($,{attributes:o})]})),n?.removeAttribute("data-attributes")}))}))})();
1 +(()=>{"use strict";const t=window.ReactDOM,e="@media only screen and (max-width: 1024px)",n="@media only screen and (max-width: 640px)",o="linear-gradient(135deg, #0040E3, #18D4FD)";window.React;new class{constructor(t={}){this.defaultOptions={allowedTags:["svg","g","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","defs","clipPath","mask","linearGradient","radialGradient","stop","style","title","desc"],allowedAttributes:["id","class","style","transform","xmlns","xmlns:xlink","version","baseProfile","xml:space","d","x","y","width","height","cx","cy","r","rx","ry","points","x1","y1","x2","y2","viewBox","preserveAspectRatio","overflow","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","opacity","color","paint-order","vector-effect","shape-rendering","display","visibility","clip-path","clip-rule","clipPathUnits","mask","maskUnits","maskContentUnits","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","fx","fy","fr","dx","dy","text-anchor","dominant-baseline","alignment-baseline","font-family","font-size","font-style","font-weight","letter-spacing","word-spacing","textLength","lengthAdjust","role","focusable","aria-hidden","aria-label","aria-labelledby","aria-describedby"],allowedProtocols:["http","https","data"],removeScripts:!0,removeEvents:!0,removeExternalResources:!0,sanitizeStyle:!0},this.options={...this.defaultOptions,...t},this.allowedTagSet=new Set(this.options.allowedTags.map((t=>t.toLowerCase()))),this.allowedAttributeSet=new Set(this.options.allowedAttributes.map((t=>t.toLowerCase())))}sanitize(t){if("string"!=typeof t||""===t.trim())return"";const e=(new DOMParser).parseFromString(t,"image/svg+xml"),n=e.documentElement;return!n||"svg"!==n.localName.toLowerCase()||e.getElementsByTagName("parsererror").length?"":(this.removeScripts(e),this.sanitizeElements(e),(new XMLSerializer).serializeToString(e.documentElement))}async sanitizeFile(t){const e=await fetch(t),n=await e.text();return this.sanitize(`${n}`)}removeScripts(t){this.options.removeScripts&&Array.from(t.querySelectorAll("*")).forEach((t=>{t.localName.toLowerCase().includes("script")&&t.remove()}))}sanitizeElements(t){Array.from(t.querySelectorAll("*")).forEach((t=>{const e=t.localName.toLowerCase();this.allowedTagSet.has(e)?("style"===e&&this.options.sanitizeStyle&&(t.textContent=this.sanitizeCss(t.textContent)),this.sanitizeAttributes(t)):t.remove()}))}sanitizeAttributes(t){Array.from(t.attributes).forEach((e=>{const n=e.name,o=n.toLowerCase(),s=e.value;if(this.options.removeEvents&&o.startsWith("on"))return void t.removeAttribute(n);if(this.options.removeExternalResources&&("href"===o||o.endsWith(":href"))&&!this.isAllowedUrl(s))return void t.removeAttribute(n);const r=o.replace("xlink:","");this.allowedAttributeSet.has(o)||this.allowedAttributeSet.has(r)?this.options.removeExternalResources&&this.hasExternalUrl(s)?t.removeAttribute(n):"style"===o&&this.options.sanitizeStyle&&t.setAttribute(n,this.sanitizeCss(s)):t.removeAttribute(n)}))}hasExternalUrl(t){return!("string"!=typeof t||!/url\s*\(/i.test(t))&&Array.from(t.matchAll(/url\s*\(\s*['"]?([^'")]*)/gi)).some((([,t])=>!t.trim().startsWith("#")))}isAllowedUrl(t){const e=String(t||"").trim();if(e.startsWith("#"))return!0;if(/^data:/i.test(e))return this.options.allowedProtocols.includes("data")&&/^data:image\/(png|jpe?g|gif|webp);base64,/i.test(e);try{return this.options.allowedProtocols.includes(new URL(e).protocol.replace(":",""))}catch{return!1}}sanitizeCss(t){return String(t||"").replace(/expression\s*\(/gi,"").replace(/javascript:/gi,"").replace(/behavior\s*:/gi,"").replace(/binding\s*:/gi,"").replace(/@import[^;]*;?/gi,"").replace(/url\s*\(\s*(['"]?)(?!#)[^)]*\)/gi,"none")}};const s=t=>{const e=(t=>{try{const e=new URL(t);return["http:","https:"].includes(e.protocol)?e.toString():null}catch(e){return"string"==typeof t&&t.startsWith("/")&&!t.startsWith("//")?t:null}})(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"},r=(t,e)=>{return null==(n=e)||""===n||Array.isArray(n)&&0===n.length||"object"==typeof n&&0===Object.keys(n).length||"string"==typeof n&&""===n.trim()||"number"==typeof n&&0===n?"":`${t}: ${e};`;var n},a=(t,e=!0,n=!0,a=!0)=>{const{type:i="solid",color:l="",gradient:c=o,image:p={},position:d="center center",attachment:h="",repeat:b="no-repeat",size:u="",overlayColor:m=""}=t||{};return"gradient"===i&&n?r("background",c):"image"===i&&a?`background: ${s(p?.url)};\n\t\t\t\t${r("background-color",m)}\n\t\t\t\t${r("background-position",d)}\n\t\t\t\t${r("background-size",u)}\n\t\t\t\t${r("background-repeat",b)}\n\t\t\t\t${r("background-attachment",h)}\n\t\t\t\t${r("background-repeat",b)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&r("background",l)},i=t=>{if(!t)return"";const e=t=>{const{color:e="#000000",style:n="solid",width:o="0px"}=t;return`${o} ${n} ${e}`};return"object"!=typeof t||Array.isArray(t)?"":t.hasOwnProperty("top")||t.hasOwnProperty("right")||t.hasOwnProperty("bottom")||t.hasOwnProperty("left")?["top","right","bottom","left"].map((n=>t[n]?`border-${n}: ${e(t[n])};`:"")).join(" ").trim():r("border",e(t))},l=(t,e="box")=>{const{hOffset:n="0px",vOffset:o="0px",blur:s="0px",spreed:r="0px",color:a="#7090b0",isInset:i=!1}=t||{},l=`${n} ${o} ${s}`;return("text"===e?`${l} ${a}`:`${l} ${r} ${a} ${i?"inset":""}`)||"none"},c=(t,o,s=!0)=>{const{fontFamily:a="Default",fontCategory:i="sans-serif",fontVariant:l=400,fontWeight:c,isUploadFont:p=!0,fontSize:d={desktop:null,tablet:null,mobile:null},fontStyle:h,textTransform:b,textDecoration:u,lineHeight:m,letterSpace:g}=o||{},w=!s||!a||"Default"===a,$=d?.desktop||d,f=d?.tablet||$,k=d?.mobile||f,y=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},x=`\n\t\t${w?"":`font-family: '${a}', ${i};`}\n\t\t${r("font-weight",c)}\n\t\t${r("font-size",y($))}\n\t\t${r("font-style",h)}\n\t\t${r("text-transform",b)}\n\t\t${r("text-decoration",u)}\n\t\t${r("line-height",m)}\n\t\t${r("letter-spacing",g)}\n\t`,v=l&&400!==l?"400i"===l?":ital@1":l?.includes("00i")?`: ital, wght@1, ${l?.replace("00i","00")} `:`: wght@${l} `:"",A=w?"":`https://fonts.googleapis.com/css2?family=${a?.split(" ").join("+")}${v.replace(/ /g,"")}&display=swap`;return{googleFontLink:!p||w?"":`@import url(${A});`,styles:`${t}{\n\t\t\t${x}\n\t\t}\n\t\t${e} {\n\t\t\t${t}{\n\t\t\t\t${r("font-size",y(f))}\n\t\t\t}\n\t\t}\n\t\t${n} {\n\t\t\t${t}{\n\t\t\t\t${r("font-size",y(k))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},p=t=>{if(!t)return"";if("string"==typeof t)return t;if("object"==typeof t&&!Array.isArray(t)){const e=["top","right","bottom","left"];return e.map((e=>t[e]||"")).every((t=>!t))?"":e.map((e=>t[e]||"0")).join(" ")}return""},d=window.ReactJSXRuntime,h=({attributes:t,id:o})=>{const{alignment:s,styles:h}=t,{normal:b,hover:u,desktop:m,tablet:g,mobile:w,typo:$}=h,f=`#${o}.wp-block-b-blocks-whatsapp-chat`,k=`${f} .bBlocks-whatsapp-block-wrapper`,y=`${f} .bBlocks-whatsapp-block-btn`,x=`${y}.bBlocks-whatsapp-block-btn--pulse`,v=`${y} .bBlocks-whatsapp-block-btn__text`,A=`${y} .bBlocks-whatsapp-block-btn__icon`,S=`${y} .bBlocks-whatsapp-block-btn__status-dot`;return(0,d.jsx)("style",{dangerouslySetInnerHTML:{
2 +__html:`\n\n\t\t${c("",$).googleFontLink}\n\t\t${c(v,$).styles}\n\n\t\t${k}{\n\t\t\t${r("align-items",s)}\n\t\t}\n\n\t\t${x} {\n\t\t\tanimation: bBlocks-whatsapp-block-pulse 2s infinite;\n\t\t}\n\n\t\t@keyframes bBlocks-whatsapp-block-pulse {\n\t\t\t0% {\n\t\t\t\tbox-shadow: 0 0 0 0 ${h.pulseColor};\n\t\t\t}\n\n\t\t\t70% {\n\t\t\t\tbox-shadow: 0 0 0 12px rgba(37, 211, 102, 0);\n\t\t\t}\n\n\t\t\t100% {\n\t\t\t\tbox-shadow: 0 0 0 0 rgba(37, 211, 102, 0);\n\t\t\t}\n\t\t}\n\n\t\t${y}{\n\t\t\t${r("margin",p(m.margin))}\n\t\t\t${r("padding",p(m.padding))}\n\t\t\t${a(b.bg)}\n\t\t\t${r("color",b.color)}\n\t\t\t${i(b.border)}\n\t\t\t${r("border-radius",p(b.radius))}\n\t\t\t${l(b.shadow)}\n\t\t\ttransition: all ${u.transition}s ease-in-out;\n\t\t}\n\t\t${y}:hover{\n\t\t\t${a(u.bg)}\n\t\t\t${i(u.border)}\n\t\t\t${r("color",u.color)}\n\t\t\t${r("border-radius",p(u.radius))}\n\t\t\t${l(u.shadow)}\n\t\t}\n\n\t\t${v}{\n\t\t\t${r("color",b.color)}\n\t\t}\n\n\t\t${y}:hover .bBlocks-whatsapp-block-btn__text{\n\t\t\t${r("color",u.color)}\n\t\t}\n\n\t\t${A}>svg{\n\t\t\t${r("width",h.icon.size)}\n\t\t\t${r("fill",h.icon.normal.color)}\n\t\t}\n\n\t\t${y}:hover .bBlocks-whatsapp-block-btn__icon>svg{\n\t\t\t${r("fill",h.icon.hover.color)}\n\t\t}\n\t\t\n\t\t${S}{\n\t\t\t${a(h.status.color)}\n\t\t\t${r("width",h.status.size)}\n\t\t\t${r("height",h.status.size)}\n\t\t\t${r("left",h.status.position.x)}\n\t\t\t${r("top",h.status.position.y)}\n\t\t}\n\t\t\n\t\t${e}{\n\t\t\t${y}{\n\t\t\t\t${r("margin",p(g.margin))}\n\t\t\t\t${r("padding",p(g.padding))}\n\t\t\t}\n\t\t}\n\t\t${n}{\n\t\t\t${y}{\n\t\t\t\t${r("margin",p(w.margin))}\n\t\t\t\t${r("padding",p(w.padding))}\n\t\t\t}\n\t\t}\n\t\t\n\t\t`.replace(/\s+/g," ")}})},b=(0,d.jsx)("span",{className:"bBlocks-whatsapp-block-btn__icon","aria-hidden":"true",children:(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,d.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})}),u=({attributes:t})=>{const{phoneNumber:e,buttonText:n,prefillMessage:o,showIcon:s,showStatusDot:r,tooltipText:a,buttonSize:i,hoverAnimation:l,openInNewTab:c,fullWidth:p,iconPosition:h,shadow:u,pulseAnimation:m}=t,g={small:"bBlocks-whatsapp-block-btn--small",medium:"bBlocks-whatsapp-block-btn--medium",large:"bBlocks-whatsapp-block-btn--large"},w=["bBlocks-whatsapp-block-btn",g[i]||g.medium,p?"bBlocks-whatsapp-block-btn--full":"",l?"bBlocks-whatsapp-block-btn--hover-anim":"",u?"bBlocks-whatsapp-block-btn--shadow":"",m?"bBlocks-whatsapp-block-btn--pulse":""].filter(Boolean).join(" ");let $="https://wa.me/";return e&&($+=encodeURIComponent(e)),o&&($+="?text="+encodeURIComponent(o)),(0,d.jsx)("div",{children:(0,d.jsxs)("span",{className:"bBlocks-whatsapp-block-wrapper",children:[(0,d.jsxs)("a",{href:$,className:w,target:c?"_blank":void 0,rel:c?"noopener noreferrer":void 0,role:"button","aria-label":n,"data-tooltip":a||void 0,children:[s&&"left"===h&&b,(0,d.jsx)("span",{className:"bBlocks-whatsapp-block-btn__text",children:n}),s&&"right"===h&&b,r&&(0,d.jsx)("span",{className:"bBlocks-whatsapp-block-btn__status-dot","aria-hidden":"true"})]}),a&&(0,d.jsx)("span",{className:"bBlocks-whatsapp-block-tooltip","aria-hidden":"true",children:a})]})})};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-whatsapp-chat").forEach((e=>{const n=JSON.parse(e.dataset.attributes);(0,t.createRoot)(e).render((0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h,{attributes:n,id:e.id}),(0,d.jsx)(u,{attributes:n})]})),e?.removeAttribute("data-attributes")}))}))})();