diff --git a/004beebb-eb86d7a0526eebea3754.js b/004beebb-eb86d7a0526eebea3754.js new file mode 100644 index 0000000..b70e251 --- /dev/null +++ b/004beebb-eb86d7a0526eebea3754.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{lq4N:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Vim=void 0;var n,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r("5zkI"),a=(n=i)&&n.__esModule?n:{default:n};var s=[{keys:"",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j^",context:"visual"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],l=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],c=a.default.Pos,u=function(){function e(e,r){e.attached=!1,this==a.default.keyMap.vim&&a.default.rmClass(e.getWrapperElement(),"cm-fat-cursor"),r&&r.attach==t||function(e){e.setOption("disableInput",!1),e.off("cursorActivity",$e),e.state.vim=null,e.leaveVimMode()}(e)}function t(e,r){this==a.default.keyMap.vim&&(e.attached=!0),r&&r.attach==t||function(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),a.default.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",$e),I(e),e.enterVimMode()}(e)}function r(e,t){if(t){if(this[e])return this[e];var r=function(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),r=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==r.length)return!1;for(var o=!1,a=0;a"}(e);if(!r)return!1;var o=a.default.Vim.findKey(t,r);return"function"==typeof o&&a.default.signal(t,"vim-keypress",r),o}}a.default.defineOption("vimMode",!1,(function(e,t,r){t&&"vim"!=e.getOption("keyMap")?e.setOption("keyMap","vim"):!t&&r!=a.default.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")}));var n={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A"},i={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};var u=/[\d]/,h=[a.default.isWordChar,function(e){return e&&!a.default.isWordChar(e)&&!/\s/.test(e)}],f=[function(e){return/\S/.test(e)}];function p(e,t){for(var r=[],n=e;n"]),y=[].concat(d,m,g,["-",'"',".",":","/"]);function k(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function C(e){return/^[a-z]$/.test(e)}function w(e){return/^[A-Z]$/.test(e)}function M(e){return/^\s*$/.test(e)}function x(e){return-1!=".?!".indexOf(e)}function S(e,t){for(var r=0;rt?e=t:e0?1:-1,c=o.getCursor();do{if((a=n[(100+(e+=l))%100])&&(s=a.find())&&!X(c,s))break}while(er)}return a}}),macroModeState:new B,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new j({}),searchHistoryController:new V,exCommandHistoryController:new V},A){var i=A[o];i.value=i.defaultValue}}B.prototype={exitMacroRecordMode:function(){var e=R.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var r=R.registerController.getRegister(t);r&&(r.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var K={buildKeyMap:function(){},getRegisterController:function(){return R.registerController},resetVimGlobalState_:N,getVimGlobalState_:function(){return R},maybeInitVimState_:I,suppressErrorLogging:!1,InsertModeKey:Qe,map:function(e,t,r){He.map(e,t,r)},unmap:function(e,t){He.unmap(e,t)},setOption:L,getOption:T,defineOption:b,defineEx:function(e,t,r){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;Ve[e]=r,He.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,r){var n=this.findKey(e,t,r);if("function"==typeof n)return n()},findKey:function(e,t,r){var n,o=I(e);function i(){var n=R.macroModeState;if(n.isRecording){if("q"==t)return n.exitMacroRecordMode(),W(e),!0;"mapping"!=r&&function(e,t){if(e.isPlaying)return;var r=e.latestRegister,n=R.registerController.getRegister(r);n&&n.pushText(t)}(n,t)}}function l(){if(""==t)return W(e),o.visualMode?he(e):o.insertMode&&Fe(e),!0}return!1===(n=o.insertMode?function(){if(l())return!0;for(var r=o.inputState.keyBuffer=o.inputState.keyBuffer+t,n=1==t.length,i=H.matchCommand(r,s,o.inputState,"insert");r.length>1&&"full"!=i.type;){r=o.inputState.keyBuffer=r.slice(1);var a=H.matchCommand(r,s,o.inputState,"insert");"none"!=a.type&&(i=a)}if("none"==i.type)return W(e),!1;if("partial"==i.type)return E&&window.clearTimeout(E),E=window.setTimeout((function(){o.insertMode&&o.inputState.keyBuffer&&W(e)}),T("insertModeEscKeysTimeout")),!n;if(E&&window.clearTimeout(E),n){for(var c=e.listSelections(),u=0;u|<\w+>|./.exec(r),t=n[0],r=r.substring(n.index+t.length),a.default.Vim.handleKey(e,t,"mapping")}(n.toKeys):H.processCommand(e,o,n)}catch(r){throw e.state.vim=void 0,I(e),a.default.Vim.suppressErrorLogging||console.log(r),r}return!0}))}},handleEx:function(e,t){He.processCommand(e,t)},defineMotion:function(e,t){F[e]=t},defineAction:function(e,t){J[e]=t},defineOperator:function(e,t){U[e]=t},mapCommand:function(e,t,r,n,o){var i={keys:e,type:t};for(var a in i[t]=r,i[t+"Args"]=n,o)i[a]=o[a];De(i)},_mapCommand:De,defineRegister:function(e,t){var r=R.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(r[e])throw Error("Register already defined "+e);r[e]=t,y.push(e)},exitVisualMode:he,exitInsertMode:Fe};function P(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function W(e,t){e.state.vim.inputState=new P,a.default.signal(e,"vim-command-done",t)}function _(e,t,r){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!r}function j(e){this.registers=e,this.unnamedRegister=e['"']=new _,e["."]=new _,e[":"]=new _,e["/"]=new _}function V(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}P.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},P.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},_.prototype={setText:function(e,t,r){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!r},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(O(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},j.prototype={pushText:function(e,t,r,n,o){n&&"\n"!==r.charAt(r.length-1)&&(r+="\n");var i=this.isValidRegister(e)?this.getRegister(e):null;if(i){w(e)?i.pushText(r,n):i.setText(r,n,o),this.unnamedRegister.setText(i.toString(),n)}else{switch(t){case"yank":this.registers[0]=new _(r,n,o);break;case"delete":case"change":-1==r.indexOf("\n")?this.registers["-"]=new _(r,n):(this.shiftNumericRegisters_(),this.registers[1]=new _(r,n))}this.unnamedRegister.setText(r,n,o)}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new _),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&S(e,y)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},V.prototype={nextMatch:function(e,t){var r=this.historyBuffer,n=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var o=this.iterator+n;t?o>=0:o=r.length?(this.iterator=r.length,this.initialPrefix):o<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var H={matchCommand:function(e,t,r,n){var o,i=function(e,t,r,n){for(var o,i=[],a=[],s=0;s"==o.keys.slice(-11)){var l=function(e){var t=/^.*(<[^>]+>)$/.exec(e),r=t?t[1]:e.slice(-1);if(r.length>1)switch(r){case"":r="\n";break;case"":r=" ";break;default:r=""}return r}(e);if(!l)return{type:"none"};r.selectedCharacter=l}return{type:"full",command:o}},processCommand:function(e,t,r){switch(t.inputState.repeatOverride=r.repeatOverride,r.type){case"motion":this.processMotion(e,t,r);break;case"operator":this.processOperator(e,t,r);break;case"operatorMotion":this.processOperatorMotion(e,t,r);break;case"action":this.processAction(e,t,r);break;case"search":this.processSearch(e,t,r);break;case"ex":case"keyToEx":this.processEx(e,t,r)}},processMotion:function(e,t,r){t.inputState.motion=r.motion,t.inputState.motionArgs=q(r.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,r){var n=t.inputState;if(n.operator){if(n.operator==r.operator)return n.motion="expandToLine",n.motionArgs={linewise:!0},void this.evalInput(e,t);W(e)}n.operator=r.operator,n.operatorArgs=q(r.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,r){var n=t.visualMode,o=q(r.operatorMotionArgs);o&&n&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,r),n||this.processMotion(e,t,r)},processAction:function(e,t,r){var n=t.inputState,o=n.getRepeat(),i=!!o,a=q(r.actionArgs)||{};n.selectedCharacter&&(a.selectedCharacter=n.selectedCharacter),r.operator&&this.processOperator(e,t,r),r.motion&&this.processMotion(e,t,r),(r.motion||r.operator)&&this.evalInput(e,t),a.repeat=o||1,a.repeatIsExplicit=i,a.registerName=n.registerName,W(e),t.lastMotion=null,r.isEdit&&this.recordLastEdit(t,n,r),J[r.action](e,a,t)},processSearch:function(e,t,r){if(e.getSearchCursor){var n=r.searchArgs.forward,o=r.searchArgs.wholeWordOnly;xe(e).setReversed(!n);var i=n?"/":"?",s=xe(e).getQuery(),l=e.getScrollInfo();switch(r.searchArgs.querySrc){case"prompt":var c=R.macroModeState;if(c.isPlaying)p(f=c.replaySearchQueries.shift(),!0,!1);else Be(e,{onClose:function(t){e.scrollTo(l.left,l.top),p(t,!0,!0);var r=R.macroModeState;r.isRecording&&function(e,t){if(e.isPlaying)return;var r=e.latestRegister,n=R.registerController.getRegister(r);n&&n.pushSearchQuery&&n.pushSearchQuery(t)}(r,t)},prefix:i,desc:Oe,onKeyUp:function(t,r,o){var i,s,c,u=a.default.keyName(t);"Up"==u||"Down"==u?(i="Up"==u,s=t.target?t.target.selectionEnd:0,o(r=R.searchHistoryController.nextMatch(r,i)||""),s&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(s,t.target.value.length))):"Left"!=u&&"Right"!=u&&"Ctrl"!=u&&"Alt"!=u&&"Shift"!=u&&R.searchHistoryController.reset();try{c=Ie(e,r,!0,!0)}catch(t){}c?e.scrollIntoView(Ke(e,!n,c),30):(Pe(e),e.scrollTo(l.left,l.top))},onKeyDown:function(t,r,n){var o=a.default.keyName(t);"Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==r?(R.searchHistoryController.pushInput(r),R.searchHistoryController.reset(),Ie(e,s),Pe(e),e.scrollTo(l.left,l.top),a.default.e_stop(t),W(e),n(),e.focus()):"Up"==o||"Down"==o?a.default.e_stop(t):"Ctrl-U"==o&&(a.default.e_stop(t),n(""))}});break;case"wordUnderCursor":var u=fe(e,!1,!0,!1,!0),h=!0;if(u||(u=fe(e,!1,!0,!1,!1),h=!1),!u)return;var f=e.getLine(u.start.line).substring(u.start.ch,u.end.ch);f=h&&o?"\\b"+f+"\\b":f.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),R.jumpList.cachedCursor=e.getCursor(),e.setCursor(u.start),p(f,!0,!1)}}function p(n,o,i){R.searchHistoryController.pushInput(n),R.searchHistoryController.reset();try{Ie(e,n,o,i)}catch(a){return Ee(e,"Invalid regex: "+n),void W(e)}H.processMotion(e,t,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}},processEx:function(e,t,r){function n(t){R.exCommandHistoryController.pushInput(t),R.exCommandHistoryController.reset(),He.processCommand(e,t)}function o(t,r,n){var o,i,s=a.default.keyName(t);("Esc"==s||"Ctrl-C"==s||"Ctrl-["==s||"Backspace"==s&&""==r)&&(R.exCommandHistoryController.pushInput(r),R.exCommandHistoryController.reset(),a.default.e_stop(t),W(e),n(),e.focus()),"Up"==s||"Down"==s?(a.default.e_stop(t),o="Up"==s,i=t.target?t.target.selectionEnd:0,n(r=R.exCommandHistoryController.nextMatch(r,o)||""),i&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(i,t.target.value.length))):"Ctrl-U"==s?(a.default.e_stop(t),n("")):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&R.exCommandHistoryController.reset()}"keyToEx"==r.type?He.processCommand(e,r.exArgs.input):t.visualMode?Be(e,{onClose:n,prefix:":",value:"'<,'>",onKeyDown:o,selectValueOnOpen:!1}):Be(e,{onClose:n,prefix:":",onKeyDown:o})},evalInput:function(e,t){var r,n,o,i=t.inputState,a=i.motion,s=i.motionArgs||{},l=i.operator,u=i.operatorArgs||{},h=i.registerName,f=t.sel,p=G(t.visualMode?$(e,f.head):e.getCursor("head")),d=G(t.visualMode?$(e,f.anchor):e.getCursor("anchor")),m=G(p),g=G(d);if(l&&this.recordLastEdit(t,i),(o=void 0!==i.repeatOverride?i.repeatOverride:i.getRepeat())>0&&s.explicitRepeat?s.repeatIsExplicit=!0:(s.noRepeat||!s.explicitRepeat&&0===o)&&(o=1,s.repeatIsExplicit=!1),i.selectedCharacter&&(s.selectedCharacter=u.selectedCharacter=i.selectedCharacter),s.repeat=o,W(e),a){var v=F[a](e,p,s,t);if(t.lastMotion=F[a],!v)return;if(s.toJumplist){var y=R.jumpList,k=y.cachedCursor;k?(pe(e,k,v),delete y.cachedCursor):pe(e,p,v)}v instanceof Array?(n=v[0],r=v[1]):r=v,r||(r=G(p)),t.visualMode?(t.visualBlock&&r.ch===1/0||(r=$(e,r,t.visualBlock)),n&&(n=$(e,n,!0)),n=n||g,f.anchor=n,f.head=r,ce(e),ke(e,t,"<",Y(n,r)?n:r),ke(e,t,">",Y(n,r)?r:n)):l||(r=$(e,r),e.setCursor(r.line,r.ch))}if(l){if(u.lastSel){n=g;var C=u.lastSel,w=Math.abs(C.head.line-C.anchor.line),x=Math.abs(C.head.ch-C.anchor.ch);r=C.visualLine?c(g.line+w,g.ch):C.visualBlock?c(g.line+w,g.ch+x):C.head.line==C.anchor.line?c(g.line,g.ch+x):c(g.line+w,g.ch),t.visualMode=!0,t.visualLine=C.visualLine,t.visualBlock=C.visualBlock,f=t.sel={anchor:n,head:r},ce(e)}else t.visualMode&&(u.lastSel={anchor:G(f.anchor),head:G(f.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var S,A,b,L,T;if(t.visualMode){if(S=ee(f.head,f.anchor),A=te(f.head,f.anchor),b=t.visualLine||u.linewise,T=ue(e,{anchor:S,head:A},L=t.visualBlock?"block":b?"line":"char"),b){var E=T.ranges;if("block"==L)for(var O=0;O0&&i&&M(i);i=o.pop())r.line--,r.ch=0;i?(r.line--,r.ch=ne(e,r.line)):r.ch=0}}(e,S,A),T=ue(e,{anchor:S,head:A},L="char",!s.inclusive||b)}e.setSelections(T.ranges,T.primary),t.lastMotion=null,u.repeat=o,u.registerName=h,u.linewise=b;var I=U[l](e,u,T.ranges,g,r);t.visualMode&&he(e,null!=I),I&&e.setCursor(I)}},recordLastEdit:function(e,t,r){var n=R.macroModeState;n.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=r,n.lastInsertModeChanges.changes=[],n.lastInsertModeChanges.expectCursorActivityForChange=!1)}},F={moveToTopLine:function(e,t,r){var n=We(e).top+r.repeat-1;return c(n,e.findFirstNonWhiteSpaceCharacter(n))},moveToMiddleLine:function(e){var t=We(e),r=Math.floor(.5*(t.top+t.bottom));return c(r,e.findFirstNonWhiteSpaceCharacter(r))},moveToBottomLine:function(e,t,r){var n=We(e).bottom-r.repeat+1;return c(n,e.findFirstNonWhiteSpaceCharacter(n))},expandToLine:function(e,t,r){return c(t.line+r.repeat-1,1/0)},findNext:function(e,t,r){var n=xe(e),o=n.getQuery();if(o){var i=!r.forward;return i=n.isReversed()?!i:i,Ne(e,o),Ke(e,i,o,r.repeat)}},goToMark:function(e,t,r,n){var o=_e(e,n,r.selectedCharacter);return o?r.linewise?{line:o.line,ch:e.findFirstNonWhiteSpaceCharacter(o.line)}:o:null},moveToOtherHighlightedEnd:function(e,t,r,n){if(n.visualBlock&&r.sameLine){var o=n.sel;return[$(e,c(o.anchor.line,o.head.ch)),$(e,c(o.head.line,o.anchor.ch))]}return[n.sel.head,n.sel.anchor]},jumpToMark:function(e,t,r,n){for(var o=t,i=0;iu&&o.line==u?this.moveToEol(e,t,r,n):(r.toFirstChar&&(i=e.findFirstNonWhiteSpaceCharacter(s),n.lastHPos=i),n.lastHSPos=e.charCoords(c(s,i),"div").left,c(s,i))},moveByDisplayLines:function(e,t,r,n){var o=t;switch(n.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:n.lastHSPos=e.charCoords(o,"div").left}var i=r.repeat;if((s=e.findPosV(o,r.forward?i:-i,"line",n.lastHSPos)).hitSide)if(r.forward)var a={top:e.charCoords(s,"div").top+8,left:n.lastHSPos},s=e.coordsChar(a,"div");else{var l=e.charCoords(c(e.firstLine(),0),"div");l.left=n.lastHSPos,s=e.coordsChar(l,"div")}return n.lastHPos=s.ch,s},moveByPage:function(e,t,r){var n=t,o=r.repeat;return e.findPosV(n,r.forward?o:-o,"page")},moveByParagraph:function(e,t,r){var n=r.forward?1:-1;return we(e,t,r.repeat,n)},moveBySentence:function(e,t,r){var n=r.forward?1:-1;return function(e,t,r,n){function o(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!k(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function i(e,t,r,n){var i=""===(c=e.getLine(t)),a={line:c,ln:t,pos:r,dir:n},s={ln:a.ln,pos:a.pos},l=""===a.line;for(o(e,a);null!==a.line;){if(s.ln=a.ln,s.pos=a.pos,""===a.line&&!l)return{ln:a.ln,pos:a.pos};if(i&&""!==a.line&&!M(a.line[a.pos]))return{ln:a.ln,pos:a.pos};!x(a.line[a.pos])||i||a.pos!==a.line.length-1&&!M(a.line[a.pos+1])||(i=!0),o(e,a)}var c=e.getLine(s.ln);s.pos=0;for(var u=c.length-1;u>=0;--u)if(!M(c[u])){s.pos=u;break}return s}function a(e,t,r,n){var i={line:l=e.getLine(t),ln:t,pos:r,dir:n},a={ln:i.ln,pos:null},s=""===i.line;for(o(e,i);null!==i.line;){if(""===i.line&&!s)return null!==a.pos?a:{ln:i.ln,pos:i.pos};if(x(i.line[i.pos])&&null!==a.pos&&(i.ln!==a.ln||i.pos+1!==a.pos))return a;""===i.line||M(i.line[i.pos])||(s=!1,a={ln:i.ln,pos:i.pos}),o(e,i)}var l=e.getLine(a.ln);a.pos=0;for(var c=0;c0;)s=n<0?a(e,s.ln,s.pos,n):i(e,s.ln,s.pos,n),r--;return c(s.ln,s.pos)}(e,t,r.repeat,n)},moveByScroll:function(e,t,r,n){var o=e.getScrollInfo(),i=null,a=r.repeat;a||(a=Math.floor(o.clientHeight/(2*e.defaultTextHeight())));var s=e.charCoords(t,"local");if(r.repeat=a,!(i=F.moveByDisplayLines(e,t,r,n)))return null;var l=e.charCoords(i,"local");return e.scrollTo(null,o.top+l.top-s.top),i},moveByWords:function(e,t,r){return function(e,t,r,n,o,i){var a=G(t),s=[];(n&&!o||!n&&o)&&r++;for(var l=!(n&&o),u=0;u0)h.index=0;else{var m=h.lineText.length;h.index=m>0?m-1:0}h.nextCh=h.lineText.charAt(h.index)}d(h)&&(o.line=l,o.ch=h.index,t--)}if(h.nextCh||h.curMoveThrough)return c(l,h.index);return o}(e,r.repeat,r.forward,r.selectedCharacter)||t},moveToColumn:function(e,t,r,n){var o=r.repeat;return n.lastHPos=o-1,n.lastHSPos=e.charCoords(t,"div").left,function(e,t){var r=e.getCursor().line;return $(e,c(r,t-1))}(e,o)},moveToEol:function(e,t,r,n){var o=t;n.lastHPos=1/0;var i=c(o.line+r.repeat-1,1/0),a=e.clipPos(i);return a.ch--,n.lastHSPos=e.charCoords(a,"div").left,i},moveToFirstNonWhiteSpaceCharacter:function(e,t){var r=t;return c(r.line,e.findFirstNonWhiteSpaceCharacter(r.line))},moveToMatchedSymbol:function(e,t){var r=t,n=r.line,o=r.ch;return oi.ch||o.line>i.line){var h=o;o=i,i=h}n?i.ch+=1:o.ch+=1;return{start:o,end:i}}(e,t,o,a);else if({"'":!0,'"':!0}[o])i=function(e,t,r,n){var o,i,a,s,l=G(t),u=e.getLine(l.line).split(""),h=u.indexOf(r);l.ch-1&&!o;a--)u[a]==r&&(o=a+1);else o=l.ch+1;if(o&&!i)for(a=o,s=u.length;ae.lastLine()&&t.linewise&&!d?e.replaceRange("",p,u):e.replaceRange("",l,u),t.linewise&&(d||(e.setCursor(p),a.default.commands.newlineAndIndent(e)),l.ch=Number.MAX_VALUE),n=l}R.registerController.pushText(t.registerName,"change",o,t.linewise,r.length>1),J.enterInsertMode(e,{head:n},e.state.vim)},delete:function(e,t,r){var n,o,i=e.state.vim;if(i.visualBlock){o=e.getSelection();var a=D("",r.length);e.replaceSelections(a),n=r[0].anchor}else{var s=r[0].anchor,l=r[0].head;t.linewise&&l.line!=e.firstLine()&&s.line==e.lastLine()&&s.line==l.line-1&&(s.line==e.firstLine()?s.ch=0:s=c(s.line-1,ne(e,s.line-1))),o=e.getRange(s,l),e.replaceRange("",s,l),n=s,t.linewise&&(n=F.moveToFirstNonWhiteSpaceCharacter(e,s))}return R.registerController.pushText(t.registerName,"delete",o,t.linewise,i.visualBlock),$(e,n,i.insertMode)},indent:function(e,t,r){var n=e.state.vim,o=r[0].anchor.line,i=n.visualBlock?r[r.length-1].anchor.line:r[0].head.line,a=n.visualMode?t.repeat:1;t.linewise&&i--,e.pushUndoStop();for(var s=o;s<=i;s++)for(var l=0;lc.top?(l.line+=(s-c.top)/o,l.line=Math.ceil(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,s);else{var u=s+e.getScrollInfo().clientHeight;u=o.anchor.line?Q(o.head,0,1):c(o.anchor.line,0);else if("inplace"==n&&r.visualMode)return;e.setOption("disableInput",!1),r.visualMode&&he(e),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),a.default.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),a.default.signal(e,"vim-mode-change",{mode:"insert"})),R.macroModeState.isPlaying||(e.on("change",Je),a.default.on(e.getInputField(),"keydown",ze)),se(e,i,s)}},toggleVisualMode:function(e,t,r){var n,o=t.repeat,i=e.getCursor();r.visualMode?r.visualLine^t.linewise||r.visualBlock^t.blockwise?(r.visualLine=!!t.linewise,r.visualBlock=!!t.blockwise,a.default.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),ce(e)):he(e):(r.visualMode=!0,r.visualLine=!!t.linewise,r.visualBlock=!!t.blockwise,n=$(e,c(i.line,i.ch+o-1),!0),r.sel={anchor:i,head:n},a.default.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),ce(e),ke(e,r,"<",ee(i,n)),ke(e,r,">",te(i,n)))},reselectLastSelection:function(e,t,r){var n=r.lastSelection;if(r.visualMode&&le(e,r),n){var o=n.anchorMark.find(),i=n.headMark.find();if(!o||!i)return;r.sel={anchor:o,head:i},r.visualMode=!0,r.visualLine=n.visualLine,r.visualBlock=n.visualBlock,ce(e),ke(e,r,"<",ee(o,i)),ke(e,r,">",te(o,i)),a.default.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,t,r){var n,o;if(r.visualMode){if(n=e.getCursor("anchor"),Y(o=e.getCursor("head"),n)){var i=o;o=n,n=i}o.ch=ne(e,o.line)-1}else{var a=Math.max(t.repeat,2);n=e.getCursor(),o=$(e,c(n.line+a-1,1/0))}for(var s=0,l=n.line;l1)p=Array(t.repeat+1).join(p);var d,m,g=o.linewise,v=o.blockwise;if(g)r.visualMode?p=r.visualLine?p.slice(0,-1):"\n"+p.slice(0,p.length-1)+"\n":t.after?(p="\n"+p.slice(0,p.length-1),n.ch=ne(e,n.line)):n.ch=0;else{if(v){p=p.split("\n");for(var y=0;ye.lastLine()&&e.replaceRange("\n",c(b,0)),ne(e,b)u.length&&(n=u.length),o=c(s.line,n)}if("\n"==i)r.visualMode||e.replaceRange("",s,o),(a.default.commands.newlineAndIndentContinueComment||a.default.commands.newlineAndIndent)(e);else{var h=e.getRange(s,o);if(h=h.replace(/[^\n]/g,i),r.visualBlock){var f=new Array(e.getOption("tabSize")+1).join(" ");h=(h=e.getSelection()).replace(/\t/g,f).replace(/[^\n]/g,i).split("\n"),e.replaceSelections(h)}else e.replaceRange(h,s,o);r.visualMode?(s=Y(l[0].anchor,l[0].head)?l[0].anchor:l[0].head,e.setCursor(s),he(e,!1)):e.setCursor(Q(o,0,-1))}},incrementNumberToken:function(e,t){for(var r,n,o,i,a=e.getCursor(),s=e.getLine(a.line),l=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(r=l.exec(s))&&(o=(n=r.index)+r[0].length,!(a.ch"==t.slice(-11)){var r=t.length-11,n=e.slice(0,r),o=t.slice(0,r);return n==o&&e.length>r?"full":0==o.indexOf(n)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function Z(e,t,r){return function(){for(var n=0;n2&&(t=ee.apply(void 0,Array.prototype.slice.call(arguments,1))),Y(e,t)?e:t}function te(e,t){return arguments.length>2&&(t=te.apply(void 0,Array.prototype.slice.call(arguments,1))),Y(e,t)?t:e}function re(e,t,r){var n=Y(e,t),o=Y(t,r);return n&&o}function ne(e,t){return e.getLine(t).length}function oe(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function ie(e,t,r){var n=ne(e,t),o=new Array(r-n+1).join(" ");e.setCursor(c(t,n)),e.replaceRange(o,e.getCursor())}function ae(e,t){var r=[],n=e.listSelections(),o=G(e.clipPos(t)),i=!X(t,o),a=function(e,t,r){for(var n=0;na?l:0,h=n[u].anchor,f=Math.min(h.line,o.line),p=Math.max(h.line,o.line),d=h.ch,m=o.ch,g=n[u].head.ch-d,v=m-d;g>0&&v<=0?(d++,i||m--):g<0&&v>=0?(d--,s||m++):g<0&&-1==v&&(d--,m++);for(var y=f;y<=p;y++){var k={anchor:new c(y,d),head:new c(y,m)};r.push(k)}return e.setSelections(r),t.ch=m,h.ch=d,h}function se(e,t,r){for(var n=[],o=0;ol&&(o.line=l),o.ch=ne(e,o.line)}return{ranges:[{anchor:i,head:o}],primary:0}}if("block"==r){for(var u=Math.min(i.line,o.line),h=Math.min(i.ch,o.ch),f=Math.max(i.line,o.line),p=Math.max(i.ch,o.ch)+1,d=f-u+1,m=o.line==u?0:d-1,g=[],v=0;v=a.length)return null;n?l=f[0]:(l=h[0])(a.charAt(s))||(l=h[1]);for(var u=s,p=s;l(a.charAt(u))&&u=0;)p--;if(p++,t){for(var d=u;/\s/.test(a.charAt(u))&&u0;)p--;p||(p=m)}}return{start:c(i.line,p),end:c(i.line,u)}}function pe(e,t,r){X(t,r)||R.jumpList.add(e,t,r)}function de(e,t){R.lastCharacterSearch.increment=e,R.lastCharacterSearch.forward=t.forward,R.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var me={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ge={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function ve(e,t,r,n,o){var i=t.line,a=t.ch,s=e.getLine(i),l=r?1:-1,c=n?f:h;if(o&&""==s){if(i+=l,s=e.getLine(i),!k(e,i))return null;a=r?0:s.length}for(;;){if(o&&""==s)return{from:0,to:0,line:i};for(var u=l>0?s.length:-1,p=u,d=u;a!=u;){for(var m=!1,g=0;g0?0:s.length}}function ye(e,t,r,n){for(var o,i=e.getCursor(),a=i.ch,s=0;s0;)f(u,n)&&r--,u+=n;return new c(u,0)}var p=e.state.vim;if(p.visualLine&&f(a,1,!0)){var d=p.sel.anchor;f(d.line,-1,!0)&&(o&&d.line==a||(a+=1))}var m=h(a);for(u=a;u<=l&&r;u++)f(u,1,!0)&&(o&&h(u)==m||r--);for(i=new c(u,0),u>l&&!m?m=!0:o=!1,u=a;u>s&&(o&&h(u)!=m&&u!=a||!f(u,-1,!0));u--);return{start:new c(u,0),end:i}}function Me(){}function xe(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new Me)}function Se(e,t,r,n,o){e.openDialog?e.openDialog(t,n,{bottom:!0,value:o.value,onKeyDown:o.onKeyDown,onKeyUp:o.onKeyUp,selectValueOnOpen:!1}):n(prompt(r,""))}function Ae(e,t){var r=be(e,t)||[];if(!r.length)return[];var n=[];if(0===r[0]){for(var o=0;o'+t+"",{bottom:!0,duration:5e3}):alert(t)}var Oe="(Javascript regexp)";function Be(e,t){var r,n,o,i=(t.prefix||"")+" "+(t.desc||"");Se(e,(r=t.prefix,n=t.desc,o=''+(r||"")+'',n&&(o+=' '+n+""),o),i,t.onClose,t)}function Ie(e,t,r,n){if(t){var o=xe(e),i=Re(t,!!r,!!n);if(i)return Ne(e,i),function(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var r=["global","multiline","ignoreCase","source"],n=0;n0;t--){var r=e.substring(0,t);if(this.commandMap_[r]){var n=this.commandMap_[r];if(0===n.name.indexOf(e))return n}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e
";if(r){r=r.join("");for(var i=0;i"}}else for(var a in n){var s=n[a].toString();s.length&&(o+='"'+a+" "+s+"
")}Ee(e,o)},sort:function(e,t){var r,n,o,i,s;var l=function(){if(t.argString){var e=new a.default.StringStream(t.argString);if(e.eat("!")&&(r=!0),e.eol())return;if(!e.eatSpace())return"Invalid arguments";var l=e.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!l&&!e.eol())return"Invalid arguments";if(l[1]){n=-1!=l[1].indexOf("i"),o=-1!=l[1].indexOf("u");var c=-1!=l[1].indexOf("d")||-1!=l[1].indexOf("n")&&1,u=-1!=l[1].indexOf("x")&&1,h=-1!=l[1].indexOf("o")&&1;if(c+u+h>1)return"Invalid arguments";i=(c?"decimal":u&&"hex")||h&&"octal"}l[2]&&(s=new RegExp(l[2].substr(1,l[2].length-2),n?"i":""))}}();if(l)Ee(e,l+": "+t.argString);else{var u=t.line||e.firstLine(),h=t.lineEnd||t.line||e.lastLine();if(u!=h){var f=c(u,0),p=c(h,ne(e,h)),d=e.getRange(f,p).split("\n"),m=s||("decimal"==i?/(-?)([\d]+)/:"hex"==i?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==i?/([0-7]+)/:null),g="decimal"==i?10:"hex"==i?16:"octal"==i?8:null,v=[],y=[];if(i||s)for(var k=0;k")}if(n){var f=0;!function t(){if(f=a&&t<=s:t==a);)if(r||!h||i.from().line!=h.line)return e.scrollIntoView(i.from(),30),e.setSelection(i.from(),i.to()),h=i.from(),void(u=!1);var t,a,s;u=!0}function m(t){if(t&&t(),e.focus(),h){e.setCursor(h);var r=e.state.vim;r.exMode=!1,r.lastHPos=r.lastHSPos=h.ch}c&&c()}if(d(),u)return void Ee(e,"No matches for "+s.source);if(!t)return f(),void(c&&c());Be(e,{prefix:"replace with "+l+" (y/n/a/q/l)",onKeyDown:function(t,r,n){switch(a.default.e_stop(t),a.default.keyName(t)){case"y":case"Y":p(),d();break;case"n":case"N":d();break;case"a":case"A":var o=c;c=void 0,e.operation(f),c=o;break;case"l":case"L":p();case"q":case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":m(n)}return u&&m(n),!0}})}(e,f,p,m,g,y,d,h,t.callback)}else Ee(e,"No previous substitute regular expression")},redo:a.default.commands.redo,undo:a.default.commands.undo,write:function(e){a.default.commands.save?a.default.commands.save(e):e.save&&e.save()},nohlsearch:function(e){Pe(e)},yank:function(e){var t=G(e.getCursor()).line,r=e.getLine(t);R.registerController.pushText("0","yank",r,!0,!0)},delmarks:function(e,t){if(t.argString&&oe(t.argString))for(var r=e.state.vim,n=new a.default.StringStream(oe(t.argString));!n.eol();){n.eatSpace();var o=n.pos;if(!n.match(/[a-zA-Z]/,!1))return void Ee(e,"Invalid argument: "+t.argString.substring(o));var i=n.next();if(n.match("-",!0)){if(!n.match(/[a-zA-Z]/,!1))return void Ee(e,"Invalid argument: "+t.argString.substring(o));var s=i,l=n.next();if(!(C(s)&&C(l)||w(s)&&w(l)))return void Ee(e,"Invalid argument: "+s+"-");var c=s.charCodeAt(0),u=l.charCodeAt(0);if(c>=u)return void Ee(e,"Invalid argument: "+t.argString.substring(o));for(var h=0;h<=u-c;h++){var f=String.fromCharCode(c+h);delete r.marks[f]}}else delete r.marks[i]}else Ee(e,"Argument required")}},He=new je;function Fe(e){var t=e.state.vim,r=R.macroModeState,n=R.registerController.getRegister("."),o=r.isPlaying,i=r.lastInsertModeChanges,s=[];if(!o){for(var l=i.inVisualBlock&&t.lastSelection?t.lastSelection.visualBlock.height:1,c=i.changes,u=(s=[],0);u1&&(Ze(e,t,t.insertModeRepeat-1,!0),t.lastEditInputState.repeatOverride=t.insertModeRepeat),delete t.insertModeRepeat,t.insertMode=!1,e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),n.setText(i.changes.join("")),a.default.signal(e,"vim-mode-change",{mode:"normal"}),r.isRecording&&function(e){if(e.isPlaying)return;var t=e.latestRegister,r=R.registerController.getRegister(t);r&&r.pushInsertModeChanges&&r.pushInsertModeChanges(e.lastInsertModeChanges)}(r),e.enterVimMode()}function De(e){s.unshift(e)}function Ue(e,t,r,n){var o=R.registerController.getRegister(n);if(":"==n)return o.keyBuffer[0]&&He.processCommand(e,o.keyBuffer[0]),void(r.isPlaying=!1);var i=o.keyBuffer,s=0;r.isPlaying=!0,r.replaySearchQueries=o.searchQueries.slice(0);for(var l=0;l|<\w+>|./.exec(h))[0],h=h.substring(c.index+u.length),a.default.Vim.handleKey(e,u,"macro"),t.insertMode){var f=o.insertModeChanges[s++].changes;R.macroModeState.lastInsertModeChanges.changes=f,Ge(e,f,1),Fe(e)}r.isPlaying=!1}function Je(e,t){var r=R.macroModeState,n=r.lastInsertModeChanges;if(!r.isPlaying)for(;t;){if(n.expectCursorActivityForChange=!0,"+input"==t.origin||"paste"==t.origin||void 0===t.origin){var o=t.text.join("\n");n.maybeReset&&(n.changes=[],n.maybeReset=!1),e.state.overwrite&&!/\n/.test(o)?n.changes.push([o]):n.changes.push(o)}t=t.next}}function $e(e){var t=e.state.vim;if(t.insertMode){var r=R.macroModeState;if(r.isPlaying)return;var n=r.lastInsertModeChanges;n.expectCursorActivityForChange?n.expectCursorActivityForChange=!1:n.maybeReset=!0}else e.curOp.isVimOp||function(e,t){var r=e.getCursor("anchor"),n=e.getCursor("head");t.visualMode&&!e.somethingSelected()?he(e,!1):t.visualMode||t.insertMode||!e.somethingSelected()||(t.visualMode=!0,t.visualLine=!1,a.default.signal(e,"vim-mode-change",{mode:"visual"}));if(t.visualMode){var o=Y(n,r)?0:-1,i=Y(n,r)?-1:0;n=Q(n,0,o),r=Q(r,0,i),t.sel={anchor:r,head:n},ke(e,t,"<",ee(n,r)),ke(e,t,">",te(n,r))}else t.insertMode||(t.lastHPos=e.getCursor().ch)}(e,t);t.visualMode&&qe(e)}function qe(e){var t=e.state.vim,r=$(e,G(t.sel.head)),n=Q(r,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(r,n,{className:"cm-animate-fat-cursor"})}function Qe(e){this.keyName=e}function ze(e){var t=R.macroModeState.lastInsertModeChanges,r=a.default.keyName(e);r&&(-1==r.indexOf("Delete")&&-1==r.indexOf("Backspace")||a.default.lookupKey(r,"vim-insert",(function(){return t.maybeReset&&(t.changes=[],t.maybeReset=!1),t.changes.push(new Qe(r)),!0})))}function Ze(e,t,r,n){var o=R.macroModeState;o.isPlaying=!0;var i=!!t.lastEditActionCommand,a=t.inputState;function s(){i?H.processAction(e,t,t.lastEditActionCommand):H.evalInput(e,t)}function l(r){if(o.lastInsertModeChanges.changes.length>0){r=t.lastEditActionCommand?r:1;var n=o.lastInsertModeChanges;Ge(e,n.changes,r)}}if(t.inputState=t.lastEditInputState,i&&t.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c',\n type: 'keyToKey',\n toKeys: 'h'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: 'l'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: 'k'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: 'j'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: 'l'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: 'h',\n context: 'normal'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: 'W'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: 'B',\n context: 'normal'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: 'w'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: 'b',\n context: 'normal'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: 'j'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: 'k'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: ''\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: ''\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: '',\n context: 'insert'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: '',\n context: 'insert'\n}, {\n keys: 's',\n type: 'keyToKey',\n toKeys: 'cl',\n context: 'normal'\n}, {\n keys: 's',\n type: 'keyToKey',\n toKeys: 'c',\n context: 'visual'\n}, {\n keys: 'S',\n type: 'keyToKey',\n toKeys: 'cc',\n context: 'normal'\n}, {\n keys: 'S',\n type: 'keyToKey',\n toKeys: 'VdO',\n context: 'visual'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: '0'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: '$'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: ''\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: ''\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: 'j^',\n context: 'normal'\n}, {\n keys: '',\n type: 'keyToKey',\n toKeys: 'j^',\n context: 'visual'\n}, {\n keys: '',\n type: 'action',\n action: 'toggleOverwrite',\n context: 'insert'\n}, // Motions\n{\n keys: 'H',\n type: 'motion',\n motion: 'moveToTopLine',\n motionArgs: {\n linewise: true,\n toJumplist: true\n }\n}, {\n keys: 'M',\n type: 'motion',\n motion: 'moveToMiddleLine',\n motionArgs: {\n linewise: true,\n toJumplist: true\n }\n}, {\n keys: 'L',\n type: 'motion',\n motion: 'moveToBottomLine',\n motionArgs: {\n linewise: true,\n toJumplist: true\n }\n}, {\n keys: 'h',\n type: 'motion',\n motion: 'moveByCharacters',\n motionArgs: {\n forward: false\n }\n}, {\n keys: 'l',\n type: 'motion',\n motion: 'moveByCharacters',\n motionArgs: {\n forward: true\n }\n}, {\n keys: 'j',\n type: 'motion',\n motion: 'moveByLines',\n motionArgs: {\n forward: true,\n linewise: true\n }\n}, {\n keys: 'k',\n type: 'motion',\n motion: 'moveByLines',\n motionArgs: {\n forward: false,\n linewise: true\n }\n}, {\n keys: 'gj',\n type: 'motion',\n motion: 'moveByDisplayLines',\n motionArgs: {\n forward: true\n }\n}, {\n keys: 'gk',\n type: 'motion',\n motion: 'moveByDisplayLines',\n motionArgs: {\n forward: false\n }\n}, {\n keys: 'w',\n type: 'motion',\n motion: 'moveByWords',\n motionArgs: {\n forward: true,\n wordEnd: false\n }\n}, {\n keys: 'W',\n type: 'motion',\n motion: 'moveByWords',\n motionArgs: {\n forward: true,\n wordEnd: false,\n bigWord: true\n }\n}, {\n keys: 'e',\n type: 'motion',\n motion: 'moveByWords',\n motionArgs: {\n forward: true,\n wordEnd: true,\n inclusive: true\n }\n}, {\n keys: 'E',\n type: 'motion',\n motion: 'moveByWords',\n motionArgs: {\n forward: true,\n wordEnd: true,\n bigWord: true,\n inclusive: true\n }\n}, {\n keys: 'b',\n type: 'motion',\n motion: 'moveByWords',\n motionArgs: {\n forward: false,\n wordEnd: false\n }\n}, {\n keys: 'B',\n type: 'motion',\n motion: 'moveByWords',\n motionArgs: {\n forward: false,\n wordEnd: false,\n bigWord: true\n }\n}, {\n keys: 'ge',\n type: 'motion',\n motion: 'moveByWords',\n motionArgs: {\n forward: false,\n wordEnd: true,\n inclusive: true\n }\n}, {\n keys: 'gE',\n type: 'motion',\n motion: 'moveByWords',\n motionArgs: {\n forward: false,\n wordEnd: true,\n bigWord: true,\n inclusive: true\n }\n}, {\n keys: '{',\n type: 'motion',\n motion: 'moveByParagraph',\n motionArgs: {\n forward: false,\n toJumplist: true\n }\n}, {\n keys: '}',\n type: 'motion',\n motion: 'moveByParagraph',\n motionArgs: {\n forward: true,\n toJumplist: true\n }\n}, {\n keys: '(',\n type: 'motion',\n motion: 'moveBySentence',\n motionArgs: {\n forward: false\n }\n}, {\n keys: ')',\n type: 'motion',\n motion: 'moveBySentence',\n motionArgs: {\n forward: true\n }\n}, {\n keys: '',\n type: 'motion',\n motion: 'moveByPage',\n motionArgs: {\n forward: true\n }\n}, {\n keys: '',\n type: 'motion',\n motion: 'moveByPage',\n motionArgs: {\n forward: false\n }\n}, {\n keys: '',\n type: 'motion',\n motion: 'moveByScroll',\n motionArgs: {\n forward: true,\n explicitRepeat: true\n }\n}, {\n keys: '',\n type: 'motion',\n motion: 'moveByScroll',\n motionArgs: {\n forward: false,\n explicitRepeat: true\n }\n}, {\n keys: 'gg',\n type: 'motion',\n motion: 'moveToLineOrEdgeOfDocument',\n motionArgs: {\n forward: false,\n explicitRepeat: true,\n linewise: true,\n toJumplist: true\n }\n}, {\n keys: 'G',\n type: 'motion',\n motion: 'moveToLineOrEdgeOfDocument',\n motionArgs: {\n forward: true,\n explicitRepeat: true,\n linewise: true,\n toJumplist: true\n }\n}, {\n keys: '0',\n type: 'motion',\n motion: 'moveToStartOfLine'\n}, {\n keys: '^',\n type: 'motion',\n motion: 'moveToFirstNonWhiteSpaceCharacter'\n}, {\n keys: '+',\n type: 'motion',\n motion: 'moveByLines',\n motionArgs: {\n forward: true,\n toFirstChar: true\n }\n}, {\n keys: '-',\n type: 'motion',\n motion: 'moveByLines',\n motionArgs: {\n forward: false,\n toFirstChar: true\n }\n}, {\n keys: '_',\n type: 'motion',\n motion: 'moveByLines',\n motionArgs: {\n forward: true,\n toFirstChar: true,\n repeatOffset: -1\n }\n}, {\n keys: '$',\n type: 'motion',\n motion: 'moveToEol',\n motionArgs: {\n inclusive: true\n }\n}, {\n keys: '%',\n type: 'motion',\n motion: 'moveToMatchedSymbol',\n motionArgs: {\n inclusive: true,\n toJumplist: true\n }\n}, {\n keys: 'f',\n type: 'motion',\n motion: 'moveToCharacter',\n motionArgs: {\n forward: true,\n inclusive: true\n }\n}, {\n keys: 'F',\n type: 'motion',\n motion: 'moveToCharacter',\n motionArgs: {\n forward: false\n }\n}, {\n keys: 't',\n type: 'motion',\n motion: 'moveTillCharacter',\n motionArgs: {\n forward: true,\n inclusive: true\n }\n}, {\n keys: 'T',\n type: 'motion',\n motion: 'moveTillCharacter',\n motionArgs: {\n forward: false\n }\n}, {\n keys: ';',\n type: 'motion',\n motion: 'repeatLastCharacterSearch',\n motionArgs: {\n forward: true\n }\n}, {\n keys: ',',\n type: 'motion',\n motion: 'repeatLastCharacterSearch',\n motionArgs: {\n forward: false\n }\n}, {\n keys: '\\'',\n type: 'motion',\n motion: 'goToMark',\n motionArgs: {\n toJumplist: true,\n linewise: true\n }\n}, {\n keys: '`',\n type: 'motion',\n motion: 'goToMark',\n motionArgs: {\n toJumplist: true\n }\n}, {\n keys: ']`',\n type: 'motion',\n motion: 'jumpToMark',\n motionArgs: {\n forward: true\n }\n}, {\n keys: '[`',\n type: 'motion',\n motion: 'jumpToMark',\n motionArgs: {\n forward: false\n }\n}, {\n keys: ']\\'',\n type: 'motion',\n motion: 'jumpToMark',\n motionArgs: {\n forward: true,\n linewise: true\n }\n}, {\n keys: '[\\'',\n type: 'motion',\n motion: 'jumpToMark',\n motionArgs: {\n forward: false,\n linewise: true\n }\n}, // the next two aren't motions but must come before more general motion declarations\n{\n keys: ']p',\n type: 'action',\n action: 'paste',\n isEdit: true,\n actionArgs: {\n after: true,\n isEdit: true,\n matchIndent: true\n }\n}, {\n keys: '[p',\n type: 'action',\n action: 'paste',\n isEdit: true,\n actionArgs: {\n after: false,\n isEdit: true,\n matchIndent: true\n }\n}, {\n keys: ']',\n type: 'motion',\n motion: 'moveToSymbol',\n motionArgs: {\n forward: true,\n toJumplist: true\n }\n}, {\n keys: '[',\n type: 'motion',\n motion: 'moveToSymbol',\n motionArgs: {\n forward: false,\n toJumplist: true\n }\n}, {\n keys: '|',\n type: 'motion',\n motion: 'moveToColumn'\n}, {\n keys: 'o',\n type: 'motion',\n motion: 'moveToOtherHighlightedEnd',\n context: 'visual'\n}, {\n keys: 'O',\n type: 'motion',\n motion: 'moveToOtherHighlightedEnd',\n motionArgs: {\n sameLine: true\n },\n context: 'visual'\n}, // Operators\n{\n keys: 'd',\n type: 'operator',\n operator: 'delete'\n}, {\n keys: 'y',\n type: 'operator',\n operator: 'yank'\n}, {\n keys: 'c',\n type: 'operator',\n operator: 'change'\n}, {\n keys: '>',\n type: 'operator',\n operator: 'indent',\n operatorArgs: {\n indentRight: true\n }\n}, {\n keys: '<',\n type: 'operator',\n operator: 'indent',\n operatorArgs: {\n indentRight: false\n }\n}, {\n keys: 'g~',\n type: 'operator',\n operator: 'changeCase'\n}, {\n keys: 'gu',\n type: 'operator',\n operator: 'changeCase',\n operatorArgs: {\n toLower: true\n },\n isEdit: true\n}, {\n keys: 'gU',\n type: 'operator',\n operator: 'changeCase',\n operatorArgs: {\n toLower: false\n },\n isEdit: true\n}, {\n keys: 'n',\n type: 'motion',\n motion: 'findNext',\n motionArgs: {\n forward: true,\n toJumplist: true\n }\n}, {\n keys: 'N',\n type: 'motion',\n motion: 'findNext',\n motionArgs: {\n forward: false,\n toJumplist: true\n }\n}, // Operator-Motion dual commands\n{\n keys: 'x',\n type: 'operatorMotion',\n operator: 'delete',\n motion: 'moveByCharacters',\n motionArgs: {\n forward: true\n },\n operatorMotionArgs: {\n visualLine: false\n }\n}, {\n keys: 'X',\n type: 'operatorMotion',\n operator: 'delete',\n motion: 'moveByCharacters',\n motionArgs: {\n forward: false\n },\n operatorMotionArgs: {\n visualLine: true\n }\n}, {\n keys: 'D',\n type: 'operatorMotion',\n operator: 'delete',\n motion: 'moveToEol',\n motionArgs: {\n inclusive: true\n },\n context: 'normal'\n}, {\n keys: 'D',\n type: 'operator',\n operator: 'delete',\n operatorArgs: {\n linewise: true\n },\n context: 'visual'\n}, {\n keys: 'Y',\n type: 'operatorMotion',\n operator: 'yank',\n motion: 'expandToLine',\n motionArgs: {\n linewise: true\n },\n context: 'normal'\n}, {\n keys: 'Y',\n type: 'operator',\n operator: 'yank',\n operatorArgs: {\n linewise: true\n },\n context: 'visual'\n}, {\n keys: 'C',\n type: 'operatorMotion',\n operator: 'change',\n motion: 'moveToEol',\n motionArgs: {\n inclusive: true\n },\n context: 'normal'\n}, {\n keys: 'C',\n type: 'operator',\n operator: 'change',\n operatorArgs: {\n linewise: true\n },\n context: 'visual'\n}, {\n keys: '~',\n type: 'operatorMotion',\n operator: 'changeCase',\n motion: 'moveByCharacters',\n motionArgs: {\n forward: true\n },\n operatorArgs: {\n shouldMoveCursor: true\n },\n context: 'normal'\n}, {\n keys: '~',\n type: 'operator',\n operator: 'changeCase',\n context: 'visual'\n}, {\n keys: '',\n type: 'operatorMotion',\n operator: 'delete',\n motion: 'moveByWords',\n motionArgs: {\n forward: false,\n wordEnd: false\n },\n context: 'insert'\n}, // Actions\n{\n keys: '',\n type: 'action',\n action: 'jumpListWalk',\n actionArgs: {\n forward: true\n }\n}, {\n keys: '',\n type: 'action',\n action: 'jumpListWalk',\n actionArgs: {\n forward: false\n }\n}, {\n keys: '',\n type: 'action',\n action: 'scroll',\n actionArgs: {\n forward: true,\n linewise: true\n }\n}, {\n keys: '',\n type: 'action',\n action: 'scroll',\n actionArgs: {\n forward: false,\n linewise: true\n }\n}, {\n keys: 'a',\n type: 'action',\n action: 'enterInsertMode',\n isEdit: true,\n actionArgs: {\n insertAt: 'charAfter'\n },\n context: 'normal'\n}, {\n keys: 'A',\n type: 'action',\n action: 'enterInsertMode',\n isEdit: true,\n actionArgs: {\n insertAt: 'eol'\n },\n context: 'normal'\n}, {\n keys: 'A',\n type: 'action',\n action: 'enterInsertMode',\n isEdit: true,\n actionArgs: {\n insertAt: 'endOfSelectedArea'\n },\n context: 'visual'\n}, {\n keys: 'i',\n type: 'action',\n action: 'enterInsertMode',\n isEdit: true,\n actionArgs: {\n insertAt: 'inplace'\n },\n context: 'normal'\n}, {\n keys: 'I',\n type: 'action',\n action: 'enterInsertMode',\n isEdit: true,\n actionArgs: {\n insertAt: 'firstNonBlank'\n },\n context: 'normal'\n}, {\n keys: 'I',\n type: 'action',\n action: 'enterInsertMode',\n isEdit: true,\n actionArgs: {\n insertAt: 'startOfSelectedArea'\n },\n context: 'visual'\n}, {\n keys: 'o',\n type: 'action',\n action: 'newLineAndEnterInsertMode',\n isEdit: true,\n interlaceInsertRepeat: true,\n actionArgs: {\n after: true\n },\n context: 'normal'\n}, {\n keys: 'O',\n type: 'action',\n action: 'newLineAndEnterInsertMode',\n isEdit: true,\n interlaceInsertRepeat: true,\n actionArgs: {\n after: false\n },\n context: 'normal'\n}, {\n keys: 'v',\n type: 'action',\n action: 'toggleVisualMode'\n}, {\n keys: 'V',\n type: 'action',\n action: 'toggleVisualMode',\n actionArgs: {\n linewise: true\n }\n}, {\n keys: '',\n type: 'action',\n action: 'toggleVisualMode',\n actionArgs: {\n blockwise: true\n }\n}, {\n keys: '',\n type: 'action',\n action: 'toggleVisualMode',\n actionArgs: {\n blockwise: true\n }\n}, {\n keys: 'gv',\n type: 'action',\n action: 'reselectLastSelection'\n}, {\n keys: 'J',\n type: 'action',\n action: 'joinLines',\n isEdit: true\n}, {\n keys: 'p',\n type: 'action',\n action: 'paste',\n isEdit: true,\n actionArgs: {\n after: true,\n isEdit: true\n }\n}, {\n keys: 'P',\n type: 'action',\n action: 'paste',\n isEdit: true,\n actionArgs: {\n after: false,\n isEdit: true\n }\n}, {\n keys: 'r',\n type: 'action',\n action: 'replace',\n isEdit: true\n}, {\n keys: '@',\n type: 'action',\n action: 'replayMacro'\n}, {\n keys: 'q',\n type: 'action',\n action: 'enterMacroRecordMode'\n}, // Handle Replace-mode as a special case of insert mode.\n{\n keys: 'R',\n type: 'action',\n action: 'enterInsertMode',\n isEdit: true,\n actionArgs: {\n replace: true\n }\n}, {\n keys: 'u',\n type: 'action',\n action: 'undo',\n context: 'normal'\n}, {\n keys: 'u',\n type: 'operator',\n operator: 'changeCase',\n operatorArgs: {\n toLower: true\n },\n context: 'visual',\n isEdit: true\n}, {\n keys: 'U',\n type: 'operator',\n operator: 'changeCase',\n operatorArgs: {\n toLower: false\n },\n context: 'visual',\n isEdit: true\n}, {\n keys: '',\n type: 'action',\n action: 'redo'\n}, {\n keys: 'm',\n type: 'action',\n action: 'setMark'\n}, {\n keys: '\"',\n type: 'action',\n action: 'setRegister'\n}, {\n keys: 'zz',\n type: 'action',\n action: 'scrollToCursor',\n actionArgs: {\n position: 'center'\n }\n}, {\n keys: 'z.',\n type: 'action',\n action: 'scrollToCursor',\n actionArgs: {\n position: 'center'\n },\n motion: 'moveToFirstNonWhiteSpaceCharacter'\n}, {\n keys: 'zt',\n type: 'action',\n action: 'scrollToCursor',\n actionArgs: {\n position: 'top'\n }\n}, {\n keys: 'z',\n type: 'action',\n action: 'scrollToCursor',\n actionArgs: {\n position: 'top'\n },\n motion: 'moveToFirstNonWhiteSpaceCharacter'\n}, {\n keys: 'z-',\n type: 'action',\n action: 'scrollToCursor',\n actionArgs: {\n position: 'bottom'\n }\n}, {\n keys: 'zb',\n type: 'action',\n action: 'scrollToCursor',\n actionArgs: {\n position: 'bottom'\n },\n motion: 'moveToFirstNonWhiteSpaceCharacter'\n}, {\n keys: '.',\n type: 'action',\n action: 'repeatLastEdit'\n}, {\n keys: '',\n type: 'action',\n action: 'incrementNumberToken',\n isEdit: true,\n actionArgs: {\n increase: true,\n backtrack: false\n }\n}, {\n keys: '',\n type: 'action',\n action: 'incrementNumberToken',\n isEdit: true,\n actionArgs: {\n increase: false,\n backtrack: false\n }\n}, {\n keys: '',\n type: 'action',\n action: 'indent',\n actionArgs: {\n indentRight: true\n },\n context: 'insert'\n}, {\n keys: '',\n type: 'action',\n action: 'indent',\n actionArgs: {\n indentRight: false\n },\n context: 'insert'\n}, // Text object motions\n{\n keys: 'a',\n type: 'motion',\n motion: 'textObjectManipulation'\n}, {\n keys: 'i',\n type: 'motion',\n motion: 'textObjectManipulation',\n motionArgs: {\n textObjectInner: true\n }\n}, // Search\n{\n keys: '/',\n type: 'search',\n searchArgs: {\n forward: true,\n querySrc: 'prompt',\n toJumplist: true\n }\n}, {\n keys: '?',\n type: 'search',\n searchArgs: {\n forward: false,\n querySrc: 'prompt',\n toJumplist: true\n }\n}, {\n keys: '*',\n type: 'search',\n searchArgs: {\n forward: true,\n querySrc: 'wordUnderCursor',\n wholeWordOnly: true,\n toJumplist: true\n }\n}, {\n keys: '#',\n type: 'search',\n searchArgs: {\n forward: false,\n querySrc: 'wordUnderCursor',\n wholeWordOnly: true,\n toJumplist: true\n }\n}, {\n keys: 'g*',\n type: 'search',\n searchArgs: {\n forward: true,\n querySrc: 'wordUnderCursor',\n toJumplist: true\n }\n}, {\n keys: 'g#',\n type: 'search',\n searchArgs: {\n forward: false,\n querySrc: 'wordUnderCursor',\n toJumplist: true\n }\n}, // Ex command\n{\n keys: ':',\n type: 'ex'\n}];\n/**\n * Ex commands\n * Care must be taken when adding to the default Ex command map. For any\n * pair of commands that have a shared prefix, at least one of their\n * shortNames must not match the prefix of the other command.\n */\n\nvar defaultExCommandMap = [{\n name: 'colorscheme',\n shortName: 'colo'\n}, {\n name: 'map'\n}, {\n name: 'imap',\n shortName: 'im'\n}, {\n name: 'nmap',\n shortName: 'nm'\n}, {\n name: 'vmap',\n shortName: 'vm'\n}, {\n name: 'unmap'\n}, {\n name: 'write',\n shortName: 'w'\n}, {\n name: 'undo',\n shortName: 'u'\n}, {\n name: 'redo',\n shortName: 'red'\n}, {\n name: 'set',\n shortName: 'se'\n}, {\n name: 'set',\n shortName: 'se'\n}, {\n name: 'setlocal',\n shortName: 'setl'\n}, {\n name: 'setglobal',\n shortName: 'setg'\n}, {\n name: 'sort',\n shortName: 'sor'\n}, {\n name: 'substitute',\n shortName: 's',\n possiblyAsync: true\n}, {\n name: 'nohlsearch',\n shortName: 'noh'\n}, {\n name: 'yank',\n shortName: 'y'\n}, {\n name: 'delmarks',\n shortName: 'delm'\n}, {\n name: 'registers',\n shortName: 'reg',\n excludeFromCommandHistory: true\n}, {\n name: 'global',\n shortName: 'g'\n}];\nvar Pos = _cm_adapter2.default.Pos;\n\nvar Vim = function Vim() {\n function enterVimMode(cm) {\n cm.setOption('disableInput', true);\n cm.setOption('showCursorWhenSelecting', false);\n\n _cm_adapter2.default.signal(cm, \"vim-mode-change\", {\n mode: \"normal\"\n });\n\n cm.on('cursorActivity', onCursorActivity);\n maybeInitVimState(cm); // CodeMirror.on(cm.getInputField(), 'paste', getOnPasteFn(cm));\n\n cm.enterVimMode();\n }\n\n function leaveVimMode(cm) {\n cm.setOption('disableInput', false);\n cm.off('cursorActivity', onCursorActivity); // CodeMirror.off(cm.getInputField(), 'paste', getOnPasteFn(cm));\n\n cm.state.vim = null;\n cm.leaveVimMode();\n }\n\n function detachVimMap(cm, next) {\n cm.attached = false;\n\n if (this == _cm_adapter2.default.keyMap.vim) {\n _cm_adapter2.default.rmClass(cm.getWrapperElement(), \"cm-fat-cursor\"); // if (cm.getOption(\"inputStyle\") == \"contenteditable\" && document.body.style.caretColor != null) {\n // disableFatCursorMark(cm);\n // cm.getInputField().style.caretColor = \"\";\n // }\n\n }\n\n if (!next || next.attach != attachVimMap) leaveVimMode(cm);\n }\n\n function attachVimMap(cm, prev) {\n if (this == _cm_adapter2.default.keyMap.vim) {\n cm.attached = true;\n }\n\n if (!prev || prev.attach != attachVimMap) enterVimMode(cm);\n }\n\n function fatCursorMarks(cm) {\n var ranges = cm.listSelections(),\n result = [];\n\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n\n if (range.empty()) {\n if (range.anchor.ch < cm.getLine(range.anchor.line).length) {\n result.push(cm.markText(range.anchor, Pos(range.anchor.line, range.anchor.ch + 1), {\n className: \"cm-fat-cursor-mark\"\n }));\n } else {\n var widget = document.createElement(\"span\");\n widget.textContent = '\\xA0';\n widget.className = \"cm-fat-cursor-mark\";\n result.push(cm.setBookmark(range.anchor, {\n widget: widget\n }));\n }\n }\n }\n\n return result;\n }\n\n function updateFatCursorMark(cm) {\n var marks = cm.state.fatCursorMarks;\n if (marks) for (var i = 0; i < marks.length; i++) {\n marks[i].clear();\n }\n cm.state.fatCursorMarks = fatCursorMarks(cm);\n }\n\n function enableFatCursorMark(cm) {\n cm.state.fatCursorMarks = fatCursorMarks(cm);\n cm.on(\"cursorActivity\", updateFatCursorMark);\n }\n\n function disableFatCursorMark(cm) {\n var marks = cm.state.fatCursorMarks;\n if (marks) for (var i = 0; i < marks.length; i++) {\n marks[i].clear();\n }\n cm.state.fatCursorMarks = null;\n cm.off(\"cursorActivity\", updateFatCursorMark);\n } // Deprecated, simply setting the keymap works again.\n\n\n _cm_adapter2.default.defineOption('vimMode', false, function (cm, val, prev) {\n if (val && cm.getOption(\"keyMap\") != \"vim\") cm.setOption(\"keyMap\", \"vim\");else if (!val && prev != _cm_adapter2.default.Init && /^vim/.test(cm.getOption(\"keyMap\"))) cm.setOption(\"keyMap\", \"default\");\n });\n\n function cmKey(key, cm) {\n if (!cm) {\n return undefined;\n }\n\n if (this[key]) {\n return this[key];\n }\n\n var vimKey = cmKeyToVimKey(key);\n\n if (!vimKey) {\n return false;\n }\n\n var cmd = _cm_adapter2.default.Vim.findKey(cm, vimKey);\n\n if (typeof cmd == 'function') {\n _cm_adapter2.default.signal(cm, 'vim-keypress', vimKey);\n }\n\n return cmd;\n }\n\n var modifiers = {\n 'Shift': 'S',\n 'Ctrl': 'C',\n 'Alt': 'A',\n 'Cmd': 'D',\n 'Mod': 'A'\n };\n var specialKeys = {\n Enter: 'CR',\n Backspace: 'BS',\n Delete: 'Del',\n Insert: 'Ins'\n };\n\n function cmKeyToVimKey(key) {\n if (key.charAt(0) == '\\'') {\n // Keypress character binding of format \"'a'\"\n return key.charAt(1);\n }\n\n var pieces = key.split(/-(?!$)/);\n var lastPiece = pieces[pieces.length - 1];\n\n if (pieces.length == 1 && pieces[0].length == 1) {\n // No-modifier bindings use literal character bindings above. Skip.\n return false;\n } else if (pieces.length == 2 && pieces[0] == 'Shift' && lastPiece.length == 1) {\n // Ignore Shift+char bindings as they should be handled by literal character.\n return false;\n }\n\n var hasCharacter = false;\n\n for (var i = 0; i < pieces.length; i++) {\n var piece = pieces[i];\n\n if (piece in modifiers) {\n pieces[i] = modifiers[piece];\n } else {\n hasCharacter = true;\n }\n\n if (piece in specialKeys) {\n pieces[i] = specialKeys[piece];\n }\n }\n\n if (!hasCharacter) {\n // Vim does not support modifier only keys.\n return false;\n } // TODO: Current bindings expect the character to be lower case, but\n // it looks like vim key notation uses upper case.\n\n\n if (isUpperCase(lastPiece)) {\n pieces[pieces.length - 1] = lastPiece.toLowerCase();\n }\n\n return '<' + pieces.join('-') + '>';\n }\n\n function getOnPasteFn(cm) {\n var vim = cm.state.vim;\n\n if (!vim || !vim.onPasteFn) {\n vim.onPasteFn = function () {\n if (!vim.insertMode) {\n cm.setCursor(offsetCursor(cm.getCursor(), 0, 1));\n actions.enterInsertMode(cm, {}, vim);\n }\n };\n }\n\n return vim.onPasteFn;\n }\n\n var numberRegex = /[\\d]/;\n var wordCharTest = [_cm_adapter2.default.isWordChar, function (ch) {\n return ch && !_cm_adapter2.default.isWordChar(ch) && !/\\s/.test(ch);\n }],\n bigWordCharTest = [function (ch) {\n return /\\S/.test(ch);\n }];\n\n function makeKeyRange(start, size) {\n var keys = [];\n\n for (var i = start; i < start + size; i++) {\n keys.push(String.fromCharCode(i));\n }\n\n return keys;\n }\n\n var upperCaseAlphabet = makeKeyRange(65, 26);\n var lowerCaseAlphabet = makeKeyRange(97, 26);\n var numbers = makeKeyRange(48, 10);\n var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['<', '>']);\n var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['-', '\"', '.', ':', '/']);\n\n function isLine(cm, line) {\n return line >= cm.firstLine() && line <= cm.lastLine();\n }\n\n function isLowerCase(k) {\n return /^[a-z]$/.test(k);\n }\n\n function isMatchableSymbol(k) {\n return '()[]{}'.indexOf(k) != -1;\n }\n\n function isNumber(k) {\n return numberRegex.test(k);\n }\n\n function isUpperCase(k) {\n return /^[A-Z]$/.test(k);\n }\n\n function isWhiteSpaceString(k) {\n return /^\\s*$/.test(k);\n }\n\n function isEndOfSentenceSymbol(k) {\n return '.?!'.indexOf(k) != -1;\n }\n\n function inArray(val, arr) {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] == val) {\n return true;\n }\n }\n\n return false;\n }\n\n var options = {};\n\n function defineOption(name, defaultValue, type, aliases, callback) {\n if (defaultValue === undefined && !callback) {\n throw Error('defaultValue is required unless callback is provided');\n }\n\n if (!type) {\n type = 'string';\n }\n\n options[name] = {\n type: type,\n defaultValue: defaultValue,\n callback: callback\n };\n\n if (aliases) {\n for (var i = 0; i < aliases.length; i++) {\n options[aliases[i]] = options[name];\n }\n }\n\n if (defaultValue) {\n setOption(name, defaultValue);\n }\n }\n\n function setOption(name, value, cm, cfg) {\n var option = options[name];\n cfg = cfg || {};\n var scope = cfg.scope;\n\n if (!option) {\n return new Error('Unknown option: ' + name);\n }\n\n if (option.type == 'boolean') {\n if (value && value !== true) {\n return new Error('Invalid argument: ' + name + '=' + value);\n } else if (value !== false) {\n // Boolean options are set to true if value is not defined.\n value = true;\n }\n }\n\n if (option.callback) {\n if (scope !== 'local') {\n option.callback(value, undefined);\n }\n\n if (scope !== 'global' && cm) {\n option.callback(value, cm);\n }\n } else {\n if (scope !== 'local') {\n option.value = option.type == 'boolean' ? !!value : value;\n }\n\n if (scope !== 'global' && cm) {\n cm.state.vim.options[name] = {\n value: value\n };\n }\n }\n }\n\n function getOption(name, cm, cfg) {\n var option = options[name];\n cfg = cfg || {};\n var scope = cfg.scope;\n\n if (!option) {\n return new Error('Unknown option: ' + name);\n }\n\n if (option.callback) {\n var local = cm && option.callback(undefined, cm);\n\n if (scope !== 'global' && local !== undefined) {\n return local;\n }\n\n if (scope !== 'local') {\n return option.callback();\n }\n\n return;\n } else {\n var local = scope !== 'global' && cm && cm.state.vim.options[name];\n return (local || scope !== 'local' && option || {}).value;\n }\n }\n\n defineOption('filetype', undefined, 'string', ['ft'], function (name, cm) {\n // Option is local. Do nothing for global.\n if (cm === undefined) {\n return;\n } // The 'filetype' option proxies to the CodeMirror 'mode' option.\n\n\n if (name === undefined) {\n var mode = cm.getOption('mode');\n return mode == 'null' ? '' : mode;\n } else {\n var mode = name == '' ? 'null' : name;\n cm.setOption('mode', mode);\n }\n });\n\n var createCircularJumpList = function createCircularJumpList() {\n var size = 100;\n var pointer = -1;\n var head = 0;\n var tail = 0;\n var buffer = new Array(size);\n\n function add(cm, oldCur, newCur) {\n var current = pointer % size;\n var curMark = buffer[current];\n\n function useNextSlot(cursor) {\n var next = ++pointer % size;\n var trashMark = buffer[next];\n\n if (trashMark) {\n trashMark.clear();\n }\n\n buffer[next] = cm.setBookmark(cursor);\n }\n\n if (curMark) {\n var markPos = curMark.find(); // avoid recording redundant cursor position\n\n if (markPos && !cursorEqual(markPos, oldCur)) {\n useNextSlot(oldCur);\n }\n } else {\n useNextSlot(oldCur);\n }\n\n useNextSlot(newCur);\n head = pointer;\n tail = pointer - size + 1;\n\n if (tail < 0) {\n tail = 0;\n }\n }\n\n function move(cm, offset) {\n pointer += offset;\n\n if (pointer > head) {\n pointer = head;\n } else if (pointer < tail) {\n pointer = tail;\n }\n\n var mark = buffer[(size + pointer) % size]; // skip marks that are temporarily removed from text buffer\n\n if (mark && !mark.find()) {\n var inc = offset > 0 ? 1 : -1;\n var newCur;\n var oldCur = cm.getCursor();\n\n do {\n pointer += inc;\n mark = buffer[(size + pointer) % size]; // skip marks that are the same as current position\n\n if (mark && (newCur = mark.find()) && !cursorEqual(oldCur, newCur)) {\n break;\n }\n } while (pointer < head && pointer > tail);\n }\n\n return mark;\n }\n\n return {\n cachedCursor: undefined,\n //used for # and * jumps\n add: add,\n move: move\n };\n }; // Returns an object to track the changes associated insert mode. It\n // clones the object that is passed in, or creates an empty object one if\n // none is provided.\n\n\n var createInsertModeChanges = function createInsertModeChanges(c) {\n if (c) {\n // Copy construction\n return {\n changes: c.changes,\n expectCursorActivityForChange: c.expectCursorActivityForChange\n };\n }\n\n return {\n // Change list\n changes: [],\n // Set to true on change, false on cursorActivity.\n expectCursorActivityForChange: false\n };\n };\n\n function MacroModeState() {\n this.latestRegister = undefined;\n this.isPlaying = false;\n this.isRecording = false;\n this.replaySearchQueries = [];\n this.onRecordingDone = undefined;\n this.lastInsertModeChanges = createInsertModeChanges();\n }\n\n MacroModeState.prototype = {\n exitMacroRecordMode: function exitMacroRecordMode() {\n var macroModeState = vimGlobalState.macroModeState;\n\n if (macroModeState.onRecordingDone) {\n macroModeState.onRecordingDone(); // close dialog\n }\n\n macroModeState.onRecordingDone = undefined;\n macroModeState.isRecording = false;\n },\n enterMacroRecordMode: function enterMacroRecordMode(cm, registerName) {\n var register = vimGlobalState.registerController.getRegister(registerName);\n\n if (register) {\n register.clear();\n this.latestRegister = registerName;\n\n if (cm.openDialog) {\n this.onRecordingDone = cm.openDialog('(recording)[' + registerName + ']', null, {\n bottom: true\n });\n }\n\n this.isRecording = true;\n }\n }\n };\n\n function maybeInitVimState(cm) {\n if (!cm.state.vim) {\n // Store instance state in the CodeMirror object.\n cm.state.vim = {\n inputState: new InputState(),\n // Vim's input state that triggered the last edit, used to repeat\n // motions and operators with '.'.\n lastEditInputState: undefined,\n // Vim's action command before the last edit, used to repeat actions\n // with '.' and insert mode repeat.\n lastEditActionCommand: undefined,\n // When using jk for navigation, if you move from a longer line to a\n // shorter line, the cursor may clip to the end of the shorter line.\n // If j is pressed again and cursor goes to the next line, the\n // cursor should go back to its horizontal position on the longer\n // line if it can. This is to keep track of the horizontal position.\n lastHPos: -1,\n // Doing the same with screen-position for gj/gk\n lastHSPos: -1,\n // The last motion command run. Cleared if a non-motion command gets\n // executed in between.\n lastMotion: null,\n marks: {},\n // Mark for rendering fake cursor for visual mode.\n fakeCursor: null,\n insertMode: false,\n // Repeat count for changes made in insert mode, triggered by key\n // sequences like 3,i. Only exists when insertMode is true.\n insertModeRepeat: undefined,\n visualMode: false,\n // If we are in visual line mode. No effect if visualMode is false.\n visualLine: false,\n visualBlock: false,\n lastSelection: null,\n lastPastedText: null,\n sel: {},\n // Buffer-local/window-local values of vim options.\n options: {}\n };\n }\n\n return cm.state.vim;\n }\n\n var vimGlobalState;\n\n function resetVimGlobalState() {\n vimGlobalState = {\n // The current search query.\n searchQuery: null,\n // Whether we are searching backwards.\n searchIsReversed: false,\n // Replace part of the last substituted pattern\n lastSubstituteReplacePart: undefined,\n jumpList: createCircularJumpList(),\n macroModeState: new MacroModeState(),\n // Recording latest f, t, F or T motion command.\n lastCharacterSearch: {\n increment: 0,\n forward: true,\n selectedCharacter: ''\n },\n registerController: new RegisterController({}),\n // search history buffer\n searchHistoryController: new HistoryController(),\n // ex Command history buffer\n exCommandHistoryController: new HistoryController()\n };\n\n for (var optionName in options) {\n var option = options[optionName];\n option.value = option.defaultValue;\n }\n }\n\n var lastInsertModeKeyTimer;\n var vimApi = {\n buildKeyMap: function buildKeyMap() {// TODO: Convert keymap into dictionary format for fast lookup.\n },\n // Testing hook, though it might be useful to expose the register\n // controller anyways.\n getRegisterController: function getRegisterController() {\n return vimGlobalState.registerController;\n },\n // Testing hook.\n resetVimGlobalState_: resetVimGlobalState,\n // Testing hook.\n getVimGlobalState_: function getVimGlobalState_() {\n return vimGlobalState;\n },\n // Testing hook.\n maybeInitVimState_: maybeInitVimState,\n suppressErrorLogging: false,\n InsertModeKey: InsertModeKey,\n map: function map(lhs, rhs, ctx) {\n // Add user defined key bindings.\n exCommandDispatcher.map(lhs, rhs, ctx);\n },\n unmap: function unmap(lhs, ctx) {\n exCommandDispatcher.unmap(lhs, ctx);\n },\n // TODO: Expose setOption and getOption as instance methods. Need to decide how to namespace\n // them, or somehow make them work with the existing CodeMirror setOption/getOption API.\n setOption: setOption,\n getOption: getOption,\n defineOption: defineOption,\n defineEx: function defineEx(name, prefix, func) {\n if (!prefix) {\n prefix = name;\n } else if (name.indexOf(prefix) !== 0) {\n throw new Error('(Vim.defineEx) \"' + prefix + '\" is not a prefix of \"' + name + '\", command not registered');\n }\n\n exCommands[name] = func;\n exCommandDispatcher.commandMap_[prefix] = {\n name: name,\n shortName: prefix,\n type: 'api'\n };\n },\n handleKey: function handleKey(cm, key, origin) {\n var command = this.findKey(cm, key, origin);\n\n if (typeof command === 'function') {\n return command();\n }\n },\n\n /**\n * This is the outermost function called by CodeMirror, after keys have\n * been mapped to their Vim equivalents.\n *\n * Finds a command based on the key (and cached keys if there is a\n * multi-key sequence). Returns `undefined` if no key is matched, a noop\n * function if a partial match is found (multi-key), and a function to\n * execute the bound command if a a key is matched. The function always\n * returns true.\n */\n findKey: function findKey(cm, key, origin) {\n var vim = maybeInitVimState(cm);\n\n function handleMacroRecording() {\n var macroModeState = vimGlobalState.macroModeState;\n\n if (macroModeState.isRecording) {\n if (key == 'q') {\n macroModeState.exitMacroRecordMode();\n clearInputState(cm);\n return true;\n }\n\n if (origin != 'mapping') {\n logKey(macroModeState, key);\n }\n }\n }\n\n function handleEsc() {\n if (key == '') {\n // Clear input state and get back to normal mode.\n clearInputState(cm);\n\n if (vim.visualMode) {\n exitVisualMode(cm);\n } else if (vim.insertMode) {\n exitInsertMode(cm);\n }\n\n return true;\n }\n }\n\n function doKeyToKey(keys) {\n // TODO: prevent infinite recursion.\n var match;\n\n while (keys) {\n // Pull off one command key, which is either a single character\n // or a special sequence wrapped in '<' and '>', e.g. ''.\n match = /<\\w+-.+?>|<\\w+>|./.exec(keys);\n key = match[0];\n keys = keys.substring(match.index + key.length);\n\n _cm_adapter2.default.Vim.handleKey(cm, key, 'mapping');\n }\n }\n\n function handleKeyInsertMode() {\n if (handleEsc()) {\n return true;\n }\n\n var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key;\n var keysAreChars = key.length == 1;\n var match = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert'); // Need to check all key substrings in insert mode.\n\n while (keys.length > 1 && match.type != 'full') {\n var keys = vim.inputState.keyBuffer = keys.slice(1);\n var thisMatch = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert');\n\n if (thisMatch.type != 'none') {\n match = thisMatch;\n }\n }\n\n if (match.type == 'none') {\n clearInputState(cm);\n return false;\n } else if (match.type == 'partial') {\n if (lastInsertModeKeyTimer) {\n window.clearTimeout(lastInsertModeKeyTimer);\n }\n\n lastInsertModeKeyTimer = window.setTimeout(function () {\n if (vim.insertMode && vim.inputState.keyBuffer) {\n clearInputState(cm);\n }\n }, getOption('insertModeEscKeysTimeout'));\n return !keysAreChars;\n }\n\n if (lastInsertModeKeyTimer) {\n window.clearTimeout(lastInsertModeKeyTimer);\n }\n\n if (keysAreChars) {\n var selections = cm.listSelections();\n\n for (var i = 0; i < selections.length; i++) {\n var here = selections[i].head;\n cm.replaceRange('', offsetCursor(here, 0, -(keys.length - 1)), here, '+input');\n }\n\n vimGlobalState.macroModeState.lastInsertModeChanges.changes.pop();\n }\n\n clearInputState(cm);\n return match.command;\n }\n\n function handleKeyNonInsertMode() {\n if (handleMacroRecording() || handleEsc()) {\n return true;\n }\n\n var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key;\n\n if (/^[1-9]\\d*$/.test(keys)) {\n return true;\n }\n\n var keysMatcher = /^(\\d*)(.*)$/.exec(keys);\n\n if (!keysMatcher) {\n clearInputState(cm);\n return false;\n }\n\n var context = vim.visualMode ? 'visual' : 'normal';\n var match = commandDispatcher.matchCommand(keysMatcher[2] || keysMatcher[1], defaultKeymap, vim.inputState, context);\n\n if (match.type == 'none') {\n clearInputState(cm);\n return false;\n } else if (match.type == 'partial') {\n return true;\n }\n\n vim.inputState.keyBuffer = '';\n var keysMatcher = /^(\\d*)(.*)$/.exec(keys);\n\n if (keysMatcher[1] && keysMatcher[1] != '0') {\n vim.inputState.pushRepeatDigit(keysMatcher[1]);\n }\n\n return match.command;\n }\n\n var command;\n\n if (vim.insertMode) {\n command = handleKeyInsertMode();\n } else {\n command = handleKeyNonInsertMode();\n }\n\n if (command === false) {\n return !vim.insertMode && key.length === 1 ? function () {\n return true;\n } : undefined;\n } else if (command === true) {\n // TODO: Look into using CodeMirror's multi-key handling.\n // Return no-op since we are caching the key. Counts as handled, but\n // don't want act on it just yet.\n return function () {\n return true;\n };\n } else {\n return function () {\n return cm.operation(function () {\n cm.curOp.isVimOp = true;\n\n try {\n if (command.type == 'keyToKey') {\n doKeyToKey(command.toKeys);\n } else {\n commandDispatcher.processCommand(cm, vim, command);\n }\n } catch (e) {\n // clear VIM state in case it's in a bad state.\n cm.state.vim = undefined;\n maybeInitVimState(cm);\n\n if (!_cm_adapter2.default.Vim.suppressErrorLogging) {\n console['log'](e);\n }\n\n throw e;\n }\n\n return true;\n });\n };\n }\n },\n handleEx: function handleEx(cm, input) {\n exCommandDispatcher.processCommand(cm, input);\n },\n defineMotion: defineMotion,\n defineAction: defineAction,\n defineOperator: defineOperator,\n mapCommand: mapCommand,\n _mapCommand: _mapCommand,\n defineRegister: defineRegister,\n exitVisualMode: exitVisualMode,\n exitInsertMode: exitInsertMode\n }; // Represents the current input state.\n\n function InputState() {\n this.prefixRepeat = [];\n this.motionRepeat = [];\n this.operator = null;\n this.operatorArgs = null;\n this.motion = null;\n this.motionArgs = null;\n this.keyBuffer = []; // For matching multi-key commands.\n\n this.registerName = null; // Defaults to the unnamed register.\n }\n\n InputState.prototype.pushRepeatDigit = function (n) {\n if (!this.operator) {\n this.prefixRepeat = this.prefixRepeat.concat(n);\n } else {\n this.motionRepeat = this.motionRepeat.concat(n);\n }\n };\n\n InputState.prototype.getRepeat = function () {\n var repeat = 0;\n\n if (this.prefixRepeat.length > 0 || this.motionRepeat.length > 0) {\n repeat = 1;\n\n if (this.prefixRepeat.length > 0) {\n repeat *= parseInt(this.prefixRepeat.join(''), 10);\n }\n\n if (this.motionRepeat.length > 0) {\n repeat *= parseInt(this.motionRepeat.join(''), 10);\n }\n }\n\n return repeat;\n };\n\n function clearInputState(cm, reason) {\n cm.state.vim.inputState = new InputState();\n\n _cm_adapter2.default.signal(cm, 'vim-command-done', reason);\n }\n /*\n * Register stores information about copy and paste registers. Besides\n * text, a register must store whether it is linewise (i.e., when it is\n * pasted, should it insert itself into a new line, or should the text be\n * inserted at the cursor position.)\n */\n\n\n function Register(text, linewise, blockwise) {\n this.clear();\n this.keyBuffer = [text || ''];\n this.insertModeChanges = [];\n this.searchQueries = [];\n this.linewise = !!linewise;\n this.blockwise = !!blockwise;\n }\n\n Register.prototype = {\n setText: function setText(text, linewise, blockwise) {\n this.keyBuffer = [text || ''];\n this.linewise = !!linewise;\n this.blockwise = !!blockwise;\n },\n pushText: function pushText(text, linewise) {\n // if this register has ever been set to linewise, use linewise.\n if (linewise) {\n if (!this.linewise) {\n this.keyBuffer.push('\\n');\n }\n\n this.linewise = true;\n }\n\n this.keyBuffer.push(text);\n },\n pushInsertModeChanges: function pushInsertModeChanges(changes) {\n this.insertModeChanges.push(createInsertModeChanges(changes));\n },\n pushSearchQuery: function pushSearchQuery(query) {\n this.searchQueries.push(query);\n },\n clear: function clear() {\n this.keyBuffer = [];\n this.insertModeChanges = [];\n this.searchQueries = [];\n this.linewise = false;\n },\n toString: function toString() {\n return this.keyBuffer.join('');\n }\n };\n /**\n * Defines an external register.\n *\n * The name should be a single character that will be used to reference the register.\n * The register should support setText, pushText, clear, and toString(). See Register\n * for a reference implementation.\n */\n\n function defineRegister(name, register) {\n var registers = vimGlobalState.registerController.registers;\n\n if (!name || name.length != 1) {\n throw Error('Register name must be 1 character');\n }\n\n if (registers[name]) {\n throw Error('Register already defined ' + name);\n }\n\n registers[name] = register;\n validRegisters.push(name);\n }\n /*\n * vim registers allow you to keep many independent copy and paste buffers.\n * See http://usevim.com/2012/04/13/registers/ for an introduction.\n *\n * RegisterController keeps the state of all the registers. An initial\n * state may be passed in. The unnamed register '\"' will always be\n * overridden.\n */\n\n\n function RegisterController(registers) {\n this.registers = registers;\n this.unnamedRegister = registers['\"'] = new Register();\n registers['.'] = new Register();\n registers[':'] = new Register();\n registers['/'] = new Register();\n }\n\n RegisterController.prototype = {\n pushText: function pushText(registerName, operator, text, linewise, blockwise) {\n if (linewise && text.charAt(text.length - 1) !== '\\n') {\n text += '\\n';\n } // Lowercase and uppercase registers refer to the same register.\n // Uppercase just means append.\n\n\n var register = this.isValidRegister(registerName) ? this.getRegister(registerName) : null; // if no register/an invalid register was specified, things go to the\n // default registers\n\n if (!register) {\n switch (operator) {\n case 'yank':\n // The 0 register contains the text from the most recent yank.\n this.registers['0'] = new Register(text, linewise, blockwise);\n break;\n\n case 'delete':\n case 'change':\n if (text.indexOf('\\n') == -1) {\n // Delete less than 1 line. Update the small delete register.\n this.registers['-'] = new Register(text, linewise);\n } else {\n // Shift down the contents of the numbered registers and put the\n // deleted text into register 1.\n this.shiftNumericRegisters_();\n this.registers['1'] = new Register(text, linewise);\n }\n\n break;\n } // Make sure the unnamed register is set to what just happened\n\n\n this.unnamedRegister.setText(text, linewise, blockwise);\n return;\n } // If we've gotten to this point, we've actually specified a register\n\n\n var append = isUpperCase(registerName);\n\n if (append) {\n register.pushText(text, linewise);\n } else {\n register.setText(text, linewise, blockwise);\n } // The unnamed register always has the same value as the last used\n // register.\n\n\n this.unnamedRegister.setText(register.toString(), linewise);\n },\n // Gets the register named @name. If one of @name doesn't already exist,\n // create it. If @name is invalid, return the unnamedRegister.\n getRegister: function getRegister(name) {\n if (!this.isValidRegister(name)) {\n return this.unnamedRegister;\n }\n\n name = name.toLowerCase();\n\n if (!this.registers[name]) {\n this.registers[name] = new Register();\n }\n\n return this.registers[name];\n },\n isValidRegister: function isValidRegister(name) {\n return name && inArray(name, validRegisters);\n },\n shiftNumericRegisters_: function shiftNumericRegisters_() {\n for (var i = 9; i >= 2; i--) {\n this.registers[i] = this.getRegister('' + (i - 1));\n }\n }\n };\n\n function HistoryController() {\n this.historyBuffer = [];\n this.iterator = 0;\n this.initialPrefix = null;\n }\n\n HistoryController.prototype = {\n // the input argument here acts a user entered prefix for a small time\n // until we start autocompletion in which case it is the autocompleted.\n nextMatch: function nextMatch(input, up) {\n var historyBuffer = this.historyBuffer;\n var dir = up ? -1 : 1;\n if (this.initialPrefix === null) this.initialPrefix = input;\n\n for (var i = this.iterator + dir; up ? i >= 0 : i < historyBuffer.length; i += dir) {\n var element = historyBuffer[i];\n\n for (var j = 0; j <= element.length; j++) {\n if (this.initialPrefix == element.substring(0, j)) {\n this.iterator = i;\n return element;\n }\n }\n } // should return the user input in case we reach the end of buffer.\n\n\n if (i >= historyBuffer.length) {\n this.iterator = historyBuffer.length;\n return this.initialPrefix;\n } // return the last autocompleted query or exCommand as it is.\n\n\n if (i < 0) return input;\n },\n pushInput: function pushInput(input) {\n var index = this.historyBuffer.indexOf(input);\n if (index > -1) this.historyBuffer.splice(index, 1);\n if (input.length) this.historyBuffer.push(input);\n },\n reset: function reset() {\n this.initialPrefix = null;\n this.iterator = this.historyBuffer.length;\n }\n };\n var commandDispatcher = {\n matchCommand: function matchCommand(keys, keyMap, inputState, context) {\n var matches = commandMatches(keys, keyMap, context, inputState);\n\n if (!matches.full && !matches.partial) {\n return {\n type: 'none'\n };\n } else if (!matches.full && matches.partial) {\n return {\n type: 'partial'\n };\n }\n\n var bestMatch;\n\n for (var i = 0; i < matches.full.length; i++) {\n var match = matches.full[i];\n\n if (!bestMatch) {\n bestMatch = match;\n }\n }\n\n if (bestMatch.keys.slice(-11) == '') {\n var character = lastChar(keys);\n if (!character) return {\n type: 'none'\n };\n inputState.selectedCharacter = character;\n }\n\n return {\n type: 'full',\n command: bestMatch\n };\n },\n processCommand: function processCommand(cm, vim, command) {\n vim.inputState.repeatOverride = command.repeatOverride;\n\n switch (command.type) {\n case 'motion':\n this.processMotion(cm, vim, command);\n break;\n\n case 'operator':\n this.processOperator(cm, vim, command); // cm.pushUndoStop();\n\n break;\n\n case 'operatorMotion':\n this.processOperatorMotion(cm, vim, command); // cm.pushUndoStop();\n\n break;\n\n case 'action':\n this.processAction(cm, vim, command);\n break;\n\n case 'search':\n this.processSearch(cm, vim, command);\n break;\n\n case 'ex':\n case 'keyToEx':\n this.processEx(cm, vim, command);\n break;\n\n default:\n break;\n }\n },\n processMotion: function processMotion(cm, vim, command) {\n vim.inputState.motion = command.motion;\n vim.inputState.motionArgs = copyArgs(command.motionArgs);\n this.evalInput(cm, vim);\n },\n processOperator: function processOperator(cm, vim, command) {\n var inputState = vim.inputState;\n\n if (inputState.operator) {\n if (inputState.operator == command.operator) {\n // Typing an operator twice like 'dd' makes the operator operate\n // linewise\n inputState.motion = 'expandToLine';\n inputState.motionArgs = {\n linewise: true\n };\n this.evalInput(cm, vim);\n return;\n } else {\n // 2 different operators in a row doesn't make sense.\n clearInputState(cm);\n }\n }\n\n inputState.operator = command.operator;\n inputState.operatorArgs = copyArgs(command.operatorArgs);\n\n if (vim.visualMode) {\n // Operating on a selection in visual mode. We don't need a motion.\n this.evalInput(cm, vim);\n }\n },\n processOperatorMotion: function processOperatorMotion(cm, vim, command) {\n var visualMode = vim.visualMode;\n var operatorMotionArgs = copyArgs(command.operatorMotionArgs);\n\n if (operatorMotionArgs) {\n // Operator motions may have special behavior in visual mode.\n if (visualMode && operatorMotionArgs.visualLine) {\n vim.visualLine = true;\n }\n }\n\n this.processOperator(cm, vim, command);\n\n if (!visualMode) {\n this.processMotion(cm, vim, command);\n }\n },\n processAction: function processAction(cm, vim, command) {\n var inputState = vim.inputState;\n var repeat = inputState.getRepeat();\n var repeatIsExplicit = !!repeat;\n var actionArgs = copyArgs(command.actionArgs) || {};\n\n if (inputState.selectedCharacter) {\n actionArgs.selectedCharacter = inputState.selectedCharacter;\n } // Actions may or may not have motions and operators. Do these first.\n\n\n if (command.operator) {\n this.processOperator(cm, vim, command);\n }\n\n if (command.motion) {\n this.processMotion(cm, vim, command);\n }\n\n if (command.motion || command.operator) {\n this.evalInput(cm, vim);\n }\n\n actionArgs.repeat = repeat || 1;\n actionArgs.repeatIsExplicit = repeatIsExplicit;\n actionArgs.registerName = inputState.registerName;\n clearInputState(cm);\n vim.lastMotion = null;\n\n if (command.isEdit) {\n this.recordLastEdit(vim, inputState, command);\n }\n\n actions[command.action](cm, actionArgs, vim);\n },\n processSearch: function processSearch(cm, vim, command) {\n if (!cm.getSearchCursor) {\n // Search depends on SearchCursor.\n return;\n }\n\n var forward = command.searchArgs.forward;\n var wholeWordOnly = command.searchArgs.wholeWordOnly;\n getSearchState(cm).setReversed(!forward);\n var promptPrefix = forward ? '/' : '?';\n var originalQuery = getSearchState(cm).getQuery();\n var originalScrollPos = cm.getScrollInfo();\n\n function handleQuery(query, ignoreCase, smartCase) {\n vimGlobalState.searchHistoryController.pushInput(query);\n vimGlobalState.searchHistoryController.reset();\n\n try {\n updateSearchQuery(cm, query, ignoreCase, smartCase);\n } catch (e) {\n showConfirm(cm, 'Invalid regex: ' + query);\n clearInputState(cm);\n return;\n }\n\n commandDispatcher.processMotion(cm, vim, {\n type: 'motion',\n motion: 'findNext',\n motionArgs: {\n forward: true,\n toJumplist: command.searchArgs.toJumplist\n }\n });\n }\n\n function onPromptClose(query) {\n cm.scrollTo(originalScrollPos.left, originalScrollPos.top);\n handleQuery(query, true\n /** ignoreCase */\n , true\n /** smartCase */\n );\n var macroModeState = vimGlobalState.macroModeState;\n\n if (macroModeState.isRecording) {\n logSearchQuery(macroModeState, query);\n }\n }\n\n function onPromptKeyUp(e, query, close) {\n var keyName = _cm_adapter2.default.keyName(e),\n up,\n offset;\n\n if (keyName == 'Up' || keyName == 'Down') {\n up = keyName == 'Up' ? true : false;\n offset = e.target ? e.target.selectionEnd : 0;\n query = vimGlobalState.searchHistoryController.nextMatch(query, up) || '';\n close(query);\n if (offset && e.target) e.target.selectionEnd = e.target.selectionStart = Math.min(offset, e.target.value.length);\n } else {\n if (keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift') vimGlobalState.searchHistoryController.reset();\n }\n\n var parsedQuery;\n\n try {\n parsedQuery = updateSearchQuery(cm, query, true\n /** ignoreCase */\n , true\n /** smartCase */\n );\n } catch (e) {// Swallow bad regexes for incremental search.\n }\n\n if (parsedQuery) {\n cm.scrollIntoView(_findNext(cm, !forward, parsedQuery), 30);\n } else {\n clearSearchHighlight(cm);\n cm.scrollTo(originalScrollPos.left, originalScrollPos.top);\n }\n }\n\n function onPromptKeyDown(e, query, close) {\n var keyName = _cm_adapter2.default.keyName(e);\n\n if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[' || keyName == 'Backspace' && query == '') {\n vimGlobalState.searchHistoryController.pushInput(query);\n vimGlobalState.searchHistoryController.reset();\n updateSearchQuery(cm, originalQuery);\n clearSearchHighlight(cm);\n cm.scrollTo(originalScrollPos.left, originalScrollPos.top);\n\n _cm_adapter2.default.e_stop(e);\n\n clearInputState(cm);\n close();\n cm.focus();\n } else if (keyName == 'Up' || keyName == 'Down') {\n _cm_adapter2.default.e_stop(e);\n } else if (keyName == 'Ctrl-U') {\n // Ctrl-U clears input.\n _cm_adapter2.default.e_stop(e);\n\n close('');\n }\n }\n\n switch (command.searchArgs.querySrc) {\n case 'prompt':\n var macroModeState = vimGlobalState.macroModeState;\n\n if (macroModeState.isPlaying) {\n var query = macroModeState.replaySearchQueries.shift();\n handleQuery(query, true\n /** ignoreCase */\n , false\n /** smartCase */\n );\n } else {\n showPrompt(cm, {\n onClose: onPromptClose,\n prefix: promptPrefix,\n desc: searchPromptDesc,\n onKeyUp: onPromptKeyUp,\n onKeyDown: onPromptKeyDown\n });\n }\n\n break;\n\n case 'wordUnderCursor':\n var word = expandWordUnderCursor(cm, false\n /** inclusive */\n , true\n /** forward */\n , false\n /** bigWord */\n , true\n /** noSymbol */\n );\n var isKeyword = true;\n\n if (!word) {\n word = expandWordUnderCursor(cm, false\n /** inclusive */\n , true\n /** forward */\n , false\n /** bigWord */\n , false\n /** noSymbol */\n );\n isKeyword = false;\n }\n\n if (!word) {\n return;\n }\n\n var query = cm.getLine(word.start.line).substring(word.start.ch, word.end.ch);\n\n if (isKeyword && wholeWordOnly) {\n query = '\\\\b' + query + '\\\\b';\n } else {\n query = escapeRegex(query);\n } // cachedCursor is used to save the old position of the cursor\n // when * or # causes vim to seek for the nearest word and shift\n // the cursor before entering the motion.\n\n\n vimGlobalState.jumpList.cachedCursor = cm.getCursor();\n cm.setCursor(word.start);\n handleQuery(query, true\n /** ignoreCase */\n , false\n /** smartCase */\n );\n break;\n }\n },\n processEx: function processEx(cm, vim, command) {\n function onPromptClose(input) {\n // Give the prompt some time to close so that if processCommand shows\n // an error, the elements don't overlap.\n vimGlobalState.exCommandHistoryController.pushInput(input);\n vimGlobalState.exCommandHistoryController.reset();\n exCommandDispatcher.processCommand(cm, input);\n }\n\n function onPromptKeyDown(e, input, close) {\n var keyName = _cm_adapter2.default.keyName(e),\n up,\n offset;\n\n if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[' || keyName == 'Backspace' && input == '') {\n vimGlobalState.exCommandHistoryController.pushInput(input);\n vimGlobalState.exCommandHistoryController.reset();\n\n _cm_adapter2.default.e_stop(e);\n\n clearInputState(cm);\n close();\n cm.focus();\n }\n\n if (keyName == 'Up' || keyName == 'Down') {\n _cm_adapter2.default.e_stop(e);\n\n up = keyName == 'Up' ? true : false;\n offset = e.target ? e.target.selectionEnd : 0;\n input = vimGlobalState.exCommandHistoryController.nextMatch(input, up) || '';\n close(input);\n if (offset && e.target) e.target.selectionEnd = e.target.selectionStart = Math.min(offset, e.target.value.length);\n } else if (keyName == 'Ctrl-U') {\n // Ctrl-U clears input.\n _cm_adapter2.default.e_stop(e);\n\n close('');\n } else {\n if (keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift') vimGlobalState.exCommandHistoryController.reset();\n }\n }\n\n if (command.type == 'keyToEx') {\n // Handle user defined Ex to Ex mappings\n exCommandDispatcher.processCommand(cm, command.exArgs.input);\n } else {\n if (vim.visualMode) {\n showPrompt(cm, {\n onClose: onPromptClose,\n prefix: ':',\n value: '\\'<,\\'>',\n onKeyDown: onPromptKeyDown,\n selectValueOnOpen: false\n });\n } else {\n showPrompt(cm, {\n onClose: onPromptClose,\n prefix: ':',\n onKeyDown: onPromptKeyDown\n });\n }\n }\n },\n evalInput: function evalInput(cm, vim) {\n // If the motion command is set, execute both the operator and motion.\n // Otherwise return.\n var inputState = vim.inputState;\n var motion = inputState.motion;\n var motionArgs = inputState.motionArgs || {};\n var operator = inputState.operator;\n var operatorArgs = inputState.operatorArgs || {};\n var registerName = inputState.registerName;\n var sel = vim.sel; // TODO: Make sure cm and vim selections are identical outside visual mode.\n\n var origHead = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.head) : cm.getCursor('head'));\n var origAnchor = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.anchor) : cm.getCursor('anchor'));\n var oldHead = copyCursor(origHead);\n var oldAnchor = copyCursor(origAnchor);\n var newHead, newAnchor;\n var repeat;\n\n if (operator) {\n this.recordLastEdit(vim, inputState);\n }\n\n if (inputState.repeatOverride !== undefined) {\n // If repeatOverride is specified, that takes precedence over the\n // input state's repeat. Used by Ex mode and can be user defined.\n repeat = inputState.repeatOverride;\n } else {\n repeat = inputState.getRepeat();\n }\n\n if (repeat > 0 && motionArgs.explicitRepeat) {\n motionArgs.repeatIsExplicit = true;\n } else if (motionArgs.noRepeat || !motionArgs.explicitRepeat && repeat === 0) {\n repeat = 1;\n motionArgs.repeatIsExplicit = false;\n }\n\n if (inputState.selectedCharacter) {\n // If there is a character input, stick it in all of the arg arrays.\n motionArgs.selectedCharacter = operatorArgs.selectedCharacter = inputState.selectedCharacter;\n }\n\n motionArgs.repeat = repeat;\n clearInputState(cm);\n\n if (motion) {\n var motionResult = motions[motion](cm, origHead, motionArgs, vim);\n vim.lastMotion = motions[motion];\n\n if (!motionResult) {\n return;\n }\n\n if (motionArgs.toJumplist) {\n var jumpList = vimGlobalState.jumpList; // if the current motion is # or *, use cachedCursor\n\n var cachedCursor = jumpList.cachedCursor;\n\n if (cachedCursor) {\n recordJumpPosition(cm, cachedCursor, motionResult);\n delete jumpList.cachedCursor;\n } else {\n recordJumpPosition(cm, origHead, motionResult);\n }\n }\n\n if (motionResult instanceof Array) {\n newAnchor = motionResult[0];\n newHead = motionResult[1];\n } else {\n newHead = motionResult;\n } // TODO: Handle null returns from motion commands better.\n\n\n if (!newHead) {\n newHead = copyCursor(origHead);\n }\n\n if (vim.visualMode) {\n if (!(vim.visualBlock && newHead.ch === Infinity)) {\n newHead = clipCursorToContent(cm, newHead, vim.visualBlock);\n }\n\n if (newAnchor) {\n newAnchor = clipCursorToContent(cm, newAnchor, true);\n }\n\n newAnchor = newAnchor || oldAnchor;\n sel.anchor = newAnchor;\n sel.head = newHead;\n updateCmSelection(cm);\n updateMark(cm, vim, '<', cursorIsBefore(newAnchor, newHead) ? newAnchor : newHead);\n updateMark(cm, vim, '>', cursorIsBefore(newAnchor, newHead) ? newHead : newAnchor);\n } else if (!operator) {\n newHead = clipCursorToContent(cm, newHead);\n cm.setCursor(newHead.line, newHead.ch);\n }\n }\n\n if (operator) {\n if (operatorArgs.lastSel) {\n // Replaying a visual mode operation\n newAnchor = oldAnchor;\n var lastSel = operatorArgs.lastSel;\n var lineOffset = Math.abs(lastSel.head.line - lastSel.anchor.line);\n var chOffset = Math.abs(lastSel.head.ch - lastSel.anchor.ch);\n\n if (lastSel.visualLine) {\n // Linewise Visual mode: The same number of lines.\n newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch);\n } else if (lastSel.visualBlock) {\n // Blockwise Visual mode: The same number of lines and columns.\n newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch + chOffset);\n } else if (lastSel.head.line == lastSel.anchor.line) {\n // Normal Visual mode within one line: The same number of characters.\n newHead = Pos(oldAnchor.line, oldAnchor.ch + chOffset);\n } else {\n // Normal Visual mode with several lines: The same number of lines, in the\n // last line the same number of characters as in the last line the last time.\n newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch);\n }\n\n vim.visualMode = true;\n vim.visualLine = lastSel.visualLine;\n vim.visualBlock = lastSel.visualBlock;\n sel = vim.sel = {\n anchor: newAnchor,\n head: newHead\n };\n updateCmSelection(cm);\n } else if (vim.visualMode) {\n operatorArgs.lastSel = {\n anchor: copyCursor(sel.anchor),\n head: copyCursor(sel.head),\n visualBlock: vim.visualBlock,\n visualLine: vim.visualLine\n };\n }\n\n var curStart, curEnd, linewise, mode;\n var cmSel;\n\n if (vim.visualMode) {\n // Init visual op\n curStart = cursorMin(sel.head, sel.anchor);\n curEnd = cursorMax(sel.head, sel.anchor);\n linewise = vim.visualLine || operatorArgs.linewise;\n mode = vim.visualBlock ? 'block' : linewise ? 'line' : 'char';\n cmSel = makeCmSelection(cm, {\n anchor: curStart,\n head: curEnd\n }, mode);\n\n if (linewise) {\n var ranges = cmSel.ranges;\n\n if (mode == 'block') {\n // Linewise operators in visual block mode extend to end of line\n for (var i = 0; i < ranges.length; i++) {\n ranges[i].head.ch = lineLength(cm, ranges[i].head.line);\n }\n } else if (mode == 'line') {\n ranges[0].head = Pos(ranges[0].head.line + 1, 0);\n }\n }\n } else {\n // Init motion op\n curStart = copyCursor(newAnchor || oldAnchor);\n curEnd = copyCursor(newHead || oldHead);\n\n if (cursorIsBefore(curEnd, curStart)) {\n var tmp = curStart;\n curStart = curEnd;\n curEnd = tmp;\n }\n\n linewise = motionArgs.linewise || operatorArgs.linewise;\n\n if (linewise) {\n // Expand selection to entire line.\n expandSelectionToLine(cm, curStart, curEnd);\n } else if (motionArgs.forward) {\n // Clip to trailing newlines only if the motion goes forward.\n clipToLine(cm, curStart, curEnd);\n }\n\n mode = 'char';\n var exclusive = !motionArgs.inclusive || linewise;\n cmSel = makeCmSelection(cm, {\n anchor: curStart,\n head: curEnd\n }, mode, exclusive);\n }\n\n cm.setSelections(cmSel.ranges, cmSel.primary);\n vim.lastMotion = null;\n operatorArgs.repeat = repeat; // For indent in visual mode.\n\n operatorArgs.registerName = registerName; // Keep track of linewise as it affects how paste and change behave.\n\n operatorArgs.linewise = linewise;\n var operatorMoveTo = operators[operator](cm, operatorArgs, cmSel.ranges, oldAnchor, newHead);\n\n if (vim.visualMode) {\n exitVisualMode(cm, operatorMoveTo != null);\n }\n\n if (operatorMoveTo) {\n cm.setCursor(operatorMoveTo);\n }\n }\n },\n recordLastEdit: function recordLastEdit(vim, inputState, actionCommand) {\n var macroModeState = vimGlobalState.macroModeState;\n\n if (macroModeState.isPlaying) {\n return;\n }\n\n vim.lastEditInputState = inputState;\n vim.lastEditActionCommand = actionCommand;\n macroModeState.lastInsertModeChanges.changes = [];\n macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false;\n }\n };\n /**\n * typedef {Object{line:number,ch:number}} Cursor An object containing the\n * position of the cursor.\n */\n // All of the functions below return Cursor objects.\n\n var motions = {\n moveToTopLine: function moveToTopLine(cm, _head, motionArgs) {\n var line = getUserVisibleLines(cm).top + motionArgs.repeat - 1;\n return Pos(line, cm.findFirstNonWhiteSpaceCharacter(line));\n },\n moveToMiddleLine: function moveToMiddleLine(cm) {\n var range = getUserVisibleLines(cm);\n var line = Math.floor((range.top + range.bottom) * 0.5);\n return Pos(line, cm.findFirstNonWhiteSpaceCharacter(line));\n },\n moveToBottomLine: function moveToBottomLine(cm, _head, motionArgs) {\n var line = getUserVisibleLines(cm).bottom - motionArgs.repeat + 1;\n return Pos(line, cm.findFirstNonWhiteSpaceCharacter(line));\n },\n expandToLine: function expandToLine(_cm, head, motionArgs) {\n // Expands forward to end of line, and then to next line if repeat is\n // >1. Does not handle backward motion!\n var cur = head;\n return Pos(cur.line + motionArgs.repeat - 1, Infinity);\n },\n findNext: function findNext(cm, _head, motionArgs) {\n var state = getSearchState(cm);\n var query = state.getQuery();\n\n if (!query) {\n return;\n }\n\n var prev = !motionArgs.forward; // If search is initiated with ? instead of /, negate direction.\n\n prev = state.isReversed() ? !prev : prev;\n highlightSearchMatches(cm, query);\n return _findNext(cm, prev\n /** prev */\n , query, motionArgs.repeat);\n },\n goToMark: function goToMark(cm, _head, motionArgs, vim) {\n var pos = getMarkPos(cm, vim, motionArgs.selectedCharacter);\n\n if (pos) {\n return motionArgs.linewise ? {\n line: pos.line,\n ch: cm.findFirstNonWhiteSpaceCharacter(pos.line)\n } : pos;\n }\n\n return null;\n },\n moveToOtherHighlightedEnd: function moveToOtherHighlightedEnd(cm, _head, motionArgs, vim) {\n if (vim.visualBlock && motionArgs.sameLine) {\n var sel = vim.sel;\n return [clipCursorToContent(cm, Pos(sel.anchor.line, sel.head.ch)), clipCursorToContent(cm, Pos(sel.head.line, sel.anchor.ch))];\n } else {\n return [vim.sel.head, vim.sel.anchor];\n }\n },\n jumpToMark: function jumpToMark(cm, head, motionArgs, vim) {\n var best = head;\n\n for (var i = 0; i < motionArgs.repeat; i++) {\n var cursor = best;\n\n for (var key in vim.marks) {\n if (!isLowerCase(key)) {\n continue;\n }\n\n var mark = vim.marks[key].find();\n var isWrongDirection = motionArgs.forward ? cursorIsBefore(mark, cursor) : cursorIsBefore(cursor, mark);\n\n if (isWrongDirection) {\n continue;\n }\n\n if (motionArgs.linewise && mark.line == cursor.line) {\n continue;\n }\n\n var equal = cursorEqual(cursor, best);\n var between = motionArgs.forward ? cursorIsBetween(cursor, mark, best) : cursorIsBetween(best, mark, cursor);\n\n if (equal || between) {\n best = mark;\n }\n }\n }\n\n if (motionArgs.linewise) {\n // Vim places the cursor on the first non-whitespace character of\n // the line if there is one, else it places the cursor at the end\n // of the line, regardless of whether a mark was found.\n best = Pos(best.line, cm.findFirstNonWhiteSpaceCharacter(best.line));\n }\n\n return best;\n },\n moveByCharacters: function moveByCharacters(_cm, head, motionArgs) {\n var cur = head;\n var repeat = motionArgs.repeat;\n var ch = motionArgs.forward ? cur.ch + repeat : cur.ch - repeat;\n return Pos(cur.line, ch);\n },\n moveByLines: function moveByLines(cm, head, motionArgs, vim) {\n var cur = head;\n var endCh = cur.ch; // Depending what our last motion was, we may want to do different\n // things. If our last motion was moving vertically, we want to\n // preserve the HPos from our last horizontal move. If our last motion\n // was going to the end of a line, moving vertically we should go to\n // the end of the line, etc.\n\n switch (vim.lastMotion) {\n case this.moveByLines:\n case this.moveByDisplayLines:\n case this.moveByScroll:\n case this.moveToColumn:\n case this.moveToEol:\n endCh = vim.lastHPos;\n break;\n\n default:\n vim.lastHPos = endCh;\n }\n\n var repeat = motionArgs.repeat + (motionArgs.repeatOffset || 0);\n var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat;\n var first = cm.firstLine();\n var last = cm.lastLine(); // Vim go to line begin or line end when cursor at first/last line and\n // move to previous/next line is triggered.\n\n if (line < first && cur.line == first) {\n return this.moveToStartOfLine(cm, head, motionArgs, vim);\n } else if (line > last && cur.line == last) {\n return this.moveToEol(cm, head, motionArgs, vim);\n }\n\n if (motionArgs.toFirstChar) {\n endCh = cm.findFirstNonWhiteSpaceCharacter(line);\n vim.lastHPos = endCh;\n }\n\n vim.lastHSPos = cm.charCoords(Pos(line, endCh), 'div').left;\n return Pos(line, endCh);\n },\n moveByDisplayLines: function moveByDisplayLines(cm, head, motionArgs, vim) {\n var cur = head;\n\n switch (vim.lastMotion) {\n case this.moveByDisplayLines:\n case this.moveByScroll:\n case this.moveByLines:\n case this.moveToColumn:\n case this.moveToEol:\n break;\n\n default:\n vim.lastHSPos = cm.charCoords(cur, 'div').left;\n }\n\n var repeat = motionArgs.repeat;\n var res = cm.findPosV(cur, motionArgs.forward ? repeat : -repeat, 'line', vim.lastHSPos);\n\n if (res.hitSide) {\n if (motionArgs.forward) {\n var lastCharCoords = cm.charCoords(res, 'div');\n var goalCoords = {\n top: lastCharCoords.top + 8,\n left: vim.lastHSPos\n };\n var res = cm.coordsChar(goalCoords, 'div');\n } else {\n var resCoords = cm.charCoords(Pos(cm.firstLine(), 0), 'div');\n resCoords.left = vim.lastHSPos;\n res = cm.coordsChar(resCoords, 'div');\n }\n }\n\n vim.lastHPos = res.ch;\n return res;\n },\n moveByPage: function moveByPage(cm, head, motionArgs) {\n // CodeMirror only exposes functions that move the cursor page down, so\n // doing this bad hack to move the cursor and move it back. evalInput\n // will move the cursor to where it should be in the end.\n var curStart = head;\n var repeat = motionArgs.repeat;\n return cm.findPosV(curStart, motionArgs.forward ? repeat : -repeat, 'page');\n },\n moveByParagraph: function moveByParagraph(cm, head, motionArgs) {\n var dir = motionArgs.forward ? 1 : -1;\n return findParagraph(cm, head, motionArgs.repeat, dir);\n },\n moveBySentence: function moveBySentence(cm, head, motionArgs) {\n var dir = motionArgs.forward ? 1 : -1;\n return findSentence(cm, head, motionArgs.repeat, dir);\n },\n moveByScroll: function moveByScroll(cm, head, motionArgs, vim) {\n var scrollbox = cm.getScrollInfo();\n var curEnd = null;\n var repeat = motionArgs.repeat;\n\n if (!repeat) {\n repeat = Math.floor(scrollbox.clientHeight / (2 * cm.defaultTextHeight()));\n }\n\n var orig = cm.charCoords(head, 'local');\n motionArgs.repeat = repeat;\n var curEnd = motions.moveByDisplayLines(cm, head, motionArgs, vim);\n\n if (!curEnd) {\n return null;\n }\n\n var dest = cm.charCoords(curEnd, 'local');\n cm.scrollTo(null, scrollbox.top + dest.top - orig.top);\n return curEnd;\n },\n moveByWords: function moveByWords(cm, head, motionArgs) {\n return moveToWord(cm, head, motionArgs.repeat, !!motionArgs.forward, !!motionArgs.wordEnd, !!motionArgs.bigWord);\n },\n moveTillCharacter: function moveTillCharacter(cm, _head, motionArgs) {\n var repeat = motionArgs.repeat;\n\n var curEnd = _moveToCharacter(cm, repeat, motionArgs.forward, motionArgs.selectedCharacter);\n\n var increment = motionArgs.forward ? -1 : 1;\n recordLastCharacterSearch(increment, motionArgs);\n if (!curEnd) return null;\n curEnd.ch += increment;\n return curEnd;\n },\n moveToCharacter: function moveToCharacter(cm, head, motionArgs) {\n var repeat = motionArgs.repeat;\n recordLastCharacterSearch(0, motionArgs);\n return _moveToCharacter(cm, repeat, motionArgs.forward, motionArgs.selectedCharacter) || head;\n },\n moveToSymbol: function moveToSymbol(cm, head, motionArgs) {\n var repeat = motionArgs.repeat;\n return findSymbol(cm, repeat, motionArgs.forward, motionArgs.selectedCharacter) || head;\n },\n moveToColumn: function moveToColumn(cm, head, motionArgs, vim) {\n var repeat = motionArgs.repeat; // repeat is equivalent to which column we want to move to!\n\n vim.lastHPos = repeat - 1;\n vim.lastHSPos = cm.charCoords(head, 'div').left;\n return _moveToColumn(cm, repeat);\n },\n moveToEol: function moveToEol(cm, head, motionArgs, vim) {\n var cur = head;\n vim.lastHPos = Infinity;\n var retval = Pos(cur.line + motionArgs.repeat - 1, Infinity);\n var end = cm.clipPos(retval);\n end.ch--;\n vim.lastHSPos = cm.charCoords(end, 'div').left;\n return retval;\n },\n moveToFirstNonWhiteSpaceCharacter: function moveToFirstNonWhiteSpaceCharacter(cm, head) {\n // Go to the start of the line where the text begins, or the end for\n // whitespace-only lines\n var cursor = head;\n return Pos(cursor.line, cm.findFirstNonWhiteSpaceCharacter(cursor.line));\n },\n moveToMatchedSymbol: function moveToMatchedSymbol(cm, head) {\n var cursor = head;\n var line = cursor.line;\n var ch = cursor.ch;\n var lineText = cm.getLine(line); // var symbol;\n // for (; ch < lineText.length; ch++) {\n // symbol = lineText.charAt(ch);\n // if (symbol && isMatchableSymbol(symbol)) {\n // var style = cm.getTokenTypeAt(Pos(line, ch + 1));\n // if (style !== \"string\" && style !== \"comment\") {\n // break;\n // }\n // }\n // }\n\n if (ch < lineText.length) {\n var matched = cm.findMatchingBracket(Pos(line, ch));\n return matched.to;\n } else {\n return cursor;\n }\n },\n moveToStartOfLine: function moveToStartOfLine(_cm, head) {\n return Pos(head.line, 0);\n },\n moveToLineOrEdgeOfDocument: function moveToLineOrEdgeOfDocument(cm, _head, motionArgs) {\n var lineNum = motionArgs.forward ? cm.lastLine() : cm.firstLine();\n\n if (motionArgs.repeatIsExplicit) {\n lineNum = motionArgs.repeat - cm.getOption('firstLineNumber');\n }\n\n return Pos(lineNum, cm.findFirstNonWhiteSpaceCharacter(lineNum));\n },\n textObjectManipulation: function textObjectManipulation(cm, head, motionArgs, vim) {\n // TODO: lots of possible exceptions that can be thrown here. Try da(\n // outside of a () block.\n // TODO: adding <> >< to this map doesn't work, presumably because\n // they're operators\n var mirroredPairs = {\n '(': ')',\n ')': '(',\n '{': '}',\n '}': '{',\n '[': ']',\n ']': '['\n };\n var selfPaired = {\n '\\'': true,\n '\"': true\n };\n var character = motionArgs.selectedCharacter; // 'b' refers to '()' block.\n // 'B' refers to '{}' block.\n\n if (character == 'b') {\n character = '(';\n } else if (character == 'B') {\n character = '{';\n } // Inclusive is the difference between a and i\n // TODO: Instead of using the additional text object map to perform text\n // object operations, merge the map into the defaultKeyMap and use\n // motionArgs to define behavior. Define separate entries for 'aw',\n // 'iw', 'a[', 'i[', etc.\n\n\n var inclusive = !motionArgs.textObjectInner;\n var tmp;\n\n if (mirroredPairs[character]) {\n tmp = selectCompanionObject(cm, head, character, inclusive);\n } else if (selfPaired[character]) {\n tmp = findBeginningAndEnd(cm, head, character, inclusive);\n } else if (character === 'W') {\n tmp = expandWordUnderCursor(cm, inclusive, true\n /** forward */\n , true\n /** bigWord */\n );\n } else if (character === 'w') {\n tmp = expandWordUnderCursor(cm, inclusive, true\n /** forward */\n , false\n /** bigWord */\n );\n } else if (character === 'p') {\n tmp = findParagraph(cm, head, motionArgs.repeat, 0, inclusive);\n motionArgs.linewise = true;\n\n if (vim.visualMode) {\n if (!vim.visualLine) {\n vim.visualLine = true;\n }\n } else {\n var operatorArgs = vim.inputState.operatorArgs;\n\n if (operatorArgs) {\n operatorArgs.linewise = true;\n }\n\n tmp.end.line--;\n }\n } else {\n // No text object defined for this, don't move.\n return null;\n }\n\n if (!cm.state.vim.visualMode) {\n return [tmp.start, tmp.end];\n } else {\n return expandSelection(cm, tmp.start, tmp.end);\n }\n },\n repeatLastCharacterSearch: function repeatLastCharacterSearch(cm, head, motionArgs) {\n var lastSearch = vimGlobalState.lastCharacterSearch;\n var repeat = motionArgs.repeat;\n var forward = motionArgs.forward === lastSearch.forward;\n var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1);\n cm.moveH(-1 * increment, 'char');\n motionArgs.inclusive = forward ? true : false;\n\n var curEnd = _moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter);\n\n if (!curEnd) {\n cm.moveH(increment, 'char');\n return head;\n }\n\n curEnd.ch += increment;\n return curEnd;\n }\n };\n\n function defineMotion(name, fn) {\n motions[name] = fn;\n }\n\n function fillArray(val, times) {\n var arr = [];\n\n for (var i = 0; i < times; i++) {\n arr.push(val);\n }\n\n return arr;\n }\n /**\n * An operator acts on a text selection. It receives the list of selections\n * as input. The corresponding CodeMirror selection is guaranteed to\n * match the input selection.\n */\n\n\n var operators = {\n change: function change(cm, args, ranges) {\n var finalHead, text;\n var vim = cm.state.vim;\n vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock = vim.visualBlock;\n\n if (!vim.visualMode) {\n var anchor = ranges[0].anchor,\n head = ranges[0].head;\n text = cm.getRange(anchor, head);\n var lastState = vim.lastEditInputState || {};\n\n if (lastState.motion == \"moveByWords\" && !isWhiteSpaceString(text)) {\n // Exclude trailing whitespace if the range is not all whitespace.\n var match = /\\s+$/.exec(text);\n\n if (match && lastState.motionArgs && lastState.motionArgs.forward) {\n head = offsetCursor(head, 0, -match[0].length);\n text = text.slice(0, -match[0].length);\n }\n }\n\n var prevLineEnd = new Pos(anchor.line - 1, Number.MAX_VALUE);\n var wasLastLine = cm.firstLine() == cm.lastLine();\n\n if (head.line > cm.lastLine() && args.linewise && !wasLastLine) {\n cm.replaceRange('', prevLineEnd, head);\n } else {\n cm.replaceRange('', anchor, head);\n }\n\n if (args.linewise) {\n // Push the next line back down, if there is a next line.\n if (!wasLastLine) {\n cm.setCursor(prevLineEnd);\n\n _cm_adapter2.default.commands.newlineAndIndent(cm);\n } // make sure cursor ends up at the end of the line.\n\n\n anchor.ch = Number.MAX_VALUE;\n }\n\n finalHead = anchor;\n } else {\n text = cm.getSelection();\n var replacement = fillArray('', ranges.length);\n cm.replaceSelections(replacement);\n finalHead = cursorMin(ranges[0].head, ranges[0].anchor);\n }\n\n vimGlobalState.registerController.pushText(args.registerName, 'change', text, args.linewise, ranges.length > 1);\n actions.enterInsertMode(cm, {\n head: finalHead\n }, cm.state.vim);\n },\n // delete is a javascript keyword.\n 'delete': function _delete(cm, args, ranges) {\n var finalHead, text;\n var vim = cm.state.vim;\n\n if (!vim.visualBlock) {\n var anchor = ranges[0].anchor,\n head = ranges[0].head;\n\n if (args.linewise && head.line != cm.firstLine() && anchor.line == cm.lastLine() && anchor.line == head.line - 1) {\n // Special case for dd on last line (and first line).\n if (anchor.line == cm.firstLine()) {\n anchor.ch = 0;\n } else {\n anchor = Pos(anchor.line - 1, lineLength(cm, anchor.line - 1));\n }\n }\n\n text = cm.getRange(anchor, head);\n cm.replaceRange('', anchor, head);\n finalHead = anchor;\n\n if (args.linewise) {\n finalHead = motions.moveToFirstNonWhiteSpaceCharacter(cm, anchor);\n }\n } else {\n text = cm.getSelection();\n var replacement = fillArray('', ranges.length);\n cm.replaceSelections(replacement);\n finalHead = ranges[0].anchor;\n }\n\n vimGlobalState.registerController.pushText(args.registerName, 'delete', text, args.linewise, vim.visualBlock);\n var includeLineBreak = vim.insertMode;\n return clipCursorToContent(cm, finalHead, includeLineBreak);\n },\n indent: function indent(cm, args, ranges) {\n var vim = cm.state.vim;\n var startLine = ranges[0].anchor.line;\n var endLine = vim.visualBlock ? ranges[ranges.length - 1].anchor.line : ranges[0].head.line; // In visual mode, n> shifts the selection right n times, instead of\n // shifting n lines right once.\n\n var repeat = vim.visualMode ? args.repeat : 1;\n\n if (args.linewise) {\n // The only way to delete a newline is to delete until the start of\n // the next line, so in linewise mode evalInput will include the next\n // line. We don't want this in indent, so we go back a line.\n endLine--;\n }\n\n cm.pushUndoStop();\n\n for (var i = startLine; i <= endLine; i++) {\n for (var j = 0; j < repeat; j++) {\n cm.indentLine(i, args.indentRight);\n }\n }\n\n cm.pushUndoStop();\n return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor);\n },\n changeCase: function changeCase(cm, args, ranges, oldAnchor, newHead) {\n var selections = cm.getSelections();\n var swapped = [];\n var toLower = args.toLower;\n\n for (var j = 0; j < selections.length; j++) {\n var toSwap = selections[j];\n var text = '';\n\n if (toLower === true) {\n text = toSwap.toLowerCase();\n } else if (toLower === false) {\n text = toSwap.toUpperCase();\n } else {\n for (var i = 0; i < toSwap.length; i++) {\n var character = toSwap.charAt(i);\n text += isUpperCase(character) ? character.toLowerCase() : character.toUpperCase();\n }\n }\n\n swapped.push(text);\n }\n\n cm.replaceSelections(swapped);\n\n if (args.shouldMoveCursor) {\n return newHead;\n } else if (!cm.state.vim.visualMode && args.linewise && ranges[0].anchor.line + 1 == ranges[0].head.line) {\n return motions.moveToFirstNonWhiteSpaceCharacter(cm, oldAnchor);\n } else if (args.linewise) {\n return oldAnchor;\n } else {\n return cursorMin(ranges[0].anchor, ranges[0].head);\n }\n },\n yank: function yank(cm, args, ranges, oldAnchor) {\n var vim = cm.state.vim;\n var text = cm.getSelection();\n var endPos = vim.visualMode ? cursorMin(vim.sel.anchor, vim.sel.head, ranges[0].head, ranges[0].anchor) : oldAnchor;\n vimGlobalState.registerController.pushText(args.registerName, 'yank', text, args.linewise, vim.visualBlock);\n return endPos;\n }\n };\n\n function defineOperator(name, fn) {\n operators[name] = fn;\n }\n\n var actions = {\n jumpListWalk: function jumpListWalk(cm, actionArgs, vim) {\n if (vim.visualMode) {\n return;\n }\n\n var repeat = actionArgs.repeat;\n var forward = actionArgs.forward;\n var jumpList = vimGlobalState.jumpList;\n var mark = jumpList.move(cm, forward ? repeat : -repeat);\n var markPos = mark ? mark.find() : undefined;\n markPos = markPos ? markPos : cm.getCursor();\n cm.setCursor(markPos);\n },\n scroll: function scroll(cm, actionArgs, vim) {\n if (vim.visualMode) {\n return;\n }\n\n var repeat = actionArgs.repeat || 1;\n var lineHeight = cm.defaultTextHeight();\n var top = cm.getScrollInfo().top;\n var delta = lineHeight * repeat;\n var newPos = actionArgs.forward ? top + delta : top - delta;\n var cursor = copyCursor(cm.getCursor());\n var cursorCoords = cm.charCoords(cursor, 'local');\n\n if (actionArgs.forward) {\n if (newPos > cursorCoords.top) {\n cursor.line += (newPos - cursorCoords.top) / lineHeight;\n cursor.line = Math.ceil(cursor.line);\n cm.setCursor(cursor);\n cursorCoords = cm.charCoords(cursor, 'local');\n cm.scrollTo(null, cursorCoords.top);\n } else {\n // Cursor stays within bounds. Just reposition the scroll window.\n cm.scrollTo(null, newPos);\n }\n } else {\n var newBottom = newPos + cm.getScrollInfo().clientHeight;\n\n if (newBottom < cursorCoords.bottom) {\n cursor.line -= (cursorCoords.bottom - newBottom) / lineHeight;\n cursor.line = Math.floor(cursor.line);\n cm.setCursor(cursor);\n cursorCoords = cm.charCoords(cursor, 'local');\n cm.scrollTo(null, cursorCoords.bottom - cm.getScrollInfo().clientHeight);\n } else {\n // Cursor stays within bounds. Just reposition the scroll window.\n cm.scrollTo(null, newPos);\n }\n }\n },\n scrollToCursor: function scrollToCursor(cm, actionArgs) {\n // var lineNum = cm.getCursor().line;\n // var charCoords = cm.charCoords(Pos(lineNum, 0), 'local');\n // var height = cm.getScrollInfo().clientHeight;\n // var y = charCoords.top;\n // var lineHeight = charCoords.bottom - y;\n // switch (actionArgs.position) {\n // case 'center': y = y - (height / 2) + lineHeight;\n // break;\n // case 'bottom': y = y - height + lineHeight;\n // break;\n // }\n // cm.scrollTo(null, y);\n cm.moveCurrentLineTo(actionArgs.position);\n },\n replayMacro: function replayMacro(cm, actionArgs, vim) {\n var registerName = actionArgs.selectedCharacter;\n var repeat = actionArgs.repeat;\n var macroModeState = vimGlobalState.macroModeState;\n\n if (registerName == '@') {\n registerName = macroModeState.latestRegister;\n }\n\n while (repeat--) {\n executeMacroRegister(cm, vim, macroModeState, registerName);\n }\n },\n enterMacroRecordMode: function enterMacroRecordMode(cm, actionArgs) {\n var macroModeState = vimGlobalState.macroModeState;\n var registerName = actionArgs.selectedCharacter;\n\n if (vimGlobalState.registerController.isValidRegister(registerName)) {\n macroModeState.enterMacroRecordMode(cm, registerName);\n }\n },\n toggleOverwrite: function toggleOverwrite(cm) {\n if (!cm.state.overwrite) {\n cm.toggleOverwrite(true);\n cm.setOption('keyMap', 'vim-replace');\n\n _cm_adapter2.default.signal(cm, \"vim-mode-change\", {\n mode: \"replace\"\n });\n } else {\n cm.toggleOverwrite(false);\n cm.setOption('keyMap', 'vim-insert');\n\n _cm_adapter2.default.signal(cm, \"vim-mode-change\", {\n mode: \"insert\"\n });\n }\n },\n enterInsertMode: function enterInsertMode(cm, actionArgs, vim) {\n if (cm.getOption('readOnly')) {\n return;\n }\n\n vim.insertMode = true;\n vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1;\n cm.leaveVimMode();\n var insertAt = actionArgs ? actionArgs.insertAt : null;\n var sel = vim.sel;\n var head = actionArgs.head || cm.getCursor('head');\n var height = cm.listSelections().length;\n\n if (insertAt == 'eol') {\n head = Pos(head.line, lineLength(cm, head.line));\n } else if (insertAt == 'charAfter') {\n head = offsetCursor(head, 0, 1);\n } else if (insertAt == 'firstNonBlank') {\n head = motions.moveToFirstNonWhiteSpaceCharacter(cm, head);\n } else if (insertAt == 'startOfSelectedArea') {\n if (!vim.visualBlock) {\n if (sel.head.line < sel.anchor.line) {\n head = sel.head;\n } else {\n head = Pos(sel.anchor.line, 0);\n }\n } else {\n head = Pos(Math.min(sel.head.line, sel.anchor.line), Math.min(sel.head.ch, sel.anchor.ch));\n height = Math.abs(sel.head.line - sel.anchor.line) + 1;\n }\n } else if (insertAt == 'endOfSelectedArea') {\n if (!vim.visualBlock) {\n if (sel.head.line >= sel.anchor.line) {\n head = offsetCursor(sel.head, 0, 1);\n } else {\n head = Pos(sel.anchor.line, 0);\n }\n } else {\n head = Pos(Math.min(sel.head.line, sel.anchor.line), Math.max(sel.head.ch + 1, sel.anchor.ch));\n height = Math.abs(sel.head.line - sel.anchor.line) + 1;\n }\n } else if (insertAt == 'inplace') {\n if (vim.visualMode) {\n return;\n }\n }\n\n cm.setOption('disableInput', false);\n\n if (vim.visualMode) {\n exitVisualMode(cm);\n }\n\n if (actionArgs && actionArgs.replace) {\n // Handle Replace-mode as a special case of insert mode.\n cm.toggleOverwrite(true);\n cm.setOption('keyMap', 'vim-replace');\n\n _cm_adapter2.default.signal(cm, \"vim-mode-change\", {\n mode: \"replace\"\n });\n } else {\n cm.toggleOverwrite(false);\n cm.setOption('keyMap', 'vim-insert');\n\n _cm_adapter2.default.signal(cm, \"vim-mode-change\", {\n mode: \"insert\"\n });\n }\n\n if (!vimGlobalState.macroModeState.isPlaying) {\n // Only record if not replaying.\n cm.on('change', onChange);\n\n _cm_adapter2.default.on(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown);\n }\n\n selectForInsert(cm, head, height);\n },\n toggleVisualMode: function toggleVisualMode(cm, actionArgs, vim) {\n var repeat = actionArgs.repeat;\n var anchor = cm.getCursor();\n var head; // TODO: The repeat should actually select number of characters/lines\n // equal to the repeat times the size of the previous visual\n // operation.\n\n if (!vim.visualMode) {\n // Entering visual mode\n vim.visualMode = true;\n vim.visualLine = !!actionArgs.linewise;\n vim.visualBlock = !!actionArgs.blockwise;\n head = clipCursorToContent(cm, Pos(anchor.line, anchor.ch + repeat - 1), true\n /** includeLineBreak */\n );\n vim.sel = {\n anchor: anchor,\n head: head\n };\n\n _cm_adapter2.default.signal(cm, \"vim-mode-change\", {\n mode: \"visual\",\n subMode: vim.visualLine ? \"linewise\" : vim.visualBlock ? \"blockwise\" : \"\"\n });\n\n updateCmSelection(cm);\n updateMark(cm, vim, '<', cursorMin(anchor, head));\n updateMark(cm, vim, '>', cursorMax(anchor, head));\n } else if (vim.visualLine ^ actionArgs.linewise || vim.visualBlock ^ actionArgs.blockwise) {\n // Toggling between modes\n vim.visualLine = !!actionArgs.linewise;\n vim.visualBlock = !!actionArgs.blockwise;\n\n _cm_adapter2.default.signal(cm, \"vim-mode-change\", {\n mode: \"visual\",\n subMode: vim.visualLine ? \"linewise\" : vim.visualBlock ? \"blockwise\" : \"\"\n });\n\n updateCmSelection(cm);\n } else {\n exitVisualMode(cm);\n }\n },\n reselectLastSelection: function reselectLastSelection(cm, _actionArgs, vim) {\n var lastSelection = vim.lastSelection;\n\n if (vim.visualMode) {\n updateLastSelection(cm, vim);\n }\n\n if (lastSelection) {\n var anchor = lastSelection.anchorMark.find();\n var head = lastSelection.headMark.find();\n\n if (!anchor || !head) {\n // If the marks have been destroyed due to edits, do nothing.\n return;\n }\n\n vim.sel = {\n anchor: anchor,\n head: head\n };\n vim.visualMode = true;\n vim.visualLine = lastSelection.visualLine;\n vim.visualBlock = lastSelection.visualBlock;\n updateCmSelection(cm);\n updateMark(cm, vim, '<', cursorMin(anchor, head));\n updateMark(cm, vim, '>', cursorMax(anchor, head));\n\n _cm_adapter2.default.signal(cm, 'vim-mode-change', {\n mode: 'visual',\n subMode: vim.visualLine ? 'linewise' : vim.visualBlock ? 'blockwise' : ''\n });\n }\n },\n joinLines: function joinLines(cm, actionArgs, vim) {\n var curStart, curEnd;\n\n if (vim.visualMode) {\n curStart = cm.getCursor('anchor');\n curEnd = cm.getCursor('head');\n\n if (cursorIsBefore(curEnd, curStart)) {\n var tmp = curEnd;\n curEnd = curStart;\n curStart = tmp;\n }\n\n curEnd.ch = lineLength(cm, curEnd.line) - 1;\n } else {\n // Repeat is the number of lines to join. Minimum 2 lines.\n var repeat = Math.max(actionArgs.repeat, 2);\n curStart = cm.getCursor();\n curEnd = clipCursorToContent(cm, Pos(curStart.line + repeat - 1, Infinity));\n }\n\n var finalCh = 0;\n\n for (var i = curStart.line; i < curEnd.line; i++) {\n finalCh = lineLength(cm, curStart.line);\n var tmp = Pos(curStart.line + 1, lineLength(cm, curStart.line + 1));\n var text = cm.getRange(curStart, tmp);\n text = text.replace(/\\n\\s*/g, ' ');\n cm.replaceRange(text, curStart, tmp);\n }\n\n var curFinalPos = Pos(curStart.line, finalCh);\n\n if (vim.visualMode) {\n exitVisualMode(cm, false);\n }\n\n cm.setCursor(curFinalPos);\n },\n newLineAndEnterInsertMode: function newLineAndEnterInsertMode(cm, actionArgs, vim) {\n vim.insertMode = true;\n var insertAt = copyCursor(cm.getCursor());\n\n if (insertAt.line === cm.firstLine() && !actionArgs.after) {\n // Special case for inserting newline before start of document.\n cm.replaceRange('\\n', Pos(cm.firstLine(), 0));\n cm.setCursor(cm.firstLine(), 0);\n } else {\n insertAt.line = actionArgs.after ? insertAt.line : insertAt.line - 1;\n insertAt.ch = lineLength(cm, insertAt.line);\n cm.setCursor(insertAt);\n var newlineFn = _cm_adapter2.default.commands.newlineAndIndentContinueComment || _cm_adapter2.default.commands.newlineAndIndent;\n newlineFn(cm);\n }\n\n this.enterInsertMode(cm, {\n repeat: actionArgs.repeat\n }, vim);\n },\n paste: function paste(cm, actionArgs, vim) {\n var cur = copyCursor(cm.getCursor());\n var register = vimGlobalState.registerController.getRegister(actionArgs.registerName);\n var text = register.toString();\n\n if (!text) {\n return;\n }\n\n if (actionArgs.matchIndent) {\n var tabSize = cm.getOption(\"tabSize\"); // length that considers tabs and tabSize\n\n var whitespaceLength = function whitespaceLength(str) {\n var tabs = str.split(\"\\t\").length - 1;\n var spaces = str.split(\" \").length - 1;\n return tabs * tabSize + spaces * 1;\n };\n\n var currentLine = cm.getLine(cm.getCursor().line);\n var indent = whitespaceLength(currentLine.match(/^\\s*/)[0]); // chomp last newline b/c don't want it to match /^\\s*/gm\n\n var chompedText = text.replace(/\\n$/, '');\n var wasChomped = text !== chompedText;\n var firstIndent = whitespaceLength(text.match(/^\\s*/)[0]);\n var text = chompedText.replace(/^\\s*/gm, function (wspace) {\n var newIndent = indent + (whitespaceLength(wspace) - firstIndent);\n\n if (newIndent < 0) {\n return \"\";\n } else if (cm.getOption(\"indentWithTabs\")) {\n var quotient = Math.floor(newIndent / tabSize);\n return Array(quotient + 1).join('\\t');\n } else {\n return Array(newIndent + 1).join(' ');\n }\n });\n text += wasChomped ? \"\\n\" : \"\";\n }\n\n if (actionArgs.repeat > 1) {\n var text = Array(actionArgs.repeat + 1).join(text);\n }\n\n var linewise = register.linewise;\n var blockwise = register.blockwise;\n\n if (linewise) {\n if (vim.visualMode) {\n text = vim.visualLine ? text.slice(0, -1) : '\\n' + text.slice(0, text.length - 1) + '\\n';\n } else if (actionArgs.after) {\n // Move the newline at the end to the start instead, and paste just\n // before the newline character of the line we are on right now.\n text = '\\n' + text.slice(0, text.length - 1);\n cur.ch = lineLength(cm, cur.line);\n } else {\n cur.ch = 0;\n }\n } else {\n if (blockwise) {\n text = text.split('\\n');\n\n for (var i = 0; i < text.length; i++) {\n text[i] = text[i] == '' ? ' ' : text[i];\n }\n }\n\n cur.ch += actionArgs.after ? 1 : 0;\n }\n\n var curPosFinal;\n var idx;\n\n if (vim.visualMode) {\n // save the pasted text for reselection if the need arises\n vim.lastPastedText = text;\n var lastSelectionCurEnd;\n var selectedArea = getSelectedAreaRange(cm, vim);\n var selectionStart = selectedArea[0];\n var selectionEnd = selectedArea[1];\n var selectedText = cm.getSelection();\n var selections = cm.listSelections();\n var emptyStrings = new Array(selections.length).join('1').split('1'); // save the curEnd marker before it get cleared due to cm.replaceRange.\n\n if (vim.lastSelection) {\n lastSelectionCurEnd = vim.lastSelection.headMark.find();\n } // push the previously selected text to unnamed register\n\n\n vimGlobalState.registerController.unnamedRegister.setText(selectedText);\n\n if (blockwise) {\n // first delete the selected text\n cm.replaceSelections(emptyStrings); // Set new selections as per the block length of the yanked text\n\n selectionEnd = Pos(selectionStart.line + text.length - 1, selectionStart.ch);\n cm.setCursor(selectionStart);\n selectBlock(cm, selectionEnd);\n cm.replaceSelections(text);\n curPosFinal = selectionStart;\n } else if (vim.visualBlock) {\n cm.replaceSelections(emptyStrings);\n cm.setCursor(selectionStart);\n cm.replaceRange(text, selectionStart, selectionStart);\n curPosFinal = selectionStart;\n } else {\n cm.replaceRange(text, selectionStart, selectionEnd);\n curPosFinal = cm.posFromIndex(cm.indexFromPos(selectionStart) + text.length - 1);\n } // restore the the curEnd marker\n\n\n if (lastSelectionCurEnd) {\n vim.lastSelection.headMark = cm.setBookmark(lastSelectionCurEnd);\n }\n\n if (linewise) {\n curPosFinal.ch = 0;\n }\n } else {\n if (blockwise) {\n cm.setCursor(cur);\n\n for (var i = 0; i < text.length; i++) {\n var line = cur.line + i;\n\n if (line > cm.lastLine()) {\n cm.replaceRange('\\n', Pos(line, 0));\n }\n\n var lastCh = lineLength(cm, line);\n\n if (lastCh < cur.ch) {\n extendLineToColumn(cm, line, cur.ch);\n }\n }\n\n cm.setCursor(cur);\n selectBlock(cm, Pos(cur.line + text.length - 1, cur.ch));\n cm.replaceSelections(text);\n curPosFinal = cur;\n } else {\n cm.replaceRange(text, cur); // Now fine tune the cursor to where we want it.\n\n if (linewise && actionArgs.after) {\n curPosFinal = Pos(cur.line + 1, cm.findFirstNonWhiteSpaceCharacter(cur.line + 1));\n } else if (linewise && !actionArgs.after) {\n curPosFinal = Pos(cur.line, cm.findFirstNonWhiteSpaceCharacter(cur.line));\n } else if (!linewise && actionArgs.after) {\n idx = cm.indexFromPos(cur);\n curPosFinal = cm.posFromIndex(idx + text.length - 1);\n } else {\n idx = cm.indexFromPos(cur);\n curPosFinal = cm.posFromIndex(idx + text.length);\n }\n }\n }\n\n if (vim.visualMode) {\n exitVisualMode(cm, false);\n }\n\n cm.setCursor(curPosFinal);\n },\n undo: function undo(cm, actionArgs) {\n cm.operation(function () {\n repeatFn(cm, _cm_adapter2.default.commands.undo, actionArgs.repeat)();\n cm.setCursor(cm.getCursor('anchor'));\n });\n },\n redo: function redo(cm, actionArgs) {\n repeatFn(cm, _cm_adapter2.default.commands.redo, actionArgs.repeat)();\n },\n setRegister: function setRegister(_cm, actionArgs, vim) {\n vim.inputState.registerName = actionArgs.selectedCharacter;\n },\n setMark: function setMark(cm, actionArgs, vim) {\n var markName = actionArgs.selectedCharacter;\n updateMark(cm, vim, markName, cm.getCursor());\n },\n replace: function replace(cm, actionArgs, vim) {\n var replaceWith = actionArgs.selectedCharacter;\n var curStart = cm.getCursor();\n var replaceTo;\n var curEnd;\n var selections = cm.listSelections();\n\n if (vim.visualMode) {\n curStart = cm.getCursor('start');\n curEnd = cm.getCursor('end');\n } else {\n var line = cm.getLine(curStart.line);\n replaceTo = curStart.ch + actionArgs.repeat;\n\n if (replaceTo > line.length) {\n replaceTo = line.length;\n }\n\n curEnd = Pos(curStart.line, replaceTo);\n }\n\n if (replaceWith == '\\n') {\n if (!vim.visualMode) cm.replaceRange('', curStart, curEnd); // special case, where vim help says to replace by just one line-break\n\n (_cm_adapter2.default.commands.newlineAndIndentContinueComment || _cm_adapter2.default.commands.newlineAndIndent)(cm);\n } else {\n var replaceWithStr = cm.getRange(curStart, curEnd); //replace all characters in range by selected, but keep linebreaks\n\n replaceWithStr = replaceWithStr.replace(/[^\\n]/g, replaceWith);\n\n if (vim.visualBlock) {\n // Tabs are split in visua block before replacing\n var spaces = new Array(cm.getOption(\"tabSize\") + 1).join(' ');\n replaceWithStr = cm.getSelection();\n replaceWithStr = replaceWithStr.replace(/\\t/g, spaces).replace(/[^\\n]/g, replaceWith).split('\\n');\n cm.replaceSelections(replaceWithStr);\n } else {\n cm.replaceRange(replaceWithStr, curStart, curEnd);\n }\n\n if (vim.visualMode) {\n curStart = cursorIsBefore(selections[0].anchor, selections[0].head) ? selections[0].anchor : selections[0].head;\n cm.setCursor(curStart);\n exitVisualMode(cm, false);\n } else {\n cm.setCursor(offsetCursor(curEnd, 0, -1));\n }\n }\n },\n incrementNumberToken: function incrementNumberToken(cm, actionArgs) {\n var cur = cm.getCursor();\n var lineStr = cm.getLine(cur.line);\n var re = /(-?)(?:(0x)([\\da-f]+)|(0b|0|)(\\d+))/gi;\n var match;\n var start;\n var end;\n var numberStr;\n\n while ((match = re.exec(lineStr)) !== null) {\n start = match.index;\n end = start + match[0].length;\n if (cur.ch < end) break;\n }\n\n if (!actionArgs.backtrack && end <= cur.ch) return;\n\n if (match) {\n var baseStr = match[2] || match[4];\n var digits = match[3] || match[5];\n var increment = actionArgs.increase ? 1 : -1;\n var base = {\n '0b': 2,\n '0': 8,\n '': 10,\n '0x': 16\n }[baseStr.toLowerCase()];\n var number = parseInt(match[1] + digits, base) + increment * actionArgs.repeat;\n numberStr = number.toString(base);\n var zeroPadding = baseStr ? new Array(digits.length - numberStr.length + 1 + match[1].length).join('0') : '';\n\n if (numberStr.charAt(0) === '-') {\n numberStr = '-' + baseStr + zeroPadding + numberStr.substr(1);\n } else {\n numberStr = baseStr + zeroPadding + numberStr;\n }\n\n var from = Pos(cur.line, start);\n var to = Pos(cur.line, end);\n cm.replaceRange(numberStr, from, to);\n } else {\n return;\n }\n\n cm.setCursor(Pos(cur.line, start + numberStr.length - 1));\n },\n repeatLastEdit: function repeatLastEdit(cm, actionArgs, vim) {\n var lastEditInputState = vim.lastEditInputState;\n\n if (!lastEditInputState) {\n return;\n }\n\n var repeat = actionArgs.repeat;\n\n if (repeat && actionArgs.repeatIsExplicit) {\n vim.lastEditInputState.repeatOverride = repeat;\n } else {\n repeat = vim.lastEditInputState.repeatOverride || repeat;\n }\n\n _repeatLastEdit(cm, vim, repeat, false\n /** repeatForInsert */\n );\n },\n indent: function indent(cm, actionArgs) {\n cm.indentLine(cm.getCursor().line, actionArgs.indentRight);\n },\n exitInsertMode: exitInsertMode\n };\n\n function defineAction(name, fn) {\n actions[name] = fn;\n }\n /*\n * Below are miscellaneous utility functions used by vim.js\n */\n\n /**\n * Clips cursor to ensure that line is within the buffer's range\n * If includeLineBreak is true, then allow cur.ch == lineLength.\n */\n\n\n function clipCursorToContent(cm, cur, includeLineBreak) {\n var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine());\n var maxCh = lineLength(cm, line) - 1;\n maxCh = includeLineBreak ? maxCh + 1 : maxCh;\n var ch = Math.min(Math.max(0, cur.ch), maxCh);\n return Pos(line, ch);\n }\n\n function copyArgs(args) {\n var ret = {};\n\n for (var prop in args) {\n if (args.hasOwnProperty(prop)) {\n ret[prop] = args[prop];\n }\n }\n\n return ret;\n }\n\n function offsetCursor(cur, offsetLine, offsetCh) {\n if ((typeof offsetLine === 'undefined' ? 'undefined' : _typeof(offsetLine)) === 'object') {\n offsetCh = offsetLine.ch;\n offsetLine = offsetLine.line;\n }\n\n return Pos(cur.line + offsetLine, cur.ch + offsetCh);\n }\n\n function getOffset(anchor, head) {\n return {\n line: head.line - anchor.line,\n ch: head.line - anchor.line\n };\n }\n\n function commandMatches(keys, keyMap, context, inputState) {\n // Partial matches are not applied. They inform the key handler\n // that the current key sequence is a subsequence of a valid key\n // sequence, so that the key buffer is not cleared.\n var match,\n partial = [],\n full = [];\n\n for (var i = 0; i < keyMap.length; i++) {\n var command = keyMap[i];\n\n if (context == 'insert' && command.context != 'insert' || command.context && command.context != context || inputState.operator && command.type == 'action' || !(match = commandMatch(keys, command.keys))) {\n continue;\n }\n\n if (match == 'partial') {\n partial.push(command);\n }\n\n if (match == 'full') {\n full.push(command);\n }\n }\n\n return {\n partial: partial.length && partial,\n full: full.length && full\n };\n }\n\n function commandMatch(pressed, mapped) {\n if (mapped.slice(-11) == '') {\n // Last character matches anything.\n var prefixLen = mapped.length - 11;\n var pressedPrefix = pressed.slice(0, prefixLen);\n var mappedPrefix = mapped.slice(0, prefixLen);\n return pressedPrefix == mappedPrefix && pressed.length > prefixLen ? 'full' : mappedPrefix.indexOf(pressedPrefix) == 0 ? 'partial' : false;\n } else {\n return pressed == mapped ? 'full' : mapped.indexOf(pressed) == 0 ? 'partial' : false;\n }\n }\n\n function lastChar(keys) {\n var match = /^.*(<[^>]+>)$/.exec(keys);\n var selectedCharacter = match ? match[1] : keys.slice(-1);\n\n if (selectedCharacter.length > 1) {\n switch (selectedCharacter) {\n case '':\n selectedCharacter = '\\n';\n break;\n\n case '':\n selectedCharacter = ' ';\n break;\n\n default:\n selectedCharacter = '';\n break;\n }\n }\n\n return selectedCharacter;\n }\n\n function repeatFn(cm, fn, repeat) {\n return function () {\n for (var i = 0; i < repeat; i++) {\n fn(cm);\n }\n };\n }\n\n function copyCursor(cur) {\n return Pos(cur.line, cur.ch);\n }\n\n function cursorEqual(cur1, cur2) {\n return cur1.ch == cur2.ch && cur1.line == cur2.line;\n }\n\n function cursorIsBefore(cur1, cur2) {\n if (cur1.line < cur2.line) {\n return true;\n }\n\n if (cur1.line == cur2.line && cur1.ch < cur2.ch) {\n return true;\n }\n\n return false;\n }\n\n function cursorMin(cur1, cur2) {\n if (arguments.length > 2) {\n cur2 = cursorMin.apply(undefined, Array.prototype.slice.call(arguments, 1));\n }\n\n return cursorIsBefore(cur1, cur2) ? cur1 : cur2;\n }\n\n function cursorMax(cur1, cur2) {\n if (arguments.length > 2) {\n cur2 = cursorMax.apply(undefined, Array.prototype.slice.call(arguments, 1));\n }\n\n return cursorIsBefore(cur1, cur2) ? cur2 : cur1;\n }\n\n function cursorIsBetween(cur1, cur2, cur3) {\n // returns true if cur2 is between cur1 and cur3.\n var cur1before2 = cursorIsBefore(cur1, cur2);\n var cur2before3 = cursorIsBefore(cur2, cur3);\n return cur1before2 && cur2before3;\n }\n\n function lineLength(cm, lineNum) {\n return cm.getLine(lineNum).length;\n }\n\n function trim(s) {\n if (s.trim) {\n return s.trim();\n }\n\n return s.replace(/^\\s+|\\s+$/g, '');\n }\n\n function escapeRegex(s) {\n return s.replace(/([.?*+$\\[\\]\\/\\\\(){}|\\-])/g, '\\\\$1');\n }\n\n function extendLineToColumn(cm, lineNum, column) {\n var endCh = lineLength(cm, lineNum);\n var spaces = new Array(column - endCh + 1).join(' ');\n cm.setCursor(Pos(lineNum, endCh));\n cm.replaceRange(spaces, cm.getCursor());\n } // This functions selects a rectangular block\n // of text with selectionEnd as any of its corner\n // Height of block:\n // Difference in selectionEnd.line and first/last selection.line\n // Width of the block:\n // Distance between selectionEnd.ch and any(first considered here) selection.ch\n\n\n function selectBlock(cm, selectionEnd) {\n var selections = [],\n ranges = cm.listSelections();\n var head = copyCursor(cm.clipPos(selectionEnd));\n var isClipped = !cursorEqual(selectionEnd, head);\n var curHead = cm.getCursor('head');\n var primIndex = getIndex(ranges, curHead);\n var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor);\n var max = ranges.length - 1;\n var index = max - primIndex > primIndex ? max : 0;\n var base = ranges[index].anchor;\n var firstLine = Math.min(base.line, head.line);\n var lastLine = Math.max(base.line, head.line);\n var baseCh = base.ch,\n headCh = head.ch;\n var dir = ranges[index].head.ch - baseCh;\n var newDir = headCh - baseCh;\n\n if (dir > 0 && newDir <= 0) {\n baseCh++;\n\n if (!isClipped) {\n headCh--;\n }\n } else if (dir < 0 && newDir >= 0) {\n baseCh--;\n\n if (!wasClipped) {\n headCh++;\n }\n } else if (dir < 0 && newDir == -1) {\n baseCh--;\n headCh++;\n }\n\n for (var line = firstLine; line <= lastLine; line++) {\n var range = {\n anchor: new Pos(line, baseCh),\n head: new Pos(line, headCh)\n };\n selections.push(range);\n }\n\n cm.setSelections(selections);\n selectionEnd.ch = headCh;\n base.ch = baseCh;\n return base;\n }\n\n function selectForInsert(cm, head, height) {\n var sel = [];\n\n for (var i = 0; i < height; i++) {\n var lineHead = offsetCursor(head, i, 0);\n sel.push({\n anchor: lineHead,\n head: lineHead\n });\n }\n\n cm.setSelections(sel, 0);\n } // getIndex returns the index of the cursor in the selections.\n\n\n function getIndex(ranges, cursor, end) {\n for (var i = 0; i < ranges.length; i++) {\n var atAnchor = end != 'head' && cursorEqual(ranges[i].anchor, cursor);\n var atHead = end != 'anchor' && cursorEqual(ranges[i].head, cursor);\n\n if (atAnchor || atHead) {\n return i;\n }\n }\n\n return -1;\n }\n\n function getSelectedAreaRange(cm, vim) {\n var lastSelection = vim.lastSelection;\n\n var getCurrentSelectedAreaRange = function getCurrentSelectedAreaRange() {\n var selections = cm.listSelections();\n var start = selections[0];\n var end = selections[selections.length - 1];\n var selectionStart = cursorIsBefore(start.anchor, start.head) ? start.anchor : start.head;\n var selectionEnd = cursorIsBefore(end.anchor, end.head) ? end.head : end.anchor;\n return [selectionStart, selectionEnd];\n };\n\n var getLastSelectedAreaRange = function getLastSelectedAreaRange() {\n var selectionStart = cm.getCursor();\n var selectionEnd = cm.getCursor();\n var block = lastSelection.visualBlock;\n\n if (block) {\n var width = block.width;\n var height = block.height;\n selectionEnd = Pos(selectionStart.line + height, selectionStart.ch + width);\n var selections = []; // selectBlock creates a 'proper' rectangular block.\n // We do not want that in all cases, so we manually set selections.\n\n for (var i = selectionStart.line; i < selectionEnd.line; i++) {\n var anchor = Pos(i, selectionStart.ch);\n var head = Pos(i, selectionEnd.ch);\n var range = {\n anchor: anchor,\n head: head\n };\n selections.push(range);\n }\n\n cm.setSelections(selections);\n } else {\n var start = lastSelection.anchorMark.find();\n var end = lastSelection.headMark.find();\n var line = end.line - start.line;\n var ch = end.ch - start.ch;\n selectionEnd = {\n line: selectionEnd.line + line,\n ch: line ? selectionEnd.ch : ch + selectionEnd.ch\n };\n\n if (lastSelection.visualLine) {\n selectionStart = Pos(selectionStart.line, 0);\n selectionEnd = Pos(selectionEnd.line, lineLength(cm, selectionEnd.line));\n }\n\n cm.setSelection(selectionStart, selectionEnd);\n }\n\n return [selectionStart, selectionEnd];\n };\n\n if (!vim.visualMode) {\n // In case of replaying the action.\n return getLastSelectedAreaRange();\n } else {\n return getCurrentSelectedAreaRange();\n }\n } // Updates the previous selection with the current selection's values. This\n // should only be called in visual mode.\n\n\n function updateLastSelection(cm, vim) {\n var anchor = vim.sel.anchor;\n var head = vim.sel.head; // To accommodate the effect of lastPastedText in the last selection\n\n if (vim.lastPastedText) {\n head = cm.posFromIndex(cm.indexFromPos(anchor) + vim.lastPastedText.length);\n vim.lastPastedText = null;\n }\n\n vim.lastSelection = {\n 'anchorMark': cm.setBookmark(anchor),\n 'headMark': cm.setBookmark(head),\n 'anchor': copyCursor(anchor),\n 'head': copyCursor(head),\n 'visualMode': vim.visualMode,\n 'visualLine': vim.visualLine,\n 'visualBlock': vim.visualBlock\n };\n }\n\n function expandSelection(cm, start, end) {\n var sel = cm.state.vim.sel;\n var head = sel.head;\n var anchor = sel.anchor;\n var tmp;\n\n if (cursorIsBefore(end, start)) {\n tmp = end;\n end = start;\n start = tmp;\n }\n\n if (cursorIsBefore(head, anchor)) {\n head = cursorMin(start, head);\n anchor = cursorMax(anchor, end);\n } else {\n anchor = cursorMin(start, anchor);\n head = cursorMax(head, end);\n head = offsetCursor(head, 0, -1);\n\n if (head.ch == -1 && head.line != cm.firstLine()) {\n head = Pos(head.line - 1, lineLength(cm, head.line - 1));\n }\n }\n\n return [anchor, head];\n }\n /**\n * Updates the CodeMirror selection to match the provided vim selection.\n * If no arguments are given, it uses the current vim selection state.\n */\n\n\n function updateCmSelection(cm, sel, mode) {\n var vim = cm.state.vim;\n sel = sel || vim.sel;\n var mode = mode || vim.visualLine ? 'line' : vim.visualBlock ? 'block' : 'char';\n var cmSel = makeCmSelection(cm, sel, mode);\n cm.setSelections(cmSel.ranges, cmSel.primary);\n updateFakeCursor(cm);\n }\n\n function makeCmSelection(cm, sel, mode, exclusive) {\n var head = copyCursor(sel.head);\n var anchor = copyCursor(sel.anchor);\n\n if (mode == 'char') {\n var headOffset = !exclusive && !cursorIsBefore(sel.head, sel.anchor) ? 1 : 0;\n var anchorOffset = cursorIsBefore(sel.head, sel.anchor) ? 1 : 0;\n head = offsetCursor(sel.head, 0, headOffset);\n anchor = offsetCursor(sel.anchor, 0, anchorOffset);\n return {\n ranges: [{\n anchor: anchor,\n head: head\n }],\n primary: 0\n };\n } else if (mode == 'line') {\n if (!cursorIsBefore(sel.head, sel.anchor)) {\n anchor.ch = 0;\n var lastLine = cm.lastLine();\n\n if (head.line > lastLine) {\n head.line = lastLine;\n }\n\n head.ch = lineLength(cm, head.line);\n } else {\n head.ch = 0;\n anchor.ch = lineLength(cm, anchor.line);\n }\n\n return {\n ranges: [{\n anchor: anchor,\n head: head\n }],\n primary: 0\n };\n } else if (mode == 'block') {\n var top = Math.min(anchor.line, head.line),\n left = Math.min(anchor.ch, head.ch),\n bottom = Math.max(anchor.line, head.line),\n right = Math.max(anchor.ch, head.ch) + 1;\n var height = bottom - top + 1;\n var primary = head.line == top ? 0 : height - 1;\n var ranges = [];\n\n for (var i = 0; i < height; i++) {\n ranges.push({\n anchor: Pos(top + i, left),\n head: Pos(top + i, right)\n });\n }\n\n return {\n ranges: ranges,\n primary: primary\n };\n }\n }\n\n function getHead(cm) {\n var cur = cm.getCursor('head');\n\n if (cm.getSelection().length == 1) {\n // Small corner case when only 1 character is selected. The \"real\"\n // head is the left of head and anchor.\n cur = cursorMin(cur, cm.getCursor('anchor'));\n }\n\n return cur;\n }\n /**\n * If moveHead is set to false, the CodeMirror selection will not be\n * touched. The caller assumes the responsibility of putting the cursor\n * in the right place.\n */\n\n\n function exitVisualMode(cm, moveHead) {\n var vim = cm.state.vim;\n\n if (moveHead !== false) {\n cm.setCursor(clipCursorToContent(cm, vim.sel.head));\n }\n\n updateLastSelection(cm, vim);\n vim.visualMode = false;\n vim.visualLine = false;\n vim.visualBlock = false;\n\n _cm_adapter2.default.signal(cm, \"vim-mode-change\", {\n mode: \"normal\"\n });\n\n if (vim.fakeCursor) {\n vim.fakeCursor.clear();\n }\n } // Remove any trailing newlines from the selection. For\n // example, with the caret at the start of the last word on the line,\n // 'dw' should word, but not the newline, while 'w' should advance the\n // caret to the first character of the next line.\n\n\n function clipToLine(cm, curStart, curEnd) {\n var selection = cm.getRange(curStart, curEnd); // Only clip if the selection ends with trailing newline + whitespace\n\n if (/\\n\\s*$/.test(selection)) {\n var lines = selection.split('\\n'); // We know this is all whitespace.\n\n lines.pop(); // Cases:\n // 1. Last word is an empty line - do not clip the trailing '\\n'\n // 2. Last word is not an empty line - clip the trailing '\\n'\n\n var line; // Find the line containing the last word, and clip all whitespace up\n // to it.\n\n for (var line = lines.pop(); lines.length > 0 && line && isWhiteSpaceString(line); line = lines.pop()) {\n curEnd.line--;\n curEnd.ch = 0;\n } // If the last word is not an empty line, clip an additional newline\n\n\n if (line) {\n curEnd.line--;\n curEnd.ch = lineLength(cm, curEnd.line);\n } else {\n curEnd.ch = 0;\n }\n }\n } // Expand the selection to line ends.\n\n\n function expandSelectionToLine(_cm, curStart, curEnd) {\n curStart.ch = 0;\n curEnd.ch = 0;\n curEnd.line++;\n } // function findFirstNonWhiteSpaceCharacter(text) {\n // if (!text) {\n // return 0;\n // }\n // var firstNonWS = text.search(/\\S/);\n // return firstNonWS == -1 ? text.length : firstNonWS;\n // }\n\n\n function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol) {\n var cur = getHead(cm);\n var line = cm.getLine(cur.line);\n var idx = cur.ch; // Seek to first word or non-whitespace character, depending on if\n // noSymbol is true.\n\n var test = noSymbol ? wordCharTest[0] : bigWordCharTest[0];\n\n while (!test(line.charAt(idx))) {\n idx++;\n\n if (idx >= line.length) {\n return null;\n }\n }\n\n if (bigWord) {\n test = bigWordCharTest[0];\n } else {\n test = wordCharTest[0];\n\n if (!test(line.charAt(idx))) {\n test = wordCharTest[1];\n }\n }\n\n var end = idx,\n start = idx;\n\n while (test(line.charAt(end)) && end < line.length) {\n end++;\n }\n\n while (test(line.charAt(start)) && start >= 0) {\n start--;\n }\n\n start++;\n\n if (inclusive) {\n // If present, include all whitespace after word.\n // Otherwise, include all whitespace before word, except indentation.\n var wordEnd = end;\n\n while (/\\s/.test(line.charAt(end)) && end < line.length) {\n end++;\n }\n\n if (wordEnd == end) {\n var wordStart = start;\n\n while (/\\s/.test(line.charAt(start - 1)) && start > 0) {\n start--;\n }\n\n if (!start) {\n start = wordStart;\n }\n }\n }\n\n return {\n start: Pos(cur.line, start),\n end: Pos(cur.line, end)\n };\n }\n\n function recordJumpPosition(cm, oldCur, newCur) {\n if (!cursorEqual(oldCur, newCur)) {\n vimGlobalState.jumpList.add(cm, oldCur, newCur);\n }\n }\n\n function recordLastCharacterSearch(increment, args) {\n vimGlobalState.lastCharacterSearch.increment = increment;\n vimGlobalState.lastCharacterSearch.forward = args.forward;\n vimGlobalState.lastCharacterSearch.selectedCharacter = args.selectedCharacter;\n }\n\n var symbolToMode = {\n '(': 'bracket',\n ')': 'bracket',\n '{': 'bracket',\n '}': 'bracket',\n '[': 'section',\n ']': 'section',\n '*': 'comment',\n '/': 'comment',\n 'm': 'method',\n 'M': 'method',\n '#': 'preprocess'\n };\n var findSymbolModes = {\n bracket: {\n isComplete: function isComplete(state) {\n if (state.nextCh === state.symb) {\n state.depth++;\n if (state.depth >= 1) return true;\n } else if (state.nextCh === state.reverseSymb) {\n state.depth--;\n }\n\n return false;\n }\n },\n section: {\n init: function init(state) {\n state.curMoveThrough = true;\n state.symb = (state.forward ? ']' : '[') === state.symb ? '{' : '}';\n },\n isComplete: function isComplete(state) {\n return state.index === 0 && state.nextCh === state.symb;\n }\n },\n comment: {\n isComplete: function isComplete(state) {\n var found = state.lastCh === '*' && state.nextCh === '/';\n state.lastCh = state.nextCh;\n return found;\n }\n },\n // TODO: The original Vim implementation only operates on level 1 and 2.\n // The current implementation doesn't check for code block level and\n // therefore it operates on any levels.\n method: {\n init: function init(state) {\n state.symb = state.symb === 'm' ? '{' : '}';\n state.reverseSymb = state.symb === '{' ? '}' : '{';\n },\n isComplete: function isComplete(state) {\n if (state.nextCh === state.symb) return true;\n return false;\n }\n },\n preprocess: {\n init: function init(state) {\n state.index = 0;\n },\n isComplete: function isComplete(state) {\n if (state.nextCh === '#') {\n var token = state.lineText.match(/#(\\w+)/)[1];\n\n if (token === 'endif') {\n if (state.forward && state.depth === 0) {\n return true;\n }\n\n state.depth++;\n } else if (token === 'if') {\n if (!state.forward && state.depth === 0) {\n return true;\n }\n\n state.depth--;\n }\n\n if (token === 'else' && state.depth === 0) return true;\n }\n\n return false;\n }\n }\n };\n\n function findSymbol(cm, repeat, forward, symb) {\n var cur = copyCursor(cm.getCursor());\n var increment = forward ? 1 : -1;\n var endLine = forward ? cm.lineCount() : -1;\n var curCh = cur.ch;\n var line = cur.line;\n var lineText = cm.getLine(line);\n var state = {\n lineText: lineText,\n nextCh: lineText.charAt(curCh),\n lastCh: null,\n index: curCh,\n symb: symb,\n reverseSymb: (forward ? {\n ')': '(',\n '}': '{'\n } : {\n '(': ')',\n '{': '}'\n })[symb],\n forward: forward,\n depth: 0,\n curMoveThrough: false\n };\n var mode = symbolToMode[symb];\n if (!mode) return cur;\n var init = findSymbolModes[mode].init;\n var isComplete = findSymbolModes[mode].isComplete;\n\n if (init) {\n init(state);\n }\n\n while (line !== endLine && repeat) {\n state.index += increment;\n state.nextCh = state.lineText.charAt(state.index);\n\n if (!state.nextCh) {\n line += increment;\n state.lineText = cm.getLine(line) || '';\n\n if (increment > 0) {\n state.index = 0;\n } else {\n var lineLen = state.lineText.length;\n state.index = lineLen > 0 ? lineLen - 1 : 0;\n }\n\n state.nextCh = state.lineText.charAt(state.index);\n }\n\n if (isComplete(state)) {\n cur.line = line;\n cur.ch = state.index;\n repeat--;\n }\n }\n\n if (state.nextCh || state.curMoveThrough) {\n return Pos(line, state.index);\n }\n\n return cur;\n }\n /*\n * Returns the boundaries of the next word. If the cursor in the middle of\n * the word, then returns the boundaries of the current word, starting at\n * the cursor. If the cursor is at the start/end of a word, and we are going\n * forward/backward, respectively, find the boundaries of the next word.\n *\n * @param {CodeMirror} cm CodeMirror object.\n * @param {Cursor} cur The cursor position.\n * @param {boolean} forward True to search forward. False to search\n * backward.\n * @param {boolean} bigWord True if punctuation count as part of the word.\n * False if only [a-zA-Z0-9] characters count as part of the word.\n * @param {boolean} emptyLineIsWord True if empty lines should be treated\n * as words.\n * @return {Object{from:number, to:number, line: number}} The boundaries of\n * the word, or null if there are no more words.\n */\n\n\n function findWord(cm, cur, forward, bigWord, emptyLineIsWord) {\n var lineNum = cur.line;\n var pos = cur.ch;\n var line = cm.getLine(lineNum);\n var dir = forward ? 1 : -1;\n var charTests = bigWord ? bigWordCharTest : wordCharTest;\n\n if (emptyLineIsWord && line == '') {\n lineNum += dir;\n line = cm.getLine(lineNum);\n\n if (!isLine(cm, lineNum)) {\n return null;\n }\n\n pos = forward ? 0 : line.length;\n }\n\n while (true) {\n if (emptyLineIsWord && line == '') {\n return {\n from: 0,\n to: 0,\n line: lineNum\n };\n }\n\n var stop = dir > 0 ? line.length : -1;\n var wordStart = stop,\n wordEnd = stop; // Find bounds of next word.\n\n while (pos != stop) {\n var foundWord = false;\n\n for (var i = 0; i < charTests.length && !foundWord; ++i) {\n if (charTests[i](line.charAt(pos))) {\n wordStart = pos; // Advance to end of word.\n\n while (pos != stop && charTests[i](line.charAt(pos))) {\n pos += dir;\n }\n\n wordEnd = pos;\n foundWord = wordStart != wordEnd;\n\n if (wordStart == cur.ch && lineNum == cur.line && wordEnd == wordStart + dir) {\n // We started at the end of a word. Find the next one.\n continue;\n } else {\n return {\n from: Math.min(wordStart, wordEnd + 1),\n to: Math.max(wordStart, wordEnd),\n line: lineNum\n };\n }\n }\n }\n\n if (!foundWord) {\n pos += dir;\n }\n } // Advance to next/prev line.\n\n\n lineNum += dir;\n\n if (!isLine(cm, lineNum)) {\n return null;\n }\n\n line = cm.getLine(lineNum);\n pos = dir > 0 ? 0 : line.length;\n }\n }\n /**\n * @param {CodeMirror} cm CodeMirror object.\n * @param {Pos} cur The position to start from.\n * @param {int} repeat Number of words to move past.\n * @param {boolean} forward True to search forward. False to search\n * backward.\n * @param {boolean} wordEnd True to move to end of word. False to move to\n * beginning of word.\n * @param {boolean} bigWord True if punctuation count as part of the word.\n * False if only alphabet characters count as part of the word.\n * @return {Cursor} The position the cursor should move to.\n */\n\n\n function moveToWord(cm, cur, repeat, forward, wordEnd, bigWord) {\n var curStart = copyCursor(cur);\n var words = [];\n\n if (forward && !wordEnd || !forward && wordEnd) {\n repeat++;\n } // For 'e', empty lines are not considered words, go figure.\n\n\n var emptyLineIsWord = !(forward && wordEnd);\n\n for (var i = 0; i < repeat; i++) {\n var word = findWord(cm, cur, forward, bigWord, emptyLineIsWord);\n\n if (!word) {\n var eodCh = lineLength(cm, cm.lastLine());\n words.push(forward ? {\n line: cm.lastLine(),\n from: eodCh,\n to: eodCh\n } : {\n line: 0,\n from: 0,\n to: 0\n });\n break;\n }\n\n words.push(word);\n cur = Pos(word.line, forward ? word.to - 1 : word.from);\n }\n\n var shortCircuit = words.length != repeat;\n var firstWord = words[0];\n var lastWord = words.pop();\n\n if (forward && !wordEnd) {\n // w\n if (!shortCircuit && (firstWord.from != curStart.ch || firstWord.line != curStart.line)) {\n // We did not start in the middle of a word. Discard the extra word at the end.\n lastWord = words.pop();\n }\n\n return Pos(lastWord.line, lastWord.from);\n } else if (forward && wordEnd) {\n return Pos(lastWord.line, lastWord.to - 1);\n } else if (!forward && wordEnd) {\n // ge\n if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) {\n // We did not start in the middle of a word. Discard the extra word at the end.\n lastWord = words.pop();\n }\n\n return Pos(lastWord.line, lastWord.to);\n } else {\n // b\n return Pos(lastWord.line, lastWord.from);\n }\n }\n\n function _moveToCharacter(cm, repeat, forward, character) {\n var cur = cm.getCursor();\n var start = cur.ch;\n var idx;\n\n for (var i = 0; i < repeat; i++) {\n var line = cm.getLine(cur.line);\n idx = charIdxInLine(start, line, character, forward, true);\n\n if (idx == -1) {\n return null;\n }\n\n start = idx;\n }\n\n return Pos(cm.getCursor().line, idx);\n }\n\n function _moveToColumn(cm, repeat) {\n // repeat is always >= 1, so repeat - 1 always corresponds\n // to the column we want to go to.\n var line = cm.getCursor().line;\n return clipCursorToContent(cm, Pos(line, repeat - 1));\n }\n\n function updateMark(cm, vim, markName, pos) {\n if (!inArray(markName, validMarks)) {\n return;\n }\n\n if (vim.marks[markName]) {\n vim.marks[markName].clear();\n }\n\n vim.marks[markName] = cm.setBookmark(pos);\n }\n\n function charIdxInLine(start, line, character, forward, includeChar) {\n // Search for char in line.\n // motion_options: {forward, includeChar}\n // If includeChar = true, include it too.\n // If forward = true, search forward, else search backwards.\n // If char is not found on this line, do nothing\n var idx;\n\n if (forward) {\n idx = line.indexOf(character, start + 1);\n\n if (idx != -1 && !includeChar) {\n idx -= 1;\n }\n } else {\n idx = line.lastIndexOf(character, start - 1);\n\n if (idx != -1 && !includeChar) {\n idx += 1;\n }\n }\n\n return idx;\n }\n\n function findParagraph(cm, head, repeat, dir, inclusive) {\n var line = head.line;\n var min = cm.firstLine();\n var max = cm.lastLine();\n var start,\n end,\n i = line;\n\n function isEmpty(i) {\n return !cm.getLine(i);\n }\n\n function isBoundary(i, dir, any) {\n if (any) {\n return isEmpty(i) != isEmpty(i + dir);\n }\n\n return !isEmpty(i) && isEmpty(i + dir);\n }\n\n if (dir) {\n while (min <= i && i <= max && repeat > 0) {\n if (isBoundary(i, dir)) {\n repeat--;\n }\n\n i += dir;\n }\n\n return new Pos(i, 0);\n }\n\n var vim = cm.state.vim;\n\n if (vim.visualLine && isBoundary(line, 1, true)) {\n var anchor = vim.sel.anchor;\n\n if (isBoundary(anchor.line, -1, true)) {\n if (!inclusive || anchor.line != line) {\n line += 1;\n }\n }\n }\n\n var startState = isEmpty(line);\n\n for (i = line; i <= max && repeat; i++) {\n if (isBoundary(i, 1, true)) {\n if (!inclusive || isEmpty(i) != startState) {\n repeat--;\n }\n }\n }\n\n end = new Pos(i, 0); // select boundary before paragraph for the last one\n\n if (i > max && !startState) {\n startState = true;\n } else {\n inclusive = false;\n }\n\n for (i = line; i > min; i--) {\n if (!inclusive || isEmpty(i) == startState || i == line) {\n if (isBoundary(i, -1, true)) {\n break;\n }\n }\n }\n\n start = new Pos(i, 0);\n return {\n start: start,\n end: end\n };\n }\n\n function findSentence(cm, cur, repeat, dir) {\n /*\n Takes an index object\n {\n line: the line string,\n ln: line number,\n pos: index in line,\n dir: direction of traversal (-1 or 1)\n }\n and modifies the line, ln, and pos members to represent the\n next valid position or sets them to null if there are\n no more valid positions.\n */\n function nextChar(cm, idx) {\n if (idx.pos + idx.dir < 0 || idx.pos + idx.dir >= idx.line.length) {\n idx.ln += idx.dir;\n\n if (!isLine(cm, idx.ln)) {\n idx.line = null;\n idx.ln = null;\n idx.pos = null;\n return;\n }\n\n idx.line = cm.getLine(idx.ln);\n idx.pos = idx.dir > 0 ? 0 : idx.line.length - 1;\n } else {\n idx.pos += idx.dir;\n }\n }\n /*\n Performs one iteration of traversal in forward direction\n Returns an index object of the new location\n */\n\n\n function forward(cm, ln, pos, dir) {\n var line = cm.getLine(ln);\n var stop = line === \"\";\n var curr = {\n line: line,\n ln: ln,\n pos: pos,\n dir: dir\n };\n var last_valid = {\n ln: curr.ln,\n pos: curr.pos\n };\n var skip_empty_lines = curr.line === \"\"; // Move one step to skip character we start on\n\n nextChar(cm, curr);\n\n while (curr.line !== null) {\n last_valid.ln = curr.ln;\n last_valid.pos = curr.pos;\n\n if (curr.line === \"\" && !skip_empty_lines) {\n return {\n ln: curr.ln,\n pos: curr.pos\n };\n } else if (stop && curr.line !== \"\" && !isWhiteSpaceString(curr.line[curr.pos])) {\n return {\n ln: curr.ln,\n pos: curr.pos\n };\n } else if (isEndOfSentenceSymbol(curr.line[curr.pos]) && !stop && (curr.pos === curr.line.length - 1 || isWhiteSpaceString(curr.line[curr.pos + 1]))) {\n stop = true;\n }\n\n nextChar(cm, curr);\n }\n /*\n Set the position to the last non whitespace character on the last\n valid line in the case that we reach the end of the document.\n */\n\n\n var line = cm.getLine(last_valid.ln);\n last_valid.pos = 0;\n\n for (var i = line.length - 1; i >= 0; --i) {\n if (!isWhiteSpaceString(line[i])) {\n last_valid.pos = i;\n break;\n }\n }\n\n return last_valid;\n }\n /*\n Performs one iteration of traversal in reverse direction\n Returns an index object of the new location\n */\n\n\n function reverse(cm, ln, pos, dir) {\n var line = cm.getLine(ln);\n var curr = {\n line: line,\n ln: ln,\n pos: pos,\n dir: dir\n };\n var last_valid = {\n ln: curr.ln,\n pos: null\n };\n var skip_empty_lines = curr.line === \"\"; // Move one step to skip character we start on\n\n nextChar(cm, curr);\n\n while (curr.line !== null) {\n if (curr.line === \"\" && !skip_empty_lines) {\n if (last_valid.pos !== null) {\n return last_valid;\n } else {\n return {\n ln: curr.ln,\n pos: curr.pos\n };\n }\n } else if (isEndOfSentenceSymbol(curr.line[curr.pos]) && last_valid.pos !== null && !(curr.ln === last_valid.ln && curr.pos + 1 === last_valid.pos)) {\n return last_valid;\n } else if (curr.line !== \"\" && !isWhiteSpaceString(curr.line[curr.pos])) {\n skip_empty_lines = false;\n last_valid = {\n ln: curr.ln,\n pos: curr.pos\n };\n }\n\n nextChar(cm, curr);\n }\n /*\n Set the position to the first non whitespace character on the last\n valid line in the case that we reach the beginning of the document.\n */\n\n\n var line = cm.getLine(last_valid.ln);\n last_valid.pos = 0;\n\n for (var i = 0; i < line.length; ++i) {\n if (!isWhiteSpaceString(line[i])) {\n last_valid.pos = i;\n break;\n }\n }\n\n return last_valid;\n }\n\n var curr_index = {\n ln: cur.line,\n pos: cur.ch\n };\n\n while (repeat > 0) {\n if (dir < 0) {\n curr_index = reverse(cm, curr_index.ln, curr_index.pos, dir);\n } else {\n curr_index = forward(cm, curr_index.ln, curr_index.pos, dir);\n }\n\n repeat--;\n }\n\n return Pos(curr_index.ln, curr_index.pos);\n } // TODO: perhaps this finagling of start and end positions belonds\n // in codemirror/replaceRange?\n\n\n function selectCompanionObject(cm, head, symb, inclusive) {\n var cur = head,\n start,\n end;\n var bracketRegexp = {\n '(': /[()]/,\n ')': /[()]/,\n '[': /[[\\]]/,\n ']': /[[\\]]/,\n '{': /[{}]/,\n '}': /[{}]/\n }[symb];\n var openSym = {\n '(': '(',\n ')': '(',\n '[': '[',\n ']': '[',\n '{': '{',\n '}': '{'\n }[symb];\n var curChar = cm.getLine(cur.line).charAt(cur.ch); // Due to the behavior of scanForBracket, we need to add an offset if the\n // cursor is on a matching open bracket.\n\n var offset = curChar === openSym ? 1 : 0;\n start = cm.scanForBracket(Pos(cur.line, cur.ch + offset), -1, undefined, {\n 'bracketRegex': bracketRegexp\n });\n end = cm.scanForBracket(Pos(cur.line, cur.ch + offset), 1, undefined, {\n 'bracketRegex': bracketRegexp\n });\n\n if (!start || !end) {\n return {\n start: cur,\n end: cur\n };\n }\n\n start = start.pos;\n end = end.pos;\n\n if (start.line == end.line && start.ch > end.ch || start.line > end.line) {\n var tmp = start;\n start = end;\n end = tmp;\n }\n\n if (inclusive) {\n end.ch += 1;\n } else {\n start.ch += 1;\n }\n\n return {\n start: start,\n end: end\n };\n } // Takes in a symbol and a cursor and tries to simulate text objects that\n // have identical opening and closing symbols\n // TODO support across multiple lines\n\n\n function findBeginningAndEnd(cm, head, symb, inclusive) {\n var cur = copyCursor(head);\n var line = cm.getLine(cur.line);\n var chars = line.split('');\n var start, end, i, len;\n var firstIndex = chars.indexOf(symb); // the decision tree is to always look backwards for the beginning first,\n // but if the cursor is in front of the first instance of the symb,\n // then move the cursor forward\n\n if (cur.ch < firstIndex) {\n cur.ch = firstIndex; // Why is this line even here???\n // cm.setCursor(cur.line, firstIndex+1);\n } // otherwise if the cursor is currently on the closing symbol\n else if (firstIndex < cur.ch && chars[cur.ch] == symb) {\n end = cur.ch; // assign end to the current cursor\n\n --cur.ch; // make sure to look backwards\n } // if we're currently on the symbol, we've got a start\n\n\n if (chars[cur.ch] == symb && !end) {\n start = cur.ch + 1; // assign start to ahead of the cursor\n } else {\n // go backwards to find the start\n for (i = cur.ch; i > -1 && !start; i--) {\n if (chars[i] == symb) {\n start = i + 1;\n }\n }\n } // look forwards for the end symbol\n\n\n if (start && !end) {\n for (i = start, len = chars.length; i < len && !end; i++) {\n if (chars[i] == symb) {\n end = i;\n }\n }\n } // nothing found\n\n\n if (!start || !end) {\n return {\n start: cur,\n end: cur\n };\n } // include the symbols\n\n\n if (inclusive) {\n --start;\n ++end;\n }\n\n return {\n start: Pos(cur.line, start),\n end: Pos(cur.line, end)\n };\n } // Search functions\n\n\n defineOption('pcre', true, 'boolean');\n\n function SearchState() {}\n\n SearchState.prototype = {\n getQuery: function getQuery() {\n return vimGlobalState.query;\n },\n setQuery: function setQuery(query) {\n vimGlobalState.query = query;\n },\n getOverlay: function getOverlay() {\n return this.searchOverlay;\n },\n setOverlay: function setOverlay(overlay) {\n this.searchOverlay = overlay;\n },\n isReversed: function isReversed() {\n return vimGlobalState.isReversed;\n },\n setReversed: function setReversed(reversed) {\n vimGlobalState.isReversed = reversed;\n },\n getScrollbarAnnotate: function getScrollbarAnnotate() {\n return this.annotate;\n },\n setScrollbarAnnotate: function setScrollbarAnnotate(annotate) {\n this.annotate = annotate;\n }\n };\n\n function getSearchState(cm) {\n var vim = cm.state.vim;\n return vim.searchState_ || (vim.searchState_ = new SearchState());\n }\n\n function dialog(cm, template, shortText, onClose, options) {\n if (cm.openDialog) {\n cm.openDialog(template, onClose, {\n bottom: true,\n value: options.value,\n onKeyDown: options.onKeyDown,\n onKeyUp: options.onKeyUp,\n selectValueOnOpen: false\n });\n } else {\n onClose(prompt(shortText, ''));\n }\n }\n\n function splitBySlash(argString) {\n return splitBySeparator(argString, '/');\n }\n\n function findUnescapedSlashes(argString) {\n return findUnescapedSeparators(argString, '/');\n }\n\n function splitBySeparator(argString, separator) {\n var slashes = findUnescapedSeparators(argString, separator) || [];\n if (!slashes.length) return [];\n var tokens = []; // in case of strings like foo/bar\n\n if (slashes[0] !== 0) return;\n\n for (var i = 0; i < slashes.length; i++) {\n if (typeof slashes[i] == 'number') tokens.push(argString.substring(slashes[i] + 1, slashes[i + 1]));\n }\n\n return tokens;\n }\n\n function findUnescapedSeparators(str, separator) {\n if (!separator) separator = '/';\n var escapeNextChar = false;\n var slashes = [];\n\n for (var i = 0; i < str.length; i++) {\n var c = str.charAt(i);\n\n if (!escapeNextChar && c == separator) {\n slashes.push(i);\n }\n\n escapeNextChar = !escapeNextChar && c == '\\\\';\n }\n\n return slashes;\n } // Translates a search string from ex (vim) syntax into javascript form.\n\n\n function translateRegex(str) {\n // When these match, add a '\\' if unescaped or remove one if escaped.\n var specials = '|(){'; // Remove, but never add, a '\\' for these.\n\n var unescape = '}';\n var escapeNextChar = false;\n var out = [];\n\n for (var i = -1; i < str.length; i++) {\n var c = str.charAt(i) || '';\n var n = str.charAt(i + 1) || '';\n var specialComesNext = n && specials.indexOf(n) != -1;\n\n if (escapeNextChar) {\n if (c !== '\\\\' || !specialComesNext) {\n out.push(c);\n }\n\n escapeNextChar = false;\n } else {\n if (c === '\\\\') {\n escapeNextChar = true; // Treat the unescape list as special for removing, but not adding '\\'.\n\n if (n && unescape.indexOf(n) != -1) {\n specialComesNext = true;\n } // Not passing this test means removing a '\\'.\n\n\n if (!specialComesNext || n === '\\\\') {\n out.push(c);\n }\n } else {\n out.push(c);\n\n if (specialComesNext && n !== '\\\\') {\n out.push('\\\\');\n }\n }\n }\n }\n\n return out.join('');\n } // Translates the replace part of a search and replace from ex (vim) syntax into\n // javascript form. Similar to translateRegex, but additionally fixes back references\n // (translates '\\[0..9]' to '$[0..9]') and follows different rules for escaping '$'.\n\n\n var charUnescapes = {\n '\\\\n': '\\n',\n '\\\\r': '\\r',\n '\\\\t': '\\t'\n };\n\n function translateRegexReplace(str) {\n var escapeNextChar = false;\n var out = [];\n\n for (var i = -1; i < str.length; i++) {\n var c = str.charAt(i) || '';\n var n = str.charAt(i + 1) || '';\n\n if (charUnescapes[c + n]) {\n out.push(charUnescapes[c + n]);\n i++;\n } else if (escapeNextChar) {\n // At any point in the loop, escapeNextChar is true if the previous\n // character was a '\\' and was not escaped.\n out.push(c);\n escapeNextChar = false;\n } else {\n if (c === '\\\\') {\n escapeNextChar = true;\n\n if (isNumber(n) || n === '$') {\n out.push('$');\n } else if (n !== '/' && n !== '\\\\') {\n out.push('\\\\');\n }\n } else {\n if (c === '$') {\n out.push('$');\n }\n\n out.push(c);\n\n if (n === '/') {\n out.push('\\\\');\n }\n }\n }\n }\n\n return out.join('');\n } // Unescape \\ and / in the replace part, for PCRE mode.\n\n\n var unescapes = {\n '\\\\/': '/',\n '\\\\\\\\': '\\\\',\n '\\\\n': '\\n',\n '\\\\r': '\\r',\n '\\\\t': '\\t'\n };\n\n function unescapeRegexReplace(str) {\n var stream = new _cm_adapter2.default.StringStream(str);\n var output = [];\n\n while (!stream.eol()) {\n // Search for \\.\n while (stream.peek() && stream.peek() != '\\\\') {\n output.push(stream.next());\n }\n\n var matched = false;\n\n for (var matcher in unescapes) {\n if (stream.match(matcher, true)) {\n matched = true;\n output.push(unescapes[matcher]);\n break;\n }\n }\n\n if (!matched) {\n // Don't change anything\n output.push(stream.next());\n }\n }\n\n return output.join('');\n }\n /**\n * Extract the regular expression from the query and return a Regexp object.\n * Returns null if the query is blank.\n * If ignoreCase is passed in, the Regexp object will have the 'i' flag set.\n * If smartCase is passed in, and the query contains upper case letters,\n * then ignoreCase is overridden, and the 'i' flag will not be set.\n * If the query contains the /i in the flag part of the regular expression,\n * then both ignoreCase and smartCase are ignored, and 'i' will be passed\n * through to the Regex object.\n */\n\n\n function parseQuery(query, ignoreCase, smartCase) {\n // First update the last search register\n var lastSearchRegister = vimGlobalState.registerController.getRegister('/');\n lastSearchRegister.setText(query); // Check if the query is already a regex.\n\n if (query instanceof RegExp) {\n return query;\n } // First try to extract regex + flags from the input. If no flags found,\n // extract just the regex. IE does not accept flags directly defined in\n // the regex string in the form /regex/flags\n\n\n var slashes = findUnescapedSlashes(query);\n var regexPart;\n var forceIgnoreCase;\n\n if (!slashes.length) {\n // Query looks like 'regexp'\n regexPart = query;\n } else {\n // Query looks like 'regexp/...'\n regexPart = query.substring(0, slashes[0]);\n var flagsPart = query.substring(slashes[0]);\n forceIgnoreCase = flagsPart.indexOf('i') != -1;\n }\n\n if (!regexPart) {\n return null;\n }\n\n if (!getOption('pcre')) {\n regexPart = translateRegex(regexPart);\n }\n\n if (smartCase) {\n ignoreCase = /^[^A-Z]*$/.test(regexPart);\n }\n\n var regexp = new RegExp(regexPart, ignoreCase || forceIgnoreCase ? 'i' : undefined);\n return regexp;\n }\n\n function showConfirm(cm, text) {\n if (cm.openNotification) {\n cm.openNotification('' + text + '', {\n bottom: true,\n duration: 5000\n });\n } else {\n alert(text);\n }\n }\n\n function makePrompt(prefix, desc) {\n var raw = '' + (prefix || \"\") + '';\n if (desc) raw += ' ' + desc + '';\n return raw;\n }\n\n var searchPromptDesc = '(Javascript regexp)';\n\n function showPrompt(cm, options) {\n var shortText = (options.prefix || '') + ' ' + (options.desc || '');\n var prompt = makePrompt(options.prefix, options.desc);\n dialog(cm, prompt, shortText, options.onClose, options);\n }\n\n function regexEqual(r1, r2) {\n if (r1 instanceof RegExp && r2 instanceof RegExp) {\n var props = ['global', 'multiline', 'ignoreCase', 'source'];\n\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n\n if (r1[prop] !== r2[prop]) {\n return false;\n }\n }\n\n return true;\n }\n\n return false;\n } // Returns true if the query is valid.\n\n\n function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) {\n if (!rawQuery) {\n return;\n }\n\n var state = getSearchState(cm);\n var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase);\n\n if (!query) {\n return;\n }\n\n highlightSearchMatches(cm, query);\n\n if (regexEqual(query, state.getQuery())) {\n return query;\n }\n\n state.setQuery(query);\n return query;\n }\n\n function searchOverlay(query) {\n if (query.source.charAt(0) == '^') {\n var matchSol = true;\n }\n\n return {\n token: function token(stream) {\n if (matchSol && !stream.sol()) {\n stream.skipToEnd();\n return;\n }\n\n var match = stream.match(query, false);\n\n if (match) {\n if (match[0].length == 0) {\n // Matched empty string, skip to next.\n stream.next();\n return 'searching';\n }\n\n if (!stream.sol()) {\n // Backtrack 1 to match \\b\n stream.backUp(1);\n\n if (!query.exec(stream.next() + match[0])) {\n stream.next();\n return null;\n }\n }\n\n stream.match(query);\n return 'searching';\n }\n\n while (!stream.eol()) {\n stream.next();\n if (stream.match(query, false)) break;\n }\n },\n query: query\n };\n }\n\n function highlightSearchMatches(cm, query) {\n var searchState = getSearchState(cm);\n var overlay = searchState.getOverlay();\n\n if (!overlay || query != overlay.query) {\n if (overlay) {\n cm.removeOverlay(overlay);\n }\n\n overlay = searchOverlay(query);\n cm.addOverlay(overlay);\n\n if (cm.showMatchesOnScrollbar) {\n if (searchState.getScrollbarAnnotate()) {\n searchState.getScrollbarAnnotate().clear();\n }\n\n searchState.setScrollbarAnnotate(cm.showMatchesOnScrollbar(query));\n }\n\n searchState.setOverlay(overlay);\n }\n }\n\n function _findNext(cm, prev, query, repeat) {\n if (repeat === undefined) {\n repeat = 1;\n }\n\n return cm.operation(function () {\n var pos = cm.getCursor();\n var cursor = cm.getSearchCursor(query, pos);\n\n for (var i = 0; i < repeat; i++) {\n var found = cursor.find(prev);\n\n if (i == 0 && found && cursorEqual(cursor.from(), pos)) {\n found = cursor.find(prev);\n }\n\n if (!found) {\n // SearchCursor may have returned null because it hit EOF, wrap\n // around and try again.\n cursor = cm.getSearchCursor(query, prev ? Pos(cm.lastLine()) : Pos(cm.firstLine(), 0));\n\n if (!cursor.find(prev)) {\n return;\n }\n }\n }\n\n return cursor.from();\n });\n }\n\n function clearSearchHighlight(cm) {\n var state = getSearchState(cm);\n cm.removeOverlay(getSearchState(cm).getOverlay());\n state.setOverlay(null);\n\n if (state.getScrollbarAnnotate()) {\n state.getScrollbarAnnotate().clear();\n state.setScrollbarAnnotate(null);\n }\n }\n /**\n * Check if pos is in the specified range, INCLUSIVE.\n * Range can be specified with 1 or 2 arguments.\n * If the first range argument is an array, treat it as an array of line\n * numbers. Match pos against any of the lines.\n * If the first range argument is a number,\n * if there is only 1 range argument, check if pos has the same line\n * number\n * if there are 2 range arguments, then check if pos is in between the two\n * range arguments.\n */\n\n\n function isInRange(pos, start, end) {\n if (typeof pos != 'number') {\n // Assume it is a cursor position. Get the line number.\n pos = pos.line;\n }\n\n if (start instanceof Array) {\n return inArray(pos, start);\n } else {\n if (end) {\n return pos >= start && pos <= end;\n } else {\n return pos == start;\n }\n }\n }\n\n function getUserVisibleLines(cm) {\n // var scrollInfo = cm.getScrollInfo();\n // var occludeToleranceTop = 6;\n // var occludeToleranceBottom = 10;\n // var from = cm.coordsChar({left:0, top: occludeToleranceTop + scrollInfo.top}, 'local');\n // var bottomY = scrollInfo.clientHeight - occludeToleranceBottom + scrollInfo.top;\n // var to = cm.coordsChar({left:0, top: bottomY}, 'local');\n // return {top: from.line, bottom: to.line};\n return cm.getUserVisibleLines();\n }\n\n function getMarkPos(cm, vim, markName) {\n if (markName == '\\'') {\n var history = cm.doc.history.done;\n var event = history[history.length - 2];\n return event && event.ranges && event.ranges[0].head;\n } else if (markName == '.') {\n if (cm.doc.history.lastModTime == 0) {\n return; // If no changes, bail out; don't bother to copy or reverse history array.\n } else {\n var changeHistory = cm.doc.history.done.filter(function (el) {\n if (el.changes !== undefined) {\n return el;\n }\n });\n changeHistory.reverse();\n var lastEditPos = changeHistory[0].changes[0].to;\n }\n\n return lastEditPos;\n }\n\n var mark = vim.marks[markName];\n return mark && mark.find();\n }\n\n var ExCommandDispatcher = function ExCommandDispatcher() {\n this.buildCommandMap_();\n };\n\n ExCommandDispatcher.prototype = {\n processCommand: function processCommand(cm, input, opt_params) {\n var that = this;\n cm.operation(function () {\n cm.curOp.isVimOp = true;\n\n that._processCommand(cm, input, opt_params);\n });\n },\n _processCommand: function _processCommand(cm, input, opt_params) {\n var vim = cm.state.vim;\n var commandHistoryRegister = vimGlobalState.registerController.getRegister(':');\n var previousCommand = commandHistoryRegister.toString();\n\n if (vim.visualMode) {\n exitVisualMode(cm);\n }\n\n var inputStream = new _cm_adapter2.default.StringStream(input); // update \": with the latest command whether valid or invalid\n\n commandHistoryRegister.setText(input);\n var params = opt_params || {};\n params.input = input;\n\n try {\n this.parseInput_(cm, inputStream, params);\n } catch (e) {\n showConfirm(cm, e);\n throw e;\n }\n\n var command;\n var commandName;\n\n if (!params.commandName) {\n // If only a line range is defined, move to the line.\n if (params.line !== undefined) {\n commandName = 'move';\n }\n } else {\n command = this.matchCommand_(params.commandName);\n\n if (command) {\n commandName = command.name;\n\n if (command.excludeFromCommandHistory) {\n commandHistoryRegister.setText(previousCommand);\n }\n\n this.parseCommandArgs_(inputStream, params, command);\n\n if (command.type == 'exToKey') {\n // Handle Ex to Key mapping.\n for (var i = 0; i < command.toKeys.length; i++) {\n _cm_adapter2.default.Vim.handleKey(cm, command.toKeys[i], 'mapping');\n }\n\n return;\n } else if (command.type == 'exToEx') {\n // Handle Ex to Ex mapping.\n this.processCommand(cm, command.toInput);\n return;\n }\n }\n }\n\n if (!commandName) {\n showConfirm(cm, 'Not an editor command \":' + input + '\"');\n return;\n }\n\n try {\n exCommands[commandName](cm, params); // Possibly asynchronous commands (e.g. substitute, which might have a\n // user confirmation), are responsible for calling the callback when\n // done. All others have it taken care of for them here.\n\n if ((!command || !command.possiblyAsync) && params.callback) {\n params.callback();\n }\n } catch (e) {\n showConfirm(cm, e);\n throw e;\n }\n },\n parseInput_: function parseInput_(cm, inputStream, result) {\n inputStream.eatWhile(':'); // Parse range.\n\n if (inputStream.eat('%')) {\n result.line = cm.firstLine();\n result.lineEnd = cm.lastLine();\n } else {\n result.line = this.parseLineSpec_(cm, inputStream);\n\n if (result.line !== undefined && inputStream.eat(',')) {\n result.lineEnd = this.parseLineSpec_(cm, inputStream);\n }\n } // Parse command name.\n\n\n var commandMatch = inputStream.match(/^(\\w+)/);\n\n if (commandMatch) {\n result.commandName = commandMatch[1];\n } else {\n result.commandName = inputStream.match(/.*/)[0];\n }\n\n return result;\n },\n parseLineSpec_: function parseLineSpec_(cm, inputStream) {\n var numberMatch = inputStream.match(/^(\\d+)/);\n\n if (numberMatch) {\n // Absolute line number plus offset (N+M or N-M) is probably a typo,\n // not something the user actually wanted. (NB: vim does allow this.)\n return parseInt(numberMatch[1], 10) - 1;\n }\n\n switch (inputStream.next()) {\n case '.':\n return this.parseLineSpecOffset_(inputStream, cm.getCursor().line);\n\n case '$':\n return this.parseLineSpecOffset_(inputStream, cm.lastLine());\n\n case '\\'':\n var markName = inputStream.next();\n var markPos = getMarkPos(cm, cm.state.vim, markName);\n if (!markPos) throw new Error('Mark not set');\n return this.parseLineSpecOffset_(inputStream, markPos.line);\n\n case '-':\n case '+':\n inputStream.backUp(1); // Offset is relative to current line if not otherwise specified.\n\n return this.parseLineSpecOffset_(inputStream, cm.getCursor().line);\n\n default:\n inputStream.backUp(1);\n return undefined;\n }\n },\n parseLineSpecOffset_: function parseLineSpecOffset_(inputStream, line) {\n var offsetMatch = inputStream.match(/^([+-])?(\\d+)/);\n\n if (offsetMatch) {\n var offset = parseInt(offsetMatch[2], 10);\n\n if (offsetMatch[1] == \"-\") {\n line -= offset;\n } else {\n line += offset;\n }\n }\n\n return line;\n },\n parseCommandArgs_: function parseCommandArgs_(inputStream, params, command) {\n if (inputStream.eol()) {\n return;\n }\n\n params.argString = inputStream.match(/.*/)[0]; // Parse command-line arguments\n\n var delim = command.argDelimiter || /\\s+/;\n var args = trim(params.argString).split(delim);\n\n if (args.length && args[0]) {\n params.args = args;\n }\n },\n matchCommand_: function matchCommand_(commandName) {\n // Return the command in the command map that matches the shortest\n // prefix of the passed in command name. The match is guaranteed to be\n // unambiguous if the defaultExCommandMap's shortNames are set up\n // correctly. (see @code{defaultExCommandMap}).\n for (var i = commandName.length; i > 0; i--) {\n var prefix = commandName.substring(0, i);\n\n if (this.commandMap_[prefix]) {\n var command = this.commandMap_[prefix];\n\n if (command.name.indexOf(commandName) === 0) {\n return command;\n }\n }\n }\n\n return null;\n },\n buildCommandMap_: function buildCommandMap_() {\n this.commandMap_ = {};\n\n for (var i = 0; i < defaultExCommandMap.length; i++) {\n var command = defaultExCommandMap[i];\n var key = command.shortName || command.name;\n this.commandMap_[key] = command;\n }\n },\n map: function map(lhs, rhs, ctx) {\n if (lhs != ':' && lhs.charAt(0) == ':') {\n if (ctx) {\n throw Error('Mode not supported for ex mappings');\n }\n\n var commandName = lhs.substring(1);\n\n if (rhs != ':' && rhs.charAt(0) == ':') {\n // Ex to Ex mapping\n this.commandMap_[commandName] = {\n name: commandName,\n type: 'exToEx',\n toInput: rhs.substring(1),\n user: true\n };\n } else {\n // Ex to key mapping\n this.commandMap_[commandName] = {\n name: commandName,\n type: 'exToKey',\n toKeys: rhs,\n user: true\n };\n }\n } else {\n if (rhs != ':' && rhs.charAt(0) == ':') {\n // Key to Ex mapping.\n var mapping = {\n keys: lhs,\n type: 'keyToEx',\n exArgs: {\n input: rhs.substring(1)\n }\n };\n\n if (ctx) {\n mapping.context = ctx;\n }\n\n defaultKeymap.unshift(mapping);\n } else {\n // Key to key mapping\n var mapping = {\n keys: lhs,\n type: 'keyToKey',\n toKeys: rhs\n };\n\n if (ctx) {\n mapping.context = ctx;\n }\n\n defaultKeymap.unshift(mapping);\n }\n }\n },\n unmap: function unmap(lhs, ctx) {\n if (lhs != ':' && lhs.charAt(0) == ':') {\n // Ex to Ex or Ex to key mapping\n if (ctx) {\n throw Error('Mode not supported for ex mappings');\n }\n\n var commandName = lhs.substring(1);\n\n if (this.commandMap_[commandName] && this.commandMap_[commandName].user) {\n delete this.commandMap_[commandName];\n return;\n }\n } else {\n // Key to Ex or key to key mapping\n var keys = lhs;\n\n for (var i = 0; i < defaultKeymap.length; i++) {\n if (keys == defaultKeymap[i].keys && defaultKeymap[i].context === ctx) {\n defaultKeymap.splice(i, 1);\n return;\n }\n }\n }\n\n throw Error('No such mapping.');\n }\n };\n var exCommands = {\n colorscheme: function colorscheme(cm, params) {\n if (!params.args || params.args.length < 1) {\n showConfirm(cm, cm.getOption('theme'));\n return;\n }\n\n cm.setOption('theme', params.args[0]);\n },\n map: function map(cm, params, ctx) {\n var mapArgs = params.args;\n\n if (!mapArgs || mapArgs.length < 2) {\n if (cm) {\n showConfirm(cm, 'Invalid mapping: ' + params.input);\n }\n\n return;\n }\n\n exCommandDispatcher.map(mapArgs[0], mapArgs[1], ctx);\n },\n imap: function imap(cm, params) {\n this.map(cm, params, 'insert');\n },\n nmap: function nmap(cm, params) {\n this.map(cm, params, 'normal');\n },\n vmap: function vmap(cm, params) {\n this.map(cm, params, 'visual');\n },\n unmap: function unmap(cm, params, ctx) {\n var mapArgs = params.args;\n\n if (!mapArgs || mapArgs.length < 1) {\n if (cm) {\n showConfirm(cm, 'No such mapping: ' + params.input);\n }\n\n return;\n }\n\n exCommandDispatcher.unmap(mapArgs[0], ctx);\n },\n move: function move(cm, params) {\n commandDispatcher.processCommand(cm, cm.state.vim, {\n type: 'motion',\n motion: 'moveToLineOrEdgeOfDocument',\n motionArgs: {\n forward: false,\n explicitRepeat: true,\n linewise: true\n },\n repeatOverride: params.line + 1\n });\n },\n set: function set(cm, params) {\n var setArgs = params.args; // Options passed through to the setOption/getOption calls. May be passed in by the\n // local/global versions of the set command\n\n var setCfg = params.setCfg || {};\n\n if (!setArgs || setArgs.length < 1) {\n if (cm) {\n showConfirm(cm, 'Invalid mapping: ' + params.input);\n }\n\n return;\n }\n\n var expr = setArgs[0].split('=');\n var optionName = expr[0];\n var value = expr[1];\n var forceGet = false;\n\n if (optionName.charAt(optionName.length - 1) == '?') {\n // If post-fixed with ?, then the set is actually a get.\n if (value) {\n throw Error('Trailing characters: ' + params.argString);\n }\n\n optionName = optionName.substring(0, optionName.length - 1);\n forceGet = true;\n }\n\n if (value === undefined && optionName.substring(0, 2) == 'no') {\n // To set boolean options to false, the option name is prefixed with\n // 'no'.\n optionName = optionName.substring(2);\n value = false;\n }\n\n var optionIsBoolean = options[optionName] && options[optionName].type == 'boolean';\n\n if (optionIsBoolean && value == undefined) {\n // Calling set with a boolean option sets it to true.\n value = true;\n } // If no value is provided, then we assume this is a get.\n\n\n if (!optionIsBoolean && value === undefined || forceGet) {\n var oldValue = getOption(optionName, cm, setCfg);\n\n if (oldValue instanceof Error) {\n showConfirm(cm, oldValue.message);\n } else if (oldValue === true || oldValue === false) {\n showConfirm(cm, ' ' + (oldValue ? '' : 'no') + optionName);\n } else {\n showConfirm(cm, ' ' + optionName + '=' + oldValue);\n }\n } else {\n var setOptionReturn = setOption(optionName, value, cm, setCfg);\n\n if (setOptionReturn instanceof Error) {\n showConfirm(cm, setOptionReturn.message);\n }\n }\n },\n setlocal: function setlocal(cm, params) {\n // setCfg is passed through to setOption\n params.setCfg = {\n scope: 'local'\n };\n this.set(cm, params);\n },\n setglobal: function setglobal(cm, params) {\n // setCfg is passed through to setOption\n params.setCfg = {\n scope: 'global'\n };\n this.set(cm, params);\n },\n registers: function registers(cm, params) {\n var regArgs = params.args;\n var registers = vimGlobalState.registerController.registers;\n var regInfo = '----------Registers----------

';\n\n if (!regArgs) {\n for (var registerName in registers) {\n var text = registers[registerName].toString();\n\n if (text.length) {\n regInfo += '\"' + registerName + ' ' + text + '
';\n }\n }\n } else {\n var registerName;\n regArgs = regArgs.join('');\n\n for (var i = 0; i < regArgs.length; i++) {\n registerName = regArgs.charAt(i);\n\n if (!vimGlobalState.registerController.isValidRegister(registerName)) {\n continue;\n }\n\n var register = registers[registerName] || new Register();\n regInfo += '\"' + registerName + ' ' + register.toString() + '
';\n }\n }\n\n showConfirm(cm, regInfo);\n },\n sort: function sort(cm, params) {\n var reverse, ignoreCase, unique, number, pattern;\n\n function parseArgs() {\n if (params.argString) {\n var args = new _cm_adapter2.default.StringStream(params.argString);\n\n if (args.eat('!')) {\n reverse = true;\n }\n\n if (args.eol()) {\n return;\n }\n\n if (!args.eatSpace()) {\n return 'Invalid arguments';\n }\n\n var opts = args.match(/([dinuox]+)?\\s*(\\/.+\\/)?\\s*/);\n\n if (!opts && !args.eol()) {\n return 'Invalid arguments';\n }\n\n if (opts[1]) {\n ignoreCase = opts[1].indexOf('i') != -1;\n unique = opts[1].indexOf('u') != -1;\n var decimal = opts[1].indexOf('d') != -1 || opts[1].indexOf('n') != -1 && 1;\n var hex = opts[1].indexOf('x') != -1 && 1;\n var octal = opts[1].indexOf('o') != -1 && 1;\n\n if (decimal + hex + octal > 1) {\n return 'Invalid arguments';\n }\n\n number = decimal && 'decimal' || hex && 'hex' || octal && 'octal';\n }\n\n if (opts[2]) {\n pattern = new RegExp(opts[2].substr(1, opts[2].length - 2), ignoreCase ? 'i' : '');\n }\n }\n }\n\n var err = parseArgs();\n\n if (err) {\n showConfirm(cm, err + ': ' + params.argString);\n return;\n }\n\n var lineStart = params.line || cm.firstLine();\n var lineEnd = params.lineEnd || params.line || cm.lastLine();\n\n if (lineStart == lineEnd) {\n return;\n }\n\n var curStart = Pos(lineStart, 0);\n var curEnd = Pos(lineEnd, lineLength(cm, lineEnd));\n var text = cm.getRange(curStart, curEnd).split('\\n');\n var numberRegex = pattern ? pattern : number == 'decimal' ? /(-?)([\\d]+)/ : number == 'hex' ? /(-?)(?:0x)?([0-9a-f]+)/i : number == 'octal' ? /([0-7]+)/ : null;\n var radix = number == 'decimal' ? 10 : number == 'hex' ? 16 : number == 'octal' ? 8 : null;\n var numPart = [],\n textPart = [];\n\n if (number || pattern) {\n for (var i = 0; i < text.length; i++) {\n var matchPart = pattern ? text[i].match(pattern) : null;\n\n if (matchPart && matchPart[0] != '') {\n numPart.push(matchPart);\n } else if (!pattern && numberRegex.exec(text[i])) {\n numPart.push(text[i]);\n } else {\n textPart.push(text[i]);\n }\n }\n } else {\n textPart = text;\n }\n\n function compareFn(a, b) {\n if (reverse) {\n var tmp;\n tmp = a;\n a = b;\n b = tmp;\n }\n\n if (ignoreCase) {\n a = a.toLowerCase();\n b = b.toLowerCase();\n }\n\n var anum = number && numberRegex.exec(a);\n var bnum = number && numberRegex.exec(b);\n\n if (!anum) {\n return a < b ? -1 : 1;\n }\n\n anum = parseInt((anum[1] + anum[2]).toLowerCase(), radix);\n bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix);\n return anum - bnum;\n }\n\n function comparePatternFn(a, b) {\n if (reverse) {\n var tmp;\n tmp = a;\n a = b;\n b = tmp;\n }\n\n if (ignoreCase) {\n a[0] = a[0].toLowerCase();\n b[0] = b[0].toLowerCase();\n }\n\n return a[0] < b[0] ? -1 : 1;\n }\n\n numPart.sort(pattern ? comparePatternFn : compareFn);\n\n if (pattern) {\n for (var i = 0; i < numPart.length; i++) {\n numPart[i] = numPart[i].input;\n }\n } else if (!number) {\n textPart.sort(compareFn);\n }\n\n text = !reverse ? textPart.concat(numPart) : numPart.concat(textPart);\n\n if (unique) {\n // Remove duplicate lines\n var textOld = text;\n var lastLine;\n text = [];\n\n for (var i = 0; i < textOld.length; i++) {\n if (textOld[i] != lastLine) {\n text.push(textOld[i]);\n }\n\n lastLine = textOld[i];\n }\n }\n\n cm.replaceRange(text.join('\\n'), curStart, curEnd);\n },\n global: function global(cm, params) {\n // a global command is of the form\n // :[range]g/pattern/[cmd]\n // argString holds the string /pattern/[cmd]\n var argString = params.argString;\n\n if (!argString) {\n showConfirm(cm, 'Regular Expression missing from global');\n return;\n } // range is specified here\n\n\n var lineStart = params.line !== undefined ? params.line : cm.firstLine();\n var lineEnd = params.lineEnd || params.line || cm.lastLine(); // get the tokens from argString\n\n var tokens = splitBySlash(argString);\n var regexPart = argString,\n cmd;\n\n if (tokens.length) {\n regexPart = tokens[0];\n cmd = tokens.slice(1, tokens.length).join('/');\n }\n\n if (regexPart) {\n // If regex part is empty, then use the previous query. Otherwise\n // use the regex part as the new query.\n try {\n updateSearchQuery(cm, regexPart, true\n /** ignoreCase */\n , true\n /** smartCase */\n );\n } catch (e) {\n showConfirm(cm, 'Invalid regex: ' + regexPart);\n return;\n }\n } // now that we have the regexPart, search for regex matches in the\n // specified range of lines\n\n\n var query = getSearchState(cm).getQuery();\n var matchedLines = [],\n content = '';\n\n for (var i = lineStart; i <= lineEnd; i++) {\n var matched = query.test(cm.getLine(i));\n\n if (matched) {\n matchedLines.push(i + 1);\n content += cm.getLine(i) + '
';\n }\n } // if there is no [cmd], just display the list of matched lines\n\n\n if (!cmd) {\n showConfirm(cm, content);\n return;\n }\n\n var index = 0;\n\n var nextCommand = function nextCommand() {\n if (index < matchedLines.length) {\n var command = matchedLines[index] + cmd;\n exCommandDispatcher.processCommand(cm, command, {\n callback: nextCommand\n });\n }\n\n index++;\n };\n\n nextCommand();\n },\n substitute: function substitute(cm, params) {\n if (!cm.getSearchCursor) {\n throw new Error('Search feature not available. Requires searchcursor.js or ' + 'any other getSearchCursor implementation.');\n }\n\n var argString = params.argString;\n var tokens = argString ? splitBySeparator(argString, argString[0]) : [];\n var regexPart,\n replacePart = '',\n trailing,\n flagsPart,\n count;\n var confirm = false; // Whether to confirm each replace.\n\n var global = false; // True to replace all instances on a line, false to replace only 1.\n\n if (tokens.length) {\n regexPart = tokens[0];\n replacePart = tokens[1];\n\n if (regexPart && regexPart[regexPart.length - 1] === '$') {\n regexPart = regexPart.slice(0, regexPart.length - 1) + '\\\\n';\n replacePart = replacePart ? replacePart + '\\n' : '\\n';\n }\n\n if (replacePart !== undefined) {\n if (getOption('pcre')) {\n replacePart = unescapeRegexReplace(replacePart);\n } else {\n replacePart = translateRegexReplace(replacePart);\n }\n\n vimGlobalState.lastSubstituteReplacePart = replacePart;\n }\n\n trailing = tokens[2] ? tokens[2].split(' ') : [];\n } else {\n // either the argString is empty or its of the form ' hello/world'\n // actually splitBySlash returns a list of tokens\n // only if the string starts with a '/'\n if (argString && argString.length) {\n showConfirm(cm, 'Substitutions should be of the form ' + ':s/pattern/replace/');\n return;\n }\n } // After the 3rd slash, we can have flags followed by a space followed\n // by count.\n\n\n if (trailing) {\n flagsPart = trailing[0];\n count = parseInt(trailing[1]);\n\n if (flagsPart) {\n if (flagsPart.indexOf('c') != -1) {\n confirm = true;\n flagsPart.replace('c', '');\n }\n\n if (flagsPart.indexOf('g') != -1) {\n global = true;\n flagsPart.replace('g', '');\n }\n\n regexPart = regexPart.replace(/\\//g, \"\\\\/\") + '/' + flagsPart;\n }\n }\n\n if (regexPart) {\n // If regex part is empty, then use the previous query. Otherwise use\n // the regex part as the new query.\n try {\n updateSearchQuery(cm, regexPart, true\n /** ignoreCase */\n , true\n /** smartCase */\n );\n } catch (e) {\n showConfirm(cm, 'Invalid regex: ' + regexPart);\n return;\n }\n }\n\n replacePart = replacePart || vimGlobalState.lastSubstituteReplacePart;\n\n if (replacePart === undefined) {\n showConfirm(cm, 'No previous substitute regular expression');\n return;\n }\n\n var state = getSearchState(cm);\n var query = state.getQuery();\n var lineStart = params.line !== undefined ? params.line : cm.getCursor().line;\n var lineEnd = params.lineEnd || lineStart;\n\n if (lineStart == cm.firstLine() && lineEnd == cm.lastLine()) {\n lineEnd = Infinity;\n }\n\n if (count) {\n lineStart = lineEnd;\n lineEnd = lineStart + count - 1;\n }\n\n var startPos = clipCursorToContent(cm, Pos(lineStart, 0));\n var cursor = cm.getSearchCursor(query, startPos);\n doReplace(cm, confirm, global, lineStart, lineEnd, cursor, query, replacePart, params.callback);\n },\n redo: _cm_adapter2.default.commands.redo,\n undo: _cm_adapter2.default.commands.undo,\n write: function write(cm) {\n if (_cm_adapter2.default.commands.save) {\n // If a save command is defined, call it.\n _cm_adapter2.default.commands.save(cm);\n } else if (cm.save) {\n // Saves to text area if no save command is defined and cm.save() is available.\n cm.save();\n }\n },\n nohlsearch: function nohlsearch(cm) {\n clearSearchHighlight(cm);\n },\n yank: function yank(cm) {\n var cur = copyCursor(cm.getCursor());\n var line = cur.line;\n var lineText = cm.getLine(line);\n vimGlobalState.registerController.pushText('0', 'yank', lineText, true, true);\n },\n delmarks: function delmarks(cm, params) {\n if (!params.argString || !trim(params.argString)) {\n showConfirm(cm, 'Argument required');\n return;\n }\n\n var state = cm.state.vim;\n var stream = new _cm_adapter2.default.StringStream(trim(params.argString));\n\n while (!stream.eol()) {\n stream.eatSpace(); // Record the streams position at the beginning of the loop for use\n // in error messages.\n\n var count = stream.pos;\n\n if (!stream.match(/[a-zA-Z]/, false)) {\n showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));\n return;\n }\n\n var sym = stream.next(); // Check if this symbol is part of a range\n\n if (stream.match('-', true)) {\n // This symbol is part of a range.\n // The range must terminate at an alphabetic character.\n if (!stream.match(/[a-zA-Z]/, false)) {\n showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));\n return;\n }\n\n var startMark = sym;\n var finishMark = stream.next(); // The range must terminate at an alphabetic character which\n // shares the same case as the start of the range.\n\n if (isLowerCase(startMark) && isLowerCase(finishMark) || isUpperCase(startMark) && isUpperCase(finishMark)) {\n var start = startMark.charCodeAt(0);\n var finish = finishMark.charCodeAt(0);\n\n if (start >= finish) {\n showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));\n return;\n } // Because marks are always ASCII values, and we have\n // determined that they are the same case, we can use\n // their char codes to iterate through the defined range.\n\n\n for (var j = 0; j <= finish - start; j++) {\n var mark = String.fromCharCode(start + j);\n delete state.marks[mark];\n }\n } else {\n showConfirm(cm, 'Invalid argument: ' + startMark + '-');\n return;\n }\n } else {\n // This symbol is a valid mark, and is not part of a range.\n delete state.marks[sym];\n }\n }\n }\n };\n var exCommandDispatcher = new ExCommandDispatcher();\n /**\n * @param {CodeMirror} cm CodeMirror instance we are in.\n * @param {boolean} confirm Whether to confirm each replace.\n * @param {Cursor} lineStart Line to start replacing from.\n * @param {Cursor} lineEnd Line to stop replacing at.\n * @param {RegExp} query Query for performing matches with.\n * @param {string} replaceWith Text to replace matches with. May contain $1,\n * $2, etc for replacing captured groups using Javascript replace.\n * @param {function()} callback A callback for when the replace is done.\n */\n\n function doReplace(cm, confirm, global, lineStart, lineEnd, searchCursor, query, replaceWith, callback) {\n // Set up all the functions.\n cm.state.vim.exMode = true;\n var done = false;\n var lastPos = searchCursor.from();\n\n function replaceAll() {\n cm.operation(function () {\n while (!done) {\n replace();\n next();\n }\n\n stop();\n });\n }\n\n function replace() {\n var text = cm.getRange(searchCursor.from(), searchCursor.to());\n var newText = text.replace(query, replaceWith);\n searchCursor.replace(newText);\n }\n\n function next() {\n // The below only loops to skip over multiple occurrences on the same\n // line when 'global' is not true.\n while (searchCursor.findNext() && isInRange(searchCursor.from(), lineStart, lineEnd)) {\n if (!global && lastPos && searchCursor.from().line == lastPos.line) {\n continue;\n }\n\n cm.scrollIntoView(searchCursor.from(), 30);\n cm.setSelection(searchCursor.from(), searchCursor.to());\n lastPos = searchCursor.from();\n done = false;\n return;\n }\n\n done = true;\n }\n\n function stop(close) {\n if (close) {\n close();\n }\n\n cm.focus();\n\n if (lastPos) {\n cm.setCursor(lastPos);\n var vim = cm.state.vim;\n vim.exMode = false;\n vim.lastHPos = vim.lastHSPos = lastPos.ch;\n }\n\n if (callback) {\n callback();\n }\n }\n\n function onPromptKeyDown(e, _value, close) {\n // Swallow all keys.\n _cm_adapter2.default.e_stop(e);\n\n var keyName = _cm_adapter2.default.keyName(e);\n\n switch (keyName) {\n case 'y':\n case 'Y':\n replace();\n next();\n break;\n\n case 'n':\n case 'N':\n next();\n break;\n\n case 'a':\n case 'A':\n // replaceAll contains a call to close of its own. We don't want it\n // to fire too early or multiple times.\n var savedCallback = callback;\n callback = undefined;\n cm.operation(replaceAll);\n callback = savedCallback;\n break;\n\n case 'l':\n case 'L':\n replace();\n // fall through and exit.\n\n case 'q':\n case 'Q':\n case 'Esc':\n case 'Ctrl-C':\n case 'Ctrl-[':\n stop(close);\n break;\n }\n\n if (done) {\n stop(close);\n }\n\n return true;\n } // Actually do replace.\n\n\n next();\n\n if (done) {\n showConfirm(cm, 'No matches for ' + query.source);\n return;\n }\n\n if (!confirm) {\n replaceAll();\n\n if (callback) {\n callback();\n }\n\n return;\n }\n\n showPrompt(cm, {\n prefix: 'replace with ' + replaceWith + ' (y/n/a/q/l)',\n onKeyDown: onPromptKeyDown\n });\n }\n\n _cm_adapter2.default.keyMap.vim = {\n attach: attachVimMap,\n detach: detachVimMap,\n call: cmKey\n };\n\n function exitInsertMode(cm) {\n var vim = cm.state.vim;\n var macroModeState = vimGlobalState.macroModeState;\n var insertModeChangeRegister = vimGlobalState.registerController.getRegister('.');\n var isPlaying = macroModeState.isPlaying;\n var lastChange = macroModeState.lastInsertModeChanges; // In case of visual block, the insertModeChanges are not saved as a\n // single word, so we convert them to a single word\n // so as to update the \". register as expected in real vim.\n\n var text = [];\n\n if (!isPlaying) {\n var selLength = lastChange.inVisualBlock && vim.lastSelection ? vim.lastSelection.visualBlock.height : 1;\n var changes = lastChange.changes;\n var text = [];\n var i = 0; // In case of multiple selections in blockwise visual,\n // the inserted text, for example: 'foo', is stored as\n // 'f', 'f', InsertModeKey 'o', 'o', 'o', 'o'. (if you have a block with 2 lines).\n // We push the contents of the changes array as per the following:\n // 1. In case of InsertModeKey, just increment by 1.\n // 2. In case of a character, jump by selLength (2 in the example).\n\n while (i < changes.length) {\n // This loop will convert 'ffoooo' to 'foo'.\n text.push(changes[i]);\n\n if (changes[i] instanceof InsertModeKey) {\n i++;\n } else {\n i += selLength;\n }\n }\n\n lastChange.changes = text;\n cm.off('change', onChange);\n\n _cm_adapter2.default.off(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown);\n }\n\n if (!isPlaying && vim.insertModeRepeat > 1) {\n // Perform insert mode repeat for commands like 3,a and 3,o.\n _repeatLastEdit(cm, vim, vim.insertModeRepeat - 1, true\n /** repeatForInsert */\n );\n\n vim.lastEditInputState.repeatOverride = vim.insertModeRepeat;\n }\n\n delete vim.insertModeRepeat;\n vim.insertMode = false;\n cm.setCursor(cm.getCursor().line, cm.getCursor().ch - 1);\n cm.setOption('keyMap', 'vim');\n cm.setOption('disableInput', true);\n cm.toggleOverwrite(false); // exit replace mode if we were in it.\n // update the \". register before exiting insert mode\n\n insertModeChangeRegister.setText(lastChange.changes.join(''));\n\n _cm_adapter2.default.signal(cm, \"vim-mode-change\", {\n mode: \"normal\"\n });\n\n if (macroModeState.isRecording) {\n logInsertModeChange(macroModeState);\n }\n\n cm.enterVimMode();\n }\n\n function _mapCommand(command) {\n defaultKeymap.unshift(command);\n }\n\n function mapCommand(keys, type, name, args, extra) {\n var command = {\n keys: keys,\n type: type\n };\n command[type] = name;\n command[type + \"Args\"] = args;\n\n for (var key in extra) {\n command[key] = extra[key];\n }\n\n _mapCommand(command);\n } // The timeout in milliseconds for the two-character ESC keymap should be\n // adjusted according to your typing speed to prevent false positives.\n\n\n defineOption('insertModeEscKeysTimeout', 200, 'number');\n _cm_adapter2.default.keyMap['vim-insert'] = {\n // TODO: override navigation keys so that Esc will cancel automatic\n // indentation from o, O, i_\n fallthrough: ['default'],\n attach: attachVimMap,\n detach: detachVimMap,\n call: cmKey\n };\n _cm_adapter2.default.keyMap['vim-replace'] = {\n 'Backspace': 'goCharLeft',\n fallthrough: ['vim-insert'],\n attach: attachVimMap,\n detach: detachVimMap,\n call: cmKey\n };\n\n function executeMacroRegister(cm, vim, macroModeState, registerName) {\n var register = vimGlobalState.registerController.getRegister(registerName);\n\n if (registerName == ':') {\n // Read-only register containing last Ex command.\n if (register.keyBuffer[0]) {\n exCommandDispatcher.processCommand(cm, register.keyBuffer[0]);\n }\n\n macroModeState.isPlaying = false;\n return;\n }\n\n var keyBuffer = register.keyBuffer;\n var imc = 0;\n macroModeState.isPlaying = true;\n macroModeState.replaySearchQueries = register.searchQueries.slice(0);\n\n for (var i = 0; i < keyBuffer.length; i++) {\n var text = keyBuffer[i];\n var match, key;\n\n while (text) {\n // Pull off one command key, which is either a single character\n // or a special sequence wrapped in '<' and '>', e.g. ''.\n match = /<\\w+-.+?>|<\\w+>|./.exec(text);\n key = match[0];\n text = text.substring(match.index + key.length);\n\n _cm_adapter2.default.Vim.handleKey(cm, key, 'macro');\n\n if (vim.insertMode) {\n var changes = register.insertModeChanges[imc++].changes;\n vimGlobalState.macroModeState.lastInsertModeChanges.changes = changes;\n repeatInsertModeChanges(cm, changes, 1);\n exitInsertMode(cm);\n }\n }\n }\n\n macroModeState.isPlaying = false;\n }\n\n function logKey(macroModeState, key) {\n if (macroModeState.isPlaying) {\n return;\n }\n\n var registerName = macroModeState.latestRegister;\n var register = vimGlobalState.registerController.getRegister(registerName);\n\n if (register) {\n register.pushText(key);\n }\n }\n\n function logInsertModeChange(macroModeState) {\n if (macroModeState.isPlaying) {\n return;\n }\n\n var registerName = macroModeState.latestRegister;\n var register = vimGlobalState.registerController.getRegister(registerName);\n\n if (register && register.pushInsertModeChanges) {\n register.pushInsertModeChanges(macroModeState.lastInsertModeChanges);\n }\n }\n\n function logSearchQuery(macroModeState, query) {\n if (macroModeState.isPlaying) {\n return;\n }\n\n var registerName = macroModeState.latestRegister;\n var register = vimGlobalState.registerController.getRegister(registerName);\n\n if (register && register.pushSearchQuery) {\n register.pushSearchQuery(query);\n }\n }\n /**\n * Listens for changes made in insert mode.\n * Should only be active in insert mode.\n */\n\n\n function onChange(cm, changeObj) {\n var macroModeState = vimGlobalState.macroModeState;\n var lastChange = macroModeState.lastInsertModeChanges;\n\n if (!macroModeState.isPlaying) {\n while (changeObj) {\n lastChange.expectCursorActivityForChange = true;\n\n if (changeObj.origin == '+input' || changeObj.origin == 'paste' || changeObj.origin === undefined\n /* only in testing */\n ) {\n var text = changeObj.text.join('\\n');\n\n if (lastChange.maybeReset) {\n lastChange.changes = [];\n lastChange.maybeReset = false;\n }\n\n if (cm.state.overwrite && !/\\n/.test(text)) {\n lastChange.changes.push([text]);\n } else {\n lastChange.changes.push(text);\n }\n } // Change objects may be chained with next.\n\n\n changeObj = changeObj.next;\n }\n }\n }\n /**\n * Listens for any kind of cursor activity on CodeMirror.\n */\n\n\n function onCursorActivity(cm) {\n var vim = cm.state.vim;\n\n if (vim.insertMode) {\n // Tracking cursor activity in insert mode (for macro support).\n var macroModeState = vimGlobalState.macroModeState;\n\n if (macroModeState.isPlaying) {\n return;\n }\n\n var lastChange = macroModeState.lastInsertModeChanges;\n\n if (lastChange.expectCursorActivityForChange) {\n lastChange.expectCursorActivityForChange = false;\n } else {\n // Cursor moved outside the context of an edit. Reset the change.\n lastChange.maybeReset = true;\n }\n } else if (!cm.curOp.isVimOp) {\n handleExternalSelection(cm, vim);\n }\n\n if (vim.visualMode) {\n updateFakeCursor(cm);\n }\n }\n\n function updateFakeCursor(cm) {\n var vim = cm.state.vim;\n var from = clipCursorToContent(cm, copyCursor(vim.sel.head));\n var to = offsetCursor(from, 0, 1);\n\n if (vim.fakeCursor) {\n vim.fakeCursor.clear();\n }\n\n vim.fakeCursor = cm.markText(from, to, {\n className: 'cm-animate-fat-cursor'\n });\n }\n\n function handleExternalSelection(cm, vim) {\n var anchor = cm.getCursor('anchor');\n var head = cm.getCursor('head'); // Enter or exit visual mode to match mouse selection.\n\n if (vim.visualMode && !cm.somethingSelected()) {\n exitVisualMode(cm, false);\n } else if (!vim.visualMode && !vim.insertMode && cm.somethingSelected()) {\n vim.visualMode = true;\n vim.visualLine = false;\n\n _cm_adapter2.default.signal(cm, \"vim-mode-change\", {\n mode: \"visual\"\n });\n }\n\n if (vim.visualMode) {\n // Bind CodeMirror selection model to vim selection model.\n // Mouse selections are considered visual characterwise.\n var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0;\n var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0;\n head = offsetCursor(head, 0, headOffset);\n anchor = offsetCursor(anchor, 0, anchorOffset);\n vim.sel = {\n anchor: anchor,\n head: head\n };\n updateMark(cm, vim, '<', cursorMin(head, anchor));\n updateMark(cm, vim, '>', cursorMax(head, anchor));\n } else if (!vim.insertMode) {\n // Reset lastHPos if selection was modified by something outside of vim mode e.g. by mouse.\n vim.lastHPos = cm.getCursor().ch;\n }\n }\n /** Wrapper for special keys pressed in insert mode */\n\n\n function InsertModeKey(keyName) {\n this.keyName = keyName;\n }\n /**\n * Handles raw key down events from the text area.\n * - Should only be active in insert mode.\n * - For recording deletes in insert mode.\n */\n\n\n function onKeyEventTargetKeyDown(e) {\n var macroModeState = vimGlobalState.macroModeState;\n var lastChange = macroModeState.lastInsertModeChanges;\n\n var keyName = _cm_adapter2.default.keyName(e);\n\n if (!keyName) {\n return;\n }\n\n function onKeyFound() {\n if (lastChange.maybeReset) {\n lastChange.changes = [];\n lastChange.maybeReset = false;\n }\n\n lastChange.changes.push(new InsertModeKey(keyName));\n return true;\n }\n\n if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) {\n _cm_adapter2.default.lookupKey(keyName, 'vim-insert', onKeyFound);\n }\n }\n /**\n * Repeats the last edit, which includes exactly 1 command and at most 1\n * insert. Operator and motion commands are read from lastEditInputState,\n * while action commands are read from lastEditActionCommand.\n *\n * If repeatForInsert is true, then the function was called by\n * exitInsertMode to repeat the insert mode changes the user just made. The\n * corresponding enterInsertMode call was made with a count.\n */\n\n\n function _repeatLastEdit(cm, vim, repeat, repeatForInsert) {\n var macroModeState = vimGlobalState.macroModeState;\n macroModeState.isPlaying = true;\n var isAction = !!vim.lastEditActionCommand;\n var cachedInputState = vim.inputState;\n\n function repeatCommand() {\n if (isAction) {\n commandDispatcher.processAction(cm, vim, vim.lastEditActionCommand);\n } else {\n commandDispatcher.evalInput(cm, vim);\n }\n }\n\n function repeatInsert(repeat) {\n if (macroModeState.lastInsertModeChanges.changes.length > 0) {\n // For some reason, repeat cw in desktop VIM does not repeat\n // insert mode changes. Will conform to that behavior.\n repeat = !vim.lastEditActionCommand ? 1 : repeat;\n var changeObject = macroModeState.lastInsertModeChanges;\n repeatInsertModeChanges(cm, changeObject.changes, repeat);\n }\n }\n\n vim.inputState = vim.lastEditInputState;\n\n if (isAction && vim.lastEditActionCommand.interlaceInsertRepeat) {\n // o and O repeat have to be interlaced with insert repeats so that the\n // insertions appear on separate lines instead of the last line.\n for (var i = 0; i < repeat; i++) {\n repeatCommand();\n repeatInsert(1);\n }\n } else {\n if (!repeatForInsert) {\n // Hack to get the cursor to end up at the right place. If I is\n // repeated in insert mode repeat, cursor will be 1 insert\n // change set left of where it should be.\n repeatCommand();\n }\n\n repeatInsert(repeat);\n }\n\n vim.inputState = cachedInputState;\n\n if (vim.insertMode && !repeatForInsert) {\n // Don't exit insert mode twice. If repeatForInsert is set, then we\n // were called by an exitInsertMode call lower on the stack.\n exitInsertMode(cm);\n }\n\n macroModeState.isPlaying = false;\n }\n\n function repeatInsertModeChanges(cm, changes, repeat) {\n function keyHandler(binding) {\n if (typeof binding == 'string') {\n _cm_adapter2.default.commands[binding](cm);\n } else {\n binding(cm);\n }\n\n return true;\n }\n\n var head = cm.getCursor('head');\n var inVisualBlock = vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock;\n\n if (inVisualBlock) {\n // Set up block selection again for repeating the changes.\n var vim = cm.state.vim;\n var lastSel = vim.lastSelection;\n var offset = getOffset(lastSel.anchor, lastSel.head);\n selectForInsert(cm, head, offset.line + 1);\n repeat = cm.listSelections().length;\n cm.setCursor(head);\n }\n\n for (var i = 0; i < repeat; i++) {\n if (inVisualBlock) {\n cm.setCursor(offsetCursor(head, i, 0));\n }\n\n for (var j = 0; j < changes.length; j++) {\n var change = changes[j];\n\n if (change instanceof InsertModeKey) {\n _cm_adapter2.default.lookupKey(change.keyName, 'vim-insert', keyHandler);\n } else if (typeof change == \"string\") {\n var cur = cm.getCursor();\n cm.replaceRange(change, cur, cur);\n } else {\n var start = cm.getCursor();\n var end = offsetCursor(start, 0, change[0].length);\n cm.replaceRange(change[0], start, end);\n }\n }\n }\n\n if (inVisualBlock) {\n cm.setCursor(offsetCursor(head, 0, 1));\n }\n }\n\n resetVimGlobalState();\n return vimApi;\n};\n\n_cm_adapter2.default.Vim = Vim();\nexports.Vim = Vim;\nexports.default = _cm_adapter2.default;"],"sourceRoot":""} \ No newline at end of file diff --git a/15-d3fb2b6d4cda0937e9c0.js b/15-d3fb2b6d4cda0937e9c0.js new file mode 100644 index 0000000..3b7b41f --- /dev/null +++ b/15-d3fb2b6d4cda0937e9c0.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[15,68],{"7Xl7":function(e,n,t){"use strict";t.r(n),t.d(n,"conf",(function(){return i})),t.d(n,"language",(function(){return r}));var o=t("87dK"),i=("undefined"==typeof monaco?self.monaco:monaco,o.conf),r={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:o.language.operators,symbols:o.language.symbols,escapes:o.language.escapes,digits:o.language.digits,octaldigits:o.language.octaldigits,binarydigits:o.language.binarydigits,hexdigits:o.language.hexdigits,regexpctl:o.language.regexpctl,regexpesc:o.language.regexpesc,tokenizer:o.language.tokenizer}},"87dK":function(e,n,t){"use strict";t.r(n),t.d(n,"conf",(function(){return i})),t.d(n,"language",(function(){return r}));var o="undefined"==typeof monaco?self.monaco:monaco,i={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:o.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:o.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:o.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:o.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},r={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","as","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","package","private","protected","public","readonly","require","global","return","set","static","super","switch","symbol","this","throw","true","try","type","typeof","unique","var","void","while","with","yield","async","await","of"],typeKeywords:["any","boolean","number","object","string","undefined"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}}}]); +//# sourceMappingURL=15-d3fb2b6d4cda0937e9c0.js.map \ No newline at end of file diff --git a/15-d3fb2b6d4cda0937e9c0.js.map b/15-d3fb2b6d4cda0937e9c0.js.map new file mode 100644 index 0000000..4a0e3ed --- /dev/null +++ b/15-d3fb2b6d4cda0937e9c0.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.js","webpack:///./node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.js"],"names":["conf","monaco","self","language","defaultToken","tokenPostfix","keywords","typeKeywords","operators","symbols","escapes","digits","octaldigits","binarydigits","hexdigits","regexpctl","regexpesc","tokenizer","_monaco","wordPattern","comments","lineComment","blockComment","brackets","onEnterRules","beforeText","afterText","action","indentAction","languages","IndentAction","IndentOutdent","appendText","None","removeText","autoClosingPairs","open","close","notIn","folding","markers","start","RegExp","end","root","include","common","cases","token","bracket","next","whitespace","comment","jsdoc","regexp","regexrange","string_double","string_single","string_backtick","bracketCounting"],"mappings":"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","file":"15-d3fb2b6d4cda0937e9c0.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nimport { conf as tsConf, language as tsLanguage } from '../typescript/typescript.js'; // Allow for running under nodejs/requirejs in tests\n\nvar _monaco = typeof monaco === 'undefined' ? self.monaco : monaco;\n\nexport var conf = tsConf;\nexport var language = {\n // Set defaultToken to invalid to see what you do not tokenize yet\n defaultToken: 'invalid',\n tokenPostfix: '.js',\n keywords: ['break', 'case', 'catch', 'class', 'continue', 'const', 'constructor', 'debugger', 'default', 'delete', 'do', 'else', 'export', 'extends', 'false', 'finally', 'for', 'from', 'function', 'get', 'if', 'import', 'in', 'instanceof', 'let', 'new', 'null', 'return', 'set', 'super', 'switch', 'symbol', 'this', 'throw', 'true', 'try', 'typeof', 'undefined', 'var', 'void', 'while', 'with', 'yield', 'async', 'await', 'of'],\n typeKeywords: [],\n operators: tsLanguage.operators,\n symbols: tsLanguage.symbols,\n escapes: tsLanguage.escapes,\n digits: tsLanguage.digits,\n octaldigits: tsLanguage.octaldigits,\n binarydigits: tsLanguage.binarydigits,\n hexdigits: tsLanguage.hexdigits,\n regexpctl: tsLanguage.regexpctl,\n regexpesc: tsLanguage.regexpesc,\n tokenizer: tsLanguage.tokenizer\n};","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict'; // Allow for running under nodejs/requirejs in tests\n\nvar _monaco = typeof monaco === 'undefined' ? self.monaco : monaco;\n\nexport var conf = {\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g,\n comments: {\n lineComment: '//',\n blockComment: ['/*', '*/']\n },\n brackets: [['{', '}'], ['[', ']'], ['(', ')']],\n onEnterRules: [{\n // e.g. /** | */\n beforeText: /^\\s*\\/\\*\\*(?!\\/)([^\\*]|\\*(?!\\/))*$/,\n afterText: /^\\s*\\*\\/$/,\n action: {\n indentAction: _monaco.languages.IndentAction.IndentOutdent,\n appendText: ' * '\n }\n }, {\n // e.g. /** ...|\n beforeText: /^\\s*\\/\\*\\*(?!\\/)([^\\*]|\\*(?!\\/))*$/,\n action: {\n indentAction: _monaco.languages.IndentAction.None,\n appendText: ' * '\n }\n }, {\n // e.g. * ...|\n beforeText: /^(\\t|(\\ \\ ))*\\ \\*(\\ ([^\\*]|\\*(?!\\/))*)?$/,\n action: {\n indentAction: _monaco.languages.IndentAction.None,\n appendText: '* '\n }\n }, {\n // e.g. */|\n beforeText: /^(\\t|(\\ \\ ))*\\ \\*\\/\\s*$/,\n action: {\n indentAction: _monaco.languages.IndentAction.None,\n removeText: 1\n }\n }],\n autoClosingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\"',\n close: '\"',\n notIn: ['string']\n }, {\n open: '\\'',\n close: '\\'',\n notIn: ['string', 'comment']\n }, {\n open: '`',\n close: '`',\n notIn: ['string', 'comment']\n }, {\n open: \"/**\",\n close: \" */\",\n notIn: [\"string\"]\n }],\n folding: {\n markers: {\n start: new RegExp(\"^\\\\s*//\\\\s*#?region\\\\b\"),\n end: new RegExp(\"^\\\\s*//\\\\s*#?endregion\\\\b\")\n }\n }\n};\nexport var language = {\n // Set defaultToken to invalid to see what you do not tokenize yet\n defaultToken: 'invalid',\n tokenPostfix: '.ts',\n keywords: ['abstract', 'as', 'break', 'case', 'catch', 'class', 'continue', 'const', 'constructor', 'debugger', 'declare', 'default', 'delete', 'do', 'else', 'enum', 'export', 'extends', 'false', 'finally', 'for', 'from', 'function', 'get', 'if', 'implements', 'import', 'in', 'infer', 'instanceof', 'interface', 'is', 'keyof', 'let', 'module', 'namespace', 'never', 'new', 'null', 'package', 'private', 'protected', 'public', 'readonly', 'require', 'global', 'return', 'set', 'static', 'super', 'switch', 'symbol', 'this', 'throw', 'true', 'try', 'type', 'typeof', 'unique', 'var', 'void', 'while', 'with', 'yield', 'async', 'await', 'of'],\n typeKeywords: ['any', 'boolean', 'number', 'object', 'string', 'undefined'],\n operators: ['<=', '>=', '==', '!=', '===', '!==', '=>', '+', '-', '**', '*', '/', '%', '++', '--', '<<', '>', '>>>', '&', '|', '^', '!', '~', '&&', '||', '?', ':', '=', '+=', '-=', '*=', '**=', '/=', '%=', '<<=', '>>=', '>>>=', '&=', '|=', '^=', '@'],\n // we include these common regular expressions\n symbols: /[=>](?!@symbols)/, '@brackets'], [/!(?=([^=]|$))/, 'delimiter'], [/@symbols/, {\n cases: {\n '@operators': 'delimiter',\n '@default': ''\n }\n }], // numbers\n [/(@digits)[eE]([\\-+]?(@digits))?/, 'number.float'], [/(@digits)\\.(@digits)([eE][\\-+]?(@digits))?/, 'number.float'], [/0[xX](@hexdigits)n?/, 'number.hex'], [/0[oO]?(@octaldigits)n?/, 'number.octal'], [/0[bB](@binarydigits)n?/, 'number.binary'], [/(@digits)n?/, 'number'], // delimiter: after number because of .\\d floats\n [/[;,.]/, 'delimiter'], // strings\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'], [/'([^'\\\\]|\\\\.)*$/, 'string.invalid'], [/\"/, 'string', '@string_double'], [/'/, 'string', '@string_single'], [/`/, 'string', '@string_backtick']],\n whitespace: [[/[ \\t\\r\\n]+/, ''], [/\\/\\*\\*(?!\\/)/, 'comment.doc', '@jsdoc'], [/\\/\\*/, 'comment', '@comment'], [/\\/\\/.*$/, 'comment']],\n comment: [[/[^\\/*]+/, 'comment'], [/\\*\\//, 'comment', '@pop'], [/[\\/*]/, 'comment']],\n jsdoc: [[/[^\\/*]+/, 'comment.doc'], [/\\*\\//, 'comment.doc', '@pop'], [/[\\/*]/, 'comment.doc']],\n // We match regular expression quite precisely\n regexp: [[/(\\{)(\\d+(?:,\\d*)?)(\\})/, ['regexp.escape.control', 'regexp.escape.control', 'regexp.escape.control']], [/(\\[)(\\^?)(?=(?:[^\\]\\\\\\/]|\\\\.)+)/, ['regexp.escape.control', {\n token: 'regexp.escape.control',\n next: '@regexrange'\n }]], [/(\\()(\\?:|\\?=|\\?!)/, ['regexp.escape.control', 'regexp.escape.control']], [/[()]/, 'regexp.escape.control'], [/@regexpctl/, 'regexp.escape.control'], [/[^\\\\\\/]/, 'regexp'], [/@regexpesc/, 'regexp.escape'], [/\\\\\\./, 'regexp.invalid'], [/(\\/)([gimsuy]*)/, [{\n token: 'regexp',\n bracket: '@close',\n next: '@pop'\n }, 'keyword.other']]],\n regexrange: [[/-/, 'regexp.escape.control'], [/\\^/, 'regexp.invalid'], [/@regexpesc/, 'regexp.escape'], [/[^\\]]/, 'regexp'], [/\\]/, {\n token: 'regexp.escape.control',\n next: '@pop',\n bracket: '@close'\n }]],\n string_double: [[/[^\\\\\"]+/, 'string'], [/@escapes/, 'string.escape'], [/\\\\./, 'string.escape.invalid'], [/\"/, 'string', '@pop']],\n string_single: [[/[^\\\\']+/, 'string'], [/@escapes/, 'string.escape'], [/\\\\./, 'string.escape.invalid'], [/'/, 'string', '@pop']],\n string_backtick: [[/\\$\\{/, {\n token: 'delimiter.bracket',\n next: '@bracketCounting'\n }], [/[^\\\\`$]+/, 'string'], [/@escapes/, 'string.escape'], [/\\\\./, 'string.escape.invalid'], [/`/, 'string', '@pop']],\n bracketCounting: [[/\\{/, 'delimiter.bracket', '@bracketCounting'], [/\\}/, 'delimiter.bracket', '@pop'], {\n include: 'common'\n }]\n }\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/16-6013898f3d0aaadc484c.js b/16-6013898f3d0aaadc484c.js new file mode 100644 index 0000000..e6283b6 --- /dev/null +++ b/16-6013898f3d0aaadc484c.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{"6Xso":function(e,n,t){"use strict";t.r(n),t.d(n,"conf",(function(){return o})),t.d(n,"language",(function(){return s}));var o={comments:{lineComment:"*"},brackets:[["[","]"],["(",")"]]},s={defaultToken:"invalid",ignoreCase:!0,tokenPostfix:".abap",keywords:["abstract","add","add-corresponding","adjacent","alias","aliases","all","append","appending","ascending","as","assert","assign","assigned","assigning","association","authority-check","back","begin","binary","block","bound","break-point","by","byte","class","call","cast","changing","check","class-data","class-method","class-methods","clear","close","cnt","collect","commit","cond","character","corresponding","communication","component","compute","concatenate","condense","constants","conv","count","controls","convert","create","currency","data","descending","default","define","deferred","delete","describe","detail","display","divide","divide-corresponding","display-mode","duplicates","deleting","editor-call","end","endexec","endfunction","ending","endmodule","end-of-definition","end-of-page","end-of-selection","end-test-injection","end-test-seam","exit-command","endclass","endmethod","endform","endinterface","endprovide","endselect","endtry","endwhile","enum","event","events","exec","exit","export","exporting","extract","exception","exceptions","field-symbols","field-groups","field","first","fetch","fields","format","frame","free","from","function","find","for","found","function-pool","generate","get","handle","hide","hashed","include","import","importing","index","infotypes","initial","initialization","id","is","in","interface","interfaces","init","input","insert","instance","into","key","left-justified","leave","like","line","line-count","line-size","load","local","log-point","length","left","leading","lower","matchcode","method","mesh","message","message-id","methods","modify","module","move","move-corresponding","multiply","multiply-corresponding","match","new","new-line","new-page","new-section","next","no","no-gap","no-gaps","no-sign","no-zero","non-unique","number","occurrence","object","obligatory","of","output","overlay","optional","others","occurrences","occurs","offset","options","pack","parameters","perform","places","position","print-control","private","program","protected","provide","public","put","radiobutton","raising","ranges","receive","receiving","redefinition","reduce","reference","refresh","regex","reject","results","requested","ref","replace","report","reserve","restore","result","return","returning","right-justified","rollback","read","read-only","rp-provide-from-last","run","scan","screen","scroll","search","select","select-options","selection-screen","stamp","source","subkey","separated","set","shift","single","skip","sort","sorted","split","standard","stamp","starting","start-of-selection","sum","subtract-corresponding","statics","step","stop","structure","submatches","submit","subtract","summary","supplied","suppress","section","syntax-check","syntax-trace","system-call","switch","tables","table","task","testing","test-seam","test-injection","then","time","times","title","titlebar","to","top-of-page","trailing","transfer","transformation","translate","transporting","types","type","type-pool","type-pools","unassign","unique","uline","unpack","update","upper","using","value","when","while","window","write","where","with","work","at","case","catch","continue","do","elseif","else","endat","endcase","enddo","endif","endloop","endon","if","loop","on","raise","try","abs","sign","ceil","floor","trunc","frac","acos","asin","atan","cos","sin","tan","cosh","sinh","tanh","exp","log","log10","sqrt","strlen","xstrlen","charlen","lines","numofchar","dbmaxlen","round","rescale","nmax","nmin","cmax","cmin","boolc","boolx","xsdbool","contains","contains_any_of","contains_any_not_of","matches","line_exists","ipow","char_off","count","count_any_of","count_any_not_of","distance","condense","concat_lines_of","escape","find","find_end","find_any_of","find_any_not_of","insert","match","repeat","replace","reverse","segment","shift_left","shift_right","substring","substring_after","substring_from","substring_before","substring_to","to_upper","to_lower","to_mixed","from_mixed","translate","bit-set","line_index","definition","implementation","public","inheriting","final"],typeKeywords:["abap_bool","string","xstring","any","clike","csequence","numeric","xsequence","c","n","i","p","f","d","t","x"],operators:["+","-","/","*","=","<",">","<=",">=","<>","><","=<","=>","EQ","NE","GE","LE","CS","CN","CA","CO","CP","NS","NA","NP"],symbols:/[=>', '<=', '>=', '<>', '><', '=<', '=>', 'EQ', 'NE', 'GE', 'LE', 'CS', 'CN', 'CA', 'CO', 'CP', 'NS', 'NA', 'NP'],\n symbols: /[=>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},s=[];["abstract","activate","and","any","array","as","asc","assert","autonomous","begin","bigdecimal","blob","boolean","break","bulk","by","case","cast","catch","char","class","collect","commit","const","continue","convertcurrency","decimal","default","delete","desc","do","double","else","end","enum","exception","exit","export","extends","false","final","finally","float","for","from","future","get","global","goto","group","having","hint","if","implements","import","in","inner","insert","instanceof","int","interface","into","join","last_90_days","last_month","last_n_days","last_week","like","limit","list","long","loop","map","merge","native","new","next_90_days","next_month","next_n_days","next_week","not","null","nulls","number","object","of","on","or","outer","override","package","parallel","pragma","private","protected","public","retrieve","return","returning","rollback","savepoint","search","select","set","short","sort","stat","static","strictfp","super","switch","synchronized","system","testmethod","then","this","this_month","this_week","throw","throws","today","tolabel","tomorrow","transaction","transient","trigger","true","try","type","undelete","update","upsert","using","virtual","void","volatile","webservice","when","where","while","yesterday"].forEach((function(e){s.push(e),s.push(e.toUpperCase()),s.push(function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(e))}));var i={defaultToken:"",tokenPostfix:".apex",keywords:s,operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@apexdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],apexdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}}}]); +//# sourceMappingURL=17-b3f813617e1c0be45d36.js.map \ No newline at end of file diff --git a/17-b3f813617e1c0be45d36.js.map b/17-b3f813617e1c0be45d36.js.map new file mode 100644 index 0000000..e61244b --- /dev/null +++ b/17-b3f813617e1c0be45d36.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.js"],"names":["conf","wordPattern","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","surroundingPairs","folding","markers","start","RegExp","end","keywordsWithCaseVariations","forEach","lowercase","push","toUpperCase","charAt","substr","uppercaseFirstLetter","language","defaultToken","tokenPostfix","keywords","operators","symbols","escapes","digits","octaldigits","binarydigits","hexdigits","tokenizer","root","cases","token","include","whitespace","comment","apexdoc","string","next"],"mappings":"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","file":"17-b3f813617e1c0be45d36.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nexport var conf = {\n // the default separators except `@$`\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g,\n comments: {\n lineComment: '//',\n blockComment: ['/*', '*/']\n },\n brackets: [['{', '}'], ['[', ']'], ['(', ')']],\n autoClosingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\"',\n close: '\"'\n }, {\n open: '\\'',\n close: '\\''\n }],\n surroundingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\"',\n close: '\"'\n }, {\n open: '\\'',\n close: '\\''\n }, {\n open: '<',\n close: '>'\n }],\n folding: {\n markers: {\n start: new RegExp(\"^\\\\s*//\\\\s*(?:(?:#?region\\\\b)|(?:))\")\n }\n }\n};\nvar keywords = ['abstract', 'activate', 'and', 'any', 'array', 'as', 'asc', 'assert', 'autonomous', 'begin', 'bigdecimal', 'blob', 'boolean', 'break', 'bulk', 'by', 'case', 'cast', 'catch', 'char', 'class', 'collect', 'commit', 'const', 'continue', 'convertcurrency', 'decimal', 'default', 'delete', 'desc', 'do', 'double', 'else', 'end', 'enum', 'exception', 'exit', 'export', 'extends', 'false', 'final', 'finally', 'float', 'for', 'from', 'future', 'get', 'global', 'goto', 'group', 'having', 'hint', 'if', 'implements', 'import', 'in', 'inner', 'insert', 'instanceof', 'int', 'interface', 'into', 'join', 'last_90_days', 'last_month', 'last_n_days', 'last_week', 'like', 'limit', 'list', 'long', 'loop', 'map', 'merge', 'native', 'new', 'next_90_days', 'next_month', 'next_n_days', 'next_week', 'not', 'null', 'nulls', 'number', 'object', 'of', 'on', 'or', 'outer', 'override', 'package', 'parallel', 'pragma', 'private', 'protected', 'public', 'retrieve', 'return', 'returning', 'rollback', 'savepoint', 'search', 'select', 'set', 'short', 'sort', 'stat', 'static', 'strictfp', 'super', 'switch', 'synchronized', 'system', 'testmethod', 'then', 'this', 'this_month', 'this_week', 'throw', 'throws', 'today', 'tolabel', 'tomorrow', 'transaction', 'transient', 'trigger', 'true', 'try', 'type', 'undelete', 'update', 'upsert', 'using', 'virtual', 'void', 'volatile', 'webservice', 'when', 'where', 'while', 'yesterday']; // create case variations of the keywords - apex is case insensitive, but we can't make the highlighter case insensitive\n// because we use a heuristic to assume that identifiers starting with an upper case letter are types.\n\nvar uppercaseFirstLetter = function uppercaseFirstLetter(lowercase) {\n return lowercase.charAt(0).toUpperCase() + lowercase.substr(1);\n};\n\nvar keywordsWithCaseVariations = [];\nkeywords.forEach(function (lowercase) {\n keywordsWithCaseVariations.push(lowercase);\n keywordsWithCaseVariations.push(lowercase.toUpperCase());\n keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase));\n});\nexport var language = {\n defaultToken: '',\n tokenPostfix: '.apex',\n keywords: keywordsWithCaseVariations,\n operators: ['=', '>', '<', '!', '~', '?', ':', '==', '<=', '>=', '!=', '&&', '||', '++', '--', '+', '-', '*', '/', '&', '|', '^', '%', '<<', '>>', '>>>', '+=', '-=', '*=', '/=', '&=', '|=', '^=', '%=', '<<=', '>>=', '>>>='],\n // we include these common regular expressions\n symbols: /[=>](?!@symbols)/, '@brackets'], [/@symbols/, {\n cases: {\n '@operators': 'delimiter',\n '@default': ''\n }\n }], // @ annotations.\n [/@\\s*[a-zA-Z_\\$][\\w\\$]*/, 'annotation'], // numbers\n [/(@digits)[eE]([\\-+]?(@digits))?[fFdD]?/, 'number.float'], [/(@digits)\\.(@digits)([eE][\\-+]?(@digits))?[fFdD]?/, 'number.float'], [/(@digits)[fFdD]/, 'number.float'], [/(@digits)[lL]?/, 'number'], // delimiter: after number because of .\\d floats\n [/[;,.]/, 'delimiter'], // strings\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'], [/'([^'\\\\]|\\\\.)*$/, 'string.invalid'], [/\"/, 'string', '@string.\"'], [/'/, 'string', '@string.\\''], // characters\n [/'[^\\\\']'/, 'string'], [/(')(@escapes)(')/, ['string', 'string.escape', 'string']], [/'/, 'string.invalid']],\n whitespace: [[/[ \\t\\r\\n]+/, ''], [/\\/\\*\\*(?!\\/)/, 'comment.doc', '@apexdoc'], [/\\/\\*/, 'comment', '@comment'], [/\\/\\/.*$/, 'comment']],\n comment: [[/[^\\/*]+/, 'comment'], // [/\\/\\*/, 'comment', '@push' ], // nested comment not allowed :-(\n // [/\\/\\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/\n [/\\*\\//, 'comment', '@pop'], [/[\\/*]/, 'comment']],\n //Identical copy of comment above, except for the addition of .doc\n apexdoc: [[/[^\\/*]+/, 'comment.doc'], [/\\*\\//, 'comment.doc', '@pop'], [/[\\/*]/, 'comment.doc']],\n string: [[/[^\\\\\"']+/, 'string'], [/@escapes/, 'string.escape'], [/\\\\./, 'string.escape.invalid'], [/[\"']/, {\n cases: {\n '$#==$S2': {\n token: 'string',\n next: '@pop'\n },\n '@default': 'string'\n }\n }]]\n }\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/18-3ff3ff57036fb20bb442.js b/18-3ff3ff57036fb20bb442.js new file mode 100644 index 0000000..b22de51 --- /dev/null +++ b/18-3ff3ff57036fb20bb442.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{NlLO:function(e,t,n){"use strict";n.r(t),n.d(t,"conf",(function(){return o})),n.d(t,"language",(function(){return s}));var o={comments:{lineComment:"#"}},s={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}}}}]); +//# sourceMappingURL=18-3ff3ff57036fb20bb442.js.map \ No newline at end of file diff --git a/18-3ff3ff57036fb20bb442.js.map b/18-3ff3ff57036fb20bb442.js.map new file mode 100644 index 0000000..691787a --- /dev/null +++ b/18-3ff3ff57036fb20bb442.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.js"],"names":["conf","comments","lineComment","language","defaultToken","ignoreCase","tokenPostfix","str","tokenizer","root","include","cases","token","next","type","comment"],"mappings":"4FAAA,qFAMO,IAAIA,EAAO,CAChBC,SAAU,CACRC,YAAa,MAGNC,EAAW,CACpBC,aAAc,UACdC,YAAY,EACZC,aAAc,SACdC,IAAK,SACLC,UAAW,CACTC,KAAM,CAAC,CACLC,QAAS,YACR,CAAC,eAAgB,CAClBC,MAAO,CACL,OAAQ,CACNC,MAAO,iBACPC,KAAM,WAER,WAAY,CACVD,MAAO,iBACPC,KAAM,YAGR,CAAC,cAAe,CAClBF,MAAO,CACL,OAAQ,CACNC,MAAO,iBACPC,KAAM,WAER,WAAY,CACVD,MAAO,iBACPC,KAAM,aAIZC,KAAM,CAAC,CACLJ,QAAS,YACR,CAAC,aAAc,CAChBC,MAAO,CACL,OAAQ,CACNC,MAAO,iBACPC,KAAM,WAER,WAAY,oBAEZ,CAAC,WAAY,CACfF,MAAO,CACL,OAAQ,CACNC,MAAO,SACPC,KAAM,WAER,WAAY,aAGhBE,QAAS,CAAC,CAAC,OAAQ,CACjBJ,MAAO,CACL,OAAQ,CACNC,MAAO,UACPC,KAAM","file":"18-3ff3ff57036fb20bb442.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nexport var conf = {\n comments: {\n lineComment: '#'\n }\n};\nexport var language = {\n defaultToken: 'keyword',\n ignoreCase: true,\n tokenPostfix: '.azcli',\n str: /[^#\\s]/,\n tokenizer: {\n root: [{\n include: '@comment'\n }, [/\\s-+@str*\\s*/, {\n cases: {\n '@eos': {\n token: 'key.identifier',\n next: '@popall'\n },\n '@default': {\n token: 'key.identifier',\n next: '@type'\n }\n }\n }], [/^-+@str*\\s*/, {\n cases: {\n '@eos': {\n token: 'key.identifier',\n next: '@popall'\n },\n '@default': {\n token: 'key.identifier',\n next: '@type'\n }\n }\n }]],\n type: [{\n include: '@comment'\n }, [/-+@str*\\s*/, {\n cases: {\n '@eos': {\n token: 'key.identifier',\n next: '@popall'\n },\n '@default': 'key.identifier'\n }\n }], [/@str+\\s*/, {\n cases: {\n '@eos': {\n token: 'string',\n next: '@popall'\n },\n '@default': 'string'\n }\n }]],\n comment: [[/#.*$/, {\n cases: {\n '@eos': {\n token: 'comment',\n next: '@popall'\n }\n }\n }]]\n }\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/19-0bc80e9421c9f0bd1f63.js b/19-0bc80e9421c9f0bd1f63.js new file mode 100644 index 0000000..4b64a94 --- /dev/null +++ b/19-0bc80e9421c9f0bd1f63.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{"7s2V":function(e,s,o){"use strict";o.r(s),o.d(s,"conf",(function(){return n})),o.d(s,"language",(function(){return t}));var n={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}},t={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=>","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"],tokenizer:{root:[{include:"@whitespace"},[/@numbers/,"number"],[/@characters/,"string"],{include:"@string"},[/[()\[\]{}]/,"@brackets"],[/\/#"(?:\.|(?:")|[^"\n])*"\/g/,"regexp"],[/[#'@^`~]/,"meta"],[/@qualifiedSymbols/,{cases:{"^:.+$":"constant","@specialForms":"keyword","@coreSymbols":"keyword","@constants":"constant","@default":"identifier"}}]],whitespace:[[/[\s,]+/,"white"],[/;.*$/,"comment"],[/\(comment\b/,"comment","@comment"]],comment:[[/\(/,"comment","@push"],[/\)/,"comment","@pop"],[/[^()]/,"comment"]],string:[[/"/,"string","@multiLineString"]],multiLineString:[[/"/,"string","@popall"],[/@escapes/,"string.escape"],[/./,"string"]]}}}}]); +//# sourceMappingURL=20-8feb94473308cc6beb46.js.map \ No newline at end of file diff --git a/20-8feb94473308cc6beb46.js.map b/20-8feb94473308cc6beb46.js.map new file mode 100644 index 0000000..4d36272 --- /dev/null +++ b/20-8feb94473308cc6beb46.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.js"],"names":["conf","comments","lineComment","brackets","autoClosingPairs","open","close","surroundingPairs","language","defaultToken","ignoreCase","tokenPostfix","token","constants","numbers","characters","escapes","qualifiedSymbols","specialForms","coreSymbols","tokenizer","root","include","cases","whitespace","comment","string","multiLineString"],"mappings":"4FAAA,qFAMO,IAAIA,EAAO,CAChBC,SAAU,CACRC,YAAa,MAEfC,SAAU,CAAC,CAAC,IAAK,KAAM,CAAC,IAAK,KAAM,CAAC,IAAK,MACzCC,iBAAkB,CAAC,CACjBC,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,MAETC,iBAAkB,CAAC,CACjBF,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,OAGAE,EAAW,CACpBC,aAAc,GACdC,YAAY,EACZC,aAAc,OACdR,SAAU,CAAC,CACTE,KAAM,IACNC,MAAO,IACPM,MAAO,oBACN,CACDP,KAAM,IACNC,MAAO,IACPM,MAAO,yBACN,CACDP,KAAM,IACNC,MAAO,IACPM,MAAO,oBAETC,UAAW,CAAC,OAAQ,QAAS,OAE7BC,QAAS,kJACTC,WAAY,iIACZC,QAAS,uEAITC,iBAAkB,kNAClBC,aAAc,CAAC,IAAK,QAAS,MAAO,KAAM,KAAM,gBAAiB,eAAgB,MAAO,QAAS,QAAS,OAAQ,QAAS,MAAO,OAClIC,YAAa,CAAC,IAAK,KAAO,KAAM,KAAM,KAAM,UAAW,0BAA2B,WAAY,oBAAqB,sBAAuB,kBAAmB,iBAAkB,qBAAsB,iBAAkB,2BAA4B,KAAM,QAAS,SAAU,qBAAsB,cAAe,OAAQ,iBAAkB,OAAQ,QAAS,cAAe,iBAAkB,gBAAiB,eAAgB,yBAA0B,mBAAoB,cAAe,oBAAqB,gBAAiB,kBAAmB,mBAAoB,4BAA6B,uBAAwB,uBAAwB,IAAK,KAAO,IAAK,KAAO,KAAM,MAAO,eAAgB,aAAc,QAAS,YAAa,WAAY,qBAAsB,iBAAkB,KAAM,IAAK,IAAK,KAAM,IAAK,KAAM,IAAK,KAAM,aAAc,OAAQ,yBAA0B,iBAAkB,WAAY,SAAU,gBAAiB,YAAa,QAAS,cAAe,eAAgB,OAAQ,UAAW,QAAS,SAAU,QAAS,cAAe,iBAAkB,OAAQ,YAAa,MAAO,OAAQ,QAAS,UAAW,YAAa,OAAQ,OAAQ,eAAgB,YAAa,YAAa,cAAe,aAAc,WAAY,YAAa,aAAc,SAAU,QAAS,SAAU,WAAY,eAAgB,OAAQ,QAAS,YAAa,SAAU,QAAS,OAAQ,SAAU,SAAU,aAAc,UAAW,UAAW,cAAe,YAAa,WAAY,UAAW,SAAU,UAAW,iBAAkB,kBAAmB,WAAY,UAAW,UAAW,gBAAiB,WAAY,WAAY,WAAY,YAAa,SAAU,gBAAiB,UAAW,OAAQ,aAAc,QAAS,SAAU,OAAQ,OAAQ,MAAO,OAAQ,aAAc,qBAAsB,mBAAoB,QAAS,QAAS,QAAS,eAAgB,eAAgB,aAAc,cAAe,aAAc,aAAc,eAAgB,QAAS,SAAU,qBAAsB,kBAAmB,QAAS,UAAW,UAAW,OAAQ,aAAc,UAAW,mBAAoB,UAAW,aAAc,aAAc,SAAU,OAAQ,SAAU,UAAW,QAAS,OAAQ,QAAS,OAAQ,aAAc,kBAAmB,YAAa,QAAS,WAAY,YAAa,gBAAiB,QAAS,MAAO,OAAS,WAAY,UAAW,SAAU,uBAAwB,YAAa,eAAgB,WAAY,YAAa,WAAY,OAAQ,QAAS,UAAW,cAAe,YAAa,YAAa,UAAW,QAAS,SAAU,UAAW,cAAe,QAAS,SAAU,cAAe,cAAe,OAAQ,QAAS,SAAU,UAAW,WAAY,YAAa,QAAS,QAAS,QAAS,SAAU,UAAW,OAAQ,SAAU,eAAgB,UAAW,UAAW,OAAQ,YAAa,aAAc,WAAY,QAAS,SAAU,SAAU,iBAAkB,kBAAmB,gBAAiB,aAAc,OAAQ,QAAS,aAAc,SAAU,UAAW,UAAW,SAAU,kBAAmB,cAAe,YAAa,WAAY,SAAU,SAAU,WAAY,SAAU,UAAW,OAAQ,eAAgB,UAAW,qBAAsB,uBAAwB,WAAY,QAAS,UAAW,QAAS,cAAe,SAAU,SAAU,QAAS,KAAM,MAAO,QAAS,OAAQ,MAAO,QAAS,SAAU,cAAe,SAAU,cAAe,gBAAiB,oBAAqB,eAAgB,UAAW,YAAa,gBAAiB,SAAU,MAAO,SAAU,aAAc,kBAAmB,sBAAuB,gBAAiB,WAAY,YAAa,OAAQ,eAAgB,WAAY,oBAAqB,WAAY,sBAAuB,SAAU,aAAc,WAAY,SAAU,SAAU,UAAW,OAAQ,SAAU,QAAS,MAAO,OAAS,WAAY,aAAc,UAAW,WAAY,QAAS,YAAa,MAAO,YAAa,OAAQ,WAAY,aAAc,SAAU,YAAa,OAAQ,aAAc,OAAQ,MAAO,OAAQ,UAAW,eAAgB,OAAQ,OAAQ,eAAgB,MAAO,OAAQ,UAAW,WAAY,OAAQ,WAAY,WAAY,MAAO,QAAS,WAAY,OAAQ,QAAS,QAAS,OAAQ,YAAa,cAAe,cAAe,cAAe,UAAW,OAAQ,aAAc,QAAS,OAAQ,cAAe,gBAAiB,aAAc,iBAAkB,MAAO,aAAc,cAAe,OAAQ,SAAU,OAAQ,MAAO,UAAW,QAAS,UAAW,QAAS,aAAc,OAAQ,aAAc,UAAW,MAAO,UAAW,sBAAuB,MAAO,QAAS,OAAQ,YAAa,kBAAmB,WAAY,WAAY,OAAQ,UAAW,OAAQ,SAAU,OAAQ,QAAS,MAAO,WAAY,YAAa,aAAc,OAAQ,KAAM,aAAc,aAAc,aAAc,SAAU,UAAW,aAAc,YAAa,aAAc,aAAc,WAAY,MAAO,UAAW,UAAW,MAAO,UAAW,YAAa,eAAgB,OAAQ,KAAM,UAAW,UAAW,YAAa,gBAAiB,eAAgB,SAAU,OAAQ,cAAe,OAAQ,MAAO,OAAQ,sBAAuB,WAAY,OAAQ,KAAM,SAAU,gBAAiB,UAAW,wBAAyB,QAAS,aAAc,YAAa,eAAgB,eAAgB,YAAa,SAAU,UAAW,cAAe,MAAO,UAAW,UAAW,QAAS,wBAAyB,iBAAkB,aAAc,cAAe,uBAAwB,UAAW,mBAAoB,qBAAsB,oBAAqB,OAAQ,OAAQ,WAAY,WAAY,gBAAiB,QAAS,SAAU,YAAa,cAAe,UAAW,YAAa,aAAc,aAAc,aAAc,SAAU,OAAQ,YAAa,cAAe,qBAAsB,sBAAuB,YAAa,UAAW,SAAU,YAAa,UAAW,WAAY,aAAc,MAAO,oBAAqB,kBAAmB,kBAAmB,UAAW,QAAS,gBAAiB,QAAS,wBAAyB,MAAO,SAAU,qBAAsB,gBAAiB,YAAa,eAAgB,SAAU,aAAc,UAAW,YAAa,UAAW,SAAU,cAAe,cAAe,UAAW,OAAQ,gBAAiB,gBAAiB,UAAW,cAAe,OAAQ,UAAW,OAAQ,aAAc,SAAU,cAAe,OAAQ,WAAY,WAAY,MAAO,OAAQ,WAAY,QAAS,WAAY,cAAe,MAAO,2BAA4B,+BAAgC,qBAAsB,kBAAmB,iBAAkB,OAAQ,QAAS,cAAe,SAAU,UAAW,kBAAmB,gBAAiB,kBAAmB,iBAAkB,QAAS,OAAQ,SAAU,UAAW,UAAW,QAAS,OAAQ,UAAW,aAAc,gBAAiB,aAAc,gBAAiB,UAAW,kBAAmB,OAAQ,WAAY,aAAc,MAAO,UAAW,SAAU,aAAc,OAAQ,SAAU,SAAU,SAAU,QAAS,aAAc,SAAU,UAAW,OAAQ,iBAAkB,kBAAmB,OAAQ,YAAa,WAAY,aAAc,OAAQ,SAAU,gBAAiB,OAAQ,WAAY,cAAe,aAAc,YAAa,YAAa,WAAY,QAAS,OAAQ,gBAAiB,oBAAqB,iBAAkB,iBAAkB,gBAAiB,oBAAqB,uBAAwB,mBAAoB,kBAAmB,gBAAiB,oBAAqB,gBAAiB,iBAAkB,qBAAsB,yBAA0B,mBAAoB,uBAAwB,0BAA2B,kBAAmB,qBAAsB,yBAA0B,WAAY,UAAW,mBAAoB,YAAa,2BAA4B,SAAU,YAAa,eAAgB,OAAQ,MAAO,QAAS,MAAO,OAAQ,UAAW,UAAW,OAAQ,YAAa,MAAO,SAAU,YAAa,UAAW,YAAa,YAAa,UAAW,SAAU,OAAQ,aAAc,WAAY,WAAY,YAAa,QAAS,gBAAiB,iBAAkB,cAAe,uBAAwB,kBAAmB,YAAa,YAAa,eAAgB,iBAAkB,cAAe,iBAAkB,UAAW,QAAS,UAChiQC,UAAW,CACTC,KAAM,CACN,CACEC,QAAS,eAEX,CAAC,WAAY,UACb,CAAC,cAAe,UAChB,CACEA,QAAS,WAEX,CAAC,aAAc,aACf,CAAC,+BAAgC,UACjC,CAAC,WAAY,QACb,CAAC,oBAAqB,CACpBC,MAAO,CACL,QAAS,WACT,gBAAiB,UACjB,eAAgB,UAChB,aAAc,WACd,WAAY,iBAGhBC,WAAY,CAAC,CAAC,SAAU,SAAU,CAAC,OAAQ,WAAY,CAAC,cAAe,UAAW,aAClFC,QAAS,CAAC,CAAC,KAAM,UAAW,SAAU,CAAC,KAAM,UAAW,QAAS,CAAC,QAAS,YAC3EC,OAAQ,CAAC,CAAC,IAAK,SAAU,qBACzBC,gBAAiB,CAAC,CAAC,IAAK,SAAU,WAAY,CAAC,WAAY,iBAAkB,CAAC,IAAK","file":"20-8feb94473308cc6beb46.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nexport var conf = {\n comments: {\n lineComment: ';;'\n },\n brackets: [['[', ']'], ['(', ')'], ['{', '}']],\n autoClosingPairs: [{\n open: '[',\n close: ']'\n }, {\n open: '\"',\n close: '\"'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '{',\n close: '}'\n }],\n surroundingPairs: [{\n open: '[',\n close: ']'\n }, {\n open: '\"',\n close: '\"'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '{',\n close: '}'\n }]\n};\nexport var language = {\n defaultToken: '',\n ignoreCase: true,\n tokenPostfix: '.clj',\n brackets: [{\n open: '[',\n close: ']',\n token: 'delimiter.square'\n }, {\n open: '(',\n close: ')',\n token: 'delimiter.parenthesis'\n }, {\n open: '{',\n close: '}',\n token: 'delimiter.curly'\n }],\n constants: ['true', 'false', 'nil'],\n // delimiters: /[\\\\\\[\\]\\s\"#'(),;@^`{}~]|$/,\n numbers: /^(?:[+\\-]?\\d+(?:(?:N|(?:[eE][+\\-]?\\d+))|(?:\\.?\\d*(?:M|(?:[eE][+\\-]?\\d+))?)|\\/\\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\\\\[\\]\\s\"#'(),;@^`{}~]|$))/,\n characters: /^(?:\\\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\\\\[\\]\\s\"(),;@^`{}~]|$))/,\n escapes: /^\\\\(?:[\"'\\\\bfnrt]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,\n // simple-namespace := /^[^\\\\\\/\\[\\]\\d\\s\"#'(),;@^`{}~][^\\\\\\[\\]\\s\"(),;@^`{}~]*/\n // simple-symbol := /^(?:\\/|[^\\\\\\/\\[\\]\\d\\s\"#'(),;@^`{}~][^\\\\\\[\\]\\s\"(),;@^`{}~]*)/\n // qualified-symbol := ((<.>)*)?\n qualifiedSymbols: /^(?:(?:[^\\\\\\/\\[\\]\\d\\s\"#'(),;@^`{}~][^\\\\\\[\\]\\s\"(),;@^`{}~]*(?:\\.[^\\\\\\/\\[\\]\\d\\s\"#'(),;@^`{}~][^\\\\\\[\\]\\s\"(),;@^`{}~]*)*\\/)?(?:\\/|[^\\\\\\/\\[\\]\\d\\s\"#'(),;@^`{}~][^\\\\\\[\\]\\s\"(),;@^`{}~]*)*(?=[\\\\\\[\\]\\s\"(),;@^`{}~]|$))/,\n specialForms: ['.', 'catch', 'def', 'do', 'if', 'monitor-enter', 'monitor-exit', 'new', 'quote', 'recur', 'set!', 'throw', 'try', 'var'],\n coreSymbols: ['*', '*\\'', '*1', '*2', '*3', '*agent*', '*allow-unresolved-vars*', '*assert*', '*clojure-version*', '*command-line-args*', '*compile-files*', '*compile-path*', '*compiler-options*', '*data-readers*', '*default-data-reader-fn*', '*e', '*err*', '*file*', '*flush-on-newline*', '*fn-loader*', '*in*', '*math-context*', '*ns*', '*out*', '*print-dup*', '*print-length*', '*print-level*', '*print-meta*', '*print-namespace-maps*', '*print-readably*', '*read-eval*', '*reader-resolver*', '*source-path*', '*suppress-read*', '*unchecked-math*', '*use-context-classloader*', '*verbose-defrecords*', '*warn-on-reflection*', '+', '+\\'', '-', '-\\'', '->', '->>', '->ArrayChunk', '->Eduction', '->Vec', '->VecNode', '->VecSeq', '-cache-protocol-fn', '-reset-methods', '..', '/', '<', '<=', '=', '==', '>', '>=', 'EMPTY-NODE', 'Inst', 'StackTraceElement->vec', 'Throwable->map', 'accessor', 'aclone', 'add-classpath', 'add-watch', 'agent', 'agent-error', 'agent-errors', 'aget', 'alength', 'alias', 'all-ns', 'alter', 'alter-meta!', 'alter-var-root', 'amap', 'ancestors', 'and', 'any?', 'apply', 'areduce', 'array-map', 'as->', 'aset', 'aset-boolean', 'aset-byte', 'aset-char', 'aset-double', 'aset-float', 'aset-int', 'aset-long', 'aset-short', 'assert', 'assoc', 'assoc!', 'assoc-in', 'associative?', 'atom', 'await', 'await-for', 'await1', 'bases', 'bean', 'bigdec', 'bigint', 'biginteger', 'binding', 'bit-and', 'bit-and-not', 'bit-clear', 'bit-flip', 'bit-not', 'bit-or', 'bit-set', 'bit-shift-left', 'bit-shift-right', 'bit-test', 'bit-xor', 'boolean', 'boolean-array', 'boolean?', 'booleans', 'bound-fn', 'bound-fn*', 'bound?', 'bounded-count', 'butlast', 'byte', 'byte-array', 'bytes', 'bytes?', 'case', 'cast', 'cat', 'char', 'char-array', 'char-escape-string', 'char-name-string', 'char?', 'chars', 'chunk', 'chunk-append', 'chunk-buffer', 'chunk-cons', 'chunk-first', 'chunk-next', 'chunk-rest', 'chunked-seq?', 'class', 'class?', 'clear-agent-errors', 'clojure-version', 'coll?', 'comment', 'commute', 'comp', 'comparator', 'compare', 'compare-and-set!', 'compile', 'complement', 'completing', 'concat', 'cond', 'cond->', 'cond->>', 'condp', 'conj', 'conj!', 'cons', 'constantly', 'construct-proxy', 'contains?', 'count', 'counted?', 'create-ns', 'create-struct', 'cycle', 'dec', 'dec\\'', 'decimal?', 'declare', 'dedupe', 'default-data-readers', 'definline', 'definterface', 'defmacro', 'defmethod', 'defmulti', 'defn', 'defn-', 'defonce', 'defprotocol', 'defrecord', 'defstruct', 'deftype', 'delay', 'delay?', 'deliver', 'denominator', 'deref', 'derive', 'descendants', 'destructure', 'disj', 'disj!', 'dissoc', 'dissoc!', 'distinct', 'distinct?', 'doall', 'dorun', 'doseq', 'dosync', 'dotimes', 'doto', 'double', 'double-array', 'double?', 'doubles', 'drop', 'drop-last', 'drop-while', 'eduction', 'empty', 'empty?', 'ensure', 'ensure-reduced', 'enumeration-seq', 'error-handler', 'error-mode', 'eval', 'even?', 'every-pred', 'every?', 'ex-data', 'ex-info', 'extend', 'extend-protocol', 'extend-type', 'extenders', 'extends?', 'false?', 'ffirst', 'file-seq', 'filter', 'filterv', 'find', 'find-keyword', 'find-ns', 'find-protocol-impl', 'find-protocol-method', 'find-var', 'first', 'flatten', 'float', 'float-array', 'float?', 'floats', 'flush', 'fn', 'fn?', 'fnext', 'fnil', 'for', 'force', 'format', 'frequencies', 'future', 'future-call', 'future-cancel', 'future-cancelled?', 'future-done?', 'future?', 'gen-class', 'gen-interface', 'gensym', 'get', 'get-in', 'get-method', 'get-proxy-class', 'get-thread-bindings', 'get-validator', 'group-by', 'halt-when', 'hash', 'hash-combine', 'hash-map', 'hash-ordered-coll', 'hash-set', 'hash-unordered-coll', 'ident?', 'identical?', 'identity', 'if-let', 'if-not', 'if-some', 'ifn?', 'import', 'in-ns', 'inc', 'inc\\'', 'indexed?', 'init-proxy', 'inst-ms', 'inst-ms*', 'inst?', 'instance?', 'int', 'int-array', 'int?', 'integer?', 'interleave', 'intern', 'interpose', 'into', 'into-array', 'ints', 'io!', 'isa?', 'iterate', 'iterator-seq', 'juxt', 'keep', 'keep-indexed', 'key', 'keys', 'keyword', 'keyword?', 'last', 'lazy-cat', 'lazy-seq', 'let', 'letfn', 'line-seq', 'list', 'list*', 'list?', 'load', 'load-file', 'load-reader', 'load-string', 'loaded-libs', 'locking', 'long', 'long-array', 'longs', 'loop', 'macroexpand', 'macroexpand-1', 'make-array', 'make-hierarchy', 'map', 'map-entry?', 'map-indexed', 'map?', 'mapcat', 'mapv', 'max', 'max-key', 'memfn', 'memoize', 'merge', 'merge-with', 'meta', 'method-sig', 'methods', 'min', 'min-key', 'mix-collection-hash', 'mod', 'munge', 'name', 'namespace', 'namespace-munge', 'nat-int?', 'neg-int?', 'neg?', 'newline', 'next', 'nfirst', 'nil?', 'nnext', 'not', 'not-any?', 'not-empty', 'not-every?', 'not=', 'ns', 'ns-aliases', 'ns-imports', 'ns-interns', 'ns-map', 'ns-name', 'ns-publics', 'ns-refers', 'ns-resolve', 'ns-unalias', 'ns-unmap', 'nth', 'nthnext', 'nthrest', 'num', 'number?', 'numerator', 'object-array', 'odd?', 'or', 'parents', 'partial', 'partition', 'partition-all', 'partition-by', 'pcalls', 'peek', 'persistent!', 'pmap', 'pop', 'pop!', 'pop-thread-bindings', 'pos-int?', 'pos?', 'pr', 'pr-str', 'prefer-method', 'prefers', 'primitives-classnames', 'print', 'print-ctor', 'print-dup', 'print-method', 'print-simple', 'print-str', 'printf', 'println', 'println-str', 'prn', 'prn-str', 'promise', 'proxy', 'proxy-call-with-super', 'proxy-mappings', 'proxy-name', 'proxy-super', 'push-thread-bindings', 'pvalues', 'qualified-ident?', 'qualified-keyword?', 'qualified-symbol?', 'quot', 'rand', 'rand-int', 'rand-nth', 'random-sample', 'range', 'ratio?', 'rational?', 'rationalize', 're-find', 're-groups', 're-matcher', 're-matches', 're-pattern', 're-seq', 'read', 'read-line', 'read-string', 'reader-conditional', 'reader-conditional?', 'realized?', 'record?', 'reduce', 'reduce-kv', 'reduced', 'reduced?', 'reductions', 'ref', 'ref-history-count', 'ref-max-history', 'ref-min-history', 'ref-set', 'refer', 'refer-clojure', 'reify', 'release-pending-sends', 'rem', 'remove', 'remove-all-methods', 'remove-method', 'remove-ns', 'remove-watch', 'repeat', 'repeatedly', 'replace', 'replicate', 'require', 'reset!', 'reset-meta!', 'reset-vals!', 'resolve', 'rest', 'restart-agent', 'resultset-seq', 'reverse', 'reversible?', 'rseq', 'rsubseq', 'run!', 'satisfies?', 'second', 'select-keys', 'send', 'send-off', 'send-via', 'seq', 'seq?', 'seqable?', 'seque', 'sequence', 'sequential?', 'set', 'set-agent-send-executor!', 'set-agent-send-off-executor!', 'set-error-handler!', 'set-error-mode!', 'set-validator!', 'set?', 'short', 'short-array', 'shorts', 'shuffle', 'shutdown-agents', 'simple-ident?', 'simple-keyword?', 'simple-symbol?', 'slurp', 'some', 'some->', 'some->>', 'some-fn', 'some?', 'sort', 'sort-by', 'sorted-map', 'sorted-map-by', 'sorted-set', 'sorted-set-by', 'sorted?', 'special-symbol?', 'spit', 'split-at', 'split-with', 'str', 'string?', 'struct', 'struct-map', 'subs', 'subseq', 'subvec', 'supers', 'swap!', 'swap-vals!', 'symbol', 'symbol?', 'sync', 'tagged-literal', 'tagged-literal?', 'take', 'take-last', 'take-nth', 'take-while', 'test', 'the-ns', 'thread-bound?', 'time', 'to-array', 'to-array-2d', 'trampoline', 'transduce', 'transient', 'tree-seq', 'true?', 'type', 'unchecked-add', 'unchecked-add-int', 'unchecked-byte', 'unchecked-char', 'unchecked-dec', 'unchecked-dec-int', 'unchecked-divide-int', 'unchecked-double', 'unchecked-float', 'unchecked-inc', 'unchecked-inc-int', 'unchecked-int', 'unchecked-long', 'unchecked-multiply', 'unchecked-multiply-int', 'unchecked-negate', 'unchecked-negate-int', 'unchecked-remainder-int', 'unchecked-short', 'unchecked-subtract', 'unchecked-subtract-int', 'underive', 'unquote', 'unquote-splicing', 'unreduced', 'unsigned-bit-shift-right', 'update', 'update-in', 'update-proxy', 'uri?', 'use', 'uuid?', 'val', 'vals', 'var-get', 'var-set', 'var?', 'vary-meta', 'vec', 'vector', 'vector-of', 'vector?', 'volatile!', 'volatile?', 'vreset!', 'vswap!', 'when', 'when-first', 'when-let', 'when-not', 'when-some', 'while', 'with-bindings', 'with-bindings*', 'with-in-str', 'with-loading-context', 'with-local-vars', 'with-meta', 'with-open', 'with-out-str', 'with-precision', 'with-redefs', 'with-redefs-fn', 'xml-seq', 'zero?', 'zipmap'],\n tokenizer: {\n root: [// whitespaces and comments\n {\n include: '@whitespace'\n }, // numbers\n [/@numbers/, 'number'], // characters\n [/@characters/, 'string'], // strings\n {\n include: '@string'\n }, // brackets\n [/[()\\[\\]{}]/, '@brackets'], // regular expressions\n [/\\/#\"(?:\\.|(?:\")|[^\"\\n])*\"\\/g/, 'regexp'], // reader macro characters\n [/[#'@^`~]/, 'meta'], // symbols\n [/@qualifiedSymbols/, {\n cases: {\n '^:.+$': 'constant',\n '@specialForms': 'keyword',\n '@coreSymbols': 'keyword',\n '@constants': 'constant',\n '@default': 'identifier'\n }\n }]],\n whitespace: [[/[\\s,]+/, 'white'], [/;.*$/, 'comment'], [/\\(comment\\b/, 'comment', '@comment']],\n comment: [[/\\(/, 'comment', '@push'], [/\\)/, 'comment', '@pop'], [/[^()]/, 'comment']],\n string: [[/\"/, 'string', '@multiLineString']],\n multiLineString: [[/\"/, 'string', '@popall'], [/@escapes/, 'string.escape'], [/./, 'string']]\n }\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/21-f2e0ffe2ae8974f6a5aa.js b/21-f2e0ffe2ae8974f6a5aa.js new file mode 100644 index 0000000..b9c5c81 --- /dev/null +++ b/21-f2e0ffe2ae8974f6a5aa.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{"2ZXa":function(e,n,r){"use strict";r.r(n),r.d(n,"conf",(function(){return t})),r.d(n,"language",(function(){return s}));var t={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},s={defaultToken:"",ignoreCase:!0,tokenPostfix:".coffee",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:["and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when"],symbols:/[=>\\/\\?\\s]+)/g,\n comments: {\n blockComment: ['###', '###'],\n lineComment: '#'\n },\n brackets: [['{', '}'], ['[', ']'], ['(', ')']],\n autoClosingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\"',\n close: '\"'\n }, {\n open: '\\'',\n close: '\\''\n }],\n surroundingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\"',\n close: '\"'\n }, {\n open: '\\'',\n close: '\\''\n }],\n folding: {\n markers: {\n start: new RegExp(\"^\\\\s*#region\\\\b\"),\n end: new RegExp(\"^\\\\s*#endregion\\\\b\")\n }\n }\n};\nexport var language = {\n defaultToken: '',\n ignoreCase: true,\n tokenPostfix: '.coffee',\n brackets: [{\n open: '{',\n close: '}',\n token: 'delimiter.curly'\n }, {\n open: '[',\n close: ']',\n token: 'delimiter.square'\n }, {\n open: '(',\n close: ')',\n token: 'delimiter.parenthesis'\n }],\n regEx: /\\/(?!\\/\\/)(?:[^\\/\\\\]|\\\\.)*\\/[igm]*/,\n keywords: ['and', 'or', 'is', 'isnt', 'not', 'on', 'yes', '@', 'no', 'off', 'true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super', 'undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when'],\n // we include these common regular expressions\n symbols: /[=>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},s={defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","property","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}}}]); +//# sourceMappingURL=22-7bfce3e9e0f9cfdc0a62.js.map \ No newline at end of file diff --git a/22-7bfce3e9e0f9cfdc0a62.js.map b/22-7bfce3e9e0f9cfdc0a62.js.map new file mode 100644 index 0000000..d6b9c1b --- /dev/null +++ b/22-7bfce3e9e0f9cfdc0a62.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.js"],"names":["conf","wordPattern","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","notIn","surroundingPairs","folding","markers","start","RegExp","end","language","defaultToken","tokenPostfix","token","keywords","namespaceFollows","parenFollows","operators","symbols","escapes","tokenizer","root","cases","next","include","qualified","namespace","comment","string","litstring","litinterpstring","interpolatedstring","whitespace"],"mappings":"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","file":"22-7bfce3e9e0f9cfdc0a62.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nexport var conf = {\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\#\\$\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g,\n comments: {\n lineComment: '//',\n blockComment: ['/*', '*/']\n },\n brackets: [['{', '}'], ['[', ']'], ['(', ')']],\n autoClosingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\\'',\n close: '\\'',\n notIn: ['string', 'comment']\n }, {\n open: '\"',\n close: '\"',\n notIn: ['string', 'comment']\n }],\n surroundingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '<',\n close: '>'\n }, {\n open: '\\'',\n close: '\\''\n }, {\n open: '\"',\n close: '\"'\n }],\n folding: {\n markers: {\n start: new RegExp(\"^\\\\s*#region\\\\b\"),\n end: new RegExp(\"^\\\\s*#endregion\\\\b\")\n }\n }\n};\nexport var language = {\n defaultToken: '',\n tokenPostfix: '.cs',\n brackets: [{\n open: '{',\n close: '}',\n token: 'delimiter.curly'\n }, {\n open: '[',\n close: ']',\n token: 'delimiter.square'\n }, {\n open: '(',\n close: ')',\n token: 'delimiter.parenthesis'\n }, {\n open: '<',\n close: '>',\n token: 'delimiter.angle'\n }],\n keywords: ['extern', 'alias', 'using', 'bool', 'decimal', 'sbyte', 'byte', 'short', 'ushort', 'int', 'uint', 'long', 'ulong', 'char', 'float', 'double', 'object', 'dynamic', 'string', 'assembly', 'is', 'as', 'ref', 'out', 'this', 'base', 'new', 'typeof', 'void', 'checked', 'unchecked', 'default', 'delegate', 'var', 'const', 'if', 'else', 'switch', 'case', 'while', 'do', 'for', 'foreach', 'in', 'break', 'continue', 'goto', 'return', 'throw', 'try', 'catch', 'finally', 'lock', 'yield', 'from', 'let', 'where', 'join', 'on', 'equals', 'into', 'orderby', 'ascending', 'descending', 'select', 'group', 'by', 'namespace', 'partial', 'class', 'field', 'event', 'method', 'param', 'property', 'public', 'protected', 'internal', 'private', 'abstract', 'sealed', 'static', 'struct', 'readonly', 'volatile', 'virtual', 'override', 'params', 'get', 'set', 'add', 'remove', 'operator', 'true', 'false', 'implicit', 'explicit', 'interface', 'enum', 'null', 'async', 'await', 'fixed', 'sizeof', 'stackalloc', 'unsafe', 'nameof', 'when'],\n namespaceFollows: ['namespace', 'using'],\n parenFollows: ['if', 'for', 'while', 'switch', 'foreach', 'using', 'catch', 'when'],\n operators: ['=', '??', '||', '&&', '|', '^', '&', '==', '!=', '<=', '>=', '<<', '+', '-', '*', '/', '%', '!', '~', '++', '--', '+=', '-=', '*=', '/=', '%=', '&=', '|=', '^=', '<<=', '>>=', '>>', '=>'],\n symbols: /[=>](?!@symbols)/, '@brackets'], [/@symbols/, {\n cases: {\n '@operators': 'delimiter',\n '@default': ''\n }\n }], // numbers\n [/[0-9_]*\\.[0-9_]+([eE][\\-+]?\\d+)?[fFdD]?/, 'number.float'], [/0[xX][0-9a-fA-F_]+/, 'number.hex'], [/0[bB][01_]+/, 'number.hex'], [/[0-9_]+/, 'number'], // delimiter: after number because of .\\d floats\n [/[;,.]/, 'delimiter'], // strings\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'], [/\"/, {\n token: 'string.quote',\n next: '@string'\n }], [/\\$\\@\"/, {\n token: 'string.quote',\n next: '@litinterpstring'\n }], [/\\@\"/, {\n token: 'string.quote',\n next: '@litstring'\n }], [/\\$\"/, {\n token: 'string.quote',\n next: '@interpolatedstring'\n }], // characters\n [/'[^\\\\']'/, 'string'], [/(')(@escapes)(')/, ['string', 'string.escape', 'string']], [/'/, 'string.invalid']],\n qualified: [[/[a-zA-Z_][\\w]*/, {\n cases: {\n '@keywords': {\n token: 'keyword.$0'\n },\n '@default': 'identifier'\n }\n }], [/\\./, 'delimiter'], ['', '', '@pop']],\n namespace: [{\n include: '@whitespace'\n }, [/[A-Z]\\w*/, 'namespace'], [/[\\.=]/, 'delimiter'], ['', '', '@pop']],\n comment: [[/[^\\/*]+/, 'comment'], // [/\\/\\*/, 'comment', '@push' ], // no nested comments :-(\n ['\\\\*/', 'comment', '@pop'], [/[\\/*]/, 'comment']],\n string: [[/[^\\\\\"]+/, 'string'], [/@escapes/, 'string.escape'], [/\\\\./, 'string.escape.invalid'], [/\"/, {\n token: 'string.quote',\n next: '@pop'\n }]],\n litstring: [[/[^\"]+/, 'string'], [/\"\"/, 'string.escape'], [/\"/, {\n token: 'string.quote',\n next: '@pop'\n }]],\n litinterpstring: [[/[^\"{]+/, 'string'], [/\"\"/, 'string.escape'], [/{{/, 'string.escape'], [/}}/, 'string.escape'], [/{/, {\n token: 'string.quote',\n next: 'root.litinterpstring'\n }], [/\"/, {\n token: 'string.quote',\n next: '@pop'\n }]],\n interpolatedstring: [[/[^\\\\\"{]+/, 'string'], [/@escapes/, 'string.escape'], [/\\\\./, 'string.escape.invalid'], [/{{/, 'string.escape'], [/}}/, 'string.escape'], [/{/, {\n token: 'string.quote',\n next: 'root.interpolatedstring'\n }], [/\"/, {\n token: 'string.quote',\n next: '@pop'\n }]],\n whitespace: [[/^[ \\t\\v\\f]*#((r)|(load))(?=\\s)/, 'directive.csx'], [/^[ \\t\\v\\f]*#\\w.*$/, 'namespace.cpp'], [/[ \\t\\v\\f\\r\\n]+/, ''], [/\\/\\*/, 'comment', '@comment'], [/\\/\\/.*$/, 'comment']]\n }\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/23-77eebca13c66bb0d80ce.js b/23-77eebca13c66bb0d80ce.js new file mode 100644 index 0000000..b608ebe --- /dev/null +++ b/23-77eebca13c66bb0d80ce.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{"p+q7":function(t,r,e){"use strict";e.r(r),e.d(r,"conf",(function(){return s})),e.d(r,"language",(function(){return n}));var s={brackets:[],autoClosingPairs:[],surroundingPairs:[]},n={keywords:[],typeKeywords:[],tokenPostfix:".csp",operators:[],symbols:/[=>",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}}}}]); +//# sourceMappingURL=24-9206a241a87c5d9fe4bd.js.map \ No newline at end of file diff --git a/24-9206a241a87c5d9fe4bd.js.map b/24-9206a241a87c5d9fe4bd.js.map new file mode 100644 index 0000000..d239c8d --- /dev/null +++ b/24-9206a241a87c5d9fe4bd.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/monaco-editor/esm/vs/basic-languages/css/css.js"],"names":["conf","wordPattern","comments","blockComment","brackets","autoClosingPairs","open","close","notIn","surroundingPairs","folding","markers","start","RegExp","end","language","defaultToken","tokenPostfix","ws","identifier","token","tokenizer","root","include","selector","next","selectorbody","selectorname","selectorattribute","term","rulevalue","warndebug","import","urldeclaration","parenthizedterm","declarationbody","comment","name","numbers","units","keyframedeclaration","switchTo","keyframebody","functioninvocation","functionarguments","strings","stringenddoublequote","stringendquote"],"mappings":"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","file":"24-9206a241a87c5d9fe4bd.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nexport var conf = {\n wordPattern: /(#?-?\\d*\\.\\d\\w*%?)|((::|[@#.!:])?[\\w-?]+%?)|::|[@#.!:]/g,\n comments: {\n blockComment: ['/*', '*/']\n },\n brackets: [['{', '}'], ['[', ']'], ['(', ')']],\n autoClosingPairs: [{\n open: '{',\n close: '}',\n notIn: ['string', 'comment']\n }, {\n open: '[',\n close: ']',\n notIn: ['string', 'comment']\n }, {\n open: '(',\n close: ')',\n notIn: ['string', 'comment']\n }, {\n open: '\"',\n close: '\"',\n notIn: ['string', 'comment']\n }, {\n open: '\\'',\n close: '\\'',\n notIn: ['string', 'comment']\n }],\n surroundingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\"',\n close: '\"'\n }, {\n open: '\\'',\n close: '\\''\n }],\n folding: {\n markers: {\n start: new RegExp(\"^\\\\s*\\\\/\\\\*\\\\s*#region\\\\b\\\\s*(.*?)\\\\s*\\\\*\\\\/\"),\n end: new RegExp(\"^\\\\s*\\\\/\\\\*\\\\s*#endregion\\\\b.*\\\\*\\\\/\")\n }\n }\n};\nexport var language = {\n defaultToken: '',\n tokenPostfix: '.css',\n ws: '[ \\t\\n\\r\\f]*',\n identifier: '-?-?([a-zA-Z]|(\\\\\\\\(([0-9a-fA-F]{1,6}\\\\s?)|[^[0-9a-fA-F])))([\\\\w\\\\-]|(\\\\\\\\(([0-9a-fA-F]{1,6}\\\\s?)|[^[0-9a-fA-F])))*',\n brackets: [{\n open: '{',\n close: '}',\n token: 'delimiter.bracket'\n }, {\n open: '[',\n close: ']',\n token: 'delimiter.bracket'\n }, {\n open: '(',\n close: ')',\n token: 'delimiter.parenthesis'\n }, {\n open: '<',\n close: '>',\n token: 'delimiter.angle'\n }],\n tokenizer: {\n root: [{\n include: '@selector'\n }],\n selector: [{\n include: '@comments'\n }, {\n include: '@import'\n }, {\n include: '@strings'\n }, ['[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)', {\n token: 'keyword',\n next: '@keyframedeclaration'\n }], ['[@](page|content|font-face|-moz-document)', {\n token: 'keyword'\n }], ['[@](charset|namespace)', {\n token: 'keyword',\n next: '@declarationbody'\n }], ['(url-prefix)(\\\\()', ['attribute.value', {\n token: 'delimiter.parenthesis',\n next: '@urldeclaration'\n }]], ['(url)(\\\\()', ['attribute.value', {\n token: 'delimiter.parenthesis',\n next: '@urldeclaration'\n }]], {\n include: '@selectorname'\n }, ['[\\\\*]', 'tag'], ['[>\\\\+,]', 'delimiter'], ['\\\\[', {\n token: 'delimiter.bracket',\n next: '@selectorattribute'\n }], ['{', {\n token: 'delimiter.bracket',\n next: '@selectorbody'\n }]],\n selectorbody: [{\n include: '@comments'\n }, ['[*_]?@identifier@ws:(?=(\\\\s|\\\\d|[^{;}]*[;}]))', 'attribute.name', '@rulevalue'], ['}', {\n token: 'delimiter.bracket',\n next: '@pop'\n }]],\n selectorname: [['(\\\\.|#(?=[^{])|%|(@identifier)|:)+', 'tag']],\n selectorattribute: [{\n include: '@term'\n }, [']', {\n token: 'delimiter.bracket',\n next: '@pop'\n }]],\n term: [{\n include: '@comments'\n }, ['(url-prefix)(\\\\()', ['attribute.value', {\n token: 'delimiter.parenthesis',\n next: '@urldeclaration'\n }]], ['(url)(\\\\()', ['attribute.value', {\n token: 'delimiter.parenthesis',\n next: '@urldeclaration'\n }]], {\n include: '@functioninvocation'\n }, {\n include: '@numbers'\n }, {\n include: '@name'\n }, ['([<>=\\\\+\\\\-\\\\*\\\\/\\\\^\\\\|\\\\~,])', 'delimiter'], [',', 'delimiter']],\n rulevalue: [{\n include: '@comments'\n }, {\n include: '@strings'\n }, {\n include: '@term'\n }, ['!important', 'keyword'], [';', 'delimiter', '@pop'], ['(?=})', {\n token: '',\n next: '@pop'\n }] // missing semicolon\n ],\n warndebug: [['[@](warn|debug)', {\n token: 'keyword',\n next: '@declarationbody'\n }]],\n import: [['[@](import)', {\n token: 'keyword',\n next: '@declarationbody'\n }]],\n urldeclaration: [{\n include: '@strings'\n }, ['[^)\\r\\n]+', 'string'], ['\\\\)', {\n token: 'delimiter.parenthesis',\n next: '@pop'\n }]],\n parenthizedterm: [{\n include: '@term'\n }, ['\\\\)', {\n token: 'delimiter.parenthesis',\n next: '@pop'\n }]],\n declarationbody: [{\n include: '@term'\n }, [';', 'delimiter', '@pop'], ['(?=})', {\n token: '',\n next: '@pop'\n }] // missing semicolon\n ],\n comments: [['\\\\/\\\\*', 'comment', '@comment'], ['\\\\/\\\\/+.*', 'comment']],\n comment: [['\\\\*\\\\/', 'comment', '@pop'], [/[^*/]+/, 'comment'], [/./, 'comment']],\n name: [['@identifier', 'attribute.value']],\n numbers: [['-?(\\\\d*\\\\.)?\\\\d+([eE][\\\\-+]?\\\\d+)?', {\n token: 'attribute.value.number',\n next: '@units'\n }], ['#[0-9a-fA-F_]+(?!\\\\w)', 'attribute.value.hex']],\n units: [['(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?', 'attribute.value.unit', '@pop']],\n keyframedeclaration: [['@identifier', 'attribute.value'], ['{', {\n token: 'delimiter.bracket',\n switchTo: '@keyframebody'\n }]],\n keyframebody: [{\n include: '@term'\n }, ['{', {\n token: 'delimiter.bracket',\n next: '@selectorbody'\n }], ['}', {\n token: 'delimiter.bracket',\n next: '@pop'\n }]],\n functioninvocation: [['@identifier\\\\(', {\n token: 'attribute.value',\n next: '@functionarguments'\n }]],\n functionarguments: [['\\\\$@identifier@ws:', 'attribute.name'], ['[,]', 'delimiter'], {\n include: '@term'\n }, ['\\\\)', {\n token: 'attribute.value',\n next: '@pop'\n }]],\n strings: [['~?\"', {\n token: 'string',\n next: '@stringenddoublequote'\n }], ['~?\\'', {\n token: 'string',\n next: '@stringendquote'\n }]],\n stringenddoublequote: [['\\\\\\\\.', 'string'], ['\"', {\n token: 'string',\n next: '@pop'\n }], [/[^\\\\\"]+/, 'string'], ['.', 'string']],\n stringendquote: [['\\\\\\\\.', 'string'], ['\\'', {\n token: 'string',\n next: '@pop'\n }], [/[^\\\\']+/, 'string'], ['.', 'string']]\n }\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/25-ebb1208f5d7fdf5e0913.js b/25-ebb1208f5d7fdf5e0913.js new file mode 100644 index 0000000..46d38ee --- /dev/null +++ b/25-ebb1208f5d7fdf5e0913.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{Dsrv:function(e,n,o){"use strict";o.r(n),o.d(n,"conf",(function(){return s})),o.d(n,"language",(function(){return t}));var s={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},t={defaultToken:"",tokenPostfix:".dockerfile",variable:/\${?[\w]+}?/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/(ONBUILD)(\s+)/,["keyword",""]],[/(ENV)(\s+)([\w]+)/,["keyword","",{token:"variable",next:"@arguments"}]],[/(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/,{token:"keyword",next:"@arguments"}]],arguments:[{include:"@whitespace"},{include:"@strings"},[/(@variable)/,{cases:{"@eos":{token:"variable",next:"@popall"},"@default":"variable"}}],[/\\/,{cases:{"@eos":"","@default":""}}],[/./,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],whitespace:[[/\s+/,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],comment:[[/(^#.*$)/,"comment","@popall"]],strings:[[/'$/,"string","@popall"],[/'/,"string","@stringBody"],[/"$/,"string","@popall"],[/"/,"string","@dblStringBody"]],stringBody:[[/[^\\\$']/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/'$/,"string","@popall"],[/'/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]],dblStringBody:[[/[^\\\$"]/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/"$/,"string","@popall"],[/"/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]]}}}}]); +//# sourceMappingURL=25-ebb1208f5d7fdf5e0913.js.map \ No newline at end of file diff --git a/25-ebb1208f5d7fdf5e0913.js.map b/25-ebb1208f5d7fdf5e0913.js.map new file mode 100644 index 0000000..09066a0 --- /dev/null +++ b/25-ebb1208f5d7fdf5e0913.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.js"],"names":["conf","brackets","autoClosingPairs","open","close","surroundingPairs","language","defaultToken","tokenPostfix","variable","tokenizer","root","include","token","next","arguments","cases","whitespace","comment","strings","stringBody","dblStringBody"],"mappings":"4FAAA,qFAMO,IAAIA,EAAO,CAChBC,SAAU,CAAC,CAAC,IAAK,KAAM,CAAC,IAAK,KAAM,CAAC,IAAK,MACzCC,iBAAkB,CAAC,CACjBC,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,MAETC,iBAAkB,CAAC,CACjBF,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,OAGAE,EAAW,CACpBC,aAAc,GACdC,aAAc,cACdC,SAAU,cACVC,UAAW,CACTC,KAAM,CAAC,CACLC,QAAS,eACR,CACDA,QAAS,YACR,CAAC,iBAAkB,CAAC,UAAW,KAAM,CAAC,oBAAqB,CAAC,UAAW,GAAI,CAC5EC,MAAO,WACPC,KAAM,gBACH,CAAC,sHAAuH,CAC3HD,MAAO,UACPC,KAAM,gBAERC,UAAW,CAAC,CACVH,QAAS,eACR,CACDA,QAAS,YACR,CAAC,cAAe,CACjBI,MAAO,CACL,OAAQ,CACNH,MAAO,WACPC,KAAM,WAER,WAAY,cAEZ,CAAC,KAAM,CACTE,MAAO,CACL,OAAQ,GACR,WAAY,MAEZ,CAAC,IAAK,CACRA,MAAO,CACL,OAAQ,CACNH,MAAO,GACPC,KAAM,WAER,WAAY,OAIhBG,WAAY,CAAC,CAAC,MAAO,CACnBD,MAAO,CACL,OAAQ,CACNH,MAAO,GACPC,KAAM,WAER,WAAY,OAGhBI,QAAS,CAAC,CAAC,UAAW,UAAW,YAEjCC,QAAS,CAAC,CAAC,KAAM,SAAU,WAAY,CAAC,IAAK,SAAU,eAAgB,CAAC,KAAM,SAAU,WAAY,CAAC,IAAK,SAAU,mBACpHC,WAAY,CAAC,CAAC,WAAY,CACxBJ,MAAO,CACL,OAAQ,CACNH,MAAO,SACPC,KAAM,WAER,WAAY,YAEZ,CAAC,MAAO,iBAAkB,CAAC,KAAM,SAAU,WAAY,CAAC,IAAK,SAAU,QAAS,CAAC,cAAe,YAAa,CAAC,MAAO,UAAW,CAAC,IAAK,SAAU,YACpJO,cAAe,CAAC,CAAC,WAAY,CAC3BL,MAAO,CACL,OAAQ,CACNH,MAAO,SACPC,KAAM,WAER,WAAY,YAEZ,CAAC,MAAO,iBAAkB,CAAC,KAAM,SAAU,WAAY,CAAC,IAAK,SAAU,QAAS,CAAC,cAAe,YAAa,CAAC,MAAO,UAAW,CAAC,IAAK,SAAU","file":"25-ebb1208f5d7fdf5e0913.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nexport var conf = {\n brackets: [['{', '}'], ['[', ']'], ['(', ')']],\n autoClosingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\"',\n close: '\"'\n }, {\n open: '\\'',\n close: '\\''\n }],\n surroundingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\"',\n close: '\"'\n }, {\n open: '\\'',\n close: '\\''\n }]\n};\nexport var language = {\n defaultToken: '',\n tokenPostfix: '.dockerfile',\n variable: /\\${?[\\w]+}?/,\n tokenizer: {\n root: [{\n include: '@whitespace'\n }, {\n include: '@comment'\n }, [/(ONBUILD)(\\s+)/, ['keyword', '']], [/(ENV)(\\s+)([\\w]+)/, ['keyword', '', {\n token: 'variable',\n next: '@arguments'\n }]], [/(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/, {\n token: 'keyword',\n next: '@arguments'\n }]],\n arguments: [{\n include: '@whitespace'\n }, {\n include: '@strings'\n }, [/(@variable)/, {\n cases: {\n '@eos': {\n token: 'variable',\n next: '@popall'\n },\n '@default': 'variable'\n }\n }], [/\\\\/, {\n cases: {\n '@eos': '',\n '@default': ''\n }\n }], [/./, {\n cases: {\n '@eos': {\n token: '',\n next: '@popall'\n },\n '@default': ''\n }\n }]],\n // Deal with white space, including comments\n whitespace: [[/\\s+/, {\n cases: {\n '@eos': {\n token: '',\n next: '@popall'\n },\n '@default': ''\n }\n }]],\n comment: [[/(^#.*$)/, 'comment', '@popall']],\n // Recognize strings, including those broken across lines with \\ (but not without)\n strings: [[/'$/, 'string', '@popall'], [/'/, 'string', '@stringBody'], [/\"$/, 'string', '@popall'], [/\"/, 'string', '@dblStringBody']],\n stringBody: [[/[^\\\\\\$']/, {\n cases: {\n '@eos': {\n token: 'string',\n next: '@popall'\n },\n '@default': 'string'\n }\n }], [/\\\\./, 'string.escape'], [/'$/, 'string', '@popall'], [/'/, 'string', '@pop'], [/(@variable)/, 'variable'], [/\\\\$/, 'string'], [/$/, 'string', '@popall']],\n dblStringBody: [[/[^\\\\\\$\"]/, {\n cases: {\n '@eos': {\n token: 'string',\n next: '@popall'\n },\n '@default': 'string'\n }\n }], [/\\\\./, 'string.escape'], [/\"$/, 'string', '@popall'], [/\"/, 'string', '@pop'], [/(@variable)/, 'variable'], [/\\\\$/, 'string'], [/$/, 'string', '@popall']]\n }\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/26-ae613efddb5da2d3be9b.js b/26-ae613efddb5da2d3be9b.js new file mode 100644 index 0000000..f34ab1a --- /dev/null +++ b/26-ae613efddb5da2d3be9b.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{yswY:function(e,n,t){"use strict";t.r(n),t.d(n,"conf",(function(){return s})),t.d(n,"language",(function(){return o}));var s={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),end:new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")}}},o={defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*(?!\))/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^*(]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"],[/\(\*\)/,"comment"],[/\(/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}}}}]); +//# sourceMappingURL=26-ae613efddb5da2d3be9b.js.map \ No newline at end of file diff --git a/26-ae613efddb5da2d3be9b.js.map b/26-ae613efddb5da2d3be9b.js.map new file mode 100644 index 0000000..f79e0ed --- /dev/null +++ b/26-ae613efddb5da2d3be9b.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.js"],"names":["conf","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","surroundingPairs","folding","markers","start","RegExp","end","language","defaultToken","tokenPostfix","keywords","symbols","escapes","integersuffix","floatsuffix","tokenizer","root","cases","token","include","next","whitespace","comment","string","litstring"],"mappings":"4FAAA,qFAMO,IAAIA,EAAO,CAChBC,SAAU,CACRC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEvBC,SAAU,CAAC,CAAC,IAAK,KAAM,CAAC,IAAK,KAAM,CAAC,IAAK,MACzCC,iBAAkB,CAAC,CACjBC,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,MAETC,iBAAkB,CAAC,CACjBF,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,MAETE,QAAS,CACPC,QAAS,CACPC,MAAO,IAAIC,OAAO,0DAClBC,IAAK,IAAID,OAAO,mEAIXE,EAAW,CACpBC,aAAc,GACdC,aAAc,MACdC,SAAU,CAAC,WAAY,MAAO,SAAU,KAAM,SAAU,MAAO,OAAQ,QAAS,QAAS,UAAW,YAAa,QAAS,aAAc,cAAe,WAAY,QAAS,UAAW,WAAY,KAAM,OAAQ,WAAY,SAAU,OAAQ,OAAQ,MAAO,YAAa,QAAS,QAAS,WAAY,SAAU,QAAS,UAAW,MAAO,MAAO,WAAY,QAAS,UAAW,SAAU,KAAM,KAAM,UAAW,UAAW,SAAU,YAAa,WAAY,OAAQ,MAAO,MAAO,MAAO,OAAQ,OAAQ,MAAO,QAAS,SAAU,MAAO,SAAU,UAAW,YAAa,SAAU,QAAS,MAAO,MAAO,OAAQ,KAAM,OAAQ,KAAM,SAAU,WAAY,UAAW,WAAY,UAAW,YAAa,OAAQ,SAAU,MAAO,SAAU,SAAU,SAAU,SAAU,MAAO,OAAQ,KAAM,OAAQ,WAAY,QAAS,MAAO,OAAQ,SAAU,MAAO,MAAO,OAAQ,UAAW,WAAY,OAAQ,QAAS,OAAQ,SAEx4BC,QAAS,4BACTC,QAAS,wEACTC,cAAe,iBACfC,YAAa,UAEbC,UAAW,CACTC,KAAM,CACN,CAAC,eAAgB,CACfC,MAAO,CACL,YAAa,CACXC,MAAO,cAET,WAAY,gBAGhB,CACEC,QAAS,eAEX,CAAC,WAAY,cACb,CAAC,oBAAqB,WACtB,CAAC,aAAc,aAAc,CAAC,mBAAoB,aAAc,CAAC,WAAY,aAC7E,CAAC,uCAAwC,gBAAiB,CAAC,yCAA0C,gBAAiB,CAAC,mBAAoB,gBAAiB,CAAC,iCAAkC,cAAe,CAAC,2BAA4B,cAAe,CAAC,sBAAuB,UAClR,CAAC,QAAS,aACV,CAAC,kBAAmB,kBAAmB,CAAC,MAAO,SAAU,eAAgB,CAAC,IAAK,SAAU,aACzF,CAAC,MAAO,CACND,MAAO,eACPE,KAAM,eAER,CAAC,aAAc,UAAW,CAAC,mBAAoB,CAAC,SAAU,gBAAiB,WAAY,CAAC,IAAK,mBAC7FC,WAAY,CAAC,CAAC,aAAc,IAAK,CAAC,aAAc,UAAW,YAAa,CAAC,UAAW,YACpFC,QAAS,CAAC,CAAC,SAAU,WAAY,CAAC,OAAQ,UAAW,QAAS,CAAC,KAAM,WAAY,CAAC,SAAU,WAAY,CAAC,KAAM,YAC/GC,OAAQ,CAAC,CAAC,UAAW,UAAW,CAAC,WAAY,iBAAkB,CAAC,MAAO,yBAA0B,CAAC,YAAa,CAC7GN,MAAO,CACL,UAAW,CACTC,MAAO,SACPE,KAAM,QAER,WAAY,aAGhBI,UAAW,CAAC,CAAC,QAAS,UAAW,CAAC,KAAM,iBAAkB,CAAC,IAAK,CAC9DN,MAAO,eACPE,KAAM","file":"26-ae613efddb5da2d3be9b.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nexport var conf = {\n comments: {\n lineComment: '//',\n blockComment: ['(*', '*)']\n },\n brackets: [['{', '}'], ['[', ']'], ['(', ')']],\n autoClosingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\"',\n close: '\"'\n }],\n surroundingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\"',\n close: '\"'\n }, {\n open: '\\'',\n close: '\\''\n }],\n folding: {\n markers: {\n start: new RegExp(\"^\\\\s*//\\\\s*#region\\\\b|^\\\\s*\\\\(\\\\*\\\\s*#region(.*)\\\\*\\\\)\"),\n end: new RegExp(\"^\\\\s*//\\\\s*#endregion\\\\b|^\\\\s*\\\\(\\\\*\\\\s*#endregion\\\\s*\\\\*\\\\)\")\n }\n }\n};\nexport var language = {\n defaultToken: '',\n tokenPostfix: '.fs',\n keywords: ['abstract', 'and', 'atomic', 'as', 'assert', 'asr', 'base', 'begin', 'break', 'checked', 'component', 'const', 'constraint', 'constructor', 'continue', 'class', 'default', 'delegate', 'do', 'done', 'downcast', 'downto', 'elif', 'else', 'end', 'exception', 'eager', 'event', 'external', 'extern', 'false', 'finally', 'for', 'fun', 'function', 'fixed', 'functor', 'global', 'if', 'in', 'include', 'inherit', 'inline', 'interface', 'internal', 'land', 'lor', 'lsl', 'lsr', 'lxor', 'lazy', 'let', 'match', 'member', 'mod', 'module', 'mutable', 'namespace', 'method', 'mixin', 'new', 'not', 'null', 'of', 'open', 'or', 'object', 'override', 'private', 'parallel', 'process', 'protected', 'pure', 'public', 'rec', 'return', 'static', 'sealed', 'struct', 'sig', 'then', 'to', 'true', 'tailcall', 'trait', 'try', 'type', 'upcast', 'use', 'val', 'void', 'virtual', 'volatile', 'when', 'while', 'with', 'yield'],\n // we include these common regular expressions\n symbols: /[=>].\n [/\\[<.*>\\]/, 'annotation'], // Preprocessor directive\n [/^#(if|else|endif)/, 'keyword'], // delimiters and operators\n [/[{}()\\[\\]]/, '@brackets'], [/[<>](?!@symbols)/, '@brackets'], [/@symbols/, 'delimiter'], // numbers\n [/\\d*\\d+[eE]([\\-+]?\\d+)?(@floatsuffix)/, 'number.float'], [/\\d*\\.\\d+([eE][\\-+]?\\d+)?(@floatsuffix)/, 'number.float'], [/0x[0-9a-fA-F]+LF/, 'number.float'], [/0x[0-9a-fA-F]+(@integersuffix)/, 'number.hex'], [/0b[0-1]+(@integersuffix)/, 'number.bin'], [/\\d+(@integersuffix)/, 'number'], // delimiter: after number because of .\\d floats\n [/[;,.]/, 'delimiter'], // strings\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'], [/\"\"\"/, 'string', '@string.\"\"\"'], [/\"/, 'string', '@string.\"'], // literal string\n [/\\@\"/, {\n token: 'string.quote',\n next: '@litstring'\n }], // characters\n [/'[^\\\\']'B?/, 'string'], [/(')(@escapes)(')/, ['string', 'string.escape', 'string']], [/'/, 'string.invalid']],\n whitespace: [[/[ \\t\\r\\n]+/, ''], [/\\(\\*(?!\\))/, 'comment', '@comment'], [/\\/\\/.*$/, 'comment']],\n comment: [[/[^*(]+/, 'comment'], [/\\*\\)/, 'comment', '@pop'], [/\\*/, 'comment'], [/\\(\\*\\)/, 'comment'], [/\\(/, 'comment']],\n string: [[/[^\\\\\"]+/, 'string'], [/@escapes/, 'string.escape'], [/\\\\./, 'string.escape.invalid'], [/(\"\"\"|\"B?)/, {\n cases: {\n '$#==$S2': {\n token: 'string',\n next: '@pop'\n },\n '@default': 'string'\n }\n }]],\n litstring: [[/[^\"]+/, 'string'], [/\"\"/, 'string.escape'], [/\"/, {\n token: 'string.quote',\n next: '@pop'\n }]]\n }\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/27-157150cd506545c50407.js b/27-157150cd506545c50407.js new file mode 100644 index 0000000..75a1798 --- /dev/null +++ b/27-157150cd506545c50407.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{lHAa:function(e,n,o){"use strict";o.r(n),o.d(n,"conf",(function(){return t})),o.d(n,"language",(function(){return s}));var t={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]},s={defaultToken:"",tokenPostfix:".go",keywords:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}}}}]); +//# sourceMappingURL=27-157150cd506545c50407.js.map \ No newline at end of file diff --git a/27-157150cd506545c50407.js.map b/27-157150cd506545c50407.js.map new file mode 100644 index 0000000..c8e4133 --- /dev/null +++ b/27-157150cd506545c50407.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/monaco-editor/esm/vs/basic-languages/go/go.js"],"names":["conf","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","notIn","surroundingPairs","language","defaultToken","tokenPostfix","keywords","operators","symbols","escapes","tokenizer","root","cases","token","include","whitespace","comment","doccomment","string","rawstring"],"mappings":"4FAAA,qFAMO,IAAIA,EAAO,CAChBC,SAAU,CACRC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEvBC,SAAU,CAAC,CAAC,IAAK,KAAM,CAAC,IAAK,KAAM,CAAC,IAAK,MACzCC,iBAAkB,CAAC,CACjBC,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,IACPC,MAAO,CAAC,WACP,CACDF,KAAM,IACNC,MAAO,IACPC,MAAO,CAAC,WACP,CACDF,KAAM,IACNC,MAAO,IACPC,MAAO,CAAC,SAAU,aAEpBC,iBAAkB,CAAC,CACjBH,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,OAGAG,EAAW,CACpBC,aAAc,GACdC,aAAc,MACdC,SAAU,CAAC,QAAS,OAAQ,OAAQ,QAAS,WAAY,UAAW,QAAS,OAAQ,cAAe,MAAO,OAAQ,KAAM,OAAQ,KAAM,SAAU,YAAa,MAAO,UAAW,QAAS,SAAU,SAAU,SAAU,SAAU,OAAQ,MAAO,OAAQ,OAAQ,QAAS,QAAS,SAAU,SAAU,SAAU,OAAQ,QAAS,QAAS,QAAS,UAAW,UAAW,YAAa,aAAc,OAAQ,OAAQ,OAAQ,MAAO,UAAW,SAAU,OACxbC,UAAW,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,MAAO,MAAO,MAAO,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,KAAM,KAAM,MAAO,IAAK,IAAK,GAAI,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAE9QC,QAAS,wBACTC,QAAS,wEAETC,UAAW,CACTC,KAAM,CACN,CAAC,eAAgB,CACfC,MAAO,CACL,YAAa,CACXC,MAAO,cAET,WAAY,gBAGhB,CACEC,QAAS,eAEX,CAAC,aAAc,cACf,CAAC,WAAY,WACb,CAAC,aAAc,aAAc,CAAC,mBAAoB,aAAc,CAAC,WAAY,CAC3EF,MAAO,CACL,aAAc,YACd,WAAY,MAGhB,CAAC,yBAA0B,gBAAiB,CAAC,2BAA4B,gBAAiB,CAAC,gCAAiC,cAAe,CAAC,gBAAiB,gBAAiB,CAAC,oBAAqB,iBAAkB,CAAC,WAAY,UAAW,CAAC,KAAM,UACrP,CAAC,QAAS,aACV,CAAC,kBAAmB,kBAAmB,CAAC,IAAK,SAAU,WAAY,CAAC,IAAK,SAAU,cACnF,CAAC,WAAY,UAAW,CAAC,mBAAoB,CAAC,SAAU,gBAAiB,WAAY,CAAC,IAAK,mBAC3FG,WAAY,CAAC,CAAC,aAAc,IAAK,CAAC,eAAgB,cAAe,eAAgB,CAAC,OAAQ,UAAW,YAAa,CAAC,UAAW,YAC9HC,QAAS,CAAC,CAAC,UAAW,WAEtB,CAAC,OAAQ,UAAW,QAAS,CAAC,QAAS,YAEvCC,WAAY,CAAC,CAAC,UAAW,eACzB,CAAC,OAAQ,uBAAwB,CAAC,OAAQ,cAAe,QAAS,CAAC,QAAS,gBAC5EC,OAAQ,CAAC,CAAC,UAAW,UAAW,CAAC,WAAY,iBAAkB,CAAC,MAAO,yBAA0B,CAAC,IAAK,SAAU,SACjHC,UAAW,CAAC,CAAC,QAAS,UAAW,CAAC,IAAK,SAAU","file":"27-157150cd506545c50407.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nexport var conf = {\n comments: {\n lineComment: '//',\n blockComment: ['/*', '*/']\n },\n brackets: [['{', '}'], ['[', ']'], ['(', ')']],\n autoClosingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '`',\n close: '`',\n notIn: ['string']\n }, {\n open: '\"',\n close: '\"',\n notIn: ['string']\n }, {\n open: '\\'',\n close: '\\'',\n notIn: ['string', 'comment']\n }],\n surroundingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '`',\n close: '`'\n }, {\n open: '\"',\n close: '\"'\n }, {\n open: '\\'',\n close: '\\''\n }]\n};\nexport var language = {\n defaultToken: '',\n tokenPostfix: '.go',\n keywords: ['break', 'case', 'chan', 'const', 'continue', 'default', 'defer', 'else', 'fallthrough', 'for', 'func', 'go', 'goto', 'if', 'import', 'interface', 'map', 'package', 'range', 'return', 'select', 'struct', 'switch', 'type', 'var', 'bool', 'true', 'false', 'uint8', 'uint16', 'uint32', 'uint64', 'int8', 'int16', 'int32', 'int64', 'float32', 'float64', 'complex64', 'complex128', 'byte', 'rune', 'uint', 'int', 'uintptr', 'string', 'nil'],\n operators: ['+', '-', '*', '/', '%', '&', '|', '^', '<<', '>>', '&^', '+=', '-=', '*=', '/=', '%=', '&=', '|=', '^=', '<<=', '>>=', '&^=', '&&', '||', '<-', '++', '--', '==', '<', '>', '=', '!', '!=', '<=', '>=', ':=', '...', '(', ')', '', ']', '{', '}', ',', ';', '.', ':'],\n // we include these common regular expressions\n symbols: /[=>](?!@symbols)/, '@brackets'], [/@symbols/, {\n cases: {\n '@operators': 'delimiter',\n '@default': ''\n }\n }], // numbers\n [/\\d*\\d+[eE]([\\-+]?\\d+)?/, 'number.float'], [/\\d*\\.\\d+([eE][\\-+]?\\d+)?/, 'number.float'], [/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, 'number.hex'], [/0[0-7']*[0-7]/, 'number.octal'], [/0[bB][0-1']*[0-1]/, 'number.binary'], [/\\d[\\d']*/, 'number'], [/\\d/, 'number'], // delimiter: after number because of .\\d floats\n [/[;,.]/, 'delimiter'], // strings\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'], [/\"/, 'string', '@string'], [/`/, \"string\", \"@rawstring\"], // characters\n [/'[^\\\\']'/, 'string'], [/(')(@escapes)(')/, ['string', 'string.escape', 'string']], [/'/, 'string.invalid']],\n whitespace: [[/[ \\t\\r\\n]+/, ''], [/\\/\\*\\*(?!\\/)/, 'comment.doc', '@doccomment'], [/\\/\\*/, 'comment', '@comment'], [/\\/\\/.*$/, 'comment']],\n comment: [[/[^\\/*]+/, 'comment'], // [/\\/\\*/, 'comment', '@push' ], // nested comment not allowed :-(\n // [/\\/\\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/\n [/\\*\\//, 'comment', '@pop'], [/[\\/*]/, 'comment']],\n //Identical copy of comment above, except for the addition of .doc\n doccomment: [[/[^\\/*]+/, 'comment.doc'], // [/\\/\\*/, 'comment.doc', '@push' ], // nested comment not allowed :-(\n [/\\/\\*/, 'comment.doc.invalid'], [/\\*\\//, 'comment.doc', '@pop'], [/[\\/*]/, 'comment.doc']],\n string: [[/[^\\\\\"]+/, 'string'], [/@escapes/, 'string.escape'], [/\\\\./, 'string.escape.invalid'], [/\"/, 'string', '@pop']],\n rawstring: [[/[^\\`]/, \"string\"], [/`/, \"string\", \"@pop\"]]\n }\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/28-b9e9a703e11ed7dd7d7e.js b/28-b9e9a703e11ed7dd7d7e.js new file mode 100644 index 0000000..f42c019 --- /dev/null +++ b/28-b9e9a703e11ed7dd7d7e.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{Eg73:function(e,n,t){"use strict";t.r(n),t.d(n,"conf",(function(){return o})),t.d(n,"language",(function(){return s}));var o={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""'},{open:'"',close:'"'}],folding:{offSide:!0}},s={defaultToken:"invalid",tokenPostfix:".gql",keywords:["null","true","false","query","mutation","subscription","extend","schema","directive","scalar","type","interface","union","enum","input","implements","fragment","on"],typeKeywords:["Int","Float","String","Boolean","ID"],directiveLocations:["SCHEMA","SCALAR","OBJECT","FIELD_DEFINITION","ARGUMENT_DEFINITION","INTERFACE","UNION","ENUM","ENUM_VALUE","INPUT_OBJECT","INPUT_FIELD_DEFINITION","QUERY","MUTATION","SUBSCRIPTION","FIELD","FRAGMENT_DEFINITION","FRAGMENT_SPREAD","INLINE_FRAGMENT","VARIABLE_DEFINITION"],operators:["=","!","?",":","&","|"],symbols:/[=!?:&|]+/,escapes:/\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,tokenizer:{root:[[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@typeKeywords":"keyword","@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,{token:"annotation",log:"annotation token: $0"}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@mlstring",nextEmbedded:"markdown"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],mlstring:[[/[^"]+/,"string"],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]]}}}}]); +//# sourceMappingURL=28-b9e9a703e11ed7dd7d7e.js.map \ No newline at end of file diff --git a/28-b9e9a703e11ed7dd7d7e.js.map b/28-b9e9a703e11ed7dd7d7e.js.map new file mode 100644 index 0000000..1408325 --- /dev/null +++ b/28-b9e9a703e11ed7dd7d7e.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.js"],"names":["conf","comments","lineComment","brackets","autoClosingPairs","open","close","notIn","surroundingPairs","folding","offSide","language","defaultToken","tokenPostfix","keywords","typeKeywords","directiveLocations","operators","symbols","escapes","tokenizer","root","cases","include","token","log","next","nextEmbedded","bracket","mlstring","string","whitespace"],"mappings":"4FAAA,qFAMO,IAAIA,EAAO,CAChBC,SAAU,CACRC,YAAa,KAEfC,SAAU,CAAC,CAAC,IAAK,KAAM,CAAC,IAAK,KAAM,CAAC,IAAK,MACzCC,iBAAkB,CAAC,CACjBC,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,MACNC,MAAO,MACPC,MAAO,CAAC,SAAU,YACjB,CACDF,KAAM,IACNC,MAAO,IACPC,MAAO,CAAC,SAAU,aAEpBC,iBAAkB,CAAC,CACjBH,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,IACNC,MAAO,KACN,CACDD,KAAM,MACNC,MAAO,OACN,CACDD,KAAM,IACNC,MAAO,MAETG,QAAS,CACPC,SAAS,IAGFC,EAAW,CAEpBC,aAAc,UACdC,aAAc,OACdC,SAAU,CAAC,OAAQ,OAAQ,QAAS,QAAS,WAAY,eAAgB,SAAU,SAAU,YAAa,SAAU,OAAQ,YAAa,QAAS,OAAQ,QAAS,aAAc,WAAY,MAC7LC,aAAc,CAAC,MAAO,QAAS,SAAU,UAAW,MACpDC,mBAAoB,CAAC,SAAU,SAAU,SAAU,mBAAoB,sBAAuB,YAAa,QAAS,OAAQ,aAAc,eAAgB,yBAA0B,QAAS,WAAY,eAAgB,QAAS,sBAAuB,kBAAmB,kBAAmB,uBAC/RC,UAAW,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,KAErCC,QAAS,YAETC,QAAS,qCAETC,UAAW,CACTC,KAAM,CACN,CAAC,gBAAiB,CAChBC,MAAO,CACL,YAAa,UACb,WAAY,gBAEZ,CAAC,eAAgB,CACnBA,MAAO,CACL,gBAAiB,UACjB,WAAY,qBAGhB,CACEC,QAAS,eAEX,CAAC,aAAc,aAAc,CAAC,WAAY,CACxCD,MAAO,CACL,aAAc,WACd,WAAY,MAKhB,CAAC,yBAA0B,CACzBE,MAAO,aACPC,IAAK,yBAEP,CAAC,2BAA4B,gBAAiB,CAAC,oBAAqB,cAAe,CAAC,MAAO,UAC3F,CAAC,QAAS,aAAc,CAAC,MAAO,CAC9BD,MAAO,SACPE,KAAM,YACNC,aAAc,aAEhB,CAAC,kBAAmB,kBAAmB,CAAC,IAAK,CAC3CH,MAAO,eACPI,QAAS,QACTF,KAAM,aAERG,SAAU,CAAC,CAAC,QAAS,UAAW,CAAC,MAAO,CACtCL,MAAO,SACPE,KAAM,OACNC,aAAc,UAEhBG,OAAQ,CAAC,CAAC,UAAW,UAAW,CAAC,WAAY,iBAAkB,CAAC,MAAO,yBAA0B,CAAC,IAAK,CACrGN,MAAO,eACPI,QAAS,SACTF,KAAM,UAERK,WAAY,CAAC,CAAC,aAAc,IAAK,CAAC,OAAQ","file":"28-b9e9a703e11ed7dd7d7e.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nexport var conf = {\n comments: {\n lineComment: '#'\n },\n brackets: [['{', '}'], ['[', ']'], ['(', ')']],\n autoClosingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\"\"\"',\n close: '\"\"\"',\n notIn: ['string', 'comment']\n }, {\n open: '\"',\n close: '\"',\n notIn: ['string', 'comment']\n }],\n surroundingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\"\"\"',\n close: '\"\"\"'\n }, {\n open: '\"',\n close: '\"'\n }],\n folding: {\n offSide: true\n }\n};\nexport var language = {\n // Set defaultToken to invalid to see what you do not tokenize yet\n defaultToken: 'invalid',\n tokenPostfix: '.gql',\n keywords: ['null', 'true', 'false', 'query', 'mutation', 'subscription', 'extend', 'schema', 'directive', 'scalar', 'type', 'interface', 'union', 'enum', 'input', 'implements', 'fragment', 'on'],\n typeKeywords: ['Int', 'Float', 'String', 'Boolean', 'ID'],\n directiveLocations: ['SCHEMA', 'SCALAR', 'OBJECT', 'FIELD_DEFINITION', 'ARGUMENT_DEFINITION', 'INTERFACE', 'UNION', 'ENUM', 'ENUM_VALUE', 'INPUT_OBJECT', 'INPUT_FIELD_DEFINITION', 'QUERY', 'MUTATION', 'SUBSCRIPTION', 'FIELD', 'FRAGMENT_DEFINITION', 'FRAGMENT_SPREAD', 'INLINE_FRAGMENT', 'VARIABLE_DEFINITION'],\n operators: ['=', '!', '?', ':', '&', '|'],\n // we include these common regular expressions\n symbols: /[=!?:&|]+/,\n // https://facebook.github.io/graphql/draft/#sec-String-Value\n escapes: /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9A-Fa-f]{4})/,\n // The main tokenizer for our languages\n tokenizer: {\n root: [// identifiers and keywords\n [/[a-z_$][\\w$]*/, {\n cases: {\n '@keywords': 'keyword',\n '@default': 'identifier'\n }\n }], [/[A-Z][\\w\\$]*/, {\n cases: {\n '@typeKeywords': 'keyword',\n '@default': 'type.identifier'\n }\n }], // whitespace\n {\n include: '@whitespace'\n }, // delimiters and operators\n [/[{}()\\[\\]]/, '@brackets'], [/@symbols/, {\n cases: {\n '@operators': 'operator',\n '@default': ''\n }\n }], // @ annotations.\n // As an example, we emit a debugging log message on these tokens.\n // Note: message are supressed during the first load -- change some lines to see them.\n [/@\\s*[a-zA-Z_\\$][\\w\\$]*/, {\n token: 'annotation',\n log: 'annotation token: $0'\n }], // numbers\n [/\\d*\\.\\d+([eE][\\-+]?\\d+)?/, 'number.float'], [/0[xX][0-9a-fA-F]+/, 'number.hex'], [/\\d+/, 'number'], // delimiter: after number because of .\\d floats\n [/[;,.]/, 'delimiter'], [/\"\"\"/, {\n token: 'string',\n next: '@mlstring',\n nextEmbedded: 'markdown'\n }], // strings\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'], [/\"/, {\n token: 'string.quote',\n bracket: '@open',\n next: '@string'\n }]],\n mlstring: [[/[^\"]+/, 'string'], ['\"\"\"', {\n token: 'string',\n next: '@pop',\n nextEmbedded: '@pop'\n }]],\n string: [[/[^\\\\\"]+/, 'string'], [/@escapes/, 'string.escape'], [/\\\\./, 'string.escape.invalid'], [/\"/, {\n token: 'string.quote',\n bracket: '@close',\n next: '@pop'\n }]],\n whitespace: [[/[ \\t\\r\\n]+/, ''], [/#.*$/, 'comment']]\n }\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/29-092a414f8fd4cd5259ed.js b/29-092a414f8fd4cd5259ed.js new file mode 100644 index 0000000..a51774d --- /dev/null +++ b/29-092a414f8fd4cd5259ed.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{O3xE:function(e,t,n){"use strict";n.r(t),n.d(t,"conf",(function(){return i})),n.d(t,"language",(function(){return m}));var a="undefined"==typeof monaco?self.monaco:monaco,r=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],i={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["\x3c!--","--\x3e"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+r.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:a.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+r.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:a.languages.IndentAction.Indent}}]},m={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}}}}]); +//# sourceMappingURL=29-092a414f8fd4cd5259ed.js.map \ No newline at end of file diff --git a/29-092a414f8fd4cd5259ed.js.map b/29-092a414f8fd4cd5259ed.js.map new file mode 100644 index 0000000..b2b1781 --- /dev/null +++ b/29-092a414f8fd4cd5259ed.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.js"],"names":["_monaco","monaco","self","EMPTY_ELEMENTS","conf","wordPattern","comments","blockComment","brackets","autoClosingPairs","open","close","surroundingPairs","onEnterRules","beforeText","RegExp","join","afterText","action","indentAction","languages","IndentAction","IndentOutdent","Indent","language","defaultToken","tokenPostfix","tokenizer","root","token","switchTo","next","doctype","comment","otherTag","script","nextEmbedded","scriptAfterType","scriptAfterTypeEquals","scriptWithCustomType","scriptEmbedded","style","styleAfterType","styleAfterTypeEquals","styleWithCustomType","styleEmbedded","handlebarsInSimpleState","include","handlebarsInEmbeddedState","handlebarsRoot"],"mappings":"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","file":"29-092a414f8fd4cd5259ed.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict'; // Allow for running under nodejs/requirejs in tests\n\nvar _monaco = typeof monaco === 'undefined' ? self.monaco : monaco;\n\nvar EMPTY_ELEMENTS = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'];\nexport var conf = {\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\$\\^\\&\\*\\(\\)\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\s]+)/g,\n comments: {\n blockComment: ['{{!--', '--}}']\n },\n brackets: [[''], ['<', '>'], ['{{', '}}'], ['{', '}'], ['(', ')']],\n autoClosingPairs: [{\n open: '{',\n close: '}'\n }, {\n open: '[',\n close: ']'\n }, {\n open: '(',\n close: ')'\n }, {\n open: '\"',\n close: '\"'\n }, {\n open: '\\'',\n close: '\\''\n }],\n surroundingPairs: [{\n open: '<',\n close: '>'\n }, {\n open: '\"',\n close: '\"'\n }, {\n open: '\\'',\n close: '\\''\n }],\n onEnterRules: [{\n beforeText: new RegExp(\"<(?!(?:\" + EMPTY_ELEMENTS.join('|') + \"))(\\\\w[\\\\w\\\\d]*)([^/>]*(?!/)>)[^<]*$\", 'i'),\n afterText: /^<\\/(\\w[\\w\\d]*)\\s*>$/i,\n action: {\n indentAction: _monaco.languages.IndentAction.IndentOutdent\n }\n }, {\n beforeText: new RegExp(\"<(?!(?:\" + EMPTY_ELEMENTS.join('|') + \"))(\\\\w[\\\\w\\\\d]*)([^/>]*(?!/)>)[^<]*$\", 'i'),\n action: {\n indentAction: _monaco.languages.IndentAction.Indent\n }\n }]\n};\nexport var language = {\n defaultToken: '',\n tokenPostfix: '',\n // ignoreCase: true,\n // The main tokenizer for our languages\n tokenizer: {\n root: [[/\\{\\{/, {\n token: '@rematch',\n switchTo: '@handlebarsInSimpleState.root'\n }], [/)/, ['delimiter.html', 'tag.html', 'delimiter.html']], [/(<)(script)/, ['delimiter.html', {\n token: 'tag.html',\n next: '@script'\n }]], [/(<)(style)/, ['delimiter.html', {\n token: 'tag.html',\n next: '@style'\n }]], [/(<)([:\\w]+)/, ['delimiter.html', {\n token: 'tag.html',\n next: '@otherTag'\n }]], [/(<\\/)(\\w+)/, ['delimiter.html', {\n token: 'tag.html',\n next: '@otherTag'\n }]], [/]+/, 'metatag.content.html'], [/>/, 'metatag.html', '@pop']],\n comment: [[/\\{\\{/, {\n token: '@rematch',\n switchTo: '@handlebarsInSimpleState.comment'\n }], [/-->/, 'comment.html', '@pop'], [/[^-]+/, 'comment.content.html'], [/./, 'comment.content.html']],\n otherTag: [[/\\{\\{/, {\n token: '@rematch',\n switchTo: '@handlebarsInSimpleState.otherTag'\n }], [/\\/?>/, 'delimiter.html', '@pop'], [/\"([^\"]*)\"/, 'attribute.value'], [/'([^']*)'/, 'attribute.value'], [/[\\w\\-]+/, 'attribute.name'], [/=/, 'delimiter'], [/[ \\t\\r\\n]+/]],\n // -- BEGIN \ No newline at end of file diff --git a/favicon-32x32.png b/favicon-32x32.png new file mode 100644 index 0000000..b89a6e5 Binary files /dev/null and b/favicon-32x32.png differ diff --git a/framework-66a826f0c2f2aeede264.js b/framework-66a826f0c2f2aeede264.js new file mode 100644 index 0000000..23b86de --- /dev/null +++ b/framework-66a826f0c2f2aeede264.js @@ -0,0 +1,3 @@ +/*! For license information please see framework-66a826f0c2f2aeede264.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{"+wdc":function(e,t,n){"use strict";var r,l,a,i,o;if(Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,s=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(n){throw setTimeout(s,0),n}},f=Date.now();t.unstable_now=function(){return Date.now()-f},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(s,0))},l=function(e,t){c=setTimeout(e,t)},a=function(){clearTimeout(c)},i=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,p=window.Date,m=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)t.unstable_now=function(){return d.now()};else{var y=p.now();t.unstable_now=function(){return p.now()-y}}var g=!1,b=null,w=-1,k=5,E=0;i=function(){return t.unstable_now()>=E},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125P(i,n))void 0!==u&&0>P(u,i)?(e[r]=u,e[o]=n,r=o):(e[r]=i,e[a]=n,r=a);else{if(!(void 0!==u&&0>P(u,n)))break e;e[r]=u,e[o]=n,r=o}}}return t}return null}function P(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var N=[],z=[],O=1,M=null,I=3,R=!1,F=!1,U=!1;function D(e){for(var t=C(z);null!==t;){if(null===t.callback)_(z);else{if(!(t.startTime<=e))break;_(z),t.sortIndex=t.expirationTime,S(N,t)}t=C(z)}}function L(e){if(U=!1,D(e),!F)if(null!==C(N))F=!0,r(A);else{var t=C(z);null!==t&&l(L,t.startTime-e)}}function A(e,n){F=!1,U&&(U=!1,a()),R=!0;var r=I;try{for(D(n),M=C(N);null!==M&&(!(M.expirationTime>n)||e&&!i());){var o=M.callback;if(null!==o){M.callback=null,I=M.priorityLevel;var u=o(M.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?M.callback=u:M===C(N)&&_(N),D(n)}else _(N);M=C(N)}if(null!==M)var c=!0;else{var s=C(z);null!==s&&l(L,s.startTime-n),c=!1}return c}finally{M=null,I=r,R=!1}}function W(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var j=o;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_scheduleCallback=function(e,n,i){var o=t.unstable_now();if("object"==typeof i&&null!==i){var u=i.delay;u="number"==typeof u&&0o?(e.sortIndex=u,S(z,e),null===C(N)&&e===C(z)&&(U?a():U=!0,l(L,u-o))):(e.sortIndex=i,S(N,e),F||R||(F=!0,r(A))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_shouldYield=function(){var e=t.unstable_now();D(e);var n=C(N);return n!==M&&null!==M&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTimeO.length&&O.push(e)}function R(e,t,n){return null==e?0:function e(t,n,r,l){var o=typeof t;"undefined"!==o&&"boolean"!==o||(t=null);var u=!1;if(null===t)u=!0;else switch(o){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case a:case i:u=!0}}if(u)return r(l,t,""===n?"."+F(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c