Liferay.Loader.define("portal-search-web$codemirror@5.62.0/addon/selection/selection-pointer",["module","exports","require","../../lib/codemirror"],(function(e,o,t){window,function(e){"use strict";function o(e){e.state.selectionPointer.rects=null,t(e)}function t(e){e.state.selectionPointer.willUpdate||(e.state.selectionPointer.willUpdate=!0,setTimeout((function(){!function(e){var o=e.state.selectionPointer;if(o){if(null==o.rects&&null!=o.mouseX&&(o.rects=[],e.somethingSelected()))for(var t=e.display.selectionDiv.firstChild;t;t=t.nextSibling)o.rects.push(t.getBoundingClientRect());var n=!1;if(null!=o.mouseX)for(var i=0;i<o.rects.length;i++){var l=o.rects[i];l.left<=o.mouseX&&l.right>=o.mouseX&&l.top<=o.mouseY&&l.bottom>=o.mouseY&&(n=!0)}var s=n?o.value:"";e.display.lineDiv.style.cursor!=s&&(e.display.lineDiv.style.cursor=s)}}(e),e.state.selectionPointer.willUpdate=!1}),50))}e.defineOption("selectionPointer",!1,(function(n,i){var l=n.state.selectionPointer;l&&(e.off(n.getWrapperElement(),"mousemove",l.mousemove),e.off(n.getWrapperElement(),"mouseout",l.mouseout),e.off(window,"scroll",l.windowScroll),n.off("cursorActivity",o),n.off("scroll",o),n.state.selectionPointer=null,n.display.lineDiv.style.cursor=""),i&&(l=n.state.selectionPointer={value:"string"==typeof i?i:"default",mousemove:function(e){!function(e,o){var n=e.state.selectionPointer;(null==o.buttons?o.which:o.buttons)?n.mouseX=n.mouseY=null:(n.mouseX=o.clientX,n.mouseY=o.clientY),t(e)}(n,e)},mouseout:function(e){!function(e,o){if(!e.getWrapperElement().contains(o.relatedTarget)){var n=e.state.selectionPointer;n.mouseX=n.mouseY=null,t(e)}}(n,e)},windowScroll:function(){o(n)},rects:null,mouseX:null,mouseY:null,willUpdate:!1},e.on(n.getWrapperElement(),"mousemove",l.mousemove),e.on(n.getWrapperElement(),"mouseout",l.mouseout),e.on(window,"scroll",l.windowScroll),n.on("cursorActivity",o),n.on("scroll",o))}))}("object"==typeof o&&"object"==typeof e?t("../../lib/codemirror"):CodeMirror)}));
//# sourceMappingURL=selection-pointer.js.map