/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
import{w as t}from"./p-CsyYiC5f.js";import{r as o}from"./p-hPTD29t1.js";const r=(r,i,e)=>{let s;const n=()=>void 0!==i()&&void 0===r.label&&null!==e(),d=()=>{const o=i();if(void 0===o)return;if(!n())return void o.style.removeProperty("width");const c=e().scrollWidth;if(0===c&&null===o.offsetParent&&void 0!==t&&"IntersectionObserver"in t){if(void 0!==s)return;const t=s=new IntersectionObserver((o=>{1===o[0].intersectionRatio&&(d(),t.disconnect(),s=void 0)}),{threshold:.01,root:r});t.observe(o)}else o.style.setProperty("width",.75*c+"px")};return{calculateNotchWidth:()=>{n()&&o((()=>{d()}))},destroy:()=>{s&&(s.disconnect(),s=void 0)}}};export{r as c}