Liferay.Loader.define("journal-web$codemirror@5.65.2/addon/selection/active-line",["module","exports","require","../../lib/codemirror"],(function(e,t,i){var n,r=void 0;window;n=function(e){"use strict";var t="CodeMirror-activeline",i="CodeMirror-activeline-background",n="CodeMirror-activeline-gutter";function clearActiveLines(e){for(var r=0;r<e.state.activeLines.length;r++)e.removeLineClass(e.state.activeLines[r],"wrap",t),e.removeLineClass(e.state.activeLines[r],"background",i),e.removeLineClass(e.state.activeLines[r],"gutter",n)}function updateActiveLines(e,r){for(var a=[],o=0;o<r.length;o++){var c=r[o],s=e.getOption("styleActiveLine");if("object"==typeof s&&s.nonEmpty?c.anchor.line==c.head.line:c.empty()){var l=e.getLineHandleVisualStart(c.head.line);a[a.length-1]!=l&&a.push(l)}}(function sameArray(e,t){if(e.length!=t.length)return!1;for(var i=0;i<e.length;i++)if(e[i]!=t[i])return!1;return!0})(e.state.activeLines,a)||e.operation((function(){clearActiveLines(e);for(var r=0;r<a.length;r++)e.addLineClass(a[r],"wrap",t),e.addLineClass(a[r],"background",i),e.addLineClass(a[r],"gutter",n);e.state.activeLines=a}))}function selectionChange(e,t){updateActiveLines(e,t.ranges)}e.defineOption("styleActiveLine",!1,(function(t,i,n){var r=n!=e.Init&&n;i!=r&&(r&&(t.off("beforeSelectionChange",selectionChange),clearActiveLines(t),delete t.state.activeLines),i&&(t.state.activeLines=[],updateActiveLines(t,t.listSelections()),t.on("beforeSelectionChange",selectionChange)))}))},"object"==typeof t&&"object"==typeof e?n(i("../../lib/codemirror")):"function"==typeof r&&r.amd?r(["../../lib/codemirror"],n):n(CodeMirror)}));
//# sourceMappingURL=active-line.js.map