import{Q as i,w as c,c as l,R as d,j as t,a,u as m,g as u,U as p,r as y,D as g,b as v,d as x}from"./react-to-webcomponent-FA6csYUL.js";import"./secrets-CuyBvnIM.js";const b=new i,q=r=>{const{data:e}=m({queryKey:["delivery-widget"],queryFn:()=>x(r)}),n=u(),o=document.querySelector(".essential-estimated-delivery-block-liquid")??document.querySelector("product-form")??document.querySelector(".product-form")??document.querySelector("product-form-component"),s=document.getElementById("essential-estimated-delivery-app-block");return e&&!s&&p.captureEvent(r,e,n),y.createPortal(t.jsx(t.Fragment,{children:!s&&e&&t.jsx(g,{locale:n,conditions:e.conditions,content:e.content,design:e.design,translations:e.translations,children:t.jsx(v,{})})}),o)},E=r=>t.jsx(a,{client:b,children:t.jsx(q,{...r})}),j=c(E,d,l,{props:{shopUrl:"string",productId:"string",marketHandle:"string",collectionIdsJson:"string",s3Url:"string"}});customElements.define("essential-estimated-delivery-app-embed",j);