import{h as e,ab as t,o as n,a6 as i,f as o,ah as s,n as r,Q as a,g as l,aj as u}from"./index.9313841a.js";const d="undefined"!=typeof ResizeObserver,c=!0===d?{}:{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"};var v=i({name:"QResizeObserver",props:{debounce:{type:[String,Number],default:100}},emits:["resize"],setup(i,{emit:v}){let f,h=null,b={width:-1,height:-1};function m(e){!0===e||0===i.debounce||"0"===i.debounce?p():null===h&&(h=setTimeout(p,i.debounce))}function p(){if(null!==h&&(clearTimeout(h),h=null),f){const{offsetWidth:e,offsetHeight:t}=f;e===b.width&&t===b.height||(b={width:e,height:t},v("resize",b))}}const{proxy:g}=l();if(g.trigger=m,!0===d){let e;const t=n=>{f=g.$el.parentNode,f?(e=new ResizeObserver(m),e.observe(f),p()):!0!==n&&r((()=>{t(!0)}))};return n((()=>{t()})),o((()=>{null!==h&&clearTimeout(h),void 0!==e&&(void 0!==e.disconnect?e.disconnect():f&&e.unobserve(f))})),s}{let i=function(){null!==h&&(clearTimeout(h),h=null),void 0!==d&&(void 0!==d.removeEventListener&&d.removeEventListener("resize",m,u.passive),d=void 0)},s=function(){i(),(null==f?void 0:f.contentDocument)&&(d=f.contentDocument.defaultView,d.addEventListener("resize",m,u.passive),p())};const{isHydrated:l}=function(){const i=e(!t.value);return!1===i.value&&n((()=>{i.value=!0})),{isHydrated:i}}();let d;return n((()=>{r((()=>{f=g.$el,f&&s()}))})),o(i),()=>{if(!0===l.value)return a("object",{class:"q--avoid-card-border",style:c.style,tabindex:-1,type:"text/html",data:c.url,"aria-hidden":"true",onLoad:s})}}}});export{v as Q};
