import{useLayoutEffect as N,useEffect as e}from"react";function o(N){return N.sort(((N,e)=>{var o=N.compareDocumentPosition(e);if(o&Node.DOCUMENT_POSITION_FOLLOWING||o&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(o&Node.DOCUMENT_POSITION_PRECEDING||o&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(o&Node.DOCUMENT_POSITION_DISCONNECTED||o&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0}))}var r=N=>"object"==typeof N&&"nodeType"in N&&N.nodeType===Node.ELEMENT_NODE;function O(N,e,o){var r=N+1;return o&&r>=e&&(r=0),r}function n(N,e,o){var r=N-1;return o&&r<0&&(r=e),r}var t="undefined"!=typeof window?N:e,I=N=>N;export{I as cast,O as getNextIndex,n as getPrevIndex,r as isElement,o as sortNodes,t as useSafeLayoutEffect};
//# sourceMappingURL=utils.js.map
