(()=>{"use strict";var t={9044:()=>{function t(t){return"rgba(0, 0, 0, 0)"===t||"transparent"===t||"#00000000"===t||"none"===t||"transparent none"===t}window.jetpackForms=window.jetpackForms||{},window.jetpackForms.getBackgroundColor=function(t){let o=window.getComputedStyle(t).backgroundColor;for(;"rgba(0, 0, 0, 0)"===o&&t.parentNode&&t.parentNode.nodeType===window.Node.ELEMENT_NODE;){if("wp-block-cover"===(t=t.parentNode).className){const e=t.querySelector(".wp-block-cover__background");o=window.getComputedStyle(e).backgroundColor;continue}o=window.getComputedStyle(t).backgroundColor}return o},window.jetpackForms.getInverseReadableColor=function(t){if(!t)return"#FFFFFF";let o,e,r;if(t.startsWith("#")){let n=t.slice(1);3===n.length&&(n=n.split("").map(t=>t+t).join("")),o=parseInt(n.slice(0,2),16),e=parseInt(n.slice(2,4),16),r=parseInt(n.slice(4,6),16)}else{const n=t.match(/(\d+),\s*(\d+),\s*(\d+)/);if(!n)return"#000000";o=+n[1],e=+n[2],r=+n[3]}return.299*o+.587*e+.114*r>186?"#000000":"#FFFFFF"},window.jetpackForms.generateStyleVariables=function(o){if(!o)return;const e=window["editor-canvas"]?window["editor-canvas"].document:document,r=e.querySelector("body"),n=e.createElement("div");n.className="contact-form__style-probe",n.style="position: absolute; z-index: -1; width: 1px; height: 1px; visibility: hidden",n.innerHTML='\n\t\t\t<div class="contact-form">\n\t\t\t\t<div class="wp-block-buttons">\n\t\t\t\t\t<div class="wp-block-button">\n\t\t\t\t\t\t<div class="wp-block-button__link wp-element-button btn-primary">Test</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="wp-block-buttons">\n\t\t\t\t\t<div class="wp-block-button is-style-outline">\n\t\t\t\t\t\t<div class="wp-block-button__link wp-element-button btn-outline">Test</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="jetpack-field">\n\t\t\t\t\t<input class="jetpack-field__input" type="text">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t',o.parentNode.appendChild(n);const c=n.querySelector(".contact-form"),a=n.querySelector(".btn-primary"),i=n.querySelector(".btn-outline"),d=n.querySelector('input[type="text"]'),l=window.jetpackForms.getBackgroundColor(r),p=window.jetpackForms.getBackgroundColor(d),u=window.getComputedStyle(c).color,s=window.jetpackForms.getInverseReadableColor(u),{border:b,borderColor:m,backgroundColor:k,color:f,padding:w}=window.getComputedStyle(a),{backgroundColor:g,border:j,borderWidth:y,borderRadius:v,color:F,padding:C,lineHeight:h}=window.getComputedStyle(i),S=window.jetpackForms.getBackgroundColor(i),x=g===F?"transparent":g,{color:_,padding:N,paddingTop:T,paddingLeft:q,border:E,borderColor:z,borderWidth:I,borderStyle:B,borderRadius:L,fontSize:R,fontFamily:H,lineHeight:W,height:M,backdropFilter:V,backgroundColor:A,filter:D}=window.getComputedStyle(d);return n.remove(),{"--jetpack--contact-form--primary-color":k,"--jetpack--contact-form--background-color":l,"--jetpack--contact-form--body-text-color":u,"--jetpack--contact-form--inverted-body-text-color":s,"--jetpack--contact-form--text-color":_,"--jetpack--contact-form--border":E,"--jetpack--contact-form--border-color":z,"--jetpack--contact-form--border-size":I,"--jetpack--contact-form--border-style":B,"--jetpack--contact-form--border-radius":L,...t(A)?{}:{"--jetpack--contact-form--input-background":A},"--jetpack--contact-form--input-backdrop-filter":V,"--jetpack--contact-form--input-background-fallback":p,"--jetpack--contact-form--input-padding":N,"--jetpack--contact-form--input-padding-top":T,"--jetpack--contact-form--input-padding-left":q,"--jetpack--contact-form--input-height":M,"--jetpack--contact-form--input-filter":D,"--jetpack--contact-form--font-size":R,"--jetpack--contact-form--font-family":H,"--jetpack--contact-form--line-height":"normal"===W?"1.2em":W,"--jetpack--contact-form--button-primary--color":f,"--jetpack--contact-form--button-primary--background-color":k,"--jetpack--contact-form--button-primary--border":b,"--jetpack--contact-form--button-primary--border-color":m,"--jetpack--contact-form--button-primary--padding":w,"--jetpack--contact-form--button-outline--padding":C,"--jetpack--contact-form--button-outline--border":j,...t(g)?{}:{"--jetpack--contact-form--button-outline--background-color":x},"--jetpack--contact-form--button-outline--background-color-fallback":S,"--jetpack--contact-form--button-outline--border-size":y,"--jetpack--contact-form--button-outline--border-radius":v,"--jetpack--contact-form--button-outline--text-color":F,"--jetpack--contact-form--button-outline--line-height":h}}}},o={};(function e(r){var n=o[r];if(void 0!==n)return n.exports;var c=o[r]={exports:{}};return t[r](c,c.exports,e),c.exports})(9044);const{generateStyleVariables:e}=window.jetpackForms,r=setTimeout(()=>{n()},3e3);function n(){const t=document.querySelectorAll(".wp-block-jetpack-contact-form-container");for(const o of t){const t=e(o);if(!t)return;for(const e in t)o.style.setProperty(e,t[e])}}window.addEventListener("load",()=>{clearTimeout(r),n()})})();