import{k as c,o as i,q as s,v as g}from"./Dpn8_Hnn.mjs";import{B as l}from"./Bg0ZbUei.mjs";const u=Symbol("NaN");function m(e,n,o){c&&i();var a=new l(e),r=!s();g(()=>{var t=n();t!==t&&(t=u),r&&t!==null&&typeof t=="object"&&(t={}),a.ensure(t,o)})}function p(e){const n=e.getRootNode();return n.getSelection?n.getSelection():document.getSelection()}function f(e){const n=e.rangeCount;return n===0?null:e.getRangeAt(n-1)}function S(e){return f(e).collapsed}export{f as a,p as g,S as i,m as k};
