import{j as g,F as y,A as c,b as z,g as w,m as f,ab as O,z as v,h as x,ad as b}from"./app-DzAYC6xy.js";function E(){const r=g(!y.value);return r.value===!1&&c(()=>{r.value=!0}),{isHydrated:r}}const h=typeof ResizeObserver<"u",m=h===!0?{}:{style:"display:block;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;",url:"about:blank"},L=z({name:"QResizeObserver",props:{debounce:{type:[String,Number],default:100}},emits:["resize"],setup(r,{emit:p}){let i=null,t,s={width:-1,height:-1};function u(e){e===!0||r.debounce===0||r.debounce==="0"?a():i===null&&(i=setTimeout(a,r.debounce))}function a(){if(i!==null&&(clearTimeout(i),i=null),t){const{offsetWidth:e,offsetHeight:n}=t;(e!==s.width||n!==s.height)&&(s={width:e,height:n},p("resize",s))}}const{proxy:l}=w();if(l.trigger=u,h===!0){let e;const n=d=>{t=l.$el.parentNode,t?(e=new ResizeObserver(u),e.observe(t),a()):d!==!0&&v(()=>{n(!0)})};return c(()=>{n()}),f(()=>{i!==null&&clearTimeout(i),e!==void 0&&(e.disconnect!==void 0?e.disconnect():t&&e.unobserve(t))}),O}else{let e=function(){i!==null&&(clearTimeout(i),i=null),o!==void 0&&(o.removeEventListener!==void 0&&o.removeEventListener("resize",u,b.passive),o=void 0)},n=function(){e(),t?.contentDocument&&(o=t.contentDocument.defaultView,o.addEventListener("resize",u,b.passive),a())};const{isHydrated:d}=E();let o;return c(()=>{v(()=>{t=l.$el,t&&n()})}),f(e),()=>{if(d.value===!0)return x("object",{class:"q--avoid-card-border",style:m.style,tabindex:-1,type:"text/html",data:m.url,"aria-hidden":"true",onLoad:n})}}}});export{L as Q};
