(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e669a"],{9948:function(e,t,n){(function(e){e(n("56b3"))})((function(e){"use strict";function t(e){e.state.markedSelection&&e.operation((function(){f(e)}))}function n(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){a(e)}))}e.defineOption("styleSelectedText",!1,(function(o,i,r){var l=r&&r!=e.Init;i&&!l?(o.state.markedSelection=[],o.state.markedSelectionStyle="string"==typeof i?i:"CodeMirror-selectedtext",c(o),o.on("cursorActivity",t),o.on("change",n)):!i&&l&&(o.off("cursorActivity",t),o.off("change",n),a(o),o.state.markedSelection=o.state.markedSelectionStyle=null)}));var o=8,i=e.Pos,r=e.cmpPos;function l(e,t,n,l){if(0!=r(t,n))for(var a=e.state.markedSelection,c=e.state.markedSelectionStyle,f=t.line;;){var s=f==t.line?t:i(f,0),u=f+o,d=u>=n.line,m=d?n:i(u,0),h=e.markText(s,m,{className:c});if(null==l?a.push(h):a.splice(l++,0,h),d)break;f=u}}function a(e){for(var t=e.state.markedSelection,n=0;n<t.length;++n)t[n].clear();t.length=0}function c(e){a(e);for(var t=e.listSelections(),n=0;n<t.length;n++)l(e,t[n].from(),t[n].to())}function f(e){if(!e.somethingSelected())return a(e);if(e.listSelections().length>1)return c(e);var t=e.getCursor("start"),n=e.getCursor("end"),i=e.state.markedSelection;if(!i.length)return l(e,t,n);var f=i[0].find(),s=i[i.length-1].find();if(!f||!s||n.line-t.line<=o||r(t,s.to)>=0||r(n,f.from)<=0)return c(e);while(r(t,f.from)>0)i.shift().clear(),f=i[0].find();r(t,f.from)<0&&(f.to.line-t.line<o?(i.shift().clear(),l(e,t,f.to,0)):l(e,t,f.from,0));while(r(n,s.to)<0)i.pop().clear(),s=i[i.length-1].find();r(n,s.to)>0&&(n.line-s.from.line<o?(i.pop().clear(),l(e,s.from,n)):l(e,s.to,n))}}))}}]);
//# sourceMappingURL=chunk-2d0e669a.3626bea2.js.map