import{h as e,ac as t,o as n,a7 as i,f as o,ai as s,n as r,Q as a,g as l,ak as d}from"./index.3938ccd1.js";const u="undefined"!=typeof ResizeObserver,c=!0===u?{}:{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===u){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!==u&&(void 0!==u.removeEventListener&&u.removeEventListener("resize",m,d.passive),u=void 0)},s=function(){i(),(null==f?void 0:f.contentDocument)&&(u=f.contentDocument.defaultView,u.addEventListener("resize",m,d.passive),p())};const{isHydrated:l}=function(){const i=e(!t.value);return!1===i.value&&n((()=>{i.value=!0})),{isHydrated:i}}();let u;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};
