'use strict';(function(d){"object"==typeof exports&&"object"==typeof module?d(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)})(function(d){function f(a){for(var b=0;b<a.state.activeLines.length;b++)a.removeLineClass(a.state.activeLines[b],"wrap","CodeMirror-activeline"),a.removeLineClass(a.state.activeLines[b],"background","CodeMirror-activeline-background")}function k(a,b){if(a.length!=b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!=
b[c])return!1;return!0}function g(a,b){for(var c=[],d=0;d<b.length;d++){var e=b[d];e.empty()&&(e=a.getLineHandleVisualStart(e.head.line),c[c.length-1]!=e&&c.push(e))}k(a.state.activeLines,c)||a.operation(function(){f(a);for(var b=0;b<c.length;b++)a.addLineClass(c[b],"wrap","CodeMirror-activeline"),a.addLineClass(c[b],"background","CodeMirror-activeline-background");a.state.activeLines=c})}function h(a,b){g(a,b.ranges)}d.defineOption("styleActiveLine",!1,function(a,b,c){c=c&&c!=d.Init;b&&!c?(a.state.activeLines=
[],g(a,a.listSelections()),a.on("beforeSelectionChange",h)):!b&&c&&(a.off("beforeSelectionChange",h),f(a),delete a.state.activeLines)})});
