const d=async(i,a)=>{var s,e;if(!document.startViewTransition){await a();return}const n=(s=i==null?void 0:i.clientX)!=null?s:window.innerWidth/2,t=(e=i==null?void 0:i.clientY)!=null?e:window.innerHeight/2,r=Math.hypot(Math.max(n,window.innerWidth-n),Math.max(t,window.innerHeight-t)),o=document.startViewTransition(async()=>{await a()});o.ready.then(()=>{const c=["circle(0px at ".concat(n,"px ").concat(t,"px)"),"circle(".concat(r,"px at ").concat(n,"px ").concat(t,"px)")];document.documentElement.animate({clipPath:c},{duration:400,easing:"ease-in",pseudoElement:"::view-transition-new(root)"})}),await o.finished};export{d as e};
