"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./disposables.js");function t(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}exports.ElementPositionState={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}},exports.computeVisualPosition=t,exports.detectMovement=function(i,s,n){let o=e.disposables();if("Tracked"===s.kind){let e=function(){d!==t(i)&&(o.dispose(),n())},{position:d}=s,r=new ResizeObserver(e);r.observe(i),o.add((()=>r.disconnect())),o.addEventListener(window,"scroll",e,{passive:!0}),o.addEventListener(window,"resize",e)}return()=>o.dispose()};
//# sourceMappingURL=element-movement.js.map
