diff --git a/dist/dist-min.tar.gz b/dist/dist-min.tar.gz index a9bc2bd..ff68a42 100644 Binary files a/dist/dist-min.tar.gz and b/dist/dist-min.tar.gz differ diff --git a/dist/dist-min.zip b/dist/dist-min.zip index ab6bc8b..80d3f0f 100644 Binary files a/dist/dist-min.zip and b/dist/dist-min.zip differ diff --git a/dist/dist-min/react-console.min.js b/dist/dist-min/react-console.min.js index d5fa058..0b89b95 100644 --- a/dist/dist-min/react-console.min.js +++ b/dist/dist-min/react-console.min.js @@ -1,2 +1,2 @@ -var Console=function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){"use strict";var r=this&&this.__extends||function(t,e){function o(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)},n=o(1);o(!function(){var t=new Error('Cannot find module "./react-console.scss"');throw t.code="MODULE_NOT_FOUND",t}());var s=function(t){function e(){t.apply(this,arguments),this.child={},this.updateSemaphore=0}return r(e,t),e.prototype.componentDidMount=function(){this.idle()},e.prototype.componentDidUpdate=function(){this.idle()},e.prototype.idle=function(){var t=this;this.child.cursor&&(0==this.updateSemaphore&&(this.child.cursor.className="react-console-cursor"),this.updateSemaphore++,window.setTimeout(function(){t.updateSemaphore--,0==t.updateSemaphore&&t.child.cursor&&(t.child.cursor.className="react-console-cursor react-console-cursor-idle")},1e3))},e.prototype.renderValue=function(){var t=this;return this.props.point<0?[this.props.value]:this.props.point==this.props.value.length?[this.props.value,n.createElement("span",{ref:function(e){return t.child.cursor=e},key:"cursor",className:"react-console-cursor"}," ")]:[this.props.value.substring(0,this.props.point),n.createElement("span",{ref:function(e){return t.child.cursor=e},key:"cursor",className:"react-console-cursor"},this.props.value.substring(this.props.point,this.props.point+1)),this.props.value.substring(this.props.point+1)]},e.prototype.render=function(){var t=this.props.label;if(this.props.argument){var e=t.lastIndexOf("\n");t=e>=0?t.substring(0,e+1):""}return n.createElement("div",{className:"react-console-prompt-box"},n.createElement("span",{className:"react-console-prompt-label"},t),n.createElement("span",{className:"react-console-prompt-argument"},this.props.argument),n.createElement("span",{className:"react-console-prompt"},this.renderValue()))},e.defaultProps={point:-1,value:"",label:"> ",argument:null},e}(n.Component),a=function(t){return t.headers?n.createElement("thead",null,n.createElement("tr",null,t.headers.map(function(t){return n.createElement("th",{scope:"col",key:t},t)}))):null},l=function(t){if(t.isTable){var e=t.value[0];return n.createElement("div",{className:"react-console-message react-console-table"+(t.type?" react-console-message-"+t.type:"")},n.createElement("table",null,n.createElement(a,{headers:e.headers}),n.createElement("tbody",null,e.rows&&e.rows.map(function(t,e){return n.createElement("tr",{key:e},t.map(function(t,e){return"string"==typeof t?n.createElement("td",{key:e},t):"object"==typeof t&&"link"===t.type?n.createElement("td",{key:e},n.createElement("a",{href:t.href,target:t.target?t.target:""},t.text)):n.createElement("td",{key:e},JSON.stringify(t))}))}))))}return n.createElement("div",{className:"react-console-message"+(t.type?" react-console-message-"+t.type:"")},t.value.map(function(t,e){return"string"==typeof t?n.createElement("div",{key:e},t):"object"==typeof t&&"link"===t.type?n.createElement("div",{key:e},n.createElement("a",{href:t.href,target:t.target?t.target:""},t.text)):n.createElement("div",{key:e},JSON.stringify(t))}))};l.defaultProps={type:null,value:[],isTable:!1};var i=function(t){function e(e){var o=this;t.call(this,e),this.child={},this.setBusy=function(){o.setState({acceptInput:!1})},this.getSafeLog=function(){return o.state.log.length||o.state.log.push({label:"",command:"",message:[]}),o.state.log},this.updateLastLog=function(){for(var t=[],e=0;e0?r[o.state.log.length-1].message.length-1:0;r[o.state.log.length-1].message[n]={value:t},o.setState({log:r},o.scrollIfBottom())},this.log=function(){for(var t=[],e=0;e0&&o.setState({point:o.movePoint(-1),promptText:o.state.promptText.substring(0,o.state.point-1)+o.state.promptText.substring(o.state.point),argument:null,lastCommand:0},o.scrollToBottom)},this.killLine=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=t[0]+o.state.promptText.substring(o.state.point):t.unshift(o.state.promptText.substring(o.state.point)),o.setState({promptText:o.state.promptText.substring(0,o.state.point),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.backwardKillLine=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=o.state.promptText.substring(0,o.state.point)+t[0]:t.unshift(o.state.promptText.substring(0,o.state.point)),o.setState({point:0,promptText:o.state.promptText.substring(o.state.point),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.killWholeLine=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=o.state.promptText.substring(0,o.state.point)+t[0]+o.state.promptText.substring(o.state.point):t.unshift(o.state.promptText),o.setState({point:0,promptText:"",kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.killWord=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=t[0]+o.state.promptText.substring(o.state.point,o.nextWord()):t.unshift(o.state.promptText.substring(o.state.point,o.nextWord())),o.setState({promptText:o.state.promptText.substring(0,o.state.point)+o.state.promptText.substring(o.nextWord()),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.backwardKillWord=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=o.state.promptText.substring(o.previousWord(),o.state.point)+t[0]:t.unshift(o.state.promptText.substring(o.previousWord(),o.state.point)),o.setState({point:o.previousWord(),promptText:o.state.promptText.substring(0,o.previousWord())+o.state.promptText.substring(o.state.point),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.yank=function(){o.setState(Object.assign(o.consoleInsert(o.state.kill[o.state.killn]),{lastCommand:3}),o.scrollToBottom)},this.yankPop=function(){if(3==o.state.lastCommand){var t=o.rotateRing(1,o.state.killn,o.state.kill.length);o.setState(Object.assign(o.consoleInsert(o.state.kill[t],o.state.kill[o.state.killn].length),{killn:t,lastCommand:3}),o.scrollToBottom)}},this.complete=function(){if(o.props.complete){for(var t=o.state.promptText.split(" "),e=0,r=t[0].length;r1){var l=o.state.log;l.push({label:o.state.currLabel,command:o.state.promptText,message:[{type:"completion",value:[n.join("\t")]}]}),o.setState({currLabel:o.nextLabel(),log:l,argument:null,lastCommand:0},o.scrollToBottom)}}},this.prefixMeta=function(){1==o.state.lastCommand&&o.setState({argument:null,lastCommand:0})},this.cancelCommand=function(){if(o.state.acceptInput){o.child.typer.value="";var t=o.state.log;t.push({label:o.state.currLabel,command:o.state.promptText,message:[]}),o.setState({typer:"",point:0,promptText:"",restoreText:"",log:t,historyn:0,argument:null,lastCommand:0},o.scrollToBottom)}else o.props.cancel()},this.textInsert=function(t,e,o,r){return void 0===o&&(o=0),void 0===r&&(r=e.length),e.substring(0,r-o)+t+e.substring(r)},this.consoleInsert=function(t,e){void 0===e&&(e=0);var r=o.textInsert(t,o.state.promptText,e,o.state.point);return{point:o.movePoint(t.length-e,t.length-e+o.state.promptText.length),promptText:r,restoreText:r,argument:null,lastCommand:0}},this.movePoint=function(t,e){void 0===e&&(e=o.state.promptText.length);var r=o.state.point+t;return r<0?0:r>e?e:r},this.rotateRing=function(t,e,o,r){return void 0===r&&(r=!0),0==o?0:r?(o+(e+t)%o)%o:(e-=t,e<0?0:e>=o?o:e)},this.rotateHistory=function(t){var e=o.rotateRing(t,o.state.historyn,o.state.history.length,!1);if(0==e)o.setState({point:o.state.restoreText.length,promptText:o.state.restoreText,historyn:e,argument:null,lastCommand:0},o.scrollToBottom);else{var r=o.state.history[o.state.history.length-e];o.setState({point:r.length,promptText:r,historyn:e,argument:null,lastCommand:0},o.scrollToBottom)}},this.searchHistory=function(t,e){void 0===t&&(t=o.state.searchDirection),void 0===e&&(e=!1);var r=o.state.historyn,n=0==t?1:-1;for(e&&(r+=n);r>0&&r<=o.state.history.length;r+=n){var s=o.state.history[o.state.history.length-r],a=s.indexOf(o.state.searchText);if(a>-1)return{point:a,promptText:s,searchDirection:t,searchInit:!1,historyn:r}}return{searchDirection:t,searchInit:!1}},this.scrollSemaphore=0,this.scrollIfBottom=function(){return o.scrollSemaphore>0||o.child.container.scrollTop==o.child.container.scrollHeight-o.child.container.offsetHeight?(o.scrollSemaphore++,o.scrollIfBottomTrue):null},this.scrollIfBottomTrue=function(){o.scrollToBottom(),o.scrollSemaphore--},this.scrollToBottom=function(){o.child.container.scrollTop=o.child.container.scrollHeight;var t=o.child.focus.getBoundingClientRect();(t.top<0||t.left<0||t.bottom>(window.innerHeight||document.documentElement.clientHeight)||t.right>(window.innerWidth||document.documentElement.clientWidth))&&o.child.typer.scrollIntoView(!1)},this.nextLabel=function(){return"string"==typeof o.props.promptLabel?o.props.promptLabel:o.props.promptLabel()},this.state={focus:!1,acceptInput:!0,typer:"",point:0,currLabel:this.nextLabel(),promptText:"",restoreText:"",searchText:"",searchDirection:null,searchInit:!1,log:[],history:[],historyn:0,kill:[],killn:0,argument:null,lastCommand:0}}return r(e,t),e.prototype.componentDidMount=function(){this.props.autofocus&&this.focus()},e.prototype.nextWord=function(){var t=/\W\w/.exec(this.state.promptText.substring(this.state.point));return t?t.index+this.state.point+1:this.state.promptText.length},e.prototype.previousWord=function(){var t=/\W\w(?!.*\W\w)/.exec(this.state.promptText.substring(0,this.state.point-1));return t?t.index+1:0},e.prototype.render=function(){var t=this;return n.createElement("div",{ref:function(e){return t.child.container=e},className:"react-console-container "+(this.state.focus?"react-console-focus":"react-console-nofocus"),onClick:this.focus},this.props.welcomeMessage?n.createElement("div",{className:"react-console-message react-console-welcome"},this.props.welcomeMessage):null,this.state.log.map(function(t){return[n.createElement(s,{label:t.label,value:t.command})].concat(t.message.map(function(t,e){return n.createElement(l,{key:e,type:t.type,value:t.value,isTable:t.isTable})}))}),this.state.acceptInput?n.createElement(s,{label:this.state.currLabel,value:this.state.promptText,point:this.state.point,argument:this.state.argument}):null,n.createElement("div",{style:{overflow:"hidden",height:1,width:1}},n.createElement("textarea",{ref:function(e){return t.child.typer=e},className:"react-console-typer",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",style:{outline:"none",color:"transparent",backgroundColor:"transparent",border:"none",resize:"none",overflow:"hidden"},onBlur:this.blur,onKeyDown:this.keyDown,onChange:this.change,onPaste:this.paste})),n.createElement("div",{ref:function(e){return t.child.focus=e}}," "))},e.defaultProps={promptLabel:"> ",continue:function(){return!1},cancel:function(){}},e}(n.Component);Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e){t.exports=React}]); +var Console=function(t){function e(r){if(o[r])return o[r].exports;var s=o[r]={exports:{},id:r,loaded:!1};return t[r].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){"use strict";var r=this&&this.__extends||function(t,e){function o(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)},s=o(2);o(1);var n=function(t){function e(){t.apply(this,arguments),this.child={},this.updateSemaphore=0}return r(e,t),e.prototype.componentDidMount=function(){this.idle()},e.prototype.componentDidUpdate=function(){this.idle()},e.prototype.idle=function(){var t=this;this.child.cursor&&(0==this.updateSemaphore&&(this.child.cursor.className="react-console-cursor"),this.updateSemaphore++,window.setTimeout(function(){t.updateSemaphore--,0==t.updateSemaphore&&t.child.cursor&&(t.child.cursor.className="react-console-cursor react-console-cursor-idle")},1e3))},e.prototype.renderValue=function(){var t=this;return this.props.point<0?[this.props.value]:this.props.point==this.props.value.length?[this.props.value,s.createElement("span",{ref:function(e){return t.child.cursor=e},key:"cursor",className:"react-console-cursor"}," ")]:[this.props.value.substring(0,this.props.point),s.createElement("span",{ref:function(e){return t.child.cursor=e},key:"cursor",className:"react-console-cursor"},this.props.value.substring(this.props.point,this.props.point+1)),this.props.value.substring(this.props.point+1)]},e.prototype.render=function(){var t=this.props.label;if(this.props.argument){var e=t.lastIndexOf("\n");t=e>=0?t.substring(0,e+1):""}return s.createElement("div",{className:"react-console-prompt-box"},s.createElement("span",{className:"react-console-prompt-label"},t),s.createElement("span",{className:"react-console-prompt-argument"},this.props.argument),s.createElement("span",{className:"react-console-prompt"},this.renderValue()))},e.defaultProps={point:-1,value:"",label:"> ",argument:null},e}(s.Component),a=function(t){return t.headers?s.createElement("thead",null,s.createElement("tr",null,t.headers.map(function(t){return s.createElement("th",{scope:"col",key:t},t)}))):null},l=function(t){if(t.isTable){var e=t.value[0];return s.createElement("div",{className:"react-console-message react-console-table"+(t.type?" react-console-message-"+t.type:"")},s.createElement("table",null,s.createElement(a,{headers:e.headers}),s.createElement("tbody",null,e.rows&&e.rows.map(function(t,e){return s.createElement("tr",{key:e},t.map(function(t,e){return"string"==typeof t?s.createElement("td",{key:e},t):"object"==typeof t&&"link"===t.type?s.createElement("td",{key:e},s.createElement("a",{href:t.href,target:t.target?t.target:""},t.text)):s.createElement("td",{key:e},JSON.stringify(t))}))}))))}return s.createElement("div",{className:"react-console-message"+(t.type?" react-console-message-"+t.type:"")},t.value.map(function(t,e){return"string"==typeof t?s.createElement("div",{key:e},t):"object"==typeof t&&"link"===t.type?s.createElement("div",{key:e},s.createElement("a",{href:t.href,target:t.target?t.target:""},t.text)):s.createElement("div",{key:e},JSON.stringify(t))}))};l.defaultProps={type:null,value:[],isTable:!1};var i=function(t){function e(e){var o=this;t.call(this,e),this.child={},this.setBusy=function(){o.setState({acceptInput:!1})},this.getSafeLog=function(){return o.state.log.length||o.state.log.push({label:"",command:"",message:[]}),o.state.log},this.updateLastLog=function(){for(var t=[],e=0;e0?r[o.state.log.length-1].message.length-1:0;r[o.state.log.length-1].message[s]={value:t},o.setState({log:r},o.scrollIfBottom())},this.log=function(){for(var t=[],e=0;e0&&o.setState({point:o.movePoint(-1),promptText:o.state.promptText.substring(0,o.state.point-1)+o.state.promptText.substring(o.state.point),argument:null,lastCommand:0},o.scrollToBottom)},this.killLine=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=t[0]+o.state.promptText.substring(o.state.point):t.unshift(o.state.promptText.substring(o.state.point)),o.setState({promptText:o.state.promptText.substring(0,o.state.point),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.backwardKillLine=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=o.state.promptText.substring(0,o.state.point)+t[0]:t.unshift(o.state.promptText.substring(0,o.state.point)),o.setState({point:0,promptText:o.state.promptText.substring(o.state.point),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.killWholeLine=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=o.state.promptText.substring(0,o.state.point)+t[0]+o.state.promptText.substring(o.state.point):t.unshift(o.state.promptText),o.setState({point:0,promptText:"",kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.killWord=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=t[0]+o.state.promptText.substring(o.state.point,o.nextWord()):t.unshift(o.state.promptText.substring(o.state.point,o.nextWord())),o.setState({promptText:o.state.promptText.substring(0,o.state.point)+o.state.promptText.substring(o.nextWord()),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.backwardKillWord=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=o.state.promptText.substring(o.previousWord(),o.state.point)+t[0]:t.unshift(o.state.promptText.substring(o.previousWord(),o.state.point)),o.setState({point:o.previousWord(),promptText:o.state.promptText.substring(0,o.previousWord())+o.state.promptText.substring(o.state.point),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.yank=function(){o.setState(Object.assign(o.consoleInsert(o.state.kill[o.state.killn]),{lastCommand:3}),o.scrollToBottom)},this.yankPop=function(){if(3==o.state.lastCommand){var t=o.rotateRing(1,o.state.killn,o.state.kill.length);o.setState(Object.assign(o.consoleInsert(o.state.kill[t],o.state.kill[o.state.killn].length),{killn:t,lastCommand:3}),o.scrollToBottom)}},this.complete=function(){if(o.props.complete){for(var t=o.state.promptText.split(" "),e=0,r=t[0].length;r1){var l=o.state.log;l.push({label:o.state.currLabel,command:o.state.promptText,message:[{type:"completion",value:[s.join("\t")]}]}),o.setState({currLabel:o.nextLabel(),log:l,argument:null,lastCommand:0},o.scrollToBottom)}}},this.prefixMeta=function(){1==o.state.lastCommand&&o.setState({argument:null,lastCommand:0})},this.cancelCommand=function(){if(o.state.acceptInput){o.child.typer.value="";var t=o.state.log;t.push({label:o.state.currLabel,command:o.state.promptText,message:[]}),o.setState({typer:"",point:0,promptText:"",restoreText:"",log:t,historyn:0,argument:null,lastCommand:0},o.scrollToBottom)}else o.props.cancel()},this.textInsert=function(t,e,o,r){return void 0===o&&(o=0),void 0===r&&(r=e.length),e.substring(0,r-o)+t+e.substring(r)},this.consoleInsert=function(t,e){void 0===e&&(e=0);var r=o.textInsert(t,o.state.promptText,e,o.state.point);return{point:o.movePoint(t.length-e,t.length-e+o.state.promptText.length),promptText:r,restoreText:r,argument:null,lastCommand:0}},this.movePoint=function(t,e){void 0===e&&(e=o.state.promptText.length);var r=o.state.point+t;return r<0?0:r>e?e:r},this.rotateRing=function(t,e,o,r){return void 0===r&&(r=!0),0==o?0:r?(o+(e+t)%o)%o:(e-=t,e<0?0:e>=o?o:e)},this.rotateHistory=function(t){var e=o.rotateRing(t,o.state.historyn,o.state.history.length,!1);if(0==e)o.setState({point:o.state.restoreText.length,promptText:o.state.restoreText,historyn:e,argument:null,lastCommand:0},o.scrollToBottom);else{var r=o.state.history[o.state.history.length-e];o.setState({point:r.length,promptText:r,historyn:e,argument:null,lastCommand:0},o.scrollToBottom)}},this.searchHistory=function(t,e){void 0===t&&(t=o.state.searchDirection),void 0===e&&(e=!1);var r=o.state.historyn,s=0==t?1:-1;for(e&&(r+=s);r>0&&r<=o.state.history.length;r+=s){var n=o.state.history[o.state.history.length-r],a=n.indexOf(o.state.searchText);if(a>-1)return{point:a,promptText:n,searchDirection:t,searchInit:!1,historyn:r}}return{searchDirection:t,searchInit:!1}},this.scrollSemaphore=0,this.scrollIfBottom=function(){return o.scrollSemaphore>0||o.child.container.scrollTop==o.child.container.scrollHeight-o.child.container.offsetHeight?(o.scrollSemaphore++,o.scrollIfBottomTrue):null},this.scrollIfBottomTrue=function(){o.scrollToBottom(),o.scrollSemaphore--},this.scrollToBottom=function(){o.child.container.scrollTop=o.child.container.scrollHeight;var t=o.child.focus.getBoundingClientRect();(t.top<0||t.left<0||t.bottom>(window.innerHeight||document.documentElement.clientHeight)||t.right>(window.innerWidth||document.documentElement.clientWidth))&&o.child.typer.scrollIntoView(!1)},this.nextLabel=function(){return"string"==typeof o.props.promptLabel?o.props.promptLabel:o.props.promptLabel()},this.state={focus:!1,acceptInput:!0,typer:"",point:0,currLabel:this.nextLabel(),promptText:"",restoreText:"",searchText:"",searchDirection:null,searchInit:!1,log:[],history:[],historyn:0,kill:[],killn:0,argument:null,lastCommand:0}}return r(e,t),e.prototype.componentDidMount=function(){this.props.autofocus&&this.focus()},e.prototype.nextWord=function(){var t=/\W\w/.exec(this.state.promptText.substring(this.state.point));return t?t.index+this.state.point+1:this.state.promptText.length},e.prototype.previousWord=function(){var t=/\W\w(?!.*\W\w)/.exec(this.state.promptText.substring(0,this.state.point-1));return t?t.index+1:0},e.prototype.render=function(){var t=this;return s.createElement("div",{ref:function(e){return t.child.container=e},className:"react-console-container "+(this.state.focus?"react-console-focus":"react-console-nofocus"),onClick:this.focus},this.props.welcomeMessage?s.createElement("div",{className:"react-console-message react-console-welcome"},this.props.welcomeMessage):null,this.state.log.map(function(t){return[s.createElement(n,{label:t.label,value:t.command})].concat(t.message.map(function(t,e){return s.createElement(l,{key:e,type:t.type,value:t.value,isTable:t.isTable})}))}),this.state.acceptInput?s.createElement(n,{label:this.state.currLabel,value:this.state.promptText,point:this.state.point,argument:this.state.argument}):null,s.createElement("div",{style:{overflow:"hidden",height:1,width:1}},s.createElement("textarea",{ref:function(e){return t.child.typer=e},className:"react-console-typer",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",style:{outline:"none",color:"transparent",backgroundColor:"transparent",border:"none",resize:"none",overflow:"hidden"},onBlur:this.blur,onKeyDown:this.keyDown,onChange:this.change,onPaste:this.paste})),s.createElement("div",{ref:function(e){return t.child.focus=e}}," "))},e.defaultProps={promptLabel:"> ",continue:function(){return!1},cancel:function(){}},e}(s.Component);Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e){},function(t,e){t.exports=React}]); //# sourceMappingURL=react-console.min.js.map \ No newline at end of file diff --git a/dist/dist-min/react-console.min.js.map b/dist/dist-min/react-console.min.js.map index 2447b2d..066fd56 100644 --- a/dist/dist-min/react-console.min.js.map +++ b/dist/dist-min/react-console.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///react-console.min.js","webpack:///webpack/bootstrap 892fbe9368c37545a396","webpack:///./react-console.tsx","webpack:///external \"React\""],"names":["Console","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","__extends","this","d","b","__","constructor","hasOwnProperty","prototype","Object","create","React","e","Error","code","ConsolePrompt","_super","apply","arguments","child","updateSemaphore","componentDidMount","idle","componentDidUpdate","_this","cursor","className","window","setTimeout","renderValue","props","point","value","length","createElement","ref","key","substring","render","label","argument","idx","lastIndexOf","defaultProps","Component","ConsoleTableHeader","headers","map","header","scope","ConsoleMessage","isTable","data","type","rows","row","index","cell","cellIndex","href","target","text","JSON","stringify","val","i","default_1","setBusy","setState","acceptInput","getSafeLog","state","log","push","command","message","updateLastLog","messages","_i","indexToReplace","scrollIfBottom","logX","logTable","tableData","return","currLabel","nextLabel","focus","getSelection","toString","typer","scrollToBottom","blur","keyDown","keyCodes","13","acceptLine","37","backwardChar","39","forwardChar","38","previousHistory","40","nextHistory","8","backwardDeleteChar","46","deleteChar","35","endOfLine","36","beginningOfLine","9","complete","27","prefixMeta","ctrlCodes","65","69","70","66","76","clearScreen","80","78","82","reverseSearchHistory","83","forwardSearchHistory","68","75","killLine","85","backwardKillLine","89","yank","67","cancelCommand","metaCodes","forwardWord","backwardWord","nonIncrementalReverseSearchHistory","nonIncrementalForwardSearchHistory","190","yankLastArg","killWord","backwardKillWord","yankPop","metaShiftCodes","188","beginningOfHistory","endOfHistory","189","metaCtrlCodes","yankNthArg","altKey","ctrlKey","keyCode","preventDefault","shiftKey","change","insert","replace","lastCommand","searchText","searchInit","textInsert","triggerSearch","assign","consoleInsert","paste","clipboardData","getData","promptText","movePoint","nextWord","previousWord","continue","command_1","history_1","history","restoreText","historyn","handler","rotateHistory","searchDirection","searchHistory","historySearchBackward","historySearchForward","historySubstringSearchBackward","historySubstringSearchForward","kill","unshift","killn","killWholeLine","rotateRing","words","split","curr","completions","join","cancel","n","max","pos","ringn","ring","circular","direction","next","inc","entry","indexOf","scrollSemaphore","container","scrollTop","scrollHeight","offsetHeight","scrollIfBottomTrue","rect","getBoundingClientRect","top","left","bottom","innerHeight","document","documentElement","clientHeight","right","innerWidth","clientWidth","scrollIntoView","promptLabel","autofocus","search","exec","onClick","welcomeMessage","concat","style","overflow","height","width","autoComplete","autoCorrect","autoCapitalize","spellCheck","outline","color","backgroundColor","border","resize","onBlur","onKeyDown","onChange","onPaste","defineProperty","default"],"mappings":"AAAA,GAAIA,SACK,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDOM,SAAUI,EAAQD,EAASH,GE7CjC,YFgDC,IAAIW,GAAaC,MAAQA,KAAKD,WAAc,SAAUE,EAAGC,GAErD,QAASC,KAAOH,KAAKI,YAAcH,EADnC,IAAK,GAAIH,KAAKI,GAAOA,EAAEG,eAAeP,KAAIG,EAAEH,GAAKI,EAAEJ,GAEnDG,GAAEK,UAAkB,OAANJ,EAAaK,OAA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MACZC,eAAe,MACfC,WAAW,QACXP,OAASQ,QAAS,OACjBC,MAAO,cACPC,gBAAiB,cACjBC,OAAQ,OACRC,OAAQ,OACRX,SAAU,UAEXY,OAAQ3P,KAAK0F,KACbkK,UAAW5P,KAAK2F,QAChBkK,SAAU7P,KAAK+J,OACf+F,QAAS9P,KAAKyK,SAGhBhK,EAAAuB,cAAA,OAAKC,IAAK,SAAAA,GAAO,MAAAX,GAAKL,MAAMoE,MAAQpD,IAAI,OA12BnC+B,EAAAvB,cACN8L,YAAa,KACbvD,SAAU,WAAa,OAAO,GAC9BwB,OAAQ,cA02BVxI,GAp4B6BvD,EAAMiC,UAAnCnC,QAAAwP,eAAAxQ,EAAA,cAAAuC,OAAA,IFozBCvC,EAAQyQ,QAAUhM,GAKb,SAAUxE,EAAQD,GG3/BxBC,EAAAD,QAAAkB","file":"react-console.min.js","sourcesContent":["var Console =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tvar __extends = (this && this.__extends) || function (d, b) {\n\t for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n\t function __() { this.constructor = d; }\n\t d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n\t};\n\tvar React = __webpack_require__(1);\n\t__webpack_require__(!(function webpackMissingModule() { var e = new Error(\"Cannot find module \\\"./react-console.scss\\\"\"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));\n\tvar ConsolePrompt = (function (_super) {\n\t __extends(ConsolePrompt, _super);\n\t function ConsolePrompt() {\n\t _super.apply(this, arguments);\n\t this.child = {};\n\t // DOM Management\n\t this.updateSemaphore = 0;\n\t }\n\t // Component Lifecycle\n\t ConsolePrompt.prototype.componentDidMount = function () {\n\t this.idle();\n\t };\n\t ConsolePrompt.prototype.componentDidUpdate = function () {\n\t this.idle();\n\t };\n\t ConsolePrompt.prototype.idle = function () {\n\t var _this = this;\n\t // Blink cursor when idle\n\t if (this.child.cursor) {\n\t if (this.updateSemaphore == 0) {\n\t this.child.cursor.className = \"react-console-cursor\";\n\t }\n\t this.updateSemaphore++;\n\t window.setTimeout(function () {\n\t _this.updateSemaphore--;\n\t if (_this.updateSemaphore == 0 && _this.child.cursor) {\n\t _this.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t }\n\t }, 1000);\n\t }\n\t };\n\t ConsolePrompt.prototype.renderValue = function () {\n\t var _this = this;\n\t if (this.props.point < 0) {\n\t return [this.props.value];\n\t }\n\t else if (this.props.point == this.props.value.length) {\n\t return [this.props.value, React.createElement(\"span\", {ref: function (ref) { return _this.child.cursor = ref; }, key: \"cursor\", className: \"react-console-cursor\"}, \" \")];\n\t }\n\t else {\n\t return [this.props.value.substring(0, this.props.point),\n\t React.createElement(\"span\", {ref: function (ref) { return _this.child.cursor = ref; }, key: \"cursor\", className: \"react-console-cursor\"}, this.props.value.substring(this.props.point, this.props.point + 1)),\n\t this.props.value.substring(this.props.point + 1)];\n\t }\n\t };\n\t ConsolePrompt.prototype.render = function () {\n\t var label = this.props.label;\n\t if (this.props.argument) {\n\t var idx = label.lastIndexOf(\"\\n\");\n\t if (idx >= 0) {\n\t label = label.substring(0, idx + 1);\n\t }\n\t else {\n\t label = '';\n\t }\n\t }\n\t return React.createElement(\"div\", {className: \"react-console-prompt-box\"}, React.createElement(\"span\", {className: \"react-console-prompt-label\"}, label), React.createElement(\"span\", {className: \"react-console-prompt-argument\"}, this.props.argument), React.createElement(\"span\", {className: \"react-console-prompt\"}, this.renderValue()));\n\t };\n\t ConsolePrompt.defaultProps = {\n\t point: -1,\n\t value: \"\",\n\t label: \"> \",\n\t argument: null,\n\t };\n\t return ConsolePrompt;\n\t}(React.Component));\n\tvar ConsoleTableHeader = function (props) {\n\t if (props.headers) {\n\t return React.createElement(\"thead\", null, React.createElement(\"tr\", null, props.headers.map(function (header) {\n\t return React.createElement(\"th\", {scope: \"col\", key: header}, header);\n\t })));\n\t }\n\t return null;\n\t};\n\tvar ConsoleMessage = function (props) {\n\t if (props.isTable) {\n\t var data = props.value[0];\n\t return React.createElement(\"div\", {className: \"react-console-message react-console-table\" + (props.type ? \" react-console-message-\" + props.type : \"\")}, React.createElement(\"table\", null, React.createElement(ConsoleTableHeader, {headers: data.headers}), React.createElement(\"tbody\", null, data.rows && data.rows.map(function (row, index) {\n\t return React.createElement(\"tr\", {key: index}, row.map(function (cell, cellIndex) {\n\t if (typeof cell === 'string') {\n\t return React.createElement(\"td\", {key: cellIndex}, cell);\n\t }\n\t else if (typeof cell === 'object' && cell.type === 'link') {\n\t return React.createElement(\"td\", {key: cellIndex}, React.createElement(\"a\", {href: cell.href, target: cell.target ? cell.target : ''}, cell.text));\n\t }\n\t else {\n\t return React.createElement(\"td\", {key: cellIndex}, JSON.stringify(cell));\n\t }\n\t }));\n\t }))));\n\t }\n\t else {\n\t return React.createElement(\"div\", {className: \"react-console-message\" + (props.type ? \" react-console-message-\" + props.type : \"\")}, props.value.map(function (val, i) {\n\t if (typeof val == 'string') {\n\t return React.createElement(\"div\", {key: i}, val);\n\t }\n\t else if (typeof val === 'object' && val.type === 'link') {\n\t return React.createElement(\"div\", {key: i}, React.createElement(\"a\", {href: val.href, target: val.target ? val.target : ''}, val.text));\n\t }\n\t else {\n\t return React.createElement(\"div\", {key: i}, JSON.stringify(val));\n\t }\n\t }));\n\t }\n\t};\n\tConsoleMessage.defaultProps = {\n\t type: null,\n\t value: [],\n\t isTable: false\n\t};\n\t;\n\t;\n\tvar default_1 = (function (_super) {\n\t __extends(default_1, _super);\n\t function default_1(props) {\n\t var _this = this;\n\t _super.call(this, props);\n\t this.child = {};\n\t // Command API\n\t this.setBusy = function () {\n\t _this.setState({ acceptInput: false });\n\t };\n\t this.getSafeLog = function () {\n\t if (!_this.state.log.length) {\n\t _this.state.log.push({ label: '', command: '', message: [] });\n\t }\n\t return _this.state.log;\n\t };\n\t this.updateLastLog = function () {\n\t var messages = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t messages[_i - 0] = arguments[_i];\n\t }\n\t var log = _this.getSafeLog();\n\t var indexToReplace = log[_this.state.log.length - 1].message.length > 0 ? log[_this.state.log.length - 1].message.length - 1 : 0;\n\t log[_this.state.log.length - 1].message[indexToReplace] = { value: messages };\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.log = function () {\n\t var messages = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t messages[_i - 0] = arguments[_i];\n\t }\n\t var log = _this.getSafeLog();\n\t log[_this.state.log.length - 1].message.push({ value: messages });\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.logX = function (type) {\n\t var messages = [];\n\t for (var _i = 1; _i < arguments.length; _i++) {\n\t messages[_i - 1] = arguments[_i];\n\t }\n\t var log = _this.getSafeLog();\n\t if (!log.length) {\n\t log.push({ label: '', command: '', message: [] });\n\t }\n\t log[_this.state.log.length - 1].message.push({ type: type, value: messages });\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.logTable = function (tableData, type) {\n\t var log = _this.getSafeLog();\n\t if (type) {\n\t log[_this.state.log.length - 1].message.push({ isTable: true, type: type, value: [tableData] });\n\t }\n\t else {\n\t log[_this.state.log.length - 1].message.push({ isTable: true, value: [tableData] });\n\t }\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.return = function () {\n\t _this.setState({\n\t acceptInput: true,\n\t currLabel: _this.nextLabel(),\n\t }, _this.scrollIfBottom());\n\t };\n\t // Event Handlers\n\t this.focus = function () {\n\t if (!window.getSelection().toString()) {\n\t _this.child.typer.focus();\n\t _this.setState({ focus: true }, _this.scrollToBottom);\n\t }\n\t };\n\t this.blur = function () {\n\t _this.setState({ focus: false });\n\t };\n\t this.keyDown = function (e) {\n\t var keyCodes = {\n\t // return\n\t 13: _this.acceptLine,\n\t // left\n\t 37: _this.backwardChar,\n\t // right\n\t 39: _this.forwardChar,\n\t // up\n\t 38: _this.previousHistory,\n\t // down\n\t 40: _this.nextHistory,\n\t // backspace\n\t 8: _this.backwardDeleteChar,\n\t // delete\n\t 46: _this.deleteChar,\n\t // end\n\t 35: _this.endOfLine,\n\t // start\n\t 36: _this.beginningOfLine,\n\t // tab\n\t 9: _this.complete,\n\t // esc\n\t 27: _this.prefixMeta,\n\t };\n\t var ctrlCodes = {\n\t // C-a\n\t 65: _this.beginningOfLine,\n\t // C-e\n\t 69: _this.endOfLine,\n\t // C-f\n\t 70: _this.forwardChar,\n\t // C-b\n\t 66: _this.backwardChar,\n\t // C-l\n\t 76: _this.clearScreen,\n\t // C-p\n\t 80: _this.previousHistory,\n\t // C-n\n\t 78: _this.nextHistory,\n\t // C-r\n\t 82: _this.reverseSearchHistory,\n\t // C-s\n\t 83: _this.forwardSearchHistory,\n\t // C-d\n\t 68: _this.deleteChar,\n\t // C-q TODO\n\t //81: this.quotedInsert,\n\t // C-v TODO\n\t //86: this.quotedInsert,\n\t // C-t TODO\n\t //84: this.transposeChars,\n\t // C-k\n\t 75: _this.killLine,\n\t // C-u\n\t 85: _this.backwardKillLine,\n\t // C-y TODO\n\t 89: _this.yank,\n\t // C-c\n\t 67: _this.cancelCommand,\n\t };\n\t var ctrlXCodes = {\n\t // C-x Rubout\n\t 8: _this.backwardKillLine,\n\t };\n\t var ctrlShiftCodes = {};\n\t var metaCodes = {\n\t // M-f\n\t 70: _this.forwardWord,\n\t // M-b\n\t 66: _this.backwardWord,\n\t // M-p\n\t 80: _this.nonIncrementalReverseSearchHistory,\n\t // M-n\n\t 78: _this.nonIncrementalForwardSearchHistory,\n\t // M-.\n\t 190: _this.yankLastArg,\n\t // M-TAB TODO\n\t //9: this.tabInsert,\n\t // M-t TODO\n\t //84: this.transposeWords,\n\t // M-u TODO\n\t //85: this.upcaseWord,\n\t // M-l TODO\n\t //76: this.downcaseWord,\n\t // M-c TODO\n\t //67: this.capitalizeWord,\n\t // M-d\n\t 68: _this.killWord,\n\t // M-backspace\n\t 8: _this.backwardKillWord,\n\t // M-w TODO\n\t //87: this.unixWordRubout,\n\t // M-\\ TODO\n\t //220: this.deleteHorizontalSpace,\n\t // M-y\n\t 89: _this.yankPop,\n\t };\n\t var metaShiftCodes = {\n\t // M-<\n\t 188: _this.beginningOfHistory,\n\t // M->\n\t 190: _this.endOfHistory,\n\t // M-_\n\t 189: _this.yankLastArg,\n\t };\n\t var metaCtrlCodes = {\n\t // M-C-y\n\t 89: _this.yankNthArg,\n\t };\n\t if (_this.state.acceptInput) {\n\t if (e.altKey) {\n\t if (e.ctrlKey) {\n\t if (e.keyCode in metaCtrlCodes) {\n\t metaCtrlCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t }\n\t else if (e.shiftKey) {\n\t if (e.keyCode in metaShiftCodes) {\n\t metaShiftCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t }\n\t else if (e.keyCode in metaCodes) {\n\t metaCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t e.preventDefault();\n\t }\n\t else if (e.ctrlKey) {\n\t if (e.keyCode in ctrlCodes) {\n\t ctrlCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t else if (e.keyCode !== 86) {\n\t e.preventDefault();\n\t }\n\t }\n\t else if (e.keyCode in keyCodes) {\n\t keyCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t }\n\t else if (e.ctrlKey && e.keyCode === 67) {\n\t // if input is blocked, ctrl+c should still call cancel\n\t ctrlCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t };\n\t this.change = function () {\n\t var idx = 0;\n\t for (; idx < _this.state.typer.length && idx < _this.child.typer.value.length; idx++) {\n\t if (_this.state.typer[idx] != _this.child.typer.value[idx]) {\n\t break;\n\t }\n\t }\n\t var insert = _this.child.typer.value.substring(idx);\n\t var replace = _this.state.typer.length - idx;\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t searchText: _this.state.searchInit ? insert : _this.textInsert(insert, _this.state.searchText, replace),\n\t typer: _this.child.typer.value,\n\t }, _this.triggerSearch);\n\t }\n\t else {\n\t _this.setState(Object.assign(_this.consoleInsert(insert, replace), {\n\t typer: _this.child.typer.value,\n\t lastCommand: 0 /* Default */,\n\t }), _this.scrollToBottom);\n\t }\n\t };\n\t this.paste = function (e) {\n\t var insert = e.clipboardData.getData('text');\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t searchText: _this.state.searchInit ? insert : _this.textInsert(insert, _this.state.searchText),\n\t typer: _this.child.typer.value,\n\t }, _this.triggerSearch);\n\t }\n\t else {\n\t _this.setState(Object.assign(_this.consoleInsert(insert), {\n\t lastCommand: 0 /* Default */,\n\t }), _this.scrollToBottom);\n\t }\n\t e.preventDefault();\n\t };\n\t // Commands for Moving\n\t this.beginningOfLine = function () {\n\t _this.setState({\n\t point: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.endOfLine = function () {\n\t _this.setState({\n\t point: _this.state.promptText.length,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.forwardChar = function () {\n\t _this.setState({\n\t point: _this.movePoint(1),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardChar = function () {\n\t _this.setState({\n\t point: _this.movePoint(-1),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.forwardWord = function () {\n\t _this.setState({\n\t point: _this.nextWord(),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardWord = function () {\n\t _this.setState({\n\t point: _this.previousWord(),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t // Commands for Manipulating the History\n\t this.acceptLine = function () {\n\t _this.child.typer.value = \"\";\n\t if (_this.props.continue(_this.state.promptText)) {\n\t _this.setState(Object.assign(_this.consoleInsert(\"\\n\"), {\n\t typer: \"\",\n\t lastCommand: 0 /* Default */,\n\t }), _this.scrollToBottom);\n\t }\n\t else {\n\t var command_1 = _this.state.promptText;\n\t var history_1 = _this.state.history;\n\t var log = _this.state.log;\n\t if (!history_1 || history_1[history_1.length - 1] != command_1) {\n\t history_1.push(command_1);\n\t }\n\t log.push({\n\t label: _this.state.currLabel,\n\t command: command_1,\n\t message: []\n\t });\n\t _this.setState({\n\t acceptInput: false,\n\t typer: \"\",\n\t point: 0,\n\t promptText: \"\",\n\t restoreText: \"\",\n\t log: log,\n\t history: history_1,\n\t historyn: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, function () {\n\t _this.scrollToBottom();\n\t if (_this.props.handler) {\n\t _this.props.handler(command_1);\n\t }\n\t else {\n\t _this.return();\n\t }\n\t });\n\t }\n\t };\n\t this.previousHistory = function () {\n\t _this.rotateHistory(-1);\n\t };\n\t this.nextHistory = function () {\n\t _this.rotateHistory(1);\n\t };\n\t this.beginningOfHistory = function () {\n\t _this.rotateHistory(-_this.state.history.length);\n\t };\n\t this.endOfHistory = function () {\n\t _this.rotateHistory(_this.state.history.length);\n\t };\n\t this.triggerSearch = function () {\n\t if (_this.state.searchDirection == 0 /* Reverse */) {\n\t _this.reverseSearchHistory();\n\t }\n\t else {\n\t _this.forwardSearchHistory();\n\t }\n\t };\n\t this.reverseSearchHistory = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState(Object.assign(_this.searchHistory(0 /* Reverse */, true), {\n\t argument: \"(reverse-i-search)`\" + _this.state.searchText + \"': \",\n\t lastCommand: 1 /* Search */,\n\t }), _this.scrollToBottom);\n\t }\n\t else {\n\t _this.setState({\n\t searchDirection: 0 /* Reverse */,\n\t searchInit: true,\n\t argument: \"(reverse-i-search)`': \",\n\t lastCommand: 1 /* Search */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.forwardSearchHistory = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState(Object.assign(_this.searchHistory(1 /* Forward */, true), {\n\t argument: \"(forward-i-search)`\" + _this.state.searchText + \"': \",\n\t lastCommand: 1 /* Search */,\n\t }), _this.scrollToBottom);\n\t }\n\t else {\n\t _this.setState({\n\t searchDirection: 1 /* Forward */,\n\t searchInit: true,\n\t argument: \"(forward-i-search)`': \",\n\t lastCommand: 1 /* Search */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.clearScreen = function () {\n\t _this.setState({ log: [] });\n\t };\n\t this.nonIncrementalReverseSearchHistory = function () {\n\t // TODO\n\t };\n\t this.nonIncrementalForwardSearchHistory = function () {\n\t // TODO\n\t };\n\t this.historySearchBackward = function () {\n\t // TODO\n\t };\n\t this.historySearchForward = function () {\n\t // TODO\n\t };\n\t this.historySubstringSearchBackward = function () {\n\t // TODO\n\t };\n\t this.historySubstringSearchForward = function () {\n\t // TODO\n\t };\n\t this.yankNthArg = function () {\n\t // TODO\n\t };\n\t this.yankLastArg = function () {\n\t // TODO\n\t };\n\t // Commands for Changing Text\n\t this.deleteChar = function () {\n\t if (_this.state.point < _this.state.promptText.length) {\n\t _this.setState({\n\t promptText: _this.state.promptText.substring(0, _this.state.point)\n\t + _this.state.promptText.substring(_this.state.point + 1),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.backwardDeleteChar = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t searchText: _this.state.searchText.substring(0, _this.state.searchText.length - 1),\n\t typer: _this.child.typer.value,\n\t }, _this.triggerSearch);\n\t }\n\t else if (_this.state.point > 0) {\n\t _this.setState({\n\t point: _this.movePoint(-1),\n\t promptText: _this.state.promptText.substring(0, _this.state.point - 1)\n\t + _this.state.promptText.substring(_this.state.point),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t // Killing and Yanking\n\t this.killLine = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = kill[0] + _this.state.promptText.substring(_this.state.point);\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(_this.state.point));\n\t }\n\t _this.setState({\n\t promptText: _this.state.promptText.substring(0, _this.state.point),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardKillLine = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = _this.state.promptText.substring(0, _this.state.point) + kill[0];\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(0, _this.state.point));\n\t }\n\t _this.setState({\n\t point: 0,\n\t promptText: _this.state.promptText.substring(_this.state.point),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.killWholeLine = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = _this.state.promptText.substring(0, _this.state.point)\n\t + kill[0] + _this.state.promptText.substring(_this.state.point);\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText);\n\t }\n\t _this.setState({\n\t point: 0,\n\t promptText: '',\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.killWord = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = kill[0] + _this.state.promptText.substring(_this.state.point, _this.nextWord());\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(_this.state.point, _this.nextWord()));\n\t }\n\t _this.setState({\n\t promptText: _this.state.promptText.substring(0, _this.state.point)\n\t + _this.state.promptText.substring(_this.nextWord()),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardKillWord = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = _this.state.promptText.substring(_this.previousWord(), _this.state.point) + kill[0];\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(_this.previousWord(), _this.state.point));\n\t }\n\t _this.setState({\n\t point: _this.previousWord(),\n\t promptText: _this.state.promptText.substring(0, _this.previousWord())\n\t + _this.state.promptText.substring(_this.state.point),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.yank = function () {\n\t _this.setState(Object.assign(_this.consoleInsert(_this.state.kill[_this.state.killn]), {\n\t lastCommand: 3 /* Yank */,\n\t }), _this.scrollToBottom);\n\t };\n\t this.yankPop = function () {\n\t if (_this.state.lastCommand == 3 /* Yank */) {\n\t var killn = _this.rotateRing(1, _this.state.killn, _this.state.kill.length);\n\t _this.setState(Object.assign(_this.consoleInsert(_this.state.kill[killn], _this.state.kill[_this.state.killn].length), {\n\t killn: killn,\n\t lastCommand: 3 /* Yank */,\n\t }), _this.scrollToBottom);\n\t }\n\t };\n\t // Numeric Arguments\n\t // Completing\n\t this.complete = function () {\n\t if (_this.props.complete) {\n\t // Split text and find current word\n\t var words = _this.state.promptText.split(\" \");\n\t var curr = 0;\n\t var idx = words[0].length;\n\t while (idx < _this.state.point && curr + 1 < words.length) {\n\t idx += words[++curr].length + 1;\n\t }\n\t var completions = _this.props.complete(words, curr, _this.state.promptText);\n\t if (completions.length == 1) {\n\t // Perform completion\n\t words[curr] = completions[0];\n\t var point = -1;\n\t for (var i = 0; i <= curr; i++) {\n\t point += words[i].length + 1;\n\t }\n\t _this.setState({\n\t point: point,\n\t promptText: words.join(\" \"),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t else if (completions.length > 1) {\n\t // show completions\n\t var log = _this.state.log;\n\t log.push({\n\t label: _this.state.currLabel,\n\t command: _this.state.promptText,\n\t message: [{\n\t type: \"completion\",\n\t value: [completions.join(\"\\t\")],\n\t }]\n\t });\n\t _this.setState({\n\t currLabel: _this.nextLabel(),\n\t log: log,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t }\n\t };\n\t // Keyboard Macros\n\t // Miscellaneous\n\t this.prefixMeta = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t });\n\t }\n\t // TODO Meta prefixed state\n\t };\n\t this.cancelCommand = function () {\n\t if (_this.state.acceptInput) {\n\t _this.child.typer.value = \"\";\n\t var log = _this.state.log;\n\t log.push({\n\t label: _this.state.currLabel,\n\t command: _this.state.promptText,\n\t message: []\n\t });\n\t _this.setState({\n\t typer: \"\",\n\t point: 0,\n\t promptText: \"\",\n\t restoreText: \"\",\n\t log: log,\n\t historyn: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t else {\n\t _this.props.cancel();\n\t }\n\t };\n\t // Helper functions\n\t this.textInsert = function (insert, text, replace, point) {\n\t if (replace === void 0) { replace = 0; }\n\t if (point === void 0) { point = text.length; }\n\t return text.substring(0, point - replace) + insert + text.substring(point);\n\t };\n\t this.consoleInsert = function (insert, replace) {\n\t if (replace === void 0) { replace = 0; }\n\t var promptText = _this.textInsert(insert, _this.state.promptText, replace, _this.state.point);\n\t return {\n\t point: _this.movePoint(insert.length - replace, insert.length - replace + _this.state.promptText.length),\n\t promptText: promptText,\n\t restoreText: promptText,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t };\n\t };\n\t this.movePoint = function (n, max) {\n\t if (max === void 0) { max = _this.state.promptText.length; }\n\t var pos = _this.state.point + n;\n\t if (pos < 0) {\n\t return 0;\n\t }\n\t if (pos > max) {\n\t return max;\n\t }\n\t else {\n\t return pos;\n\t }\n\t };\n\t this.rotateRing = function (n, ringn, ring, circular) {\n\t if (circular === void 0) { circular = true; }\n\t if (ring == 0)\n\t return 0;\n\t if (circular) {\n\t return (ring + (ringn + n) % ring) % ring;\n\t }\n\t else {\n\t ringn = ringn - n;\n\t if (ringn < 0) {\n\t return 0;\n\t }\n\t else if (ringn >= ring) {\n\t return ring;\n\t }\n\t else {\n\t return ringn;\n\t }\n\t }\n\t };\n\t this.rotateHistory = function (n) {\n\t var historyn = _this.rotateRing(n, _this.state.historyn, _this.state.history.length, false);\n\t if (historyn == 0) {\n\t _this.setState({\n\t point: _this.state.restoreText.length,\n\t promptText: _this.state.restoreText,\n\t historyn: historyn,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t else {\n\t var promptText = _this.state.history[_this.state.history.length - historyn];\n\t _this.setState({\n\t point: promptText.length,\n\t promptText: promptText,\n\t historyn: historyn,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.searchHistory = function (direction, next) {\n\t if (direction === void 0) { direction = _this.state.searchDirection; }\n\t if (next === void 0) { next = false; }\n\t var idx = _this.state.historyn;\n\t var inc = (direction == 0 /* Reverse */) ? 1 : -1;\n\t if (next) {\n\t idx = idx + inc;\n\t }\n\t for (; idx > 0 && idx <= _this.state.history.length; idx = idx + inc) {\n\t var entry = _this.state.history[_this.state.history.length - idx];\n\t var point = entry.indexOf(_this.state.searchText);\n\t if (point > -1) {\n\t return {\n\t point: point,\n\t promptText: entry,\n\t searchDirection: direction,\n\t searchInit: false,\n\t historyn: idx,\n\t };\n\t }\n\t }\n\t return {\n\t searchDirection: direction,\n\t searchInit: false,\n\t };\n\t };\n\t // DOM management\n\t this.scrollSemaphore = 0;\n\t this.scrollIfBottom = function () {\n\t if (_this.scrollSemaphore > 0 || _this.child.container.scrollTop == _this.child.container.scrollHeight - _this.child.container.offsetHeight) {\n\t _this.scrollSemaphore++;\n\t return _this.scrollIfBottomTrue;\n\t }\n\t else {\n\t return null;\n\t }\n\t };\n\t this.scrollIfBottomTrue = function () {\n\t _this.scrollToBottom();\n\t _this.scrollSemaphore--;\n\t };\n\t this.scrollToBottom = function () {\n\t _this.child.container.scrollTop = _this.child.container.scrollHeight;\n\t var rect = _this.child.focus.getBoundingClientRect();\n\t if (rect.top < 0 || rect.left < 0 ||\n\t rect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t rect.right > (window.innerWidth || document.documentElement.clientWidth)) {\n\t _this.child.typer.scrollIntoView(false);\n\t }\n\t };\n\t this.nextLabel = function () {\n\t if (typeof _this.props.promptLabel === \"string\") {\n\t return _this.props.promptLabel;\n\t }\n\t else {\n\t return _this.props.promptLabel();\n\t }\n\t };\n\t this.state = {\n\t focus: false,\n\t acceptInput: true,\n\t typer: '',\n\t point: 0,\n\t currLabel: this.nextLabel(),\n\t promptText: '',\n\t restoreText: '',\n\t searchText: '',\n\t searchDirection: null,\n\t searchInit: false,\n\t log: [],\n\t history: [],\n\t historyn: 0,\n\t kill: [],\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t };\n\t }\n\t // Component Lifecycle\n\t default_1.prototype.componentDidMount = function () {\n\t if (this.props.autofocus) {\n\t this.focus();\n\t }\n\t };\n\t default_1.prototype.nextWord = function () {\n\t // Find first alphanumeric char after first non-alphanumeric char\n\t var search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t if (search) {\n\t return search.index + this.state.point + 1;\n\t }\n\t else {\n\t return this.state.promptText.length;\n\t }\n\t };\n\t default_1.prototype.previousWord = function () {\n\t // Find first non-alphanumeric char after first alphanumeric char in reverse\n\t var search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0, this.state.point - 1));\n\t if (search) {\n\t return search.index + 1;\n\t }\n\t else {\n\t return 0;\n\t }\n\t };\n\t default_1.prototype.render = function () {\n\t var _this = this;\n\t return React.createElement(\"div\", {ref: function (ref) { return _this.child.container = ref; }, className: \"react-console-container \" + (this.state.focus ? \"react-console-focus\" : \"react-console-nofocus\"), onClick: this.focus}, this.props.welcomeMessage ?\n\t React.createElement(\"div\", {className: \"react-console-message react-console-welcome\"}, this.props.welcomeMessage)\n\t : null, this.state.log.map(function (val) {\n\t return [\n\t React.createElement(ConsolePrompt, {label: val.label, value: val.command})\n\t ].concat(val.message.map(function (val, idx) {\n\t return React.createElement(ConsoleMessage, {key: idx, type: val.type, value: val.value, isTable: val.isTable});\n\t }));\n\t }), this.state.acceptInput ?\n\t React.createElement(ConsolePrompt, {label: this.state.currLabel, value: this.state.promptText, point: this.state.point, argument: this.state.argument})\n\t : null, React.createElement(\"div\", {style: { overflow: \"hidden\", height: 1, width: 1 }}, React.createElement(\"textarea\", {ref: function (ref) { return _this.child.typer = ref; }, className: \"react-console-typer\", autoComplete: \"off\", autoCorrect: \"off\", autoCapitalize: \"off\", spellCheck: \"false\", style: { outline: \"none\",\n\t color: \"transparent\",\n\t backgroundColor: \"transparent\",\n\t border: \"none\",\n\t resize: \"none\",\n\t overflow: \"hidden\",\n\t }, onBlur: this.blur, onKeyDown: this.keyDown, onChange: this.change, onPaste: this.paste})), React.createElement(\"div\", {ref: function (ref) { return _this.child.focus = ref; }}, \" \"));\n\t };\n\t default_1.defaultProps = {\n\t promptLabel: '> ',\n\t continue: function () { return false; },\n\t cancel: function () { },\n\t };\n\t return default_1;\n\t}(React.Component));\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = default_1;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = React;\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// react-console.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 892fbe9368c37545a396","\"use strict\";\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport './react-console.scss';\n\ninterface ConsolePromptProps {\n\tpoint?: number;\n\tvalue: string;\n\tlabel: string;\n\targument?: string;\n}\nclass ConsolePrompt extends React.Component {\n\tstatic defaultProps: ConsolePromptProps = {\n\t\tpoint: -1,\n\t\tvalue: \"\",\n\t\tlabel: \"> \",\n\t\targument: null,\n\t}\n\tchild: {\n\t\tcursor?: Element;\n\t} = {};\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tthis.idle();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.idle();\n\t}\n\t// DOM Management\n\tupdateSemaphore: number = 0;\n\tidle() {\n\t\t// Blink cursor when idle\n\t\tif(this.child.cursor) {\n\t\t\tif(this.updateSemaphore == 0) {\n\t\t\t\tthis.child.cursor.className = \"react-console-cursor\";\n\t\t\t}\n\t\t\tthis.updateSemaphore++;\n\t\t\twindow.setTimeout( () => {\n\t\t\t\tthis.updateSemaphore--;\n\t\t\t\tif(this.updateSemaphore == 0 && this.child.cursor) {\n\t\t\t\t\tthis.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\trenderValue() {\n\t\tif(this.props.point < 0) {\n\t\t\treturn [this.props.value];\n\t\t} else if (this.props.point == this.props.value.length) {\n\t\t\treturn [this.props.value, this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\"> ];\n\t\t} else {\n\t\t\treturn [this.props.value.substring(0,this.props.point),\n\t\t\t\t this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\">{this.props.value.substring(this.props.point,this.props.point+1)},\n\t\t\t\tthis.props.value.substring(this.props.point+1)];\n\t\t}\n\t}\n\trender() {\n\t\tlet label = this.props.label;\n\t\tif(this.props.argument) {\n\t\t\tlet idx = label.lastIndexOf(\"\\n\");\n\t\t\tif(idx >= 0) {\n\t\t\t\tlabel = label.substring(0, idx+1);\n\t\t\t} else {\n\t\t\t\tlabel = '';\n\t\t\t}\n\t\t}\n\t\treturn
\n\t\t\t{ label }\n\t\t\t{ this.props.argument }\n\t\t\t{ this.renderValue() }\n\t\t
;\n\t}\n}\n\ninterface ConsoleTableHeaderProps {\n\theaders?: string[];\n}\nlet ConsoleTableHeader: React.SFC = function(props: ConsoleTableHeaderProps){\t\n\tif(props.headers){\n\t\treturn \n\t\t\t\t\t\n\t\t\t\t\t\t{props.headers.map((header: string) => {\n\t\t\t\t\t\t\treturn { header };\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t}\n\treturn null;\n}\n\ninterface ConsoleMessageProps {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nlet ConsoleMessage: React.SFC = function(props: ConsoleMessageProps) {\n\tif(props.isTable){\n\t\tconst data = props.value[0];\n\t\treturn
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{data.rows && data.rows.map((row: any[], index: number) => {\n\t\t\t\t\t\treturn {row.map((cell: any, cellIndex: number) => {\n\t\t\t\t\t\t\tif(typeof cell === 'string'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else if(typeof cell === 'object' && cell.type === 'link'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t;\n\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t
{cell}{cell.text}{JSON.stringify(cell)}
\n\t\t
;\n\t}else{\n\t\treturn
\n\t\t\t{props.value.map((val: any, i: number)=>{\n\t\t\t\tif(typeof val == 'string') {\n\t\t\t\t\treturn
{val}
;\n\t\t\t\t} else if(typeof val === 'object' && val.type === 'link') {\n\t\t\t\t\treturn ;\n\t\t\t\t} else {\n\t\t\t\t\treturn
{JSON.stringify(val)}
;\n\t\t\t\t}\n\t\t\t})}\n\t\t
;\n\t}\n}\nConsoleMessage.defaultProps = {\n\ttype: null,\n\tvalue: [],\n\tisTable: false\n}\n\nexport interface ConsoleTableObject {\n\trows: Array;\n\theaders?: Array;\n}\n\nexport interface LogMessage {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nexport interface LogEntry {\n\tlabel: string;\n\tcommand: string;\n\tmessage: LogMessage[];\n}\n\nexport interface ConsoleProps{\n\thandler: (command: string)=>any;\n\tcancel?: ()=>any;\n\tcomplete?: (words: string[], curr: number, promptText: string)=>string[];\n\tcontinue?: (promptText: string)=>boolean;\n\tautofocus?: boolean;\n\tpromptLabel?: string | (()=>string);\n\twelcomeMessage?: string;\n}\nexport const enum ConsoleCommand {\n\tDefault,\n\tSearch,\n\tKill,\n\tYank,\n};\nexport const enum SearchDirection {\n\tReverse,\n\tForward,\n}\nexport interface ConsoleState{\n\tfocus?: boolean;\n\tacceptInput?: boolean;\n\ttyper?: string;\n\tpoint?: number;\n\tcurrLabel?: string;\n\tpromptText?: string;\n\trestoreText?: string;\n\tsearchText?: string;\n\tsearchDirection?: SearchDirection;\n\tsearchInit?: boolean;\n\tlog?: LogEntry[];\n\thistory?: string[];\n\thistoryn?: number;\n\tkill?: string[];\n\tkilln?: number;\n\targument?: string;\n\tlastCommand?: ConsoleCommand;\n};\nexport default class extends React.Component {\n\tconstructor(props: ConsoleProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfocus: false,\n\t\t\tacceptInput: true,\n\t\t\ttyper: '',\n\t\t\tpoint: 0,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t\tpromptText: '',\n\t\t\trestoreText: '',\n\t\t\tsearchText: '',\n\t\t\tsearchDirection: null,\n\t\t\tsearchInit: false,\n\t\t\tlog: [],\n\t\t\thistory: [],\n\t\t\thistoryn: 0,\n\t\t\tkill: [],\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tstatic defaultProps = {\n\t\tpromptLabel: '> ',\n\t\tcontinue: function() { return false; },\n\t\tcancel: function() {},\n\t};\n\tchild: {\n\t\ttyper?: HTMLTextAreaElement;\n\t\tcontainer?: HTMLElement;\n\t\tfocus?: HTMLElement;\n\t} = {};\n\t// Command API\n\tsetBusy = () => {\n\t\tthis.setState({acceptInput: false});\n\t}\n\tgetSafeLog = () => {\n\t\tif(!this.state.log.length){\n\t\t\tthis.state.log.push({label: '', command: '', message: [] });\n\t\t}\n\t\treturn this.state.log;\n\t}\n\tupdateLastLog = (...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tlet indexToReplace = log[this.state.log.length-1].message.length > 0 ? log[this.state.log.length-1].message.length - 1 : 0;\n\t\tlog[this.state.log.length-1].message[indexToReplace] = {value: messages};\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlog = (...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tlog[this.state.log.length-1].message.push({value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogX = (type: string, ...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({type: type, value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogTable = (tableData: ConsoleTableObject, type?: string) => {\n\t\tlet log = this.getSafeLog();\n\t\tif(type){\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, type: type, value: [tableData]});\n\t\t}else{\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, value: [tableData]});\n\t\t}\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\treturn = () => {\n\t\tthis.setState({\n\t\t\tacceptInput: true,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t}, this.scrollIfBottom() );\n\t}\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tif(this.props.autofocus) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\t// Event Handlers\n\tfocus = () => {\n\t\tif(!window.getSelection().toString()) {\n\t\t\tthis.child.typer.focus();\n\t\t\tthis.setState({ focus: true }, this.scrollToBottom );\n\t\t}\n\t}\n\tblur = () => {\n\t\tthis.setState({ focus: false });\n\t}\n\tkeyDown = (e: KeyboardEvent) => {\n\t\tinterface keyMap {\n\t\t\t[key: number]: ()=>void\n\t\t}\n\t\tlet keyCodes: keyMap = {\n\t\t\t// return\n\t\t\t13: this.acceptLine,\n\t\t\t// left\n\t\t\t37: this.backwardChar,\n\t\t\t// right\n\t\t\t39: this.forwardChar,\n\t\t\t// up\n\t\t\t38: this.previousHistory,\n\t\t\t// down\n\t\t\t40: this.nextHistory,\n\t\t\t// backspace\n\t\t\t8: this.backwardDeleteChar,\n\t\t\t// delete\n\t\t\t46: this.deleteChar,\n\t\t\t// end\n\t\t\t35: this.endOfLine,\n\t\t\t// start\n\t\t\t36: this.beginningOfLine,\n\t\t\t// tab\n\t\t\t9: this.complete,\n\t\t\t// esc\n\t\t\t27: this.prefixMeta,\n\t\t};\n\t\tvar ctrlCodes: keyMap = {\n\t\t\t// C-a\n\t\t\t65: this.beginningOfLine,\n\t\t\t// C-e\n\t\t\t69: this.endOfLine,\n\t\t\t// C-f\n\t\t\t70: this.forwardChar,\n\t\t\t// C-b\n\t\t\t66: this.backwardChar,\n\t\t\t// C-l\n\t\t\t76: this.clearScreen,\n\t\t\t// C-p\n\t\t\t80: this.previousHistory,\n\t\t\t// C-n\n\t\t\t78: this.nextHistory,\n\t\t\t// C-r\n\t\t\t82: this.reverseSearchHistory,\n\t\t\t// C-s\n\t\t\t83: this.forwardSearchHistory,\n\t\t\t// C-d\n\t\t\t68: this.deleteChar, // TODO EOF\n\t\t\t// C-q TODO\n\t\t\t//81: this.quotedInsert,\n\t\t\t// C-v TODO\n\t\t\t//86: this.quotedInsert,\n\t\t\t// C-t TODO\n\t\t\t//84: this.transposeChars,\n\t\t\t// C-k\n\t\t\t75: this.killLine,\n\t\t\t// C-u\n\t\t\t85: this.backwardKillLine,\n\t\t\t// C-y TODO\n\t\t\t89: this.yank,\n\t\t\t// C-c\n\t\t\t67: this.cancelCommand,\n\t\t\t// C-w TODO\n\t\t\t//87: this.killPreviousWhitespace,\n\t\t\t// C-] TODO\n\t\t\t//221: this.characterSearch,\n\t\t\t// C-x TODO\n\t\t\t//88: this.prefixCtrlX,\n\t\t};\n\t\tvar ctrlXCodes: keyMap = { // TODO state\n\t\t\t// C-x Rubout\n\t\t\t8: this.backwardKillLine,\n\t\t\t// C-x ( TODO\n\t\t\t//57: this.startKbdMacro,\n\t\t\t// C-x ) TODO\n\t\t\t//48: this.endKbdMacro,\n\t\t\t// C-x e TODO\n\t\t\t//69: this.callLastKbdMacro,\n\t\t\t// C-x C-u TODO\n\t\t\t//85: this.undo,\n\t\t\t// C-x C-x TODO\n\t\t\t//88: this.exchangePointAndMark,\n\t\t};\n\t\tvar ctrlShiftCodes: keyMap = {\n\t\t\t// C-_ TODO\n\t\t\t//189: this.undo,\n\t\t\t// C-@ TODO\n\t\t\t//50: this.setMark,\n\t\t};\n\t\tvar metaCodes: keyMap = {\n\t\t\t// M-f\n\t\t\t70: this.forwardWord,\n\t\t\t// M-b\n\t\t\t66: this.backwardWord,\n\t\t\t// M-p\n\t\t\t80: this.nonIncrementalReverseSearchHistory,\n\t\t\t// M-n\n\t\t\t78: this.nonIncrementalForwardSearchHistory,\n\t\t\t// M-.\n\t\t\t190: this.yankLastArg,\n\t\t\t// M-TAB TODO\n\t\t\t//9: this.tabInsert,\n\t\t\t// M-t TODO\n\t\t\t//84: this.transposeWords,\n\t\t\t// M-u TODO\n\t\t\t//85: this.upcaseWord,\n\t\t\t// M-l TODO\n\t\t\t//76: this.downcaseWord,\n\t\t\t// M-c TODO\n\t\t\t//67: this.capitalizeWord,\n\t\t\t// M-d\n\t\t\t68: this.killWord,\n\t\t\t// M-backspace\n\t\t\t8: this.backwardKillWord,\n\t\t\t// M-w TODO\n\t\t\t//87: this.unixWordRubout,\n\t\t\t// M-\\ TODO\n\t\t\t//220: this.deleteHorizontalSpace,\n\t\t\t// M-y\n\t\t\t89: this.yankPop,\n\t\t\t// M-0 TODO\n\t\t\t//48: () => this.digitArgument(0),\n\t\t\t// M-1 TODO\n\t\t\t//49: () => this.digitArgument(1),\n\t\t\t// M-2 TODO\n\t\t\t//50: () => this.digitArgument(2),\n\t\t\t// M-3 TODO\n\t\t\t//51: () => this.digitArgument(3),\n\t\t\t// M-4 TODO\n\t\t\t//52: () => this.digitArgument(4),\n\t\t\t// M-5 TODO\n\t\t\t//53: () => this.digitArgument(5),\n\t\t\t// M-6 TODO\n\t\t\t//54: () => this.digitArgument(6),\n\t\t\t// M-7 TODO\n\t\t\t//55: () => this.digitArgument(7),\n\t\t\t// M-8 TODO\n\t\t\t//56: () => this.digitArgument(8),\n\t\t\t// M-9 TODO\n\t\t\t//57: () => this.digitArgument(9),\n\t\t\t// M-- TODO\n\t\t\t//189: () => this.digitArgument('-'),\n\t\t\t// M-f TODO\n\t\t\t//71: () => this.abort,\n\t\t\t// M-r TODO\n\t\t\t//82: this.revertLine,\n\t\t\t// M-SPACE TODO\n\t\t\t//32: this.setMark,\n\t\t};\n\t\tvar metaShiftCodes: keyMap = { // TODO hook in\n\t\t\t// M-<\n\t\t\t188: this.beginningOfHistory,\n\t\t\t// M->\n\t\t\t190: this.endOfHistory,\n\t\t\t// M-_\n\t\t\t189: this.yankLastArg,\n\t\t\t// M-? TODO\n\t\t\t//191: this.possibleCompletions,\n\t\t\t// M-* TODO\n\t\t\t//56: this.insertCompletions,\n\t\t}\n\t\tvar metaCtrlCodes: keyMap = {\n\t\t\t// M-C-y\n\t\t\t89: this.yankNthArg,\n\t\t\t// M-C-] TODO\n\t\t\t//221: this.characterSearchBackward,\n\t\t\t// M-C-j TODO !!!\n\t\t\t//74: this.viEditingMode,\n\t\t};\n\t\tif(this.state.acceptInput) {\n\t\t\tif (e.altKey) {\n\t\t\t\tif (e.ctrlKey) {\n\t\t\t\t\tif (e.keyCode in metaCtrlCodes) {\n\t\t\t\t\t\tmetaCtrlCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.shiftKey) {\n\t\t\t\t\tif (e.keyCode in metaShiftCodes) {\n\t\t\t\t\t\tmetaShiftCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.keyCode in metaCodes) {\n\t\t\t\t\tmetaCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.ctrlKey) {\n\t\t\t\tif (e.keyCode in ctrlCodes) {\n\t\t\t\t\tctrlCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}else if(e.keyCode !== 86){ // allow ctrl+v for paste on windows\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t} else if (e.keyCode in keyCodes) {\n\t\t\t\tkeyCodes[e.keyCode]();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t} else if(e.ctrlKey && e.keyCode === 67) {\n\t\t\t// if input is blocked, ctrl+c should still call cancel\n\t\t\tctrlCodes[e.keyCode]();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\tchange = () => {\n\t\tlet idx = 0;\n\t\tfor(;idx < this.state.typer.length && idx < this.child.typer.value.length; idx++) {\n\t\t\tif(this.state.typer[idx] != this.child.typer.value[idx]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet insert = this.child.typer.value.substring(idx);\n\t\tlet replace = this.state.typer.length - idx;\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText, replace),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert, replace),{\n\t\t\t\t\ttyper: this.child.typer.value,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\tpaste = (e: ClipboardEvent) => {\n\t\tlet insert = e.clipboardData.getData('text');\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert),{\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t\te.preventDefault();\n\t}\n\t// Commands for Moving\n\tbeginningOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tendOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.state.promptText.length,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(-1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.nextWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\t// Commands for Manipulating the History\n\tacceptLine = () => {\n\t\tthis.child.typer.value = \"\";\n\t\tif(this.props.continue(this.state.promptText)) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(\"\\n\"),{\n\t\t\t\t\ttyper: \"\",\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tlet command = this.state.promptText;\n\t\t\tlet history = this.state.history;\n\t\t\tlet log = this.state.log;\n\t\t\tif(!history || history[history.length-1] != command) {\n\t\t\t\thistory.push(command);\n\t\t\t}\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: command,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\tacceptInput: false,\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistory: history,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, () => {\n\t\t\t\tthis.scrollToBottom();\n\t\t\t\tif(this.props.handler) {\n\t\t\t\t\tthis.props.handler(command)\n\t\t\t\t} else {\n\t\t\t\t\tthis.return();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tpreviousHistory = () => {\n\t\tthis.rotateHistory(-1);\n\t}\n\tnextHistory = () => {\n\t\tthis.rotateHistory(1);\n\t}\n\tbeginningOfHistory = () => {\n\t\tthis.rotateHistory(-this.state.history.length);\n\t}\n\tendOfHistory = () => {\n\t\tthis.rotateHistory(this.state.history.length);\n\t}\n\ttriggerSearch = () => {\n\t\tif(this.state.searchDirection == SearchDirection.Reverse) {\n\t\t\tthis.reverseSearchHistory();\n\t\t} else {\n\t\t\tthis.forwardSearchHistory();\n\t\t}\n\t}\n\treverseSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Reverse, true),{\n\t\t\t\t\targument: `(reverse-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Reverse,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(reverse-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tforwardSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Forward, true),{\n\t\t\t\t\targument: `(forward-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Forward,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(forward-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tclearScreen = () => {\n\t\tthis.setState({ log: [] });\n\t}\n\tnonIncrementalReverseSearchHistory = () => {\n\t\t// TODO\n\t}\n\tnonIncrementalForwardSearchHistory = () => {\n\t\t// TODO\n\t}\n\thistorySearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySearchForward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchForward = () => {\n\t\t// TODO\n\t}\n\tyankNthArg = () => {\n\t\t// TODO\n\t}\n\tyankLastArg = () => {\n\t\t// TODO\n\t}\n\t// Commands for Changing Text\n\tdeleteChar = () => {\n\t\tif(this.state.point < this.state.promptText.length) {\n\t\t\tthis.setState({\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point+1),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tbackwardDeleteChar = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchText.substring(0,this.state.searchText.length-1),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else if(this.state.point > 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.movePoint(-1),\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point-1)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\t// Killing and Yanking\n\tkillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(0,this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWholeLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText);\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: '',\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point,this.nextWord());\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point,this.nextWord()));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ this.state.promptText.substring(this.nextWord()),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(this.previousWord(),this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.previousWord(),this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\tpromptText: this.state.promptText.substring(0,this.previousWord())\n\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tyank = () => {\n\t\tthis.setState(Object.assign(\n\t\t\tthis.consoleInsert(this.state.kill[this.state.killn]),{\n\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t}), this.scrollToBottom\n\t\t);\n\t}\n\tyankPop = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Yank) {\n\t\t\tlet killn = this.rotateRing(1, this.state.killn, this.state.kill.length);\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(this.state.kill[killn], this.state.kill[this.state.killn].length),{\n\t\t\t\t\tkilln: killn,\n\t\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\t// Numeric Arguments\n\t// Completing\n\tcomplete = () => {\n\t\tif(this.props.complete) {\n\t\t\t// Split text and find current word\n\t\t\tlet words = this.state.promptText.split(\" \");\n\t\t\tlet curr = 0;\n\t\t\tlet idx = words[0].length;\n\t\t\twhile(idx < this.state.point && curr + 1 < words.length) {\n\t\t\t\tidx += words[++curr].length + 1;\n\t\t\t}\n\n\t\t\tlet completions = this.props.complete(words, curr, this.state.promptText);\n\t\t\tif(completions.length == 1) {\n\t\t\t\t// Perform completion\n\t\t\t\twords[curr] = completions[0];\n\t\t\t\tlet point = -1;\n\t\t\t\tfor(let i = 0; i <= curr; i++) {\n\t\t\t\t\tpoint += words[i].length + 1;\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: words.join(\" \"),\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t} else if (completions.length > 1) {\n\t\t\t\t// show completions\n\t\t\t\tlet log = this.state.log;\n\t\t\t\tlog.push({\n\t\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\t\tcommand: this.state.promptText,\n\t\t\t\t\tmessage: [{\n\t\t\t\t\t\ttype: \"completion\",\n\t\t\t\t\t\tvalue: [completions.join(\"\\t\")],\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tthis.setState({\n\t\t\t\t\tcurrLabel: this.nextLabel(),\n\t\t\t\t\tlog: log,\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t}\n\t\t}\n\t}\n\t// Keyboard Macros\n\t// Miscellaneous\n\tprefixMeta = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t});\n\t\t}\n\t\t// TODO Meta prefixed state\n\t}\n\tcancelCommand = () => {\n\t\tif(this.state.acceptInput) { // Typing command\n\t\t\tthis.child.typer.value = \"\";\n\t\t\tlet log = this.state.log;\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: this.state.promptText,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t} else { // command is executing, call handler\n\t\t\tthis.props.cancel();\n\t\t}\n\t}\n\t// Helper functions\n\ttextInsert = (insert: string, text: string, replace: number = 0, point: number = text.length): string => {\n\t\treturn text.substring(0, point - replace) + insert + text.substring(point);\n\t}\n\tconsoleInsert = (insert: string, replace: number = 0): ConsoleState => {\n\t\tlet promptText = this.textInsert(insert, this.state.promptText, replace, this.state.point);\n\t\treturn {\n\t\t\tpoint: this.movePoint(insert.length - replace, insert.length - replace + this.state.promptText.length),\n\t\t\tpromptText: promptText,\n\t\t\trestoreText: promptText,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tmovePoint = (n: number, max: number = this.state.promptText.length) => {\n\t\tlet pos = this.state.point + n;\n\t\tif (pos < 0) {\n\t\t\treturn 0;\n\t\t} if (pos > max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n\tnextWord(): number {\n\t\t// Find first alphanumeric char after first non-alphanumeric char\n\t\tlet search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t\tif(search) {\n\t\t\treturn search.index + this.state.point + 1;\n\t\t} else {\n\t\t\treturn this.state.promptText.length;\n\t\t}\n\t}\n\tpreviousWord(): number {\n\t\t// Find first non-alphanumeric char after first alphanumeric char in reverse\n\t\tlet search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0,this.state.point-1));\n\t\tif(search) {\n\t\t\treturn search.index + 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\trotateRing = (n: number, ringn: number, ring: number, circular: boolean = true): number => {\n\t\tif(ring == 0) return 0;\n\t\tif(circular) {\n\t\t\treturn (ring + (ringn + n) % ring) % ring;\n\t\t} else {\n\t\t\tringn = ringn - n;\n\t\t\tif(ringn < 0) {\n\t\t\t\treturn 0;\n\t\t\t} else if (ringn >= ring) {\n\t\t\t\treturn ring;\n\t\t\t} else {\n\t\t\t\treturn ringn;\n\t\t\t}\n\t\t}\n\t}\n\trotateHistory = (n: number) => {\n\t\tlet historyn = this.rotateRing(n, this.state.historyn, this.state.history.length, false);\n\t\tif(historyn == 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.state.restoreText.length,\n\t\t\t\tpromptText: this.state.restoreText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t} else {\n\t\t\tlet promptText = this.state.history[this.state.history.length-historyn];\n\t\t\tthis.setState({\n\t\t\t\tpoint: promptText.length,\n\t\t\t\tpromptText: promptText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t}\n\t}\n\tsearchHistory = (direction: SearchDirection = this.state.searchDirection, next: boolean = false): ConsoleState => {\n\t\tlet idx = this.state.historyn;\n\t\tlet inc = (direction == SearchDirection.Reverse)?1:-1;\n\t\tif(next) {\n\t\t\tidx = idx + inc;\n\t\t}\n\t\tfor(;idx > 0 && idx <= this.state.history.length; idx = idx + inc) {\n\t\t\tlet entry = this.state.history[this.state.history.length-idx];\n\t\t\tlet point = entry.indexOf(this.state.searchText);\n\t\t\tif(point > -1) {\n\t\t\t\treturn {\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: entry,\n\t\t\t\t\tsearchDirection: direction,\n\t\t\t\t\tsearchInit: false,\n\t\t\t\t\thistoryn: idx,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tsearchDirection: direction,\n\t\t\tsearchInit: false,\n\t\t};\n\t}\n\t// DOM management\n\tscrollSemaphore = 0;\n\tscrollIfBottom = () => {\n\t\tif(this.scrollSemaphore > 0 || this.child.container.scrollTop == this.child.container.scrollHeight - this.child.container.offsetHeight) {\n\t\t\tthis.scrollSemaphore++;\n\t\t\treturn this.scrollIfBottomTrue;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\tscrollIfBottomTrue = () => {\n\t\tthis.scrollToBottom();\n\t\tthis.scrollSemaphore--;\n\t}\n\tscrollToBottom = () => {\n\t\tthis.child.container.scrollTop = this.child.container.scrollHeight;\n\t\tlet rect = this.child.focus.getBoundingClientRect();\n\t\tif(rect.top < 0 || rect.left < 0 ||\n\t\t\trect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t\t\trect.right > (window.innerWidth || document.documentElement.clientWidth)\n\t\t) { this.child.typer.scrollIntoView(false); }\n\t}\n\tnextLabel = () => {\n\t\tif(typeof this.props.promptLabel === \"string\") {\n\t\t\treturn this.props.promptLabel as string;\n\t\t} else {\n\t\t\treturn (this.props.promptLabel as ()=>string)();\n\t\t}\n\t}\n\trender() {\n\t\treturn
this.child.container = ref}\n\t\t\t\tclassName={\"react-console-container \" + (this.state.focus?\"react-console-focus\":\"react-console-nofocus\")}\n\t\t\t\tonClick={this.focus}\n\t\t\t>\n\t\t\t{this.props.welcomeMessage?\n\t\t\t\t
\n\t\t\t\t\t{this.props.welcomeMessage}\n\t\t\t\t
\n\t\t\t\t: null\n\t\t\t}\n\t\t\t{this.state.log.map( (val: LogEntry) => {\n\t\t\t\treturn [\n\t\t\t\t\t,\n\t\t\t\t\t...val.message.map( (val: LogMessage, idx: number) => {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t})}\n\t\t\t{this.state.acceptInput?\n\t\t\t\t\n\t\t\t\t: null\n\t\t\t}\n\t\t\t
\n\t\t\t\t this.child.typer = ref}\n\t\t\t\t\tclassName=\"react-console-typer\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tstyle={{ outline: \"none\",\n\t\t\t\t\t\tcolor: \"transparent\",\n\t\t\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tresize: \"none\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t}}\n\t\t\t\t\tonBlur={this.blur}\n\t\t\t\t\tonKeyDown={this.keyDown}\n\t\t\t\t\tonChange={this.change}\n\t\t\t\t\tonPaste={this.paste}\n\t\t\t\t>\n\t\t\t
\n\t\t\t
this.child.focus = ref}> 
\n\t\t
;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./react-console.tsx","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 1\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///react-console.min.js","webpack:///webpack/bootstrap 015b8bd03da346ba76d6","webpack:///./react-console.tsx","webpack:///external \"React\""],"names":["Console","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","__extends","this","d","b","__","constructor","hasOwnProperty","prototype","Object","create","React","ConsolePrompt","_super","apply","arguments","child","updateSemaphore","componentDidMount","idle","componentDidUpdate","_this","cursor","className","window","setTimeout","renderValue","props","point","value","length","createElement","ref","key","substring","render","label","argument","idx","lastIndexOf","defaultProps","Component","ConsoleTableHeader","headers","map","header","scope","ConsoleMessage","isTable","data","type","rows","row","index","cell","cellIndex","href","target","text","JSON","stringify","val","i","default_1","setBusy","setState","acceptInput","getSafeLog","state","log","push","command","message","updateLastLog","messages","_i","indexToReplace","scrollIfBottom","logX","logTable","tableData","return","currLabel","nextLabel","focus","getSelection","toString","typer","scrollToBottom","blur","keyDown","e","keyCodes","13","acceptLine","37","backwardChar","39","forwardChar","38","previousHistory","40","nextHistory","8","backwardDeleteChar","46","deleteChar","35","endOfLine","36","beginningOfLine","9","complete","27","prefixMeta","ctrlCodes","65","69","70","66","76","clearScreen","80","78","82","reverseSearchHistory","83","forwardSearchHistory","68","75","killLine","85","backwardKillLine","89","yank","67","cancelCommand","metaCodes","forwardWord","backwardWord","nonIncrementalReverseSearchHistory","nonIncrementalForwardSearchHistory","190","yankLastArg","killWord","backwardKillWord","yankPop","metaShiftCodes","188","beginningOfHistory","endOfHistory","189","metaCtrlCodes","yankNthArg","altKey","ctrlKey","keyCode","preventDefault","shiftKey","change","insert","replace","lastCommand","searchText","searchInit","textInsert","triggerSearch","assign","consoleInsert","paste","clipboardData","getData","promptText","movePoint","nextWord","previousWord","continue","command_1","history_1","history","restoreText","historyn","handler","rotateHistory","searchDirection","searchHistory","historySearchBackward","historySearchForward","historySubstringSearchBackward","historySubstringSearchForward","kill","unshift","killn","killWholeLine","rotateRing","words","split","curr","completions","join","cancel","n","max","pos","ringn","ring","circular","direction","next","inc","entry","indexOf","scrollSemaphore","container","scrollTop","scrollHeight","offsetHeight","scrollIfBottomTrue","rect","getBoundingClientRect","top","left","bottom","innerHeight","document","documentElement","clientHeight","right","innerWidth","clientWidth","scrollIntoView","promptLabel","autofocus","search","exec","onClick","welcomeMessage","concat","style","overflow","height","width","autoComplete","autoCorrect","autoCapitalize","spellCheck","outline","color","backgroundColor","border","resize","onBlur","onKeyDown","onChange","onPaste","defineProperty","default"],"mappings":"AAAA,GAAIA,SACK,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDOM,SAAUI,EAAQD,EAASH,GE7CjC,YFgDC,IAAIW,GAAaC,MAAQA,KAAKD,WAAc,SAAUE,EAAGC,GAErD,QAASC,KAAOH,KAAKI,YAAcH,EADnC,IAAK,GAAIH,KAAKI,GAAOA,EAAEG,eAAeP,KAAIG,EAAEH,GAAKI,EAAEJ,GAEnDG,GAAEK,UAAkB,OAANJ,EAAaK,OAAOC,OAAON,IAAMC,EAAGG,UAAYJ,EAAEI,UAAW,GAAIH,KEjDxEM,EAAKrB,EAAM,EAEvBA,GAAO,EAQP,IAAAsB,GAAA,SAAAC,GAAA,QAAAD,KAA4BC,EAAAC,MAAAZ,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OAz2BnC+B,EAAAvB,cACN+L,YAAa,KACbvD,SAAU,WAAa,OAAO,GAC9BwB,OAAQ,cAy2BVzI,GAn4B6BpD,EAAM8B,UAAnChC,QAAAsP,eAAAtQ,EAAA,cAAAoC,OAAA,IFkzBCpC,EAAQuQ,QAAUjM,GAKb,SAAUrE,EAAQD,KAMlB,SAAUC,EAAQD,GG//BxBC,EAAAD,QAAAkB","file":"react-console.min.js","sourcesContent":["var Console =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tvar __extends = (this && this.__extends) || function (d, b) {\n\t for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n\t function __() { this.constructor = d; }\n\t d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n\t};\n\tvar React = __webpack_require__(2);\n\t__webpack_require__(1);\n\tvar ConsolePrompt = (function (_super) {\n\t __extends(ConsolePrompt, _super);\n\t function ConsolePrompt() {\n\t _super.apply(this, arguments);\n\t this.child = {};\n\t // DOM Management\n\t this.updateSemaphore = 0;\n\t }\n\t // Component Lifecycle\n\t ConsolePrompt.prototype.componentDidMount = function () {\n\t this.idle();\n\t };\n\t ConsolePrompt.prototype.componentDidUpdate = function () {\n\t this.idle();\n\t };\n\t ConsolePrompt.prototype.idle = function () {\n\t var _this = this;\n\t // Blink cursor when idle\n\t if (this.child.cursor) {\n\t if (this.updateSemaphore == 0) {\n\t this.child.cursor.className = \"react-console-cursor\";\n\t }\n\t this.updateSemaphore++;\n\t window.setTimeout(function () {\n\t _this.updateSemaphore--;\n\t if (_this.updateSemaphore == 0 && _this.child.cursor) {\n\t _this.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t }\n\t }, 1000);\n\t }\n\t };\n\t ConsolePrompt.prototype.renderValue = function () {\n\t var _this = this;\n\t if (this.props.point < 0) {\n\t return [this.props.value];\n\t }\n\t else if (this.props.point == this.props.value.length) {\n\t return [this.props.value, React.createElement(\"span\", {ref: function (ref) { return _this.child.cursor = ref; }, key: \"cursor\", className: \"react-console-cursor\"}, \" \")];\n\t }\n\t else {\n\t return [this.props.value.substring(0, this.props.point),\n\t React.createElement(\"span\", {ref: function (ref) { return _this.child.cursor = ref; }, key: \"cursor\", className: \"react-console-cursor\"}, this.props.value.substring(this.props.point, this.props.point + 1)),\n\t this.props.value.substring(this.props.point + 1)];\n\t }\n\t };\n\t ConsolePrompt.prototype.render = function () {\n\t var label = this.props.label;\n\t if (this.props.argument) {\n\t var idx = label.lastIndexOf(\"\\n\");\n\t if (idx >= 0) {\n\t label = label.substring(0, idx + 1);\n\t }\n\t else {\n\t label = '';\n\t }\n\t }\n\t return React.createElement(\"div\", {className: \"react-console-prompt-box\"}, React.createElement(\"span\", {className: \"react-console-prompt-label\"}, label), React.createElement(\"span\", {className: \"react-console-prompt-argument\"}, this.props.argument), React.createElement(\"span\", {className: \"react-console-prompt\"}, this.renderValue()));\n\t };\n\t ConsolePrompt.defaultProps = {\n\t point: -1,\n\t value: \"\",\n\t label: \"> \",\n\t argument: null,\n\t };\n\t return ConsolePrompt;\n\t}(React.Component));\n\tvar ConsoleTableHeader = function (props) {\n\t if (props.headers) {\n\t return React.createElement(\"thead\", null, React.createElement(\"tr\", null, props.headers.map(function (header) {\n\t return React.createElement(\"th\", {scope: \"col\", key: header}, header);\n\t })));\n\t }\n\t return null;\n\t};\n\tvar ConsoleMessage = function (props) {\n\t if (props.isTable) {\n\t var data = props.value[0];\n\t return React.createElement(\"div\", {className: \"react-console-message react-console-table\" + (props.type ? \" react-console-message-\" + props.type : \"\")}, React.createElement(\"table\", null, React.createElement(ConsoleTableHeader, {headers: data.headers}), React.createElement(\"tbody\", null, data.rows && data.rows.map(function (row, index) {\n\t return React.createElement(\"tr\", {key: index}, row.map(function (cell, cellIndex) {\n\t if (typeof cell === 'string') {\n\t return React.createElement(\"td\", {key: cellIndex}, cell);\n\t }\n\t else if (typeof cell === 'object' && cell.type === 'link') {\n\t return React.createElement(\"td\", {key: cellIndex}, React.createElement(\"a\", {href: cell.href, target: cell.target ? cell.target : ''}, cell.text));\n\t }\n\t else {\n\t return React.createElement(\"td\", {key: cellIndex}, JSON.stringify(cell));\n\t }\n\t }));\n\t }))));\n\t }\n\t else {\n\t return React.createElement(\"div\", {className: \"react-console-message\" + (props.type ? \" react-console-message-\" + props.type : \"\")}, props.value.map(function (val, i) {\n\t if (typeof val == 'string') {\n\t return React.createElement(\"div\", {key: i}, val);\n\t }\n\t else if (typeof val === 'object' && val.type === 'link') {\n\t return React.createElement(\"div\", {key: i}, React.createElement(\"a\", {href: val.href, target: val.target ? val.target : ''}, val.text));\n\t }\n\t else {\n\t return React.createElement(\"div\", {key: i}, JSON.stringify(val));\n\t }\n\t }));\n\t }\n\t};\n\tConsoleMessage.defaultProps = {\n\t type: null,\n\t value: [],\n\t isTable: false\n\t};\n\t;\n\t;\n\tvar default_1 = (function (_super) {\n\t __extends(default_1, _super);\n\t function default_1(props) {\n\t var _this = this;\n\t _super.call(this, props);\n\t this.child = {};\n\t // Command API\n\t this.setBusy = function () {\n\t _this.setState({ acceptInput: false });\n\t };\n\t this.getSafeLog = function () {\n\t if (!_this.state.log.length) {\n\t _this.state.log.push({ label: '', command: '', message: [] });\n\t }\n\t return _this.state.log;\n\t };\n\t this.updateLastLog = function () {\n\t var messages = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t messages[_i - 0] = arguments[_i];\n\t }\n\t var log = _this.getSafeLog();\n\t var indexToReplace = log[_this.state.log.length - 1].message.length > 0 ? log[_this.state.log.length - 1].message.length - 1 : 0;\n\t log[_this.state.log.length - 1].message[indexToReplace] = { value: messages };\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.log = function () {\n\t var messages = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t messages[_i - 0] = arguments[_i];\n\t }\n\t var log = _this.getSafeLog();\n\t log[_this.state.log.length - 1].message.push({ value: messages });\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.logX = function (type) {\n\t var messages = [];\n\t for (var _i = 1; _i < arguments.length; _i++) {\n\t messages[_i - 1] = arguments[_i];\n\t }\n\t var log = _this.getSafeLog();\n\t if (!log.length) {\n\t log.push({ label: '', command: '', message: [] });\n\t }\n\t log[_this.state.log.length - 1].message.push({ type: type, value: messages });\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.logTable = function (tableData, type) {\n\t var log = _this.getSafeLog();\n\t if (type) {\n\t log[_this.state.log.length - 1].message.push({ isTable: true, type: type, value: [tableData] });\n\t }\n\t else {\n\t log[_this.state.log.length - 1].message.push({ isTable: true, value: [tableData] });\n\t }\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.return = function () {\n\t _this.setState({\n\t acceptInput: true,\n\t currLabel: _this.nextLabel(),\n\t }, _this.scrollIfBottom());\n\t };\n\t // Event Handlers\n\t this.focus = function () {\n\t if (!window.getSelection().toString()) {\n\t _this.child.typer.focus();\n\t _this.setState({ focus: true }, _this.scrollToBottom);\n\t }\n\t };\n\t this.blur = function () {\n\t _this.setState({ focus: false });\n\t };\n\t this.keyDown = function (e) {\n\t var keyCodes = {\n\t // return\n\t 13: _this.acceptLine,\n\t // left\n\t 37: _this.backwardChar,\n\t // right\n\t 39: _this.forwardChar,\n\t // up\n\t 38: _this.previousHistory,\n\t // down\n\t 40: _this.nextHistory,\n\t // backspace\n\t 8: _this.backwardDeleteChar,\n\t // delete\n\t 46: _this.deleteChar,\n\t // end\n\t 35: _this.endOfLine,\n\t // start\n\t 36: _this.beginningOfLine,\n\t // tab\n\t 9: _this.complete,\n\t // esc\n\t 27: _this.prefixMeta,\n\t };\n\t var ctrlCodes = {\n\t // C-a\n\t 65: _this.beginningOfLine,\n\t // C-e\n\t 69: _this.endOfLine,\n\t // C-f\n\t 70: _this.forwardChar,\n\t // C-b\n\t 66: _this.backwardChar,\n\t // C-l\n\t 76: _this.clearScreen,\n\t // C-p\n\t 80: _this.previousHistory,\n\t // C-n\n\t 78: _this.nextHistory,\n\t // C-r\n\t 82: _this.reverseSearchHistory,\n\t // C-s\n\t 83: _this.forwardSearchHistory,\n\t // C-d\n\t 68: _this.deleteChar,\n\t // C-q TODO\n\t //81: this.quotedInsert,\n\t // C-v TODO\n\t //86: this.quotedInsert,\n\t // C-t TODO\n\t //84: this.transposeChars,\n\t // C-k\n\t 75: _this.killLine,\n\t // C-u\n\t 85: _this.backwardKillLine,\n\t // C-y TODO\n\t 89: _this.yank,\n\t // C-c\n\t 67: _this.cancelCommand,\n\t };\n\t var ctrlXCodes = {\n\t // C-x Rubout\n\t 8: _this.backwardKillLine,\n\t };\n\t var ctrlShiftCodes = {};\n\t var metaCodes = {\n\t // M-f\n\t 70: _this.forwardWord,\n\t // M-b\n\t 66: _this.backwardWord,\n\t // M-p\n\t 80: _this.nonIncrementalReverseSearchHistory,\n\t // M-n\n\t 78: _this.nonIncrementalForwardSearchHistory,\n\t // M-.\n\t 190: _this.yankLastArg,\n\t // M-TAB TODO\n\t //9: this.tabInsert,\n\t // M-t TODO\n\t //84: this.transposeWords,\n\t // M-u TODO\n\t //85: this.upcaseWord,\n\t // M-l TODO\n\t //76: this.downcaseWord,\n\t // M-c TODO\n\t //67: this.capitalizeWord,\n\t // M-d\n\t 68: _this.killWord,\n\t // M-backspace\n\t 8: _this.backwardKillWord,\n\t // M-w TODO\n\t //87: this.unixWordRubout,\n\t // M-\\ TODO\n\t //220: this.deleteHorizontalSpace,\n\t // M-y\n\t 89: _this.yankPop,\n\t };\n\t var metaShiftCodes = {\n\t // M-<\n\t 188: _this.beginningOfHistory,\n\t // M->\n\t 190: _this.endOfHistory,\n\t // M-_\n\t 189: _this.yankLastArg,\n\t };\n\t var metaCtrlCodes = {\n\t // M-C-y\n\t 89: _this.yankNthArg,\n\t };\n\t if (_this.state.acceptInput) {\n\t if (e.altKey) {\n\t if (e.ctrlKey) {\n\t if (e.keyCode in metaCtrlCodes) {\n\t metaCtrlCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t }\n\t else if (e.shiftKey) {\n\t if (e.keyCode in metaShiftCodes) {\n\t metaShiftCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t }\n\t else if (e.keyCode in metaCodes) {\n\t metaCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t e.preventDefault();\n\t }\n\t else if (e.ctrlKey) {\n\t if (e.keyCode in ctrlCodes) {\n\t ctrlCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t e.preventDefault();\n\t }\n\t else if (e.keyCode in keyCodes) {\n\t keyCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t }\n\t else if (e.ctrlKey && e.keyCode === 67) {\n\t // if input is blocked, ctrl+c should still call cancel\n\t ctrlCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t };\n\t this.change = function () {\n\t var idx = 0;\n\t for (; idx < _this.state.typer.length && idx < _this.child.typer.value.length; idx++) {\n\t if (_this.state.typer[idx] != _this.child.typer.value[idx]) {\n\t break;\n\t }\n\t }\n\t var insert = _this.child.typer.value.substring(idx);\n\t var replace = _this.state.typer.length - idx;\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t searchText: _this.state.searchInit ? insert : _this.textInsert(insert, _this.state.searchText, replace),\n\t typer: _this.child.typer.value,\n\t }, _this.triggerSearch);\n\t }\n\t else {\n\t _this.setState(Object.assign(_this.consoleInsert(insert, replace), {\n\t typer: _this.child.typer.value,\n\t lastCommand: 0 /* Default */,\n\t }), _this.scrollToBottom);\n\t }\n\t };\n\t this.paste = function (e) {\n\t var insert = e.clipboardData.getData('text');\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t searchText: _this.state.searchInit ? insert : _this.textInsert(insert, _this.state.searchText),\n\t typer: _this.child.typer.value,\n\t }, _this.triggerSearch);\n\t }\n\t else {\n\t _this.setState(Object.assign(_this.consoleInsert(insert), {\n\t lastCommand: 0 /* Default */,\n\t }), _this.scrollToBottom);\n\t }\n\t e.preventDefault();\n\t };\n\t // Commands for Moving\n\t this.beginningOfLine = function () {\n\t _this.setState({\n\t point: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.endOfLine = function () {\n\t _this.setState({\n\t point: _this.state.promptText.length,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.forwardChar = function () {\n\t _this.setState({\n\t point: _this.movePoint(1),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardChar = function () {\n\t _this.setState({\n\t point: _this.movePoint(-1),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.forwardWord = function () {\n\t _this.setState({\n\t point: _this.nextWord(),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardWord = function () {\n\t _this.setState({\n\t point: _this.previousWord(),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t // Commands for Manipulating the History\n\t this.acceptLine = function () {\n\t _this.child.typer.value = \"\";\n\t if (_this.props.continue(_this.state.promptText)) {\n\t _this.setState(Object.assign(_this.consoleInsert(\"\\n\"), {\n\t typer: \"\",\n\t lastCommand: 0 /* Default */,\n\t }), _this.scrollToBottom);\n\t }\n\t else {\n\t var command_1 = _this.state.promptText;\n\t var history_1 = _this.state.history;\n\t var log = _this.state.log;\n\t if (!history_1 || history_1[history_1.length - 1] != command_1) {\n\t history_1.push(command_1);\n\t }\n\t log.push({\n\t label: _this.state.currLabel,\n\t command: command_1,\n\t message: []\n\t });\n\t _this.setState({\n\t acceptInput: false,\n\t typer: \"\",\n\t point: 0,\n\t promptText: \"\",\n\t restoreText: \"\",\n\t log: log,\n\t history: history_1,\n\t historyn: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, function () {\n\t _this.scrollToBottom();\n\t if (_this.props.handler) {\n\t _this.props.handler(command_1);\n\t }\n\t else {\n\t _this.return();\n\t }\n\t });\n\t }\n\t };\n\t this.previousHistory = function () {\n\t _this.rotateHistory(-1);\n\t };\n\t this.nextHistory = function () {\n\t _this.rotateHistory(1);\n\t };\n\t this.beginningOfHistory = function () {\n\t _this.rotateHistory(-_this.state.history.length);\n\t };\n\t this.endOfHistory = function () {\n\t _this.rotateHistory(_this.state.history.length);\n\t };\n\t this.triggerSearch = function () {\n\t if (_this.state.searchDirection == 0 /* Reverse */) {\n\t _this.reverseSearchHistory();\n\t }\n\t else {\n\t _this.forwardSearchHistory();\n\t }\n\t };\n\t this.reverseSearchHistory = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState(Object.assign(_this.searchHistory(0 /* Reverse */, true), {\n\t argument: \"(reverse-i-search)`\" + _this.state.searchText + \"': \",\n\t lastCommand: 1 /* Search */,\n\t }), _this.scrollToBottom);\n\t }\n\t else {\n\t _this.setState({\n\t searchDirection: 0 /* Reverse */,\n\t searchInit: true,\n\t argument: \"(reverse-i-search)`': \",\n\t lastCommand: 1 /* Search */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.forwardSearchHistory = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState(Object.assign(_this.searchHistory(1 /* Forward */, true), {\n\t argument: \"(forward-i-search)`\" + _this.state.searchText + \"': \",\n\t lastCommand: 1 /* Search */,\n\t }), _this.scrollToBottom);\n\t }\n\t else {\n\t _this.setState({\n\t searchDirection: 1 /* Forward */,\n\t searchInit: true,\n\t argument: \"(forward-i-search)`': \",\n\t lastCommand: 1 /* Search */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.clearScreen = function () {\n\t _this.setState({ log: [] });\n\t };\n\t this.nonIncrementalReverseSearchHistory = function () {\n\t // TODO\n\t };\n\t this.nonIncrementalForwardSearchHistory = function () {\n\t // TODO\n\t };\n\t this.historySearchBackward = function () {\n\t // TODO\n\t };\n\t this.historySearchForward = function () {\n\t // TODO\n\t };\n\t this.historySubstringSearchBackward = function () {\n\t // TODO\n\t };\n\t this.historySubstringSearchForward = function () {\n\t // TODO\n\t };\n\t this.yankNthArg = function () {\n\t // TODO\n\t };\n\t this.yankLastArg = function () {\n\t // TODO\n\t };\n\t // Commands for Changing Text\n\t this.deleteChar = function () {\n\t if (_this.state.point < _this.state.promptText.length) {\n\t _this.setState({\n\t promptText: _this.state.promptText.substring(0, _this.state.point)\n\t + _this.state.promptText.substring(_this.state.point + 1),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.backwardDeleteChar = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t searchText: _this.state.searchText.substring(0, _this.state.searchText.length - 1),\n\t typer: _this.child.typer.value,\n\t }, _this.triggerSearch);\n\t }\n\t else if (_this.state.point > 0) {\n\t _this.setState({\n\t point: _this.movePoint(-1),\n\t promptText: _this.state.promptText.substring(0, _this.state.point - 1)\n\t + _this.state.promptText.substring(_this.state.point),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t // Killing and Yanking\n\t this.killLine = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = kill[0] + _this.state.promptText.substring(_this.state.point);\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(_this.state.point));\n\t }\n\t _this.setState({\n\t promptText: _this.state.promptText.substring(0, _this.state.point),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardKillLine = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = _this.state.promptText.substring(0, _this.state.point) + kill[0];\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(0, _this.state.point));\n\t }\n\t _this.setState({\n\t point: 0,\n\t promptText: _this.state.promptText.substring(_this.state.point),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.killWholeLine = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = _this.state.promptText.substring(0, _this.state.point)\n\t + kill[0] + _this.state.promptText.substring(_this.state.point);\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText);\n\t }\n\t _this.setState({\n\t point: 0,\n\t promptText: '',\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.killWord = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = kill[0] + _this.state.promptText.substring(_this.state.point, _this.nextWord());\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(_this.state.point, _this.nextWord()));\n\t }\n\t _this.setState({\n\t promptText: _this.state.promptText.substring(0, _this.state.point)\n\t + _this.state.promptText.substring(_this.nextWord()),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardKillWord = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = _this.state.promptText.substring(_this.previousWord(), _this.state.point) + kill[0];\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(_this.previousWord(), _this.state.point));\n\t }\n\t _this.setState({\n\t point: _this.previousWord(),\n\t promptText: _this.state.promptText.substring(0, _this.previousWord())\n\t + _this.state.promptText.substring(_this.state.point),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.yank = function () {\n\t _this.setState(Object.assign(_this.consoleInsert(_this.state.kill[_this.state.killn]), {\n\t lastCommand: 3 /* Yank */,\n\t }), _this.scrollToBottom);\n\t };\n\t this.yankPop = function () {\n\t if (_this.state.lastCommand == 3 /* Yank */) {\n\t var killn = _this.rotateRing(1, _this.state.killn, _this.state.kill.length);\n\t _this.setState(Object.assign(_this.consoleInsert(_this.state.kill[killn], _this.state.kill[_this.state.killn].length), {\n\t killn: killn,\n\t lastCommand: 3 /* Yank */,\n\t }), _this.scrollToBottom);\n\t }\n\t };\n\t // Numeric Arguments\n\t // Completing\n\t this.complete = function () {\n\t if (_this.props.complete) {\n\t // Split text and find current word\n\t var words = _this.state.promptText.split(\" \");\n\t var curr = 0;\n\t var idx = words[0].length;\n\t while (idx < _this.state.point && curr + 1 < words.length) {\n\t idx += words[++curr].length + 1;\n\t }\n\t var completions = _this.props.complete(words, curr, _this.state.promptText);\n\t if (completions.length == 1) {\n\t // Perform completion\n\t words[curr] = completions[0];\n\t var point = -1;\n\t for (var i = 0; i <= curr; i++) {\n\t point += words[i].length + 1;\n\t }\n\t _this.setState({\n\t point: point,\n\t promptText: words.join(\" \"),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t else if (completions.length > 1) {\n\t // show completions\n\t var log = _this.state.log;\n\t log.push({\n\t label: _this.state.currLabel,\n\t command: _this.state.promptText,\n\t message: [{\n\t type: \"completion\",\n\t value: [completions.join(\"\\t\")],\n\t }]\n\t });\n\t _this.setState({\n\t currLabel: _this.nextLabel(),\n\t log: log,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t }\n\t };\n\t // Keyboard Macros\n\t // Miscellaneous\n\t this.prefixMeta = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t });\n\t }\n\t // TODO Meta prefixed state\n\t };\n\t this.cancelCommand = function () {\n\t if (_this.state.acceptInput) {\n\t _this.child.typer.value = \"\";\n\t var log = _this.state.log;\n\t log.push({\n\t label: _this.state.currLabel,\n\t command: _this.state.promptText,\n\t message: []\n\t });\n\t _this.setState({\n\t typer: \"\",\n\t point: 0,\n\t promptText: \"\",\n\t restoreText: \"\",\n\t log: log,\n\t historyn: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t else {\n\t _this.props.cancel();\n\t }\n\t };\n\t // Helper functions\n\t this.textInsert = function (insert, text, replace, point) {\n\t if (replace === void 0) { replace = 0; }\n\t if (point === void 0) { point = text.length; }\n\t return text.substring(0, point - replace) + insert + text.substring(point);\n\t };\n\t this.consoleInsert = function (insert, replace) {\n\t if (replace === void 0) { replace = 0; }\n\t var promptText = _this.textInsert(insert, _this.state.promptText, replace, _this.state.point);\n\t return {\n\t point: _this.movePoint(insert.length - replace, insert.length - replace + _this.state.promptText.length),\n\t promptText: promptText,\n\t restoreText: promptText,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t };\n\t };\n\t this.movePoint = function (n, max) {\n\t if (max === void 0) { max = _this.state.promptText.length; }\n\t var pos = _this.state.point + n;\n\t if (pos < 0) {\n\t return 0;\n\t }\n\t if (pos > max) {\n\t return max;\n\t }\n\t else {\n\t return pos;\n\t }\n\t };\n\t this.rotateRing = function (n, ringn, ring, circular) {\n\t if (circular === void 0) { circular = true; }\n\t if (ring == 0)\n\t return 0;\n\t if (circular) {\n\t return (ring + (ringn + n) % ring) % ring;\n\t }\n\t else {\n\t ringn = ringn - n;\n\t if (ringn < 0) {\n\t return 0;\n\t }\n\t else if (ringn >= ring) {\n\t return ring;\n\t }\n\t else {\n\t return ringn;\n\t }\n\t }\n\t };\n\t this.rotateHistory = function (n) {\n\t var historyn = _this.rotateRing(n, _this.state.historyn, _this.state.history.length, false);\n\t if (historyn == 0) {\n\t _this.setState({\n\t point: _this.state.restoreText.length,\n\t promptText: _this.state.restoreText,\n\t historyn: historyn,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t else {\n\t var promptText = _this.state.history[_this.state.history.length - historyn];\n\t _this.setState({\n\t point: promptText.length,\n\t promptText: promptText,\n\t historyn: historyn,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.searchHistory = function (direction, next) {\n\t if (direction === void 0) { direction = _this.state.searchDirection; }\n\t if (next === void 0) { next = false; }\n\t var idx = _this.state.historyn;\n\t var inc = (direction == 0 /* Reverse */) ? 1 : -1;\n\t if (next) {\n\t idx = idx + inc;\n\t }\n\t for (; idx > 0 && idx <= _this.state.history.length; idx = idx + inc) {\n\t var entry = _this.state.history[_this.state.history.length - idx];\n\t var point = entry.indexOf(_this.state.searchText);\n\t if (point > -1) {\n\t return {\n\t point: point,\n\t promptText: entry,\n\t searchDirection: direction,\n\t searchInit: false,\n\t historyn: idx,\n\t };\n\t }\n\t }\n\t return {\n\t searchDirection: direction,\n\t searchInit: false,\n\t };\n\t };\n\t // DOM management\n\t this.scrollSemaphore = 0;\n\t this.scrollIfBottom = function () {\n\t if (_this.scrollSemaphore > 0 || _this.child.container.scrollTop == _this.child.container.scrollHeight - _this.child.container.offsetHeight) {\n\t _this.scrollSemaphore++;\n\t return _this.scrollIfBottomTrue;\n\t }\n\t else {\n\t return null;\n\t }\n\t };\n\t this.scrollIfBottomTrue = function () {\n\t _this.scrollToBottom();\n\t _this.scrollSemaphore--;\n\t };\n\t this.scrollToBottom = function () {\n\t _this.child.container.scrollTop = _this.child.container.scrollHeight;\n\t var rect = _this.child.focus.getBoundingClientRect();\n\t if (rect.top < 0 || rect.left < 0 ||\n\t rect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t rect.right > (window.innerWidth || document.documentElement.clientWidth)) {\n\t _this.child.typer.scrollIntoView(false);\n\t }\n\t };\n\t this.nextLabel = function () {\n\t if (typeof _this.props.promptLabel === \"string\") {\n\t return _this.props.promptLabel;\n\t }\n\t else {\n\t return _this.props.promptLabel();\n\t }\n\t };\n\t this.state = {\n\t focus: false,\n\t acceptInput: true,\n\t typer: '',\n\t point: 0,\n\t currLabel: this.nextLabel(),\n\t promptText: '',\n\t restoreText: '',\n\t searchText: '',\n\t searchDirection: null,\n\t searchInit: false,\n\t log: [],\n\t history: [],\n\t historyn: 0,\n\t kill: [],\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t };\n\t }\n\t // Component Lifecycle\n\t default_1.prototype.componentDidMount = function () {\n\t if (this.props.autofocus) {\n\t this.focus();\n\t }\n\t };\n\t default_1.prototype.nextWord = function () {\n\t // Find first alphanumeric char after first non-alphanumeric char\n\t var search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t if (search) {\n\t return search.index + this.state.point + 1;\n\t }\n\t else {\n\t return this.state.promptText.length;\n\t }\n\t };\n\t default_1.prototype.previousWord = function () {\n\t // Find first non-alphanumeric char after first alphanumeric char in reverse\n\t var search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0, this.state.point - 1));\n\t if (search) {\n\t return search.index + 1;\n\t }\n\t else {\n\t return 0;\n\t }\n\t };\n\t default_1.prototype.render = function () {\n\t var _this = this;\n\t return React.createElement(\"div\", {ref: function (ref) { return _this.child.container = ref; }, className: \"react-console-container \" + (this.state.focus ? \"react-console-focus\" : \"react-console-nofocus\"), onClick: this.focus}, this.props.welcomeMessage ?\n\t React.createElement(\"div\", {className: \"react-console-message react-console-welcome\"}, this.props.welcomeMessage)\n\t : null, this.state.log.map(function (val) {\n\t return [\n\t React.createElement(ConsolePrompt, {label: val.label, value: val.command})\n\t ].concat(val.message.map(function (val, idx) {\n\t return React.createElement(ConsoleMessage, {key: idx, type: val.type, value: val.value, isTable: val.isTable});\n\t }));\n\t }), this.state.acceptInput ?\n\t React.createElement(ConsolePrompt, {label: this.state.currLabel, value: this.state.promptText, point: this.state.point, argument: this.state.argument})\n\t : null, React.createElement(\"div\", {style: { overflow: \"hidden\", height: 1, width: 1 }}, React.createElement(\"textarea\", {ref: function (ref) { return _this.child.typer = ref; }, className: \"react-console-typer\", autoComplete: \"off\", autoCorrect: \"off\", autoCapitalize: \"off\", spellCheck: \"false\", style: { outline: \"none\",\n\t color: \"transparent\",\n\t backgroundColor: \"transparent\",\n\t border: \"none\",\n\t resize: \"none\",\n\t overflow: \"hidden\",\n\t }, onBlur: this.blur, onKeyDown: this.keyDown, onChange: this.change, onPaste: this.paste})), React.createElement(\"div\", {ref: function (ref) { return _this.child.focus = ref; }}, \" \"));\n\t };\n\t default_1.defaultProps = {\n\t promptLabel: '> ',\n\t continue: function () { return false; },\n\t cancel: function () { },\n\t };\n\t return default_1;\n\t}(React.Component));\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = default_1;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\n\t// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = React;\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// react-console.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 015b8bd03da346ba76d6","\"use strict\";\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport './react-console.scss';\n\ninterface ConsolePromptProps {\n\tpoint?: number;\n\tvalue: string;\n\tlabel: string;\n\targument?: string;\n}\nclass ConsolePrompt extends React.Component {\n\tstatic defaultProps: ConsolePromptProps = {\n\t\tpoint: -1,\n\t\tvalue: \"\",\n\t\tlabel: \"> \",\n\t\targument: null,\n\t}\n\tchild: {\n\t\tcursor?: Element;\n\t} = {};\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tthis.idle();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.idle();\n\t}\n\t// DOM Management\n\tupdateSemaphore: number = 0;\n\tidle() {\n\t\t// Blink cursor when idle\n\t\tif(this.child.cursor) {\n\t\t\tif(this.updateSemaphore == 0) {\n\t\t\t\tthis.child.cursor.className = \"react-console-cursor\";\n\t\t\t}\n\t\t\tthis.updateSemaphore++;\n\t\t\twindow.setTimeout( () => {\n\t\t\t\tthis.updateSemaphore--;\n\t\t\t\tif(this.updateSemaphore == 0 && this.child.cursor) {\n\t\t\t\t\tthis.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\trenderValue() {\n\t\tif(this.props.point < 0) {\n\t\t\treturn [this.props.value];\n\t\t} else if (this.props.point == this.props.value.length) {\n\t\t\treturn [this.props.value, this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\"> ];\n\t\t} else {\n\t\t\treturn [this.props.value.substring(0,this.props.point),\n\t\t\t\t this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\">{this.props.value.substring(this.props.point,this.props.point+1)},\n\t\t\t\tthis.props.value.substring(this.props.point+1)];\n\t\t}\n\t}\n\trender() {\n\t\tlet label = this.props.label;\n\t\tif(this.props.argument) {\n\t\t\tlet idx = label.lastIndexOf(\"\\n\");\n\t\t\tif(idx >= 0) {\n\t\t\t\tlabel = label.substring(0, idx+1);\n\t\t\t} else {\n\t\t\t\tlabel = '';\n\t\t\t}\n\t\t}\n\t\treturn
\n\t\t\t{ label }\n\t\t\t{ this.props.argument }\n\t\t\t{ this.renderValue() }\n\t\t
;\n\t}\n}\n\ninterface ConsoleTableHeaderProps {\n\theaders?: string[];\n}\nlet ConsoleTableHeader: React.SFC = function(props: ConsoleTableHeaderProps){\t\n\tif(props.headers){\n\t\treturn \n\t\t\t\t\t\n\t\t\t\t\t\t{props.headers.map((header: string) => {\n\t\t\t\t\t\t\treturn { header };\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t}\n\treturn null;\n}\n\ninterface ConsoleMessageProps {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nlet ConsoleMessage: React.SFC = function(props: ConsoleMessageProps) {\n\tif(props.isTable){\n\t\tconst data = props.value[0];\n\t\treturn
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{data.rows && data.rows.map((row: any[], index: number) => {\n\t\t\t\t\t\treturn {row.map((cell: any, cellIndex: number) => {\n\t\t\t\t\t\t\tif(typeof cell === 'string'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else if(typeof cell === 'object' && cell.type === 'link'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t;\n\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t
{cell}{cell.text}{JSON.stringify(cell)}
\n\t\t
;\n\t}else{\n\t\treturn
\n\t\t\t{props.value.map((val: any, i: number)=>{\n\t\t\t\tif(typeof val == 'string') {\n\t\t\t\t\treturn
{val}
;\n\t\t\t\t} else if(typeof val === 'object' && val.type === 'link') {\n\t\t\t\t\treturn ;\n\t\t\t\t} else {\n\t\t\t\t\treturn
{JSON.stringify(val)}
;\n\t\t\t\t}\n\t\t\t})}\n\t\t
;\n\t}\n}\nConsoleMessage.defaultProps = {\n\ttype: null,\n\tvalue: [],\n\tisTable: false\n}\n\nexport interface ConsoleTableObject {\n\trows: Array;\n\theaders?: Array;\n}\n\nexport interface LogMessage {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nexport interface LogEntry {\n\tlabel: string;\n\tcommand: string;\n\tmessage: LogMessage[];\n}\n\nexport interface ConsoleProps{\n\thandler: (command: string)=>any;\n\tcancel?: ()=>any;\n\tcomplete?: (words: string[], curr: number, promptText: string)=>string[];\n\tcontinue?: (promptText: string)=>boolean;\n\tautofocus?: boolean;\n\tpromptLabel?: string | (()=>string);\n\twelcomeMessage?: string;\n}\nexport const enum ConsoleCommand {\n\tDefault,\n\tSearch,\n\tKill,\n\tYank,\n};\nexport const enum SearchDirection {\n\tReverse,\n\tForward,\n}\nexport interface ConsoleState{\n\tfocus?: boolean;\n\tacceptInput?: boolean;\n\ttyper?: string;\n\tpoint?: number;\n\tcurrLabel?: string;\n\tpromptText?: string;\n\trestoreText?: string;\n\tsearchText?: string;\n\tsearchDirection?: SearchDirection;\n\tsearchInit?: boolean;\n\tlog?: LogEntry[];\n\thistory?: string[];\n\thistoryn?: number;\n\tkill?: string[];\n\tkilln?: number;\n\targument?: string;\n\tlastCommand?: ConsoleCommand;\n};\nexport default class extends React.Component {\n\tconstructor(props: ConsoleProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfocus: false,\n\t\t\tacceptInput: true,\n\t\t\ttyper: '',\n\t\t\tpoint: 0,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t\tpromptText: '',\n\t\t\trestoreText: '',\n\t\t\tsearchText: '',\n\t\t\tsearchDirection: null,\n\t\t\tsearchInit: false,\n\t\t\tlog: [],\n\t\t\thistory: [],\n\t\t\thistoryn: 0,\n\t\t\tkill: [],\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tstatic defaultProps = {\n\t\tpromptLabel: '> ',\n\t\tcontinue: function() { return false; },\n\t\tcancel: function() {},\n\t};\n\tchild: {\n\t\ttyper?: HTMLTextAreaElement;\n\t\tcontainer?: HTMLElement;\n\t\tfocus?: HTMLElement;\n\t} = {};\n\t// Command API\n\tsetBusy = () => {\n\t\tthis.setState({acceptInput: false});\n\t}\n\tgetSafeLog = () => {\n\t\tif(!this.state.log.length){\n\t\t\tthis.state.log.push({label: '', command: '', message: [] });\n\t\t}\n\t\treturn this.state.log;\n\t}\n\tupdateLastLog = (...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tlet indexToReplace = log[this.state.log.length-1].message.length > 0 ? log[this.state.log.length-1].message.length - 1 : 0;\n\t\tlog[this.state.log.length-1].message[indexToReplace] = {value: messages};\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlog = (...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tlog[this.state.log.length-1].message.push({value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogX = (type: string, ...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({type: type, value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogTable = (tableData: ConsoleTableObject, type?: string) => {\n\t\tlet log = this.getSafeLog();\n\t\tif(type){\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, type: type, value: [tableData]});\n\t\t}else{\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, value: [tableData]});\n\t\t}\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\treturn = () => {\n\t\tthis.setState({\n\t\t\tacceptInput: true,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t}, this.scrollIfBottom() );\n\t}\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tif(this.props.autofocus) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\t// Event Handlers\n\tfocus = () => {\n\t\tif(!window.getSelection().toString()) {\n\t\t\tthis.child.typer.focus();\n\t\t\tthis.setState({ focus: true }, this.scrollToBottom );\n\t\t}\n\t}\n\tblur = () => {\n\t\tthis.setState({ focus: false });\n\t}\n\tkeyDown = (e: KeyboardEvent) => {\n\t\tinterface keyMap {\n\t\t\t[key: number]: ()=>void\n\t\t}\n\t\tlet keyCodes: keyMap = {\n\t\t\t// return\n\t\t\t13: this.acceptLine,\n\t\t\t// left\n\t\t\t37: this.backwardChar,\n\t\t\t// right\n\t\t\t39: this.forwardChar,\n\t\t\t// up\n\t\t\t38: this.previousHistory,\n\t\t\t// down\n\t\t\t40: this.nextHistory,\n\t\t\t// backspace\n\t\t\t8: this.backwardDeleteChar,\n\t\t\t// delete\n\t\t\t46: this.deleteChar,\n\t\t\t// end\n\t\t\t35: this.endOfLine,\n\t\t\t// start\n\t\t\t36: this.beginningOfLine,\n\t\t\t// tab\n\t\t\t9: this.complete,\n\t\t\t// esc\n\t\t\t27: this.prefixMeta,\n\t\t};\n\t\tvar ctrlCodes: keyMap = {\n\t\t\t// C-a\n\t\t\t65: this.beginningOfLine,\n\t\t\t// C-e\n\t\t\t69: this.endOfLine,\n\t\t\t// C-f\n\t\t\t70: this.forwardChar,\n\t\t\t// C-b\n\t\t\t66: this.backwardChar,\n\t\t\t// C-l\n\t\t\t76: this.clearScreen,\n\t\t\t// C-p\n\t\t\t80: this.previousHistory,\n\t\t\t// C-n\n\t\t\t78: this.nextHistory,\n\t\t\t// C-r\n\t\t\t82: this.reverseSearchHistory,\n\t\t\t// C-s\n\t\t\t83: this.forwardSearchHistory,\n\t\t\t// C-d\n\t\t\t68: this.deleteChar, // TODO EOF\n\t\t\t// C-q TODO\n\t\t\t//81: this.quotedInsert,\n\t\t\t// C-v TODO\n\t\t\t//86: this.quotedInsert,\n\t\t\t// C-t TODO\n\t\t\t//84: this.transposeChars,\n\t\t\t// C-k\n\t\t\t75: this.killLine,\n\t\t\t// C-u\n\t\t\t85: this.backwardKillLine,\n\t\t\t// C-y TODO\n\t\t\t89: this.yank,\n\t\t\t// C-c\n\t\t\t67: this.cancelCommand,\n\t\t\t// C-w TODO\n\t\t\t//87: this.killPreviousWhitespace,\n\t\t\t// C-] TODO\n\t\t\t//221: this.characterSearch,\n\t\t\t// C-x TODO\n\t\t\t//88: this.prefixCtrlX,\n\t\t};\n\t\tvar ctrlXCodes: keyMap = { // TODO state\n\t\t\t// C-x Rubout\n\t\t\t8: this.backwardKillLine,\n\t\t\t// C-x ( TODO\n\t\t\t//57: this.startKbdMacro,\n\t\t\t// C-x ) TODO\n\t\t\t//48: this.endKbdMacro,\n\t\t\t// C-x e TODO\n\t\t\t//69: this.callLastKbdMacro,\n\t\t\t// C-x C-u TODO\n\t\t\t//85: this.undo,\n\t\t\t// C-x C-x TODO\n\t\t\t//88: this.exchangePointAndMark,\n\t\t};\n\t\tvar ctrlShiftCodes: keyMap = {\n\t\t\t// C-_ TODO\n\t\t\t//189: this.undo,\n\t\t\t// C-@ TODO\n\t\t\t//50: this.setMark,\n\t\t};\n\t\tvar metaCodes: keyMap = {\n\t\t\t// M-f\n\t\t\t70: this.forwardWord,\n\t\t\t// M-b\n\t\t\t66: this.backwardWord,\n\t\t\t// M-p\n\t\t\t80: this.nonIncrementalReverseSearchHistory,\n\t\t\t// M-n\n\t\t\t78: this.nonIncrementalForwardSearchHistory,\n\t\t\t// M-.\n\t\t\t190: this.yankLastArg,\n\t\t\t// M-TAB TODO\n\t\t\t//9: this.tabInsert,\n\t\t\t// M-t TODO\n\t\t\t//84: this.transposeWords,\n\t\t\t// M-u TODO\n\t\t\t//85: this.upcaseWord,\n\t\t\t// M-l TODO\n\t\t\t//76: this.downcaseWord,\n\t\t\t// M-c TODO\n\t\t\t//67: this.capitalizeWord,\n\t\t\t// M-d\n\t\t\t68: this.killWord,\n\t\t\t// M-backspace\n\t\t\t8: this.backwardKillWord,\n\t\t\t// M-w TODO\n\t\t\t//87: this.unixWordRubout,\n\t\t\t// M-\\ TODO\n\t\t\t//220: this.deleteHorizontalSpace,\n\t\t\t// M-y\n\t\t\t89: this.yankPop,\n\t\t\t// M-0 TODO\n\t\t\t//48: () => this.digitArgument(0),\n\t\t\t// M-1 TODO\n\t\t\t//49: () => this.digitArgument(1),\n\t\t\t// M-2 TODO\n\t\t\t//50: () => this.digitArgument(2),\n\t\t\t// M-3 TODO\n\t\t\t//51: () => this.digitArgument(3),\n\t\t\t// M-4 TODO\n\t\t\t//52: () => this.digitArgument(4),\n\t\t\t// M-5 TODO\n\t\t\t//53: () => this.digitArgument(5),\n\t\t\t// M-6 TODO\n\t\t\t//54: () => this.digitArgument(6),\n\t\t\t// M-7 TODO\n\t\t\t//55: () => this.digitArgument(7),\n\t\t\t// M-8 TODO\n\t\t\t//56: () => this.digitArgument(8),\n\t\t\t// M-9 TODO\n\t\t\t//57: () => this.digitArgument(9),\n\t\t\t// M-- TODO\n\t\t\t//189: () => this.digitArgument('-'),\n\t\t\t// M-f TODO\n\t\t\t//71: () => this.abort,\n\t\t\t// M-r TODO\n\t\t\t//82: this.revertLine,\n\t\t\t// M-SPACE TODO\n\t\t\t//32: this.setMark,\n\t\t};\n\t\tvar metaShiftCodes: keyMap = { // TODO hook in\n\t\t\t// M-<\n\t\t\t188: this.beginningOfHistory,\n\t\t\t// M->\n\t\t\t190: this.endOfHistory,\n\t\t\t// M-_\n\t\t\t189: this.yankLastArg,\n\t\t\t// M-? TODO\n\t\t\t//191: this.possibleCompletions,\n\t\t\t// M-* TODO\n\t\t\t//56: this.insertCompletions,\n\t\t}\n\t\tvar metaCtrlCodes: keyMap = {\n\t\t\t// M-C-y\n\t\t\t89: this.yankNthArg,\n\t\t\t// M-C-] TODO\n\t\t\t//221: this.characterSearchBackward,\n\t\t\t// M-C-j TODO !!!\n\t\t\t//74: this.viEditingMode,\n\t\t};\n\t\tif(this.state.acceptInput) {\n\t\t\tif (e.altKey) {\n\t\t\t\tif (e.ctrlKey) {\n\t\t\t\t\tif (e.keyCode in metaCtrlCodes) {\n\t\t\t\t\t\tmetaCtrlCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.shiftKey) {\n\t\t\t\t\tif (e.keyCode in metaShiftCodes) {\n\t\t\t\t\t\tmetaShiftCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.keyCode in metaCodes) {\n\t\t\t\t\tmetaCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.ctrlKey) {\n\t\t\t\tif (e.keyCode in ctrlCodes) {\n\t\t\t\t\tctrlCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.keyCode in keyCodes) {\n\t\t\t\tkeyCodes[e.keyCode]();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t} else if(e.ctrlKey && e.keyCode === 67) {\n\t\t\t// if input is blocked, ctrl+c should still call cancel\n\t\t\tctrlCodes[e.keyCode]();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\tchange = () => {\n\t\tlet idx = 0;\n\t\tfor(;idx < this.state.typer.length && idx < this.child.typer.value.length; idx++) {\n\t\t\tif(this.state.typer[idx] != this.child.typer.value[idx]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet insert = this.child.typer.value.substring(idx);\n\t\tlet replace = this.state.typer.length - idx;\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText, replace),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert, replace),{\n\t\t\t\t\ttyper: this.child.typer.value,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\tpaste = (e: ClipboardEvent) => {\n\t\tlet insert = e.clipboardData.getData('text');\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert),{\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t\te.preventDefault();\n\t}\n\t// Commands for Moving\n\tbeginningOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tendOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.state.promptText.length,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(-1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.nextWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\t// Commands for Manipulating the History\n\tacceptLine = () => {\n\t\tthis.child.typer.value = \"\";\n\t\tif(this.props.continue(this.state.promptText)) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(\"\\n\"),{\n\t\t\t\t\ttyper: \"\",\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tlet command = this.state.promptText;\n\t\t\tlet history = this.state.history;\n\t\t\tlet log = this.state.log;\n\t\t\tif(!history || history[history.length-1] != command) {\n\t\t\t\thistory.push(command);\n\t\t\t}\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: command,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\tacceptInput: false,\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistory: history,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, () => {\n\t\t\t\tthis.scrollToBottom();\n\t\t\t\tif(this.props.handler) {\n\t\t\t\t\tthis.props.handler(command)\n\t\t\t\t} else {\n\t\t\t\t\tthis.return();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tpreviousHistory = () => {\n\t\tthis.rotateHistory(-1);\n\t}\n\tnextHistory = () => {\n\t\tthis.rotateHistory(1);\n\t}\n\tbeginningOfHistory = () => {\n\t\tthis.rotateHistory(-this.state.history.length);\n\t}\n\tendOfHistory = () => {\n\t\tthis.rotateHistory(this.state.history.length);\n\t}\n\ttriggerSearch = () => {\n\t\tif(this.state.searchDirection == SearchDirection.Reverse) {\n\t\t\tthis.reverseSearchHistory();\n\t\t} else {\n\t\t\tthis.forwardSearchHistory();\n\t\t}\n\t}\n\treverseSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Reverse, true),{\n\t\t\t\t\targument: `(reverse-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Reverse,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(reverse-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tforwardSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Forward, true),{\n\t\t\t\t\targument: `(forward-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Forward,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(forward-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tclearScreen = () => {\n\t\tthis.setState({ log: [] });\n\t}\n\tnonIncrementalReverseSearchHistory = () => {\n\t\t// TODO\n\t}\n\tnonIncrementalForwardSearchHistory = () => {\n\t\t// TODO\n\t}\n\thistorySearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySearchForward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchForward = () => {\n\t\t// TODO\n\t}\n\tyankNthArg = () => {\n\t\t// TODO\n\t}\n\tyankLastArg = () => {\n\t\t// TODO\n\t}\n\t// Commands for Changing Text\n\tdeleteChar = () => {\n\t\tif(this.state.point < this.state.promptText.length) {\n\t\t\tthis.setState({\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point+1),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tbackwardDeleteChar = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchText.substring(0,this.state.searchText.length-1),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else if(this.state.point > 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.movePoint(-1),\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point-1)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\t// Killing and Yanking\n\tkillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(0,this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWholeLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText);\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: '',\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point,this.nextWord());\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point,this.nextWord()));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ this.state.promptText.substring(this.nextWord()),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(this.previousWord(),this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.previousWord(),this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\tpromptText: this.state.promptText.substring(0,this.previousWord())\n\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tyank = () => {\n\t\tthis.setState(Object.assign(\n\t\t\tthis.consoleInsert(this.state.kill[this.state.killn]),{\n\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t}), this.scrollToBottom\n\t\t);\n\t}\n\tyankPop = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Yank) {\n\t\t\tlet killn = this.rotateRing(1, this.state.killn, this.state.kill.length);\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(this.state.kill[killn], this.state.kill[this.state.killn].length),{\n\t\t\t\t\tkilln: killn,\n\t\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\t// Numeric Arguments\n\t// Completing\n\tcomplete = () => {\n\t\tif(this.props.complete) {\n\t\t\t// Split text and find current word\n\t\t\tlet words = this.state.promptText.split(\" \");\n\t\t\tlet curr = 0;\n\t\t\tlet idx = words[0].length;\n\t\t\twhile(idx < this.state.point && curr + 1 < words.length) {\n\t\t\t\tidx += words[++curr].length + 1;\n\t\t\t}\n\n\t\t\tlet completions = this.props.complete(words, curr, this.state.promptText);\n\t\t\tif(completions.length == 1) {\n\t\t\t\t// Perform completion\n\t\t\t\twords[curr] = completions[0];\n\t\t\t\tlet point = -1;\n\t\t\t\tfor(let i = 0; i <= curr; i++) {\n\t\t\t\t\tpoint += words[i].length + 1;\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: words.join(\" \"),\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t} else if (completions.length > 1) {\n\t\t\t\t// show completions\n\t\t\t\tlet log = this.state.log;\n\t\t\t\tlog.push({\n\t\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\t\tcommand: this.state.promptText,\n\t\t\t\t\tmessage: [{\n\t\t\t\t\t\ttype: \"completion\",\n\t\t\t\t\t\tvalue: [completions.join(\"\\t\")],\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tthis.setState({\n\t\t\t\t\tcurrLabel: this.nextLabel(),\n\t\t\t\t\tlog: log,\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t}\n\t\t}\n\t}\n\t// Keyboard Macros\n\t// Miscellaneous\n\tprefixMeta = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t});\n\t\t}\n\t\t// TODO Meta prefixed state\n\t}\n\tcancelCommand = () => {\n\t\tif(this.state.acceptInput) { // Typing command\n\t\t\tthis.child.typer.value = \"\";\n\t\t\tlet log = this.state.log;\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: this.state.promptText,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t} else { // command is executing, call handler\n\t\t\tthis.props.cancel();\n\t\t}\n\t}\n\t// Helper functions\n\ttextInsert = (insert: string, text: string, replace: number = 0, point: number = text.length): string => {\n\t\treturn text.substring(0, point - replace) + insert + text.substring(point);\n\t}\n\tconsoleInsert = (insert: string, replace: number = 0): ConsoleState => {\n\t\tlet promptText = this.textInsert(insert, this.state.promptText, replace, this.state.point);\n\t\treturn {\n\t\t\tpoint: this.movePoint(insert.length - replace, insert.length - replace + this.state.promptText.length),\n\t\t\tpromptText: promptText,\n\t\t\trestoreText: promptText,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tmovePoint = (n: number, max: number = this.state.promptText.length) => {\n\t\tlet pos = this.state.point + n;\n\t\tif (pos < 0) {\n\t\t\treturn 0;\n\t\t} if (pos > max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n\tnextWord(): number {\n\t\t// Find first alphanumeric char after first non-alphanumeric char\n\t\tlet search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t\tif(search) {\n\t\t\treturn search.index + this.state.point + 1;\n\t\t} else {\n\t\t\treturn this.state.promptText.length;\n\t\t}\n\t}\n\tpreviousWord(): number {\n\t\t// Find first non-alphanumeric char after first alphanumeric char in reverse\n\t\tlet search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0,this.state.point-1));\n\t\tif(search) {\n\t\t\treturn search.index + 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\trotateRing = (n: number, ringn: number, ring: number, circular: boolean = true): number => {\n\t\tif(ring == 0) return 0;\n\t\tif(circular) {\n\t\t\treturn (ring + (ringn + n) % ring) % ring;\n\t\t} else {\n\t\t\tringn = ringn - n;\n\t\t\tif(ringn < 0) {\n\t\t\t\treturn 0;\n\t\t\t} else if (ringn >= ring) {\n\t\t\t\treturn ring;\n\t\t\t} else {\n\t\t\t\treturn ringn;\n\t\t\t}\n\t\t}\n\t}\n\trotateHistory = (n: number) => {\n\t\tlet historyn = this.rotateRing(n, this.state.historyn, this.state.history.length, false);\n\t\tif(historyn == 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.state.restoreText.length,\n\t\t\t\tpromptText: this.state.restoreText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t} else {\n\t\t\tlet promptText = this.state.history[this.state.history.length-historyn];\n\t\t\tthis.setState({\n\t\t\t\tpoint: promptText.length,\n\t\t\t\tpromptText: promptText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t}\n\t}\n\tsearchHistory = (direction: SearchDirection = this.state.searchDirection, next: boolean = false): ConsoleState => {\n\t\tlet idx = this.state.historyn;\n\t\tlet inc = (direction == SearchDirection.Reverse)?1:-1;\n\t\tif(next) {\n\t\t\tidx = idx + inc;\n\t\t}\n\t\tfor(;idx > 0 && idx <= this.state.history.length; idx = idx + inc) {\n\t\t\tlet entry = this.state.history[this.state.history.length-idx];\n\t\t\tlet point = entry.indexOf(this.state.searchText);\n\t\t\tif(point > -1) {\n\t\t\t\treturn {\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: entry,\n\t\t\t\t\tsearchDirection: direction,\n\t\t\t\t\tsearchInit: false,\n\t\t\t\t\thistoryn: idx,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tsearchDirection: direction,\n\t\t\tsearchInit: false,\n\t\t};\n\t}\n\t// DOM management\n\tscrollSemaphore = 0;\n\tscrollIfBottom = () => {\n\t\tif(this.scrollSemaphore > 0 || this.child.container.scrollTop == this.child.container.scrollHeight - this.child.container.offsetHeight) {\n\t\t\tthis.scrollSemaphore++;\n\t\t\treturn this.scrollIfBottomTrue;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\tscrollIfBottomTrue = () => {\n\t\tthis.scrollToBottom();\n\t\tthis.scrollSemaphore--;\n\t}\n\tscrollToBottom = () => {\n\t\tthis.child.container.scrollTop = this.child.container.scrollHeight;\n\t\tlet rect = this.child.focus.getBoundingClientRect();\n\t\tif(rect.top < 0 || rect.left < 0 ||\n\t\t\trect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t\t\trect.right > (window.innerWidth || document.documentElement.clientWidth)\n\t\t) { this.child.typer.scrollIntoView(false); }\n\t}\n\tnextLabel = () => {\n\t\tif(typeof this.props.promptLabel === \"string\") {\n\t\t\treturn this.props.promptLabel as string;\n\t\t} else {\n\t\t\treturn (this.props.promptLabel as ()=>string)();\n\t\t}\n\t}\n\trender() {\n\t\treturn
this.child.container = ref}\n\t\t\t\tclassName={\"react-console-container \" + (this.state.focus?\"react-console-focus\":\"react-console-nofocus\")}\n\t\t\t\tonClick={this.focus}\n\t\t\t>\n\t\t\t{this.props.welcomeMessage?\n\t\t\t\t
\n\t\t\t\t\t{this.props.welcomeMessage}\n\t\t\t\t
\n\t\t\t\t: null\n\t\t\t}\n\t\t\t{this.state.log.map( (val: LogEntry) => {\n\t\t\t\treturn [\n\t\t\t\t\t,\n\t\t\t\t\t...val.message.map( (val: LogMessage, idx: number) => {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t})}\n\t\t\t{this.state.acceptInput?\n\t\t\t\t\n\t\t\t\t: null\n\t\t\t}\n\t\t\t
\n\t\t\t\t this.child.typer = ref}\n\t\t\t\t\tclassName=\"react-console-typer\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tstyle={{ outline: \"none\",\n\t\t\t\t\t\tcolor: \"transparent\",\n\t\t\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tresize: \"none\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t}}\n\t\t\t\t\tonBlur={this.blur}\n\t\t\t\t\tonKeyDown={this.keyDown}\n\t\t\t\t\tonChange={this.change}\n\t\t\t\t\tonPaste={this.paste}\n\t\t\t\t>\n\t\t\t
\n\t\t\t
this.child.focus = ref}> 
\n\t\t
;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./react-console.tsx","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 2\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/dist.tar.gz b/dist/dist.tar.gz index 1141bc7..8074278 100644 Binary files a/dist/dist.tar.gz and b/dist/dist.tar.gz differ diff --git a/dist/dist.zip b/dist/dist.zip index 1a3b580..75fb47a 100644 Binary files a/dist/dist.zip and b/dist/dist.zip differ diff --git a/dist/dist/react-console.js b/dist/dist/react-console.js index 7812e30..fcaf7c6 100644 --- a/dist/dist/react-console.js +++ b/dist/dist/react-console.js @@ -52,7 +52,7 @@ var Console = d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var React = __webpack_require__(1); - __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"./react-console.scss\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); + __webpack_require__(2); var ConsolePrompt = (function (_super) { __extends(ConsolePrompt, _super); function ConsolePrompt() { @@ -381,9 +381,7 @@ var Console = ctrlCodes[e.keyCode](); e.preventDefault(); } - else if (e.keyCode !== 86) { - e.preventDefault(); - } + e.preventDefault(); } else if (e.keyCode in keyCodes) { keyCodes[e.keyCode](); @@ -1021,6 +1019,12 @@ var Console = module.exports = React; +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + + // removed by extract-text-webpack-plugin + /***/ }) /******/ ]); //# sourceMappingURL=react-console.js.map \ No newline at end of file diff --git a/dist/dist/react-console.js.map b/dist/dist/react-console.js.map index 1f704cc..f5d683f 100644 --- a/dist/dist/react-console.js.map +++ b/dist/dist/react-console.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 723c4834d547cdfe8738","webpack:///./react-console.tsx","webpack:///external \"React\""],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,aAAY,CAAC;;;;;;AAEb,KAAY,KAAK,uBAAM,CAAO,CAAC;AAE/B,qBAAO,gJAAsB,CAAC;AAQ9B;KAA4B,iCAAsC;KAAlE;SAA4B,8BAAsC;SAOjE,UAAK,GAED,EAAE,CAAC;SAQP,iBAAiB;SACjB,oBAAe,GAAW,CAAC,CAAC;KA2C7B,CAAC;K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R,GAAG,EAAE,aAAG,IAAI,YAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,EAAtB,CAAuB,EACnC,SAAS,EAAC,qBAAqB,EAC/B,YAAY,EAAC,KAAK,EAClB,WAAW,EAAC,KAAK,EACjB,cAAc,EAAC,KAAK,EACpB,UAAU,EAAC,OAAO,EAClB,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM;aACvB,KAAK,EAAE,aAAa;aACpB,eAAe,EAAE,aAAa;aAC9B,MAAM,EAAE,MAAM;aACd,MAAM,EAAE,MAAM;aACd,QAAQ,EAAE,QAAQ;UACjB,EACF,MAAM,EAAE,IAAI,CAAC,IAAK,EAClB,SAAS,EAAE,IAAI,CAAC,OAAQ,EACxB,QAAQ,EAAE,IAAI,CAAC,MAAO,EACtB,OAAO,EAAE,IAAI,CAAC,KAAM,EACT,CACP,EACN,qBAAC,GAAG,IAAC,GAAG,EAAE,aAAG,IAAI,YAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,EAAtB,CAAuB,OAAa,CAChD,CAAC;KACR,CAAC;KA52BM,sBAAY,GAAG;SACrB,WAAW,EAAE,IAAI;SACjB,QAAQ,EAAE,cAAa,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;SACtC,MAAM,EAAE,cAAY,CAAC;MACrB,CAAC;KAy2BH,gBAAC;AAAD,EAAC,CAp4B4B,KAAK,CAAC,SAAS,GAo4B3C;AAp4BD;4BAo4BC;;;;;;;ACtkCD,wB","file":"react-console.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 723c4834d547cdfe8738","\"use strict\";\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport './react-console.scss';\n\ninterface ConsolePromptProps {\n\tpoint?: number;\n\tvalue: string;\n\tlabel: string;\n\targument?: string;\n}\nclass ConsolePrompt extends React.Component {\n\tstatic defaultProps: ConsolePromptProps = {\n\t\tpoint: -1,\n\t\tvalue: \"\",\n\t\tlabel: \"> \",\n\t\targument: null,\n\t}\n\tchild: {\n\t\tcursor?: Element;\n\t} = {};\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tthis.idle();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.idle();\n\t}\n\t// DOM Management\n\tupdateSemaphore: number = 0;\n\tidle() {\n\t\t// Blink cursor when idle\n\t\tif(this.child.cursor) {\n\t\t\tif(this.updateSemaphore == 0) {\n\t\t\t\tthis.child.cursor.className = \"react-console-cursor\";\n\t\t\t}\n\t\t\tthis.updateSemaphore++;\n\t\t\twindow.setTimeout( () => {\n\t\t\t\tthis.updateSemaphore--;\n\t\t\t\tif(this.updateSemaphore == 0 && this.child.cursor) {\n\t\t\t\t\tthis.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\trenderValue() {\n\t\tif(this.props.point < 0) {\n\t\t\treturn [this.props.value];\n\t\t} else if (this.props.point == this.props.value.length) {\n\t\t\treturn [this.props.value, this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\"> ];\n\t\t} else {\n\t\t\treturn [this.props.value.substring(0,this.props.point),\n\t\t\t\t this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\">{this.props.value.substring(this.props.point,this.props.point+1)},\n\t\t\t\tthis.props.value.substring(this.props.point+1)];\n\t\t}\n\t}\n\trender() {\n\t\tlet label = this.props.label;\n\t\tif(this.props.argument) {\n\t\t\tlet idx = label.lastIndexOf(\"\\n\");\n\t\t\tif(idx >= 0) {\n\t\t\t\tlabel = label.substring(0, idx+1);\n\t\t\t} else {\n\t\t\t\tlabel = '';\n\t\t\t}\n\t\t}\n\t\treturn
\n\t\t\t{ label }\n\t\t\t{ this.props.argument }\n\t\t\t{ this.renderValue() }\n\t\t
;\n\t}\n}\n\ninterface ConsoleTableHeaderProps {\n\theaders?: string[];\n}\nlet ConsoleTableHeader: React.SFC = function(props: ConsoleTableHeaderProps){\t\n\tif(props.headers){\n\t\treturn \n\t\t\t\t\t\n\t\t\t\t\t\t{props.headers.map((header: string) => {\n\t\t\t\t\t\t\treturn { header };\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t}\n\treturn null;\n}\n\ninterface ConsoleMessageProps {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nlet ConsoleMessage: React.SFC = function(props: ConsoleMessageProps) {\n\tif(props.isTable){\n\t\tconst data = props.value[0];\n\t\treturn
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{data.rows && data.rows.map((row: any[], index: number) => {\n\t\t\t\t\t\treturn {row.map((cell: any, cellIndex: number) => {\n\t\t\t\t\t\t\tif(typeof cell === 'string'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else if(typeof cell === 'object' && cell.type === 'link'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t;\n\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t
{cell}{cell.text}{JSON.stringify(cell)}
\n\t\t
;\n\t}else{\n\t\treturn
\n\t\t\t{props.value.map((val: any, i: number)=>{\n\t\t\t\tif(typeof val == 'string') {\n\t\t\t\t\treturn
{val}
;\n\t\t\t\t} else if(typeof val === 'object' && val.type === 'link') {\n\t\t\t\t\treturn ;\n\t\t\t\t} else {\n\t\t\t\t\treturn
{JSON.stringify(val)}
;\n\t\t\t\t}\n\t\t\t})}\n\t\t
;\n\t}\n}\nConsoleMessage.defaultProps = {\n\ttype: null,\n\tvalue: [],\n\tisTable: false\n}\n\nexport interface ConsoleTableObject {\n\trows: Array;\n\theaders?: Array;\n}\n\nexport interface LogMessage {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nexport interface LogEntry {\n\tlabel: string;\n\tcommand: string;\n\tmessage: LogMessage[];\n}\n\nexport interface ConsoleProps{\n\thandler: (command: string)=>any;\n\tcancel?: ()=>any;\n\tcomplete?: (words: string[], curr: number, promptText: string)=>string[];\n\tcontinue?: (promptText: string)=>boolean;\n\tautofocus?: boolean;\n\tpromptLabel?: string | (()=>string);\n\twelcomeMessage?: string;\n}\nexport const enum ConsoleCommand {\n\tDefault,\n\tSearch,\n\tKill,\n\tYank,\n};\nexport const enum SearchDirection {\n\tReverse,\n\tForward,\n}\nexport interface ConsoleState{\n\tfocus?: boolean;\n\tacceptInput?: boolean;\n\ttyper?: string;\n\tpoint?: number;\n\tcurrLabel?: string;\n\tpromptText?: string;\n\trestoreText?: string;\n\tsearchText?: string;\n\tsearchDirection?: SearchDirection;\n\tsearchInit?: boolean;\n\tlog?: LogEntry[];\n\thistory?: string[];\n\thistoryn?: number;\n\tkill?: string[];\n\tkilln?: number;\n\targument?: string;\n\tlastCommand?: ConsoleCommand;\n};\nexport default class extends React.Component {\n\tconstructor(props: ConsoleProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfocus: false,\n\t\t\tacceptInput: true,\n\t\t\ttyper: '',\n\t\t\tpoint: 0,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t\tpromptText: '',\n\t\t\trestoreText: '',\n\t\t\tsearchText: '',\n\t\t\tsearchDirection: null,\n\t\t\tsearchInit: false,\n\t\t\tlog: [],\n\t\t\thistory: [],\n\t\t\thistoryn: 0,\n\t\t\tkill: [],\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tstatic defaultProps = {\n\t\tpromptLabel: '> ',\n\t\tcontinue: function() { return false; },\n\t\tcancel: function() {},\n\t};\n\tchild: {\n\t\ttyper?: HTMLTextAreaElement;\n\t\tcontainer?: HTMLElement;\n\t\tfocus?: HTMLElement;\n\t} = {};\n\t// Command API\n\tsetBusy = () => {\n\t\tthis.setState({acceptInput: false});\n\t}\n\tgetSafeLog = () => {\n\t\tif(!this.state.log.length){\n\t\t\tthis.state.log.push({label: '', command: '', message: [] });\n\t\t}\n\t\treturn this.state.log;\n\t}\n\tupdateLastLog = (...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tlet indexToReplace = log[this.state.log.length-1].message.length > 0 ? log[this.state.log.length-1].message.length - 1 : 0;\n\t\tlog[this.state.log.length-1].message[indexToReplace] = {value: messages};\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlog = (...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tlog[this.state.log.length-1].message.push({value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogX = (type: string, ...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({type: type, value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogTable = (tableData: ConsoleTableObject, type?: string) => {\n\t\tlet log = this.getSafeLog();\n\t\tif(type){\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, type: type, value: [tableData]});\n\t\t}else{\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, value: [tableData]});\n\t\t}\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\treturn = () => {\n\t\tthis.setState({\n\t\t\tacceptInput: true,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t}, this.scrollIfBottom() );\n\t}\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tif(this.props.autofocus) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\t// Event Handlers\n\tfocus = () => {\n\t\tif(!window.getSelection().toString()) {\n\t\t\tthis.child.typer.focus();\n\t\t\tthis.setState({ focus: true }, this.scrollToBottom );\n\t\t}\n\t}\n\tblur = () => {\n\t\tthis.setState({ focus: false });\n\t}\n\tkeyDown = (e: KeyboardEvent) => {\n\t\tinterface keyMap {\n\t\t\t[key: number]: ()=>void\n\t\t}\n\t\tlet keyCodes: keyMap = {\n\t\t\t// return\n\t\t\t13: this.acceptLine,\n\t\t\t// left\n\t\t\t37: this.backwardChar,\n\t\t\t// right\n\t\t\t39: this.forwardChar,\n\t\t\t// up\n\t\t\t38: this.previousHistory,\n\t\t\t// down\n\t\t\t40: this.nextHistory,\n\t\t\t// backspace\n\t\t\t8: this.backwardDeleteChar,\n\t\t\t// delete\n\t\t\t46: this.deleteChar,\n\t\t\t// end\n\t\t\t35: this.endOfLine,\n\t\t\t// start\n\t\t\t36: this.beginningOfLine,\n\t\t\t// tab\n\t\t\t9: this.complete,\n\t\t\t// esc\n\t\t\t27: this.prefixMeta,\n\t\t};\n\t\tvar ctrlCodes: keyMap = {\n\t\t\t// C-a\n\t\t\t65: this.beginningOfLine,\n\t\t\t// C-e\n\t\t\t69: this.endOfLine,\n\t\t\t// C-f\n\t\t\t70: this.forwardChar,\n\t\t\t// C-b\n\t\t\t66: this.backwardChar,\n\t\t\t// C-l\n\t\t\t76: this.clearScreen,\n\t\t\t// C-p\n\t\t\t80: this.previousHistory,\n\t\t\t// C-n\n\t\t\t78: this.nextHistory,\n\t\t\t// C-r\n\t\t\t82: this.reverseSearchHistory,\n\t\t\t// C-s\n\t\t\t83: this.forwardSearchHistory,\n\t\t\t// C-d\n\t\t\t68: this.deleteChar, // TODO EOF\n\t\t\t// C-q TODO\n\t\t\t//81: this.quotedInsert,\n\t\t\t// C-v TODO\n\t\t\t//86: this.quotedInsert,\n\t\t\t// C-t TODO\n\t\t\t//84: this.transposeChars,\n\t\t\t// C-k\n\t\t\t75: this.killLine,\n\t\t\t// C-u\n\t\t\t85: this.backwardKillLine,\n\t\t\t// C-y TODO\n\t\t\t89: this.yank,\n\t\t\t// C-c\n\t\t\t67: this.cancelCommand,\n\t\t\t// C-w TODO\n\t\t\t//87: this.killPreviousWhitespace,\n\t\t\t// C-] TODO\n\t\t\t//221: this.characterSearch,\n\t\t\t// C-x TODO\n\t\t\t//88: this.prefixCtrlX,\n\t\t};\n\t\tvar ctrlXCodes: keyMap = { // TODO state\n\t\t\t// C-x Rubout\n\t\t\t8: this.backwardKillLine,\n\t\t\t// C-x ( TODO\n\t\t\t//57: this.startKbdMacro,\n\t\t\t// C-x ) TODO\n\t\t\t//48: this.endKbdMacro,\n\t\t\t// C-x e TODO\n\t\t\t//69: this.callLastKbdMacro,\n\t\t\t// C-x C-u TODO\n\t\t\t//85: this.undo,\n\t\t\t// C-x C-x TODO\n\t\t\t//88: this.exchangePointAndMark,\n\t\t};\n\t\tvar ctrlShiftCodes: keyMap = {\n\t\t\t// C-_ TODO\n\t\t\t//189: this.undo,\n\t\t\t// C-@ TODO\n\t\t\t//50: this.setMark,\n\t\t};\n\t\tvar metaCodes: keyMap = {\n\t\t\t// M-f\n\t\t\t70: this.forwardWord,\n\t\t\t// M-b\n\t\t\t66: this.backwardWord,\n\t\t\t// M-p\n\t\t\t80: this.nonIncrementalReverseSearchHistory,\n\t\t\t// M-n\n\t\t\t78: this.nonIncrementalForwardSearchHistory,\n\t\t\t// M-.\n\t\t\t190: this.yankLastArg,\n\t\t\t// M-TAB TODO\n\t\t\t//9: this.tabInsert,\n\t\t\t// M-t TODO\n\t\t\t//84: this.transposeWords,\n\t\t\t// M-u TODO\n\t\t\t//85: this.upcaseWord,\n\t\t\t// M-l TODO\n\t\t\t//76: this.downcaseWord,\n\t\t\t// M-c TODO\n\t\t\t//67: this.capitalizeWord,\n\t\t\t// M-d\n\t\t\t68: this.killWord,\n\t\t\t// M-backspace\n\t\t\t8: this.backwardKillWord,\n\t\t\t// M-w TODO\n\t\t\t//87: this.unixWordRubout,\n\t\t\t// M-\\ TODO\n\t\t\t//220: this.deleteHorizontalSpace,\n\t\t\t// M-y\n\t\t\t89: this.yankPop,\n\t\t\t// M-0 TODO\n\t\t\t//48: () => this.digitArgument(0),\n\t\t\t// M-1 TODO\n\t\t\t//49: () => this.digitArgument(1),\n\t\t\t// M-2 TODO\n\t\t\t//50: () => this.digitArgument(2),\n\t\t\t// M-3 TODO\n\t\t\t//51: () => this.digitArgument(3),\n\t\t\t// M-4 TODO\n\t\t\t//52: () => this.digitArgument(4),\n\t\t\t// M-5 TODO\n\t\t\t//53: () => this.digitArgument(5),\n\t\t\t// M-6 TODO\n\t\t\t//54: () => this.digitArgument(6),\n\t\t\t// M-7 TODO\n\t\t\t//55: () => this.digitArgument(7),\n\t\t\t// M-8 TODO\n\t\t\t//56: () => this.digitArgument(8),\n\t\t\t// M-9 TODO\n\t\t\t//57: () => this.digitArgument(9),\n\t\t\t// M-- TODO\n\t\t\t//189: () => this.digitArgument('-'),\n\t\t\t// M-f TODO\n\t\t\t//71: () => this.abort,\n\t\t\t// M-r TODO\n\t\t\t//82: this.revertLine,\n\t\t\t// M-SPACE TODO\n\t\t\t//32: this.setMark,\n\t\t};\n\t\tvar metaShiftCodes: keyMap = { // TODO hook in\n\t\t\t// M-<\n\t\t\t188: this.beginningOfHistory,\n\t\t\t// M->\n\t\t\t190: this.endOfHistory,\n\t\t\t// M-_\n\t\t\t189: this.yankLastArg,\n\t\t\t// M-? TODO\n\t\t\t//191: this.possibleCompletions,\n\t\t\t// M-* TODO\n\t\t\t//56: this.insertCompletions,\n\t\t}\n\t\tvar metaCtrlCodes: keyMap = {\n\t\t\t// M-C-y\n\t\t\t89: this.yankNthArg,\n\t\t\t// M-C-] TODO\n\t\t\t//221: this.characterSearchBackward,\n\t\t\t// M-C-j TODO !!!\n\t\t\t//74: this.viEditingMode,\n\t\t};\n\t\tif(this.state.acceptInput) {\n\t\t\tif (e.altKey) {\n\t\t\t\tif (e.ctrlKey) {\n\t\t\t\t\tif (e.keyCode in metaCtrlCodes) {\n\t\t\t\t\t\tmetaCtrlCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.shiftKey) {\n\t\t\t\t\tif (e.keyCode in metaShiftCodes) {\n\t\t\t\t\t\tmetaShiftCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.keyCode in metaCodes) {\n\t\t\t\t\tmetaCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.ctrlKey) {\n\t\t\t\tif (e.keyCode in ctrlCodes) {\n\t\t\t\t\tctrlCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}else if(e.keyCode !== 86){ // allow ctrl+v for paste on windows\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t} else if (e.keyCode in keyCodes) {\n\t\t\t\tkeyCodes[e.keyCode]();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t} else if(e.ctrlKey && e.keyCode === 67) {\n\t\t\t// if input is blocked, ctrl+c should still call cancel\n\t\t\tctrlCodes[e.keyCode]();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\tchange = () => {\n\t\tlet idx = 0;\n\t\tfor(;idx < this.state.typer.length && idx < this.child.typer.value.length; idx++) {\n\t\t\tif(this.state.typer[idx] != this.child.typer.value[idx]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet insert = this.child.typer.value.substring(idx);\n\t\tlet replace = this.state.typer.length - idx;\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText, replace),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert, replace),{\n\t\t\t\t\ttyper: this.child.typer.value,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\tpaste = (e: ClipboardEvent) => {\n\t\tlet insert = e.clipboardData.getData('text');\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert),{\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t\te.preventDefault();\n\t}\n\t// Commands for Moving\n\tbeginningOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tendOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.state.promptText.length,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(-1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.nextWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\t// Commands for Manipulating the History\n\tacceptLine = () => {\n\t\tthis.child.typer.value = \"\";\n\t\tif(this.props.continue(this.state.promptText)) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(\"\\n\"),{\n\t\t\t\t\ttyper: \"\",\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tlet command = this.state.promptText;\n\t\t\tlet history = this.state.history;\n\t\t\tlet log = this.state.log;\n\t\t\tif(!history || history[history.length-1] != command) {\n\t\t\t\thistory.push(command);\n\t\t\t}\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: command,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\tacceptInput: false,\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistory: history,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, () => {\n\t\t\t\tthis.scrollToBottom();\n\t\t\t\tif(this.props.handler) {\n\t\t\t\t\tthis.props.handler(command)\n\t\t\t\t} else {\n\t\t\t\t\tthis.return();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tpreviousHistory = () => {\n\t\tthis.rotateHistory(-1);\n\t}\n\tnextHistory = () => {\n\t\tthis.rotateHistory(1);\n\t}\n\tbeginningOfHistory = () => {\n\t\tthis.rotateHistory(-this.state.history.length);\n\t}\n\tendOfHistory = () => {\n\t\tthis.rotateHistory(this.state.history.length);\n\t}\n\ttriggerSearch = () => {\n\t\tif(this.state.searchDirection == SearchDirection.Reverse) {\n\t\t\tthis.reverseSearchHistory();\n\t\t} else {\n\t\t\tthis.forwardSearchHistory();\n\t\t}\n\t}\n\treverseSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Reverse, true),{\n\t\t\t\t\targument: `(reverse-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Reverse,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(reverse-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tforwardSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Forward, true),{\n\t\t\t\t\targument: `(forward-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Forward,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(forward-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tclearScreen = () => {\n\t\tthis.setState({ log: [] });\n\t}\n\tnonIncrementalReverseSearchHistory = () => {\n\t\t// TODO\n\t}\n\tnonIncrementalForwardSearchHistory = () => {\n\t\t// TODO\n\t}\n\thistorySearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySearchForward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchForward = () => {\n\t\t// TODO\n\t}\n\tyankNthArg = () => {\n\t\t// TODO\n\t}\n\tyankLastArg = () => {\n\t\t// TODO\n\t}\n\t// Commands for Changing Text\n\tdeleteChar = () => {\n\t\tif(this.state.point < this.state.promptText.length) {\n\t\t\tthis.setState({\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point+1),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tbackwardDeleteChar = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchText.substring(0,this.state.searchText.length-1),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else if(this.state.point > 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.movePoint(-1),\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point-1)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\t// Killing and Yanking\n\tkillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(0,this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWholeLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText);\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: '',\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point,this.nextWord());\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point,this.nextWord()));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ this.state.promptText.substring(this.nextWord()),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(this.previousWord(),this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.previousWord(),this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\tpromptText: this.state.promptText.substring(0,this.previousWord())\n\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tyank = () => {\n\t\tthis.setState(Object.assign(\n\t\t\tthis.consoleInsert(this.state.kill[this.state.killn]),{\n\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t}), this.scrollToBottom\n\t\t);\n\t}\n\tyankPop = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Yank) {\n\t\t\tlet killn = this.rotateRing(1, this.state.killn, this.state.kill.length);\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(this.state.kill[killn], this.state.kill[this.state.killn].length),{\n\t\t\t\t\tkilln: killn,\n\t\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\t// Numeric Arguments\n\t// Completing\n\tcomplete = () => {\n\t\tif(this.props.complete) {\n\t\t\t// Split text and find current word\n\t\t\tlet words = this.state.promptText.split(\" \");\n\t\t\tlet curr = 0;\n\t\t\tlet idx = words[0].length;\n\t\t\twhile(idx < this.state.point && curr + 1 < words.length) {\n\t\t\t\tidx += words[++curr].length + 1;\n\t\t\t}\n\n\t\t\tlet completions = this.props.complete(words, curr, this.state.promptText);\n\t\t\tif(completions.length == 1) {\n\t\t\t\t// Perform completion\n\t\t\t\twords[curr] = completions[0];\n\t\t\t\tlet point = -1;\n\t\t\t\tfor(let i = 0; i <= curr; i++) {\n\t\t\t\t\tpoint += words[i].length + 1;\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: words.join(\" \"),\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t} else if (completions.length > 1) {\n\t\t\t\t// show completions\n\t\t\t\tlet log = this.state.log;\n\t\t\t\tlog.push({\n\t\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\t\tcommand: this.state.promptText,\n\t\t\t\t\tmessage: [{\n\t\t\t\t\t\ttype: \"completion\",\n\t\t\t\t\t\tvalue: [completions.join(\"\\t\")],\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tthis.setState({\n\t\t\t\t\tcurrLabel: this.nextLabel(),\n\t\t\t\t\tlog: log,\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t}\n\t\t}\n\t}\n\t// Keyboard Macros\n\t// Miscellaneous\n\tprefixMeta = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t});\n\t\t}\n\t\t// TODO Meta prefixed state\n\t}\n\tcancelCommand = () => {\n\t\tif(this.state.acceptInput) { // Typing command\n\t\t\tthis.child.typer.value = \"\";\n\t\t\tlet log = this.state.log;\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: this.state.promptText,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t} else { // command is executing, call handler\n\t\t\tthis.props.cancel();\n\t\t}\n\t}\n\t// Helper functions\n\ttextInsert = (insert: string, text: string, replace: number = 0, point: number = text.length): string => {\n\t\treturn text.substring(0, point - replace) + insert + text.substring(point);\n\t}\n\tconsoleInsert = (insert: string, replace: number = 0): ConsoleState => {\n\t\tlet promptText = this.textInsert(insert, this.state.promptText, replace, this.state.point);\n\t\treturn {\n\t\t\tpoint: this.movePoint(insert.length - replace, insert.length - replace + this.state.promptText.length),\n\t\t\tpromptText: promptText,\n\t\t\trestoreText: promptText,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tmovePoint = (n: number, max: number = this.state.promptText.length) => {\n\t\tlet pos = this.state.point + n;\n\t\tif (pos < 0) {\n\t\t\treturn 0;\n\t\t} if (pos > max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n\tnextWord(): number {\n\t\t// Find first alphanumeric char after first non-alphanumeric char\n\t\tlet search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t\tif(search) {\n\t\t\treturn search.index + this.state.point + 1;\n\t\t} else {\n\t\t\treturn this.state.promptText.length;\n\t\t}\n\t}\n\tpreviousWord(): number {\n\t\t// Find first non-alphanumeric char after first alphanumeric char in reverse\n\t\tlet search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0,this.state.point-1));\n\t\tif(search) {\n\t\t\treturn search.index + 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\trotateRing = (n: number, ringn: number, ring: number, circular: boolean = true): number => {\n\t\tif(ring == 0) return 0;\n\t\tif(circular) {\n\t\t\treturn (ring + (ringn + n) % ring) % ring;\n\t\t} else {\n\t\t\tringn = ringn - n;\n\t\t\tif(ringn < 0) {\n\t\t\t\treturn 0;\n\t\t\t} else if (ringn >= ring) {\n\t\t\t\treturn ring;\n\t\t\t} else {\n\t\t\t\treturn ringn;\n\t\t\t}\n\t\t}\n\t}\n\trotateHistory = (n: number) => {\n\t\tlet historyn = this.rotateRing(n, this.state.historyn, this.state.history.length, false);\n\t\tif(historyn == 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.state.restoreText.length,\n\t\t\t\tpromptText: this.state.restoreText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t} else {\n\t\t\tlet promptText = this.state.history[this.state.history.length-historyn];\n\t\t\tthis.setState({\n\t\t\t\tpoint: promptText.length,\n\t\t\t\tpromptText: promptText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t}\n\t}\n\tsearchHistory = (direction: SearchDirection = this.state.searchDirection, next: boolean = false): ConsoleState => {\n\t\tlet idx = this.state.historyn;\n\t\tlet inc = (direction == SearchDirection.Reverse)?1:-1;\n\t\tif(next) {\n\t\t\tidx = idx + inc;\n\t\t}\n\t\tfor(;idx > 0 && idx <= this.state.history.length; idx = idx + inc) {\n\t\t\tlet entry = this.state.history[this.state.history.length-idx];\n\t\t\tlet point = entry.indexOf(this.state.searchText);\n\t\t\tif(point > -1) {\n\t\t\t\treturn {\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: entry,\n\t\t\t\t\tsearchDirection: direction,\n\t\t\t\t\tsearchInit: false,\n\t\t\t\t\thistoryn: idx,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tsearchDirection: direction,\n\t\t\tsearchInit: false,\n\t\t};\n\t}\n\t// DOM management\n\tscrollSemaphore = 0;\n\tscrollIfBottom = () => {\n\t\tif(this.scrollSemaphore > 0 || this.child.container.scrollTop == this.child.container.scrollHeight - this.child.container.offsetHeight) {\n\t\t\tthis.scrollSemaphore++;\n\t\t\treturn this.scrollIfBottomTrue;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\tscrollIfBottomTrue = () => {\n\t\tthis.scrollToBottom();\n\t\tthis.scrollSemaphore--;\n\t}\n\tscrollToBottom = () => {\n\t\tthis.child.container.scrollTop = this.child.container.scrollHeight;\n\t\tlet rect = this.child.focus.getBoundingClientRect();\n\t\tif(rect.top < 0 || rect.left < 0 ||\n\t\t\trect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t\t\trect.right > (window.innerWidth || document.documentElement.clientWidth)\n\t\t) { this.child.typer.scrollIntoView(false); }\n\t}\n\tnextLabel = () => {\n\t\tif(typeof this.props.promptLabel === \"string\") {\n\t\t\treturn this.props.promptLabel as string;\n\t\t} else {\n\t\t\treturn (this.props.promptLabel as ()=>string)();\n\t\t}\n\t}\n\trender() {\n\t\treturn
this.child.container = ref}\n\t\t\t\tclassName={\"react-console-container \" + (this.state.focus?\"react-console-focus\":\"react-console-nofocus\")}\n\t\t\t\tonClick={this.focus}\n\t\t\t>\n\t\t\t{this.props.welcomeMessage?\n\t\t\t\t
\n\t\t\t\t\t{this.props.welcomeMessage}\n\t\t\t\t
\n\t\t\t\t: null\n\t\t\t}\n\t\t\t{this.state.log.map( (val: LogEntry) => {\n\t\t\t\treturn [\n\t\t\t\t\t,\n\t\t\t\t\t...val.message.map( (val: LogMessage, idx: number) => {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t})}\n\t\t\t{this.state.acceptInput?\n\t\t\t\t\n\t\t\t\t: null\n\t\t\t}\n\t\t\t
\n\t\t\t\t this.child.typer = ref}\n\t\t\t\t\tclassName=\"react-console-typer\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tstyle={{ outline: \"none\",\n\t\t\t\t\t\tcolor: \"transparent\",\n\t\t\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tresize: \"none\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t}}\n\t\t\t\t\tonBlur={this.blur}\n\t\t\t\t\tonKeyDown={this.keyDown}\n\t\t\t\t\tonChange={this.change}\n\t\t\t\t\tonPaste={this.paste}\n\t\t\t\t>\n\t\t\t
\n\t\t\t
this.child.focus = ref}> 
\n\t\t
;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./react-console.tsx","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 1\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap d2ee1a80f9f93e79dea2","webpack:///./react-console.tsx","webpack:///external \"React\"","webpack:///./react-console.scss"],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,aAAY,CAAC;;;;;;AAEb,KAAY,KAAK,uBAAM,CAAO,CAAC;AAE/B,qBAAO,CAAsB,CAAC;AAQ9B;KAA4B,iCAAsC;KAAlE;SAA4B,8BAAsC;SAOjE,UAAK,GAED,EAAE,CAAC;SAQP,iBAAiB;SACjB,oBAAe,GAAW,CAAC,CAAC;KA2C7B,CAAC;KAnDA,sBAAsB;KACtB,yCAAiB,GAAjB;SACC,IAAI,CAAC,IAAI,EAAE,CAAC;KACb,CAAC;KACD,0CAAkB,GAAlB;SACC,IAAI,CAAC,IAAI,EAAE,CAAC;KACb,CAAC;KAGD,4B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AAM;aACvB,KAAK,EAAE,aAAa;aACpB,eAAe,EAAE,aAAa;aAC9B,MAAM,EAAE,MAAM;aACd,MAAM,EAAE,MAAM;aACd,QAAQ,EAAE,QAAQ;UACjB,EACF,MAAM,EAAE,IAAI,CAAC,IAAK,EAClB,SAAS,EAAE,IAAI,CAAC,OAAQ,EACxB,QAAQ,EAAE,IAAI,CAAC,MAAO,EACtB,OAAO,EAAE,IAAI,CAAC,KAAM,EACT,CACP,EACN,qBAAC,GAAG,IAAC,GAAG,EAAE,aAAG,IAAI,YAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,EAAtB,CAAuB,OAAa,CAChD,CAAC;KACR,CAAC;KA32BM,sBAAY,GAAG;SACrB,WAAW,EAAE,IAAI;SACjB,QAAQ,EAAE,cAAa,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;SACtC,MAAM,EAAE,cAAY,CAAC;MACrB,CAAC;KAw2BH,gBAAC;AAAD,EAAC,CAn4B4B,KAAK,CAAC,SAAS,GAm4B3C;AAn4BD;4BAm4BC;;;;;;;ACrkCD,wB;;;;;;ACAA,0C","file":"react-console.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap d2ee1a80f9f93e79dea2","\"use strict\";\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport './react-console.scss';\n\ninterface ConsolePromptProps {\n\tpoint?: number;\n\tvalue: string;\n\tlabel: string;\n\targument?: string;\n}\nclass ConsolePrompt extends React.Component {\n\tstatic defaultProps: ConsolePromptProps = {\n\t\tpoint: -1,\n\t\tvalue: \"\",\n\t\tlabel: \"> \",\n\t\targument: null,\n\t}\n\tchild: {\n\t\tcursor?: Element;\n\t} = {};\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tthis.idle();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.idle();\n\t}\n\t// DOM Management\n\tupdateSemaphore: number = 0;\n\tidle() {\n\t\t// Blink cursor when idle\n\t\tif(this.child.cursor) {\n\t\t\tif(this.updateSemaphore == 0) {\n\t\t\t\tthis.child.cursor.className = \"react-console-cursor\";\n\t\t\t}\n\t\t\tthis.updateSemaphore++;\n\t\t\twindow.setTimeout( () => {\n\t\t\t\tthis.updateSemaphore--;\n\t\t\t\tif(this.updateSemaphore == 0 && this.child.cursor) {\n\t\t\t\t\tthis.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\trenderValue() {\n\t\tif(this.props.point < 0) {\n\t\t\treturn [this.props.value];\n\t\t} else if (this.props.point == this.props.value.length) {\n\t\t\treturn [this.props.value, this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\"> ];\n\t\t} else {\n\t\t\treturn [this.props.value.substring(0,this.props.point),\n\t\t\t\t this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\">{this.props.value.substring(this.props.point,this.props.point+1)},\n\t\t\t\tthis.props.value.substring(this.props.point+1)];\n\t\t}\n\t}\n\trender() {\n\t\tlet label = this.props.label;\n\t\tif(this.props.argument) {\n\t\t\tlet idx = label.lastIndexOf(\"\\n\");\n\t\t\tif(idx >= 0) {\n\t\t\t\tlabel = label.substring(0, idx+1);\n\t\t\t} else {\n\t\t\t\tlabel = '';\n\t\t\t}\n\t\t}\n\t\treturn
\n\t\t\t{ label }\n\t\t\t{ this.props.argument }\n\t\t\t{ this.renderValue() }\n\t\t
;\n\t}\n}\n\ninterface ConsoleTableHeaderProps {\n\theaders?: string[];\n}\nlet ConsoleTableHeader: React.SFC = function(props: ConsoleTableHeaderProps){\t\n\tif(props.headers){\n\t\treturn \n\t\t\t\t\t\n\t\t\t\t\t\t{props.headers.map((header: string) => {\n\t\t\t\t\t\t\treturn { header };\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t}\n\treturn null;\n}\n\ninterface ConsoleMessageProps {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nlet ConsoleMessage: React.SFC = function(props: ConsoleMessageProps) {\n\tif(props.isTable){\n\t\tconst data = props.value[0];\n\t\treturn
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{data.rows && data.rows.map((row: any[], index: number) => {\n\t\t\t\t\t\treturn {row.map((cell: any, cellIndex: number) => {\n\t\t\t\t\t\t\tif(typeof cell === 'string'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else if(typeof cell === 'object' && cell.type === 'link'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t;\n\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t
{cell}{cell.text}{JSON.stringify(cell)}
\n\t\t
;\n\t}else{\n\t\treturn
\n\t\t\t{props.value.map((val: any, i: number)=>{\n\t\t\t\tif(typeof val == 'string') {\n\t\t\t\t\treturn
{val}
;\n\t\t\t\t} else if(typeof val === 'object' && val.type === 'link') {\n\t\t\t\t\treturn ;\n\t\t\t\t} else {\n\t\t\t\t\treturn
{JSON.stringify(val)}
;\n\t\t\t\t}\n\t\t\t})}\n\t\t
;\n\t}\n}\nConsoleMessage.defaultProps = {\n\ttype: null,\n\tvalue: [],\n\tisTable: false\n}\n\nexport interface ConsoleTableObject {\n\trows: Array;\n\theaders?: Array;\n}\n\nexport interface LogMessage {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nexport interface LogEntry {\n\tlabel: string;\n\tcommand: string;\n\tmessage: LogMessage[];\n}\n\nexport interface ConsoleProps{\n\thandler: (command: string)=>any;\n\tcancel?: ()=>any;\n\tcomplete?: (words: string[], curr: number, promptText: string)=>string[];\n\tcontinue?: (promptText: string)=>boolean;\n\tautofocus?: boolean;\n\tpromptLabel?: string | (()=>string);\n\twelcomeMessage?: string;\n}\nexport const enum ConsoleCommand {\n\tDefault,\n\tSearch,\n\tKill,\n\tYank,\n};\nexport const enum SearchDirection {\n\tReverse,\n\tForward,\n}\nexport interface ConsoleState{\n\tfocus?: boolean;\n\tacceptInput?: boolean;\n\ttyper?: string;\n\tpoint?: number;\n\tcurrLabel?: string;\n\tpromptText?: string;\n\trestoreText?: string;\n\tsearchText?: string;\n\tsearchDirection?: SearchDirection;\n\tsearchInit?: boolean;\n\tlog?: LogEntry[];\n\thistory?: string[];\n\thistoryn?: number;\n\tkill?: string[];\n\tkilln?: number;\n\targument?: string;\n\tlastCommand?: ConsoleCommand;\n};\nexport default class extends React.Component {\n\tconstructor(props: ConsoleProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfocus: false,\n\t\t\tacceptInput: true,\n\t\t\ttyper: '',\n\t\t\tpoint: 0,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t\tpromptText: '',\n\t\t\trestoreText: '',\n\t\t\tsearchText: '',\n\t\t\tsearchDirection: null,\n\t\t\tsearchInit: false,\n\t\t\tlog: [],\n\t\t\thistory: [],\n\t\t\thistoryn: 0,\n\t\t\tkill: [],\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tstatic defaultProps = {\n\t\tpromptLabel: '> ',\n\t\tcontinue: function() { return false; },\n\t\tcancel: function() {},\n\t};\n\tchild: {\n\t\ttyper?: HTMLTextAreaElement;\n\t\tcontainer?: HTMLElement;\n\t\tfocus?: HTMLElement;\n\t} = {};\n\t// Command API\n\tsetBusy = () => {\n\t\tthis.setState({acceptInput: false});\n\t}\n\tgetSafeLog = () => {\n\t\tif(!this.state.log.length){\n\t\t\tthis.state.log.push({label: '', command: '', message: [] });\n\t\t}\n\t\treturn this.state.log;\n\t}\n\tupdateLastLog = (...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tlet indexToReplace = log[this.state.log.length-1].message.length > 0 ? log[this.state.log.length-1].message.length - 1 : 0;\n\t\tlog[this.state.log.length-1].message[indexToReplace] = {value: messages};\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlog = (...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tlog[this.state.log.length-1].message.push({value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogX = (type: string, ...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({type: type, value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogTable = (tableData: ConsoleTableObject, type?: string) => {\n\t\tlet log = this.getSafeLog();\n\t\tif(type){\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, type: type, value: [tableData]});\n\t\t}else{\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, value: [tableData]});\n\t\t}\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\treturn = () => {\n\t\tthis.setState({\n\t\t\tacceptInput: true,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t}, this.scrollIfBottom() );\n\t}\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tif(this.props.autofocus) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\t// Event Handlers\n\tfocus = () => {\n\t\tif(!window.getSelection().toString()) {\n\t\t\tthis.child.typer.focus();\n\t\t\tthis.setState({ focus: true }, this.scrollToBottom );\n\t\t}\n\t}\n\tblur = () => {\n\t\tthis.setState({ focus: false });\n\t}\n\tkeyDown = (e: KeyboardEvent) => {\n\t\tinterface keyMap {\n\t\t\t[key: number]: ()=>void\n\t\t}\n\t\tlet keyCodes: keyMap = {\n\t\t\t// return\n\t\t\t13: this.acceptLine,\n\t\t\t// left\n\t\t\t37: this.backwardChar,\n\t\t\t// right\n\t\t\t39: this.forwardChar,\n\t\t\t// up\n\t\t\t38: this.previousHistory,\n\t\t\t// down\n\t\t\t40: this.nextHistory,\n\t\t\t// backspace\n\t\t\t8: this.backwardDeleteChar,\n\t\t\t// delete\n\t\t\t46: this.deleteChar,\n\t\t\t// end\n\t\t\t35: this.endOfLine,\n\t\t\t// start\n\t\t\t36: this.beginningOfLine,\n\t\t\t// tab\n\t\t\t9: this.complete,\n\t\t\t// esc\n\t\t\t27: this.prefixMeta,\n\t\t};\n\t\tvar ctrlCodes: keyMap = {\n\t\t\t// C-a\n\t\t\t65: this.beginningOfLine,\n\t\t\t// C-e\n\t\t\t69: this.endOfLine,\n\t\t\t// C-f\n\t\t\t70: this.forwardChar,\n\t\t\t// C-b\n\t\t\t66: this.backwardChar,\n\t\t\t// C-l\n\t\t\t76: this.clearScreen,\n\t\t\t// C-p\n\t\t\t80: this.previousHistory,\n\t\t\t// C-n\n\t\t\t78: this.nextHistory,\n\t\t\t// C-r\n\t\t\t82: this.reverseSearchHistory,\n\t\t\t// C-s\n\t\t\t83: this.forwardSearchHistory,\n\t\t\t// C-d\n\t\t\t68: this.deleteChar, // TODO EOF\n\t\t\t// C-q TODO\n\t\t\t//81: this.quotedInsert,\n\t\t\t// C-v TODO\n\t\t\t//86: this.quotedInsert,\n\t\t\t// C-t TODO\n\t\t\t//84: this.transposeChars,\n\t\t\t// C-k\n\t\t\t75: this.killLine,\n\t\t\t// C-u\n\t\t\t85: this.backwardKillLine,\n\t\t\t// C-y TODO\n\t\t\t89: this.yank,\n\t\t\t// C-c\n\t\t\t67: this.cancelCommand,\n\t\t\t// C-w TODO\n\t\t\t//87: this.killPreviousWhitespace,\n\t\t\t// C-] TODO\n\t\t\t//221: this.characterSearch,\n\t\t\t// C-x TODO\n\t\t\t//88: this.prefixCtrlX,\n\t\t};\n\t\tvar ctrlXCodes: keyMap = { // TODO state\n\t\t\t// C-x Rubout\n\t\t\t8: this.backwardKillLine,\n\t\t\t// C-x ( TODO\n\t\t\t//57: this.startKbdMacro,\n\t\t\t// C-x ) TODO\n\t\t\t//48: this.endKbdMacro,\n\t\t\t// C-x e TODO\n\t\t\t//69: this.callLastKbdMacro,\n\t\t\t// C-x C-u TODO\n\t\t\t//85: this.undo,\n\t\t\t// C-x C-x TODO\n\t\t\t//88: this.exchangePointAndMark,\n\t\t};\n\t\tvar ctrlShiftCodes: keyMap = {\n\t\t\t// C-_ TODO\n\t\t\t//189: this.undo,\n\t\t\t// C-@ TODO\n\t\t\t//50: this.setMark,\n\t\t};\n\t\tvar metaCodes: keyMap = {\n\t\t\t// M-f\n\t\t\t70: this.forwardWord,\n\t\t\t// M-b\n\t\t\t66: this.backwardWord,\n\t\t\t// M-p\n\t\t\t80: this.nonIncrementalReverseSearchHistory,\n\t\t\t// M-n\n\t\t\t78: this.nonIncrementalForwardSearchHistory,\n\t\t\t// M-.\n\t\t\t190: this.yankLastArg,\n\t\t\t// M-TAB TODO\n\t\t\t//9: this.tabInsert,\n\t\t\t// M-t TODO\n\t\t\t//84: this.transposeWords,\n\t\t\t// M-u TODO\n\t\t\t//85: this.upcaseWord,\n\t\t\t// M-l TODO\n\t\t\t//76: this.downcaseWord,\n\t\t\t// M-c TODO\n\t\t\t//67: this.capitalizeWord,\n\t\t\t// M-d\n\t\t\t68: this.killWord,\n\t\t\t// M-backspace\n\t\t\t8: this.backwardKillWord,\n\t\t\t// M-w TODO\n\t\t\t//87: this.unixWordRubout,\n\t\t\t// M-\\ TODO\n\t\t\t//220: this.deleteHorizontalSpace,\n\t\t\t// M-y\n\t\t\t89: this.yankPop,\n\t\t\t// M-0 TODO\n\t\t\t//48: () => this.digitArgument(0),\n\t\t\t// M-1 TODO\n\t\t\t//49: () => this.digitArgument(1),\n\t\t\t// M-2 TODO\n\t\t\t//50: () => this.digitArgument(2),\n\t\t\t// M-3 TODO\n\t\t\t//51: () => this.digitArgument(3),\n\t\t\t// M-4 TODO\n\t\t\t//52: () => this.digitArgument(4),\n\t\t\t// M-5 TODO\n\t\t\t//53: () => this.digitArgument(5),\n\t\t\t// M-6 TODO\n\t\t\t//54: () => this.digitArgument(6),\n\t\t\t// M-7 TODO\n\t\t\t//55: () => this.digitArgument(7),\n\t\t\t// M-8 TODO\n\t\t\t//56: () => this.digitArgument(8),\n\t\t\t// M-9 TODO\n\t\t\t//57: () => this.digitArgument(9),\n\t\t\t// M-- TODO\n\t\t\t//189: () => this.digitArgument('-'),\n\t\t\t// M-f TODO\n\t\t\t//71: () => this.abort,\n\t\t\t// M-r TODO\n\t\t\t//82: this.revertLine,\n\t\t\t// M-SPACE TODO\n\t\t\t//32: this.setMark,\n\t\t};\n\t\tvar metaShiftCodes: keyMap = { // TODO hook in\n\t\t\t// M-<\n\t\t\t188: this.beginningOfHistory,\n\t\t\t// M->\n\t\t\t190: this.endOfHistory,\n\t\t\t// M-_\n\t\t\t189: this.yankLastArg,\n\t\t\t// M-? TODO\n\t\t\t//191: this.possibleCompletions,\n\t\t\t// M-* TODO\n\t\t\t//56: this.insertCompletions,\n\t\t}\n\t\tvar metaCtrlCodes: keyMap = {\n\t\t\t// M-C-y\n\t\t\t89: this.yankNthArg,\n\t\t\t// M-C-] TODO\n\t\t\t//221: this.characterSearchBackward,\n\t\t\t// M-C-j TODO !!!\n\t\t\t//74: this.viEditingMode,\n\t\t};\n\t\tif(this.state.acceptInput) {\n\t\t\tif (e.altKey) {\n\t\t\t\tif (e.ctrlKey) {\n\t\t\t\t\tif (e.keyCode in metaCtrlCodes) {\n\t\t\t\t\t\tmetaCtrlCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.shiftKey) {\n\t\t\t\t\tif (e.keyCode in metaShiftCodes) {\n\t\t\t\t\t\tmetaShiftCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.keyCode in metaCodes) {\n\t\t\t\t\tmetaCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.ctrlKey) {\n\t\t\t\tif (e.keyCode in ctrlCodes) {\n\t\t\t\t\tctrlCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.keyCode in keyCodes) {\n\t\t\t\tkeyCodes[e.keyCode]();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t} else if(e.ctrlKey && e.keyCode === 67) {\n\t\t\t// if input is blocked, ctrl+c should still call cancel\n\t\t\tctrlCodes[e.keyCode]();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\tchange = () => {\n\t\tlet idx = 0;\n\t\tfor(;idx < this.state.typer.length && idx < this.child.typer.value.length; idx++) {\n\t\t\tif(this.state.typer[idx] != this.child.typer.value[idx]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet insert = this.child.typer.value.substring(idx);\n\t\tlet replace = this.state.typer.length - idx;\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText, replace),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert, replace),{\n\t\t\t\t\ttyper: this.child.typer.value,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\tpaste = (e: ClipboardEvent) => {\n\t\tlet insert = e.clipboardData.getData('text');\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert),{\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t\te.preventDefault();\n\t}\n\t// Commands for Moving\n\tbeginningOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tendOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.state.promptText.length,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(-1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.nextWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\t// Commands for Manipulating the History\n\tacceptLine = () => {\n\t\tthis.child.typer.value = \"\";\n\t\tif(this.props.continue(this.state.promptText)) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(\"\\n\"),{\n\t\t\t\t\ttyper: \"\",\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tlet command = this.state.promptText;\n\t\t\tlet history = this.state.history;\n\t\t\tlet log = this.state.log;\n\t\t\tif(!history || history[history.length-1] != command) {\n\t\t\t\thistory.push(command);\n\t\t\t}\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: command,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\tacceptInput: false,\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistory: history,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, () => {\n\t\t\t\tthis.scrollToBottom();\n\t\t\t\tif(this.props.handler) {\n\t\t\t\t\tthis.props.handler(command)\n\t\t\t\t} else {\n\t\t\t\t\tthis.return();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tpreviousHistory = () => {\n\t\tthis.rotateHistory(-1);\n\t}\n\tnextHistory = () => {\n\t\tthis.rotateHistory(1);\n\t}\n\tbeginningOfHistory = () => {\n\t\tthis.rotateHistory(-this.state.history.length);\n\t}\n\tendOfHistory = () => {\n\t\tthis.rotateHistory(this.state.history.length);\n\t}\n\ttriggerSearch = () => {\n\t\tif(this.state.searchDirection == SearchDirection.Reverse) {\n\t\t\tthis.reverseSearchHistory();\n\t\t} else {\n\t\t\tthis.forwardSearchHistory();\n\t\t}\n\t}\n\treverseSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Reverse, true),{\n\t\t\t\t\targument: `(reverse-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Reverse,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(reverse-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tforwardSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Forward, true),{\n\t\t\t\t\targument: `(forward-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Forward,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(forward-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tclearScreen = () => {\n\t\tthis.setState({ log: [] });\n\t}\n\tnonIncrementalReverseSearchHistory = () => {\n\t\t// TODO\n\t}\n\tnonIncrementalForwardSearchHistory = () => {\n\t\t// TODO\n\t}\n\thistorySearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySearchForward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchForward = () => {\n\t\t// TODO\n\t}\n\tyankNthArg = () => {\n\t\t// TODO\n\t}\n\tyankLastArg = () => {\n\t\t// TODO\n\t}\n\t// Commands for Changing Text\n\tdeleteChar = () => {\n\t\tif(this.state.point < this.state.promptText.length) {\n\t\t\tthis.setState({\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point+1),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tbackwardDeleteChar = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchText.substring(0,this.state.searchText.length-1),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else if(this.state.point > 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.movePoint(-1),\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point-1)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\t// Killing and Yanking\n\tkillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(0,this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWholeLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText);\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: '',\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point,this.nextWord());\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point,this.nextWord()));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ this.state.promptText.substring(this.nextWord()),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(this.previousWord(),this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.previousWord(),this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\tpromptText: this.state.promptText.substring(0,this.previousWord())\n\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tyank = () => {\n\t\tthis.setState(Object.assign(\n\t\t\tthis.consoleInsert(this.state.kill[this.state.killn]),{\n\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t}), this.scrollToBottom\n\t\t);\n\t}\n\tyankPop = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Yank) {\n\t\t\tlet killn = this.rotateRing(1, this.state.killn, this.state.kill.length);\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(this.state.kill[killn], this.state.kill[this.state.killn].length),{\n\t\t\t\t\tkilln: killn,\n\t\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\t// Numeric Arguments\n\t// Completing\n\tcomplete = () => {\n\t\tif(this.props.complete) {\n\t\t\t// Split text and find current word\n\t\t\tlet words = this.state.promptText.split(\" \");\n\t\t\tlet curr = 0;\n\t\t\tlet idx = words[0].length;\n\t\t\twhile(idx < this.state.point && curr + 1 < words.length) {\n\t\t\t\tidx += words[++curr].length + 1;\n\t\t\t}\n\n\t\t\tlet completions = this.props.complete(words, curr, this.state.promptText);\n\t\t\tif(completions.length == 1) {\n\t\t\t\t// Perform completion\n\t\t\t\twords[curr] = completions[0];\n\t\t\t\tlet point = -1;\n\t\t\t\tfor(let i = 0; i <= curr; i++) {\n\t\t\t\t\tpoint += words[i].length + 1;\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: words.join(\" \"),\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t} else if (completions.length > 1) {\n\t\t\t\t// show completions\n\t\t\t\tlet log = this.state.log;\n\t\t\t\tlog.push({\n\t\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\t\tcommand: this.state.promptText,\n\t\t\t\t\tmessage: [{\n\t\t\t\t\t\ttype: \"completion\",\n\t\t\t\t\t\tvalue: [completions.join(\"\\t\")],\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tthis.setState({\n\t\t\t\t\tcurrLabel: this.nextLabel(),\n\t\t\t\t\tlog: log,\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t}\n\t\t}\n\t}\n\t// Keyboard Macros\n\t// Miscellaneous\n\tprefixMeta = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t});\n\t\t}\n\t\t// TODO Meta prefixed state\n\t}\n\tcancelCommand = () => {\n\t\tif(this.state.acceptInput) { // Typing command\n\t\t\tthis.child.typer.value = \"\";\n\t\t\tlet log = this.state.log;\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: this.state.promptText,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t} else { // command is executing, call handler\n\t\t\tthis.props.cancel();\n\t\t}\n\t}\n\t// Helper functions\n\ttextInsert = (insert: string, text: string, replace: number = 0, point: number = text.length): string => {\n\t\treturn text.substring(0, point - replace) + insert + text.substring(point);\n\t}\n\tconsoleInsert = (insert: string, replace: number = 0): ConsoleState => {\n\t\tlet promptText = this.textInsert(insert, this.state.promptText, replace, this.state.point);\n\t\treturn {\n\t\t\tpoint: this.movePoint(insert.length - replace, insert.length - replace + this.state.promptText.length),\n\t\t\tpromptText: promptText,\n\t\t\trestoreText: promptText,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tmovePoint = (n: number, max: number = this.state.promptText.length) => {\n\t\tlet pos = this.state.point + n;\n\t\tif (pos < 0) {\n\t\t\treturn 0;\n\t\t} if (pos > max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n\tnextWord(): number {\n\t\t// Find first alphanumeric char after first non-alphanumeric char\n\t\tlet search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t\tif(search) {\n\t\t\treturn search.index + this.state.point + 1;\n\t\t} else {\n\t\t\treturn this.state.promptText.length;\n\t\t}\n\t}\n\tpreviousWord(): number {\n\t\t// Find first non-alphanumeric char after first alphanumeric char in reverse\n\t\tlet search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0,this.state.point-1));\n\t\tif(search) {\n\t\t\treturn search.index + 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\trotateRing = (n: number, ringn: number, ring: number, circular: boolean = true): number => {\n\t\tif(ring == 0) return 0;\n\t\tif(circular) {\n\t\t\treturn (ring + (ringn + n) % ring) % ring;\n\t\t} else {\n\t\t\tringn = ringn - n;\n\t\t\tif(ringn < 0) {\n\t\t\t\treturn 0;\n\t\t\t} else if (ringn >= ring) {\n\t\t\t\treturn ring;\n\t\t\t} else {\n\t\t\t\treturn ringn;\n\t\t\t}\n\t\t}\n\t}\n\trotateHistory = (n: number) => {\n\t\tlet historyn = this.rotateRing(n, this.state.historyn, this.state.history.length, false);\n\t\tif(historyn == 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.state.restoreText.length,\n\t\t\t\tpromptText: this.state.restoreText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t} else {\n\t\t\tlet promptText = this.state.history[this.state.history.length-historyn];\n\t\t\tthis.setState({\n\t\t\t\tpoint: promptText.length,\n\t\t\t\tpromptText: promptText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t}\n\t}\n\tsearchHistory = (direction: SearchDirection = this.state.searchDirection, next: boolean = false): ConsoleState => {\n\t\tlet idx = this.state.historyn;\n\t\tlet inc = (direction == SearchDirection.Reverse)?1:-1;\n\t\tif(next) {\n\t\t\tidx = idx + inc;\n\t\t}\n\t\tfor(;idx > 0 && idx <= this.state.history.length; idx = idx + inc) {\n\t\t\tlet entry = this.state.history[this.state.history.length-idx];\n\t\t\tlet point = entry.indexOf(this.state.searchText);\n\t\t\tif(point > -1) {\n\t\t\t\treturn {\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: entry,\n\t\t\t\t\tsearchDirection: direction,\n\t\t\t\t\tsearchInit: false,\n\t\t\t\t\thistoryn: idx,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tsearchDirection: direction,\n\t\t\tsearchInit: false,\n\t\t};\n\t}\n\t// DOM management\n\tscrollSemaphore = 0;\n\tscrollIfBottom = () => {\n\t\tif(this.scrollSemaphore > 0 || this.child.container.scrollTop == this.child.container.scrollHeight - this.child.container.offsetHeight) {\n\t\t\tthis.scrollSemaphore++;\n\t\t\treturn this.scrollIfBottomTrue;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\tscrollIfBottomTrue = () => {\n\t\tthis.scrollToBottom();\n\t\tthis.scrollSemaphore--;\n\t}\n\tscrollToBottom = () => {\n\t\tthis.child.container.scrollTop = this.child.container.scrollHeight;\n\t\tlet rect = this.child.focus.getBoundingClientRect();\n\t\tif(rect.top < 0 || rect.left < 0 ||\n\t\t\trect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t\t\trect.right > (window.innerWidth || document.documentElement.clientWidth)\n\t\t) { this.child.typer.scrollIntoView(false); }\n\t}\n\tnextLabel = () => {\n\t\tif(typeof this.props.promptLabel === \"string\") {\n\t\t\treturn this.props.promptLabel as string;\n\t\t} else {\n\t\t\treturn (this.props.promptLabel as ()=>string)();\n\t\t}\n\t}\n\trender() {\n\t\treturn
this.child.container = ref}\n\t\t\t\tclassName={\"react-console-container \" + (this.state.focus?\"react-console-focus\":\"react-console-nofocus\")}\n\t\t\t\tonClick={this.focus}\n\t\t\t>\n\t\t\t{this.props.welcomeMessage?\n\t\t\t\t
\n\t\t\t\t\t{this.props.welcomeMessage}\n\t\t\t\t
\n\t\t\t\t: null\n\t\t\t}\n\t\t\t{this.state.log.map( (val: LogEntry) => {\n\t\t\t\treturn [\n\t\t\t\t\t,\n\t\t\t\t\t...val.message.map( (val: LogMessage, idx: number) => {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t})}\n\t\t\t{this.state.acceptInput?\n\t\t\t\t\n\t\t\t\t: null\n\t\t\t}\n\t\t\t
\n\t\t\t\t this.child.typer = ref}\n\t\t\t\t\tclassName=\"react-console-typer\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tstyle={{ outline: \"none\",\n\t\t\t\t\t\tcolor: \"transparent\",\n\t\t\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tresize: \"none\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t}}\n\t\t\t\t\tonBlur={this.blur}\n\t\t\t\t\tonKeyDown={this.keyDown}\n\t\t\t\t\tonChange={this.change}\n\t\t\t\t\tonPaste={this.paste}\n\t\t\t\t>\n\t\t\t
\n\t\t\t
this.child.focus = ref}> 
\n\t\t
;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./react-console.tsx","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 1\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./react-console.scss\n// module id = 2\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/react-console.js b/lib/react-console.js index 318b922..cdaa602 100644 --- a/lib/react-console.js +++ b/lib/react-console.js @@ -52,7 +52,7 @@ module.exports = d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var React = __webpack_require__(1); - __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module \"./react-console.scss\""); e.code = 'MODULE_NOT_FOUND'; throw e; }())); + __webpack_require__(2); var ConsolePrompt = (function (_super) { __extends(ConsolePrompt, _super); function ConsolePrompt() { @@ -381,9 +381,7 @@ module.exports = ctrlCodes[e.keyCode](); e.preventDefault(); } - else if (e.keyCode !== 86) { - e.preventDefault(); - } + e.preventDefault(); } else if (e.keyCode in keyCodes) { keyCodes[e.keyCode](); @@ -1021,6 +1019,12 @@ module.exports = module.exports = require("react"); +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + + // removed by extract-text-webpack-plugin + /***/ }) /******/ ]); //# sourceMappingURL=react-console.js.map \ No newline at end of file diff --git a/lib/react-console.js.map b/lib/react-console.js.map index da43e7d..c3e9afe 100644 --- a/lib/react-console.js.map +++ b/lib/react-console.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 307ebc12674a2e39783b","webpack:///./react-console.tsx","webpack:///external \"react\""],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe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Ao4BC;;;;;;;ACtkCD,mC","file":"react-console.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 307ebc12674a2e39783b","\"use strict\";\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport './react-console.scss';\n\ninterface ConsolePromptProps {\n\tpoint?: number;\n\tvalue: string;\n\tlabel: string;\n\targument?: string;\n}\nclass ConsolePrompt extends React.Component {\n\tstatic defaultProps: ConsolePromptProps = {\n\t\tpoint: -1,\n\t\tvalue: \"\",\n\t\tlabel: \"> \",\n\t\targument: null,\n\t}\n\tchild: {\n\t\tcursor?: Element;\n\t} = {};\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tthis.idle();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.idle();\n\t}\n\t// DOM Management\n\tupdateSemaphore: number = 0;\n\tidle() {\n\t\t// Blink cursor when idle\n\t\tif(this.child.cursor) {\n\t\t\tif(this.updateSemaphore == 0) {\n\t\t\t\tthis.child.cursor.className = \"react-console-cursor\";\n\t\t\t}\n\t\t\tthis.updateSemaphore++;\n\t\t\twindow.setTimeout( () => {\n\t\t\t\tthis.updateSemaphore--;\n\t\t\t\tif(this.updateSemaphore == 0 && this.child.cursor) {\n\t\t\t\t\tthis.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\trenderValue() {\n\t\tif(this.props.point < 0) {\n\t\t\treturn [this.props.value];\n\t\t} else if (this.props.point == this.props.value.length) {\n\t\t\treturn [this.props.value, this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\"> ];\n\t\t} else {\n\t\t\treturn [this.props.value.substring(0,this.props.point),\n\t\t\t\t this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\">{this.props.value.substring(this.props.point,this.props.point+1)},\n\t\t\t\tthis.props.value.substring(this.props.point+1)];\n\t\t}\n\t}\n\trender() {\n\t\tlet label = this.props.label;\n\t\tif(this.props.argument) {\n\t\t\tlet idx = label.lastIndexOf(\"\\n\");\n\t\t\tif(idx >= 0) {\n\t\t\t\tlabel = label.substring(0, idx+1);\n\t\t\t} else {\n\t\t\t\tlabel = '';\n\t\t\t}\n\t\t}\n\t\treturn
\n\t\t\t{ label }\n\t\t\t{ this.props.argument }\n\t\t\t{ this.renderValue() }\n\t\t
;\n\t}\n}\n\ninterface ConsoleTableHeaderProps {\n\theaders?: string[];\n}\nlet ConsoleTableHeader: React.SFC = function(props: ConsoleTableHeaderProps){\t\n\tif(props.headers){\n\t\treturn \n\t\t\t\t\t\n\t\t\t\t\t\t{props.headers.map((header: string) => {\n\t\t\t\t\t\t\treturn { header };\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t}\n\treturn null;\n}\n\ninterface ConsoleMessageProps {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nlet ConsoleMessage: React.SFC = function(props: ConsoleMessageProps) {\n\tif(props.isTable){\n\t\tconst data = props.value[0];\n\t\treturn
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{data.rows && data.rows.map((row: any[], index: number) => {\n\t\t\t\t\t\treturn {row.map((cell: any, cellIndex: number) => {\n\t\t\t\t\t\t\tif(typeof cell === 'string'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else if(typeof cell === 'object' && cell.type === 'link'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t;\n\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t
{cell}{cell.text}{JSON.stringify(cell)}
\n\t\t
;\n\t}else{\n\t\treturn
\n\t\t\t{props.value.map((val: any, i: number)=>{\n\t\t\t\tif(typeof val == 'string') {\n\t\t\t\t\treturn
{val}
;\n\t\t\t\t} else if(typeof val === 'object' && val.type === 'link') {\n\t\t\t\t\treturn ;\n\t\t\t\t} else {\n\t\t\t\t\treturn
{JSON.stringify(val)}
;\n\t\t\t\t}\n\t\t\t})}\n\t\t
;\n\t}\n}\nConsoleMessage.defaultProps = {\n\ttype: null,\n\tvalue: [],\n\tisTable: false\n}\n\nexport interface ConsoleTableObject {\n\trows: Array;\n\theaders?: Array;\n}\n\nexport interface LogMessage {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nexport interface LogEntry {\n\tlabel: string;\n\tcommand: string;\n\tmessage: LogMessage[];\n}\n\nexport interface ConsoleProps{\n\thandler: (command: string)=>any;\n\tcancel?: ()=>any;\n\tcomplete?: (words: string[], curr: number, promptText: string)=>string[];\n\tcontinue?: (promptText: string)=>boolean;\n\tautofocus?: boolean;\n\tpromptLabel?: string | (()=>string);\n\twelcomeMessage?: string;\n}\nexport const enum ConsoleCommand {\n\tDefault,\n\tSearch,\n\tKill,\n\tYank,\n};\nexport const enum SearchDirection {\n\tReverse,\n\tForward,\n}\nexport interface ConsoleState{\n\tfocus?: boolean;\n\tacceptInput?: boolean;\n\ttyper?: string;\n\tpoint?: number;\n\tcurrLabel?: string;\n\tpromptText?: string;\n\trestoreText?: string;\n\tsearchText?: string;\n\tsearchDirection?: SearchDirection;\n\tsearchInit?: boolean;\n\tlog?: LogEntry[];\n\thistory?: string[];\n\thistoryn?: number;\n\tkill?: string[];\n\tkilln?: number;\n\targument?: string;\n\tlastCommand?: ConsoleCommand;\n};\nexport default class extends React.Component {\n\tconstructor(props: ConsoleProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfocus: false,\n\t\t\tacceptInput: true,\n\t\t\ttyper: '',\n\t\t\tpoint: 0,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t\tpromptText: '',\n\t\t\trestoreText: '',\n\t\t\tsearchText: '',\n\t\t\tsearchDirection: null,\n\t\t\tsearchInit: false,\n\t\t\tlog: [],\n\t\t\thistory: [],\n\t\t\thistoryn: 0,\n\t\t\tkill: [],\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tstatic defaultProps = {\n\t\tpromptLabel: '> ',\n\t\tcontinue: function() { return false; },\n\t\tcancel: function() {},\n\t};\n\tchild: {\n\t\ttyper?: HTMLTextAreaElement;\n\t\tcontainer?: HTMLElement;\n\t\tfocus?: HTMLElement;\n\t} = {};\n\t// Command API\n\tsetBusy = () => {\n\t\tthis.setState({acceptInput: false});\n\t}\n\tgetSafeLog = () => {\n\t\tif(!this.state.log.length){\n\t\t\tthis.state.log.push({label: '', command: '', message: [] });\n\t\t}\n\t\treturn this.state.log;\n\t}\n\tupdateLastLog = (...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tlet indexToReplace = log[this.state.log.length-1].message.length > 0 ? log[this.state.log.length-1].message.length - 1 : 0;\n\t\tlog[this.state.log.length-1].message[indexToReplace] = {value: messages};\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlog = (...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tlog[this.state.log.length-1].message.push({value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogX = (type: string, ...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({type: type, value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogTable = (tableData: ConsoleTableObject, type?: string) => {\n\t\tlet log = this.getSafeLog();\n\t\tif(type){\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, type: type, value: [tableData]});\n\t\t}else{\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, value: [tableData]});\n\t\t}\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\treturn = () => {\n\t\tthis.setState({\n\t\t\tacceptInput: true,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t}, this.scrollIfBottom() );\n\t}\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tif(this.props.autofocus) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\t// Event Handlers\n\tfocus = () => {\n\t\tif(!window.getSelection().toString()) {\n\t\t\tthis.child.typer.focus();\n\t\t\tthis.setState({ focus: true }, this.scrollToBottom );\n\t\t}\n\t}\n\tblur = () => {\n\t\tthis.setState({ focus: false });\n\t}\n\tkeyDown = (e: KeyboardEvent) => {\n\t\tinterface keyMap {\n\t\t\t[key: number]: ()=>void\n\t\t}\n\t\tlet keyCodes: keyMap = {\n\t\t\t// return\n\t\t\t13: this.acceptLine,\n\t\t\t// left\n\t\t\t37: this.backwardChar,\n\t\t\t// right\n\t\t\t39: this.forwardChar,\n\t\t\t// up\n\t\t\t38: this.previousHistory,\n\t\t\t// down\n\t\t\t40: this.nextHistory,\n\t\t\t// backspace\n\t\t\t8: this.backwardDeleteChar,\n\t\t\t// delete\n\t\t\t46: this.deleteChar,\n\t\t\t// end\n\t\t\t35: this.endOfLine,\n\t\t\t// start\n\t\t\t36: this.beginningOfLine,\n\t\t\t// tab\n\t\t\t9: this.complete,\n\t\t\t// esc\n\t\t\t27: this.prefixMeta,\n\t\t};\n\t\tvar ctrlCodes: keyMap = {\n\t\t\t// C-a\n\t\t\t65: this.beginningOfLine,\n\t\t\t// C-e\n\t\t\t69: this.endOfLine,\n\t\t\t// C-f\n\t\t\t70: this.forwardChar,\n\t\t\t// C-b\n\t\t\t66: this.backwardChar,\n\t\t\t// C-l\n\t\t\t76: this.clearScreen,\n\t\t\t// C-p\n\t\t\t80: this.previousHistory,\n\t\t\t// C-n\n\t\t\t78: this.nextHistory,\n\t\t\t// C-r\n\t\t\t82: this.reverseSearchHistory,\n\t\t\t// C-s\n\t\t\t83: this.forwardSearchHistory,\n\t\t\t// C-d\n\t\t\t68: this.deleteChar, // TODO EOF\n\t\t\t// C-q TODO\n\t\t\t//81: this.quotedInsert,\n\t\t\t// C-v TODO\n\t\t\t//86: this.quotedInsert,\n\t\t\t// C-t TODO\n\t\t\t//84: this.transposeChars,\n\t\t\t// C-k\n\t\t\t75: this.killLine,\n\t\t\t// C-u\n\t\t\t85: this.backwardKillLine,\n\t\t\t// C-y TODO\n\t\t\t89: this.yank,\n\t\t\t// C-c\n\t\t\t67: this.cancelCommand,\n\t\t\t// C-w TODO\n\t\t\t//87: this.killPreviousWhitespace,\n\t\t\t// C-] TODO\n\t\t\t//221: this.characterSearch,\n\t\t\t// C-x TODO\n\t\t\t//88: this.prefixCtrlX,\n\t\t};\n\t\tvar ctrlXCodes: keyMap = { // TODO state\n\t\t\t// C-x Rubout\n\t\t\t8: this.backwardKillLine,\n\t\t\t// C-x ( TODO\n\t\t\t//57: this.startKbdMacro,\n\t\t\t// C-x ) TODO\n\t\t\t//48: this.endKbdMacro,\n\t\t\t// C-x e TODO\n\t\t\t//69: this.callLastKbdMacro,\n\t\t\t// C-x C-u TODO\n\t\t\t//85: this.undo,\n\t\t\t// C-x C-x TODO\n\t\t\t//88: this.exchangePointAndMark,\n\t\t};\n\t\tvar ctrlShiftCodes: keyMap = {\n\t\t\t// C-_ TODO\n\t\t\t//189: this.undo,\n\t\t\t// C-@ TODO\n\t\t\t//50: this.setMark,\n\t\t};\n\t\tvar metaCodes: keyMap = {\n\t\t\t// M-f\n\t\t\t70: this.forwardWord,\n\t\t\t// M-b\n\t\t\t66: this.backwardWord,\n\t\t\t// M-p\n\t\t\t80: this.nonIncrementalReverseSearchHistory,\n\t\t\t// M-n\n\t\t\t78: this.nonIncrementalForwardSearchHistory,\n\t\t\t// M-.\n\t\t\t190: this.yankLastArg,\n\t\t\t// M-TAB TODO\n\t\t\t//9: this.tabInsert,\n\t\t\t// M-t TODO\n\t\t\t//84: this.transposeWords,\n\t\t\t// M-u TODO\n\t\t\t//85: this.upcaseWord,\n\t\t\t// M-l TODO\n\t\t\t//76: this.downcaseWord,\n\t\t\t// M-c TODO\n\t\t\t//67: this.capitalizeWord,\n\t\t\t// M-d\n\t\t\t68: this.killWord,\n\t\t\t// M-backspace\n\t\t\t8: this.backwardKillWord,\n\t\t\t// M-w TODO\n\t\t\t//87: this.unixWordRubout,\n\t\t\t// M-\\ TODO\n\t\t\t//220: this.deleteHorizontalSpace,\n\t\t\t// M-y\n\t\t\t89: this.yankPop,\n\t\t\t// M-0 TODO\n\t\t\t//48: () => this.digitArgument(0),\n\t\t\t// M-1 TODO\n\t\t\t//49: () => this.digitArgument(1),\n\t\t\t// M-2 TODO\n\t\t\t//50: () => this.digitArgument(2),\n\t\t\t// M-3 TODO\n\t\t\t//51: () => this.digitArgument(3),\n\t\t\t// M-4 TODO\n\t\t\t//52: () => this.digitArgument(4),\n\t\t\t// M-5 TODO\n\t\t\t//53: () => this.digitArgument(5),\n\t\t\t// M-6 TODO\n\t\t\t//54: () => this.digitArgument(6),\n\t\t\t// M-7 TODO\n\t\t\t//55: () => this.digitArgument(7),\n\t\t\t// M-8 TODO\n\t\t\t//56: () => this.digitArgument(8),\n\t\t\t// M-9 TODO\n\t\t\t//57: () => this.digitArgument(9),\n\t\t\t// M-- TODO\n\t\t\t//189: () => this.digitArgument('-'),\n\t\t\t// M-f TODO\n\t\t\t//71: () => this.abort,\n\t\t\t// M-r TODO\n\t\t\t//82: this.revertLine,\n\t\t\t// M-SPACE TODO\n\t\t\t//32: this.setMark,\n\t\t};\n\t\tvar metaShiftCodes: keyMap = { // TODO hook in\n\t\t\t// M-<\n\t\t\t188: this.beginningOfHistory,\n\t\t\t// M->\n\t\t\t190: this.endOfHistory,\n\t\t\t// M-_\n\t\t\t189: this.yankLastArg,\n\t\t\t// M-? TODO\n\t\t\t//191: this.possibleCompletions,\n\t\t\t// M-* TODO\n\t\t\t//56: this.insertCompletions,\n\t\t}\n\t\tvar metaCtrlCodes: keyMap = {\n\t\t\t// M-C-y\n\t\t\t89: this.yankNthArg,\n\t\t\t// M-C-] TODO\n\t\t\t//221: this.characterSearchBackward,\n\t\t\t// M-C-j TODO !!!\n\t\t\t//74: this.viEditingMode,\n\t\t};\n\t\tif(this.state.acceptInput) {\n\t\t\tif (e.altKey) {\n\t\t\t\tif (e.ctrlKey) {\n\t\t\t\t\tif (e.keyCode in metaCtrlCodes) {\n\t\t\t\t\t\tmetaCtrlCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.shiftKey) {\n\t\t\t\t\tif (e.keyCode in metaShiftCodes) {\n\t\t\t\t\t\tmetaShiftCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.keyCode in metaCodes) {\n\t\t\t\t\tmetaCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.ctrlKey) {\n\t\t\t\tif (e.keyCode in ctrlCodes) {\n\t\t\t\t\tctrlCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}else if(e.keyCode !== 86){ // allow ctrl+v for paste on windows\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t} else if (e.keyCode in keyCodes) {\n\t\t\t\tkeyCodes[e.keyCode]();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t} else if(e.ctrlKey && e.keyCode === 67) {\n\t\t\t// if input is blocked, ctrl+c should still call cancel\n\t\t\tctrlCodes[e.keyCode]();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\tchange = () => {\n\t\tlet idx = 0;\n\t\tfor(;idx < this.state.typer.length && idx < this.child.typer.value.length; idx++) {\n\t\t\tif(this.state.typer[idx] != this.child.typer.value[idx]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet insert = this.child.typer.value.substring(idx);\n\t\tlet replace = this.state.typer.length - idx;\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText, replace),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert, replace),{\n\t\t\t\t\ttyper: this.child.typer.value,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\tpaste = (e: ClipboardEvent) => {\n\t\tlet insert = e.clipboardData.getData('text');\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert),{\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t\te.preventDefault();\n\t}\n\t// Commands for Moving\n\tbeginningOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tendOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.state.promptText.length,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(-1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.nextWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\t// Commands for Manipulating the History\n\tacceptLine = () => {\n\t\tthis.child.typer.value = \"\";\n\t\tif(this.props.continue(this.state.promptText)) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(\"\\n\"),{\n\t\t\t\t\ttyper: \"\",\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tlet command = this.state.promptText;\n\t\t\tlet history = this.state.history;\n\t\t\tlet log = this.state.log;\n\t\t\tif(!history || history[history.length-1] != command) {\n\t\t\t\thistory.push(command);\n\t\t\t}\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: command,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\tacceptInput: false,\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistory: history,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, () => {\n\t\t\t\tthis.scrollToBottom();\n\t\t\t\tif(this.props.handler) {\n\t\t\t\t\tthis.props.handler(command)\n\t\t\t\t} else {\n\t\t\t\t\tthis.return();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tpreviousHistory = () => {\n\t\tthis.rotateHistory(-1);\n\t}\n\tnextHistory = () => {\n\t\tthis.rotateHistory(1);\n\t}\n\tbeginningOfHistory = () => {\n\t\tthis.rotateHistory(-this.state.history.length);\n\t}\n\tendOfHistory = () => {\n\t\tthis.rotateHistory(this.state.history.length);\n\t}\n\ttriggerSearch = () => {\n\t\tif(this.state.searchDirection == SearchDirection.Reverse) {\n\t\t\tthis.reverseSearchHistory();\n\t\t} else {\n\t\t\tthis.forwardSearchHistory();\n\t\t}\n\t}\n\treverseSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Reverse, true),{\n\t\t\t\t\targument: `(reverse-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Reverse,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(reverse-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tforwardSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Forward, true),{\n\t\t\t\t\targument: `(forward-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Forward,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(forward-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tclearScreen = () => {\n\t\tthis.setState({ log: [] });\n\t}\n\tnonIncrementalReverseSearchHistory = () => {\n\t\t// TODO\n\t}\n\tnonIncrementalForwardSearchHistory = () => {\n\t\t// TODO\n\t}\n\thistorySearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySearchForward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchForward = () => {\n\t\t// TODO\n\t}\n\tyankNthArg = () => {\n\t\t// TODO\n\t}\n\tyankLastArg = () => {\n\t\t// TODO\n\t}\n\t// Commands for Changing Text\n\tdeleteChar = () => {\n\t\tif(this.state.point < this.state.promptText.length) {\n\t\t\tthis.setState({\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point+1),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tbackwardDeleteChar = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchText.substring(0,this.state.searchText.length-1),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else if(this.state.point > 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.movePoint(-1),\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point-1)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\t// Killing and Yanking\n\tkillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(0,this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWholeLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText);\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: '',\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point,this.nextWord());\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point,this.nextWord()));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ this.state.promptText.substring(this.nextWord()),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(this.previousWord(),this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.previousWord(),this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\tpromptText: this.state.promptText.substring(0,this.previousWord())\n\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tyank = () => {\n\t\tthis.setState(Object.assign(\n\t\t\tthis.consoleInsert(this.state.kill[this.state.killn]),{\n\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t}), this.scrollToBottom\n\t\t);\n\t}\n\tyankPop = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Yank) {\n\t\t\tlet killn = this.rotateRing(1, this.state.killn, this.state.kill.length);\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(this.state.kill[killn], this.state.kill[this.state.killn].length),{\n\t\t\t\t\tkilln: killn,\n\t\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\t// Numeric Arguments\n\t// Completing\n\tcomplete = () => {\n\t\tif(this.props.complete) {\n\t\t\t// Split text and find current word\n\t\t\tlet words = this.state.promptText.split(\" \");\n\t\t\tlet curr = 0;\n\t\t\tlet idx = words[0].length;\n\t\t\twhile(idx < this.state.point && curr + 1 < words.length) {\n\t\t\t\tidx += words[++curr].length + 1;\n\t\t\t}\n\n\t\t\tlet completions = this.props.complete(words, curr, this.state.promptText);\n\t\t\tif(completions.length == 1) {\n\t\t\t\t// Perform completion\n\t\t\t\twords[curr] = completions[0];\n\t\t\t\tlet point = -1;\n\t\t\t\tfor(let i = 0; i <= curr; i++) {\n\t\t\t\t\tpoint += words[i].length + 1;\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: words.join(\" \"),\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t} else if (completions.length > 1) {\n\t\t\t\t// show completions\n\t\t\t\tlet log = this.state.log;\n\t\t\t\tlog.push({\n\t\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\t\tcommand: this.state.promptText,\n\t\t\t\t\tmessage: [{\n\t\t\t\t\t\ttype: \"completion\",\n\t\t\t\t\t\tvalue: [completions.join(\"\\t\")],\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tthis.setState({\n\t\t\t\t\tcurrLabel: this.nextLabel(),\n\t\t\t\t\tlog: log,\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t}\n\t\t}\n\t}\n\t// Keyboard Macros\n\t// Miscellaneous\n\tprefixMeta = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t});\n\t\t}\n\t\t// TODO Meta prefixed state\n\t}\n\tcancelCommand = () => {\n\t\tif(this.state.acceptInput) { // Typing command\n\t\t\tthis.child.typer.value = \"\";\n\t\t\tlet log = this.state.log;\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: this.state.promptText,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t} else { // command is executing, call handler\n\t\t\tthis.props.cancel();\n\t\t}\n\t}\n\t// Helper functions\n\ttextInsert = (insert: string, text: string, replace: number = 0, point: number = text.length): string => {\n\t\treturn text.substring(0, point - replace) + insert + text.substring(point);\n\t}\n\tconsoleInsert = (insert: string, replace: number = 0): ConsoleState => {\n\t\tlet promptText = this.textInsert(insert, this.state.promptText, replace, this.state.point);\n\t\treturn {\n\t\t\tpoint: this.movePoint(insert.length - replace, insert.length - replace + this.state.promptText.length),\n\t\t\tpromptText: promptText,\n\t\t\trestoreText: promptText,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tmovePoint = (n: number, max: number = this.state.promptText.length) => {\n\t\tlet pos = this.state.point + n;\n\t\tif (pos < 0) {\n\t\t\treturn 0;\n\t\t} if (pos > max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n\tnextWord(): number {\n\t\t// Find first alphanumeric char after first non-alphanumeric char\n\t\tlet search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t\tif(search) {\n\t\t\treturn search.index + this.state.point + 1;\n\t\t} else {\n\t\t\treturn this.state.promptText.length;\n\t\t}\n\t}\n\tpreviousWord(): number {\n\t\t// Find first non-alphanumeric char after first alphanumeric char in reverse\n\t\tlet search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0,this.state.point-1));\n\t\tif(search) {\n\t\t\treturn search.index + 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\trotateRing = (n: number, ringn: number, ring: number, circular: boolean = true): number => {\n\t\tif(ring == 0) return 0;\n\t\tif(circular) {\n\t\t\treturn (ring + (ringn + n) % ring) % ring;\n\t\t} else {\n\t\t\tringn = ringn - n;\n\t\t\tif(ringn < 0) {\n\t\t\t\treturn 0;\n\t\t\t} else if (ringn >= ring) {\n\t\t\t\treturn ring;\n\t\t\t} else {\n\t\t\t\treturn ringn;\n\t\t\t}\n\t\t}\n\t}\n\trotateHistory = (n: number) => {\n\t\tlet historyn = this.rotateRing(n, this.state.historyn, this.state.history.length, false);\n\t\tif(historyn == 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.state.restoreText.length,\n\t\t\t\tpromptText: this.state.restoreText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t} else {\n\t\t\tlet promptText = this.state.history[this.state.history.length-historyn];\n\t\t\tthis.setState({\n\t\t\t\tpoint: promptText.length,\n\t\t\t\tpromptText: promptText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t}\n\t}\n\tsearchHistory = (direction: SearchDirection = this.state.searchDirection, next: boolean = false): ConsoleState => {\n\t\tlet idx = this.state.historyn;\n\t\tlet inc = (direction == SearchDirection.Reverse)?1:-1;\n\t\tif(next) {\n\t\t\tidx = idx + inc;\n\t\t}\n\t\tfor(;idx > 0 && idx <= this.state.history.length; idx = idx + inc) {\n\t\t\tlet entry = this.state.history[this.state.history.length-idx];\n\t\t\tlet point = entry.indexOf(this.state.searchText);\n\t\t\tif(point > -1) {\n\t\t\t\treturn {\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: entry,\n\t\t\t\t\tsearchDirection: direction,\n\t\t\t\t\tsearchInit: false,\n\t\t\t\t\thistoryn: idx,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tsearchDirection: direction,\n\t\t\tsearchInit: false,\n\t\t};\n\t}\n\t// DOM management\n\tscrollSemaphore = 0;\n\tscrollIfBottom = () => {\n\t\tif(this.scrollSemaphore > 0 || this.child.container.scrollTop == this.child.container.scrollHeight - this.child.container.offsetHeight) {\n\t\t\tthis.scrollSemaphore++;\n\t\t\treturn this.scrollIfBottomTrue;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\tscrollIfBottomTrue = () => {\n\t\tthis.scrollToBottom();\n\t\tthis.scrollSemaphore--;\n\t}\n\tscrollToBottom = () => {\n\t\tthis.child.container.scrollTop = this.child.container.scrollHeight;\n\t\tlet rect = this.child.focus.getBoundingClientRect();\n\t\tif(rect.top < 0 || rect.left < 0 ||\n\t\t\trect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t\t\trect.right > (window.innerWidth || document.documentElement.clientWidth)\n\t\t) { this.child.typer.scrollIntoView(false); }\n\t}\n\tnextLabel = () => {\n\t\tif(typeof this.props.promptLabel === \"string\") {\n\t\t\treturn this.props.promptLabel as string;\n\t\t} else {\n\t\t\treturn (this.props.promptLabel as ()=>string)();\n\t\t}\n\t}\n\trender() {\n\t\treturn
this.child.container = ref}\n\t\t\t\tclassName={\"react-console-container \" + (this.state.focus?\"react-console-focus\":\"react-console-nofocus\")}\n\t\t\t\tonClick={this.focus}\n\t\t\t>\n\t\t\t{this.props.welcomeMessage?\n\t\t\t\t
\n\t\t\t\t\t{this.props.welcomeMessage}\n\t\t\t\t
\n\t\t\t\t: null\n\t\t\t}\n\t\t\t{this.state.log.map( (val: LogEntry) => {\n\t\t\t\treturn [\n\t\t\t\t\t,\n\t\t\t\t\t...val.message.map( (val: LogMessage, idx: number) => {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t})}\n\t\t\t{this.state.acceptInput?\n\t\t\t\t\n\t\t\t\t: null\n\t\t\t}\n\t\t\t
\n\t\t\t\t this.child.typer = ref}\n\t\t\t\t\tclassName=\"react-console-typer\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tstyle={{ outline: \"none\",\n\t\t\t\t\t\tcolor: \"transparent\",\n\t\t\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tresize: \"none\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t}}\n\t\t\t\t\tonBlur={this.blur}\n\t\t\t\t\tonKeyDown={this.keyDown}\n\t\t\t\t\tonChange={this.change}\n\t\t\t\t\tonPaste={this.paste}\n\t\t\t\t>\n\t\t\t
\n\t\t\t
this.child.focus = ref}> 
\n\t\t
;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./react-console.tsx","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 1\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap aa45043607b465c48011","webpack:///./react-console.tsx","webpack:///external \"react\"","webpack:///./react-console.scss"],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,aAAY,CAAC;;;;;;AAEb,KAAY,KAAK,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QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAG,GACvD,qBAAC,QAAQ,IACR,GAAG,EAAE,aAAG,IAAI,YAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,EAAtB,CAAuB,EACnC,SAAS,EAAC,qBAAqB,EAC/B,YAAY,EAAC,KAAK,EAClB,WAAW,EAAC,KAAK,EACjB,cAAc,EAAC,KAAK,EACpB,UAAU,EAAC,OAAO,EAClB,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM;aACvB,KAAK,EAAE,aAAa;aACpB,eAAe,EAAE,aAAa;aAC9B,MAAM,EAAE,MAAM;aACd,MAAM,EAAE,MAAM;aACd,QAAQ,EAAE,QAAQ;UACjB,EACF,MAAM,EAAE,IAAI,CAAC,IAAK,EAClB,SAAS,EAAE,IAAI,CAAC,OAAQ,EACxB,QAAQ,EAAE,IAAI,CAAC,MAAO,EACtB,OAAO,EAAE,IAAI,CAAC,KAAM,EACT,CACP,EACN,qBAAC,GAAG,IAAC,GAAG,EAAE,aAAG,IAAI,YAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,EAAtB,CAAuB,OAAa,CAChD,CAAC;KACR,CAAC;KA32BM,sBAAY,GAAG;SACrB,WAAW,EAAE,IAAI;SACjB,QAAQ,EAAE,cAAa,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;SACtC,MAAM,EAAE,cAAY,CAAC;MACrB,CAAC;KAw2BH,gBAAC;AAAD,EAAC,CAn4B4B,KAAK,CAAC,SAAS,GAm4B3C;AAn4BD;4BAm4BC;;;;;;;ACrkCD,mC;;;;;;ACAA,0C","file":"react-console.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap aa45043607b465c48011","\"use strict\";\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport './react-console.scss';\n\ninterface ConsolePromptProps {\n\tpoint?: number;\n\tvalue: string;\n\tlabel: string;\n\targument?: string;\n}\nclass ConsolePrompt extends React.Component {\n\tstatic defaultProps: ConsolePromptProps = {\n\t\tpoint: -1,\n\t\tvalue: \"\",\n\t\tlabel: \"> \",\n\t\targument: null,\n\t}\n\tchild: {\n\t\tcursor?: Element;\n\t} = {};\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tthis.idle();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.idle();\n\t}\n\t// DOM Management\n\tupdateSemaphore: number = 0;\n\tidle() {\n\t\t// Blink cursor when idle\n\t\tif(this.child.cursor) {\n\t\t\tif(this.updateSemaphore == 0) {\n\t\t\t\tthis.child.cursor.className = \"react-console-cursor\";\n\t\t\t}\n\t\t\tthis.updateSemaphore++;\n\t\t\twindow.setTimeout( () => {\n\t\t\t\tthis.updateSemaphore--;\n\t\t\t\tif(this.updateSemaphore == 0 && this.child.cursor) {\n\t\t\t\t\tthis.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\trenderValue() {\n\t\tif(this.props.point < 0) {\n\t\t\treturn [this.props.value];\n\t\t} else if (this.props.point == this.props.value.length) {\n\t\t\treturn [this.props.value, this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\"> ];\n\t\t} else {\n\t\t\treturn [this.props.value.substring(0,this.props.point),\n\t\t\t\t this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\">{this.props.value.substring(this.props.point,this.props.point+1)},\n\t\t\t\tthis.props.value.substring(this.props.point+1)];\n\t\t}\n\t}\n\trender() {\n\t\tlet label = this.props.label;\n\t\tif(this.props.argument) {\n\t\t\tlet idx = label.lastIndexOf(\"\\n\");\n\t\t\tif(idx >= 0) {\n\t\t\t\tlabel = label.substring(0, idx+1);\n\t\t\t} else {\n\t\t\t\tlabel = '';\n\t\t\t}\n\t\t}\n\t\treturn
\n\t\t\t{ label }\n\t\t\t{ this.props.argument }\n\t\t\t{ this.renderValue() }\n\t\t
;\n\t}\n}\n\ninterface ConsoleTableHeaderProps {\n\theaders?: string[];\n}\nlet ConsoleTableHeader: React.SFC = function(props: ConsoleTableHeaderProps){\t\n\tif(props.headers){\n\t\treturn \n\t\t\t\t\t\n\t\t\t\t\t\t{props.headers.map((header: string) => {\n\t\t\t\t\t\t\treturn { header };\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t}\n\treturn null;\n}\n\ninterface ConsoleMessageProps {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nlet ConsoleMessage: React.SFC = function(props: ConsoleMessageProps) {\n\tif(props.isTable){\n\t\tconst data = props.value[0];\n\t\treturn
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{data.rows && data.rows.map((row: any[], index: number) => {\n\t\t\t\t\t\treturn {row.map((cell: any, cellIndex: number) => {\n\t\t\t\t\t\t\tif(typeof cell === 'string'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else if(typeof cell === 'object' && cell.type === 'link'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t;\n\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t
{cell}{cell.text}{JSON.stringify(cell)}
\n\t\t
;\n\t}else{\n\t\treturn
\n\t\t\t{props.value.map((val: any, i: number)=>{\n\t\t\t\tif(typeof val == 'string') {\n\t\t\t\t\treturn
{val}
;\n\t\t\t\t} else if(typeof val === 'object' && val.type === 'link') {\n\t\t\t\t\treturn ;\n\t\t\t\t} else {\n\t\t\t\t\treturn
{JSON.stringify(val)}
;\n\t\t\t\t}\n\t\t\t})}\n\t\t
;\n\t}\n}\nConsoleMessage.defaultProps = {\n\ttype: null,\n\tvalue: [],\n\tisTable: false\n}\n\nexport interface ConsoleTableObject {\n\trows: Array;\n\theaders?: Array;\n}\n\nexport interface LogMessage {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nexport interface LogEntry {\n\tlabel: string;\n\tcommand: string;\n\tmessage: LogMessage[];\n}\n\nexport interface ConsoleProps{\n\thandler: (command: string)=>any;\n\tcancel?: ()=>any;\n\tcomplete?: (words: string[], curr: number, promptText: string)=>string[];\n\tcontinue?: (promptText: string)=>boolean;\n\tautofocus?: boolean;\n\tpromptLabel?: string | (()=>string);\n\twelcomeMessage?: string;\n}\nexport const enum ConsoleCommand {\n\tDefault,\n\tSearch,\n\tKill,\n\tYank,\n};\nexport const enum SearchDirection {\n\tReverse,\n\tForward,\n}\nexport interface ConsoleState{\n\tfocus?: boolean;\n\tacceptInput?: boolean;\n\ttyper?: string;\n\tpoint?: number;\n\tcurrLabel?: string;\n\tpromptText?: string;\n\trestoreText?: string;\n\tsearchText?: string;\n\tsearchDirection?: SearchDirection;\n\tsearchInit?: boolean;\n\tlog?: LogEntry[];\n\thistory?: string[];\n\thistoryn?: number;\n\tkill?: string[];\n\tkilln?: number;\n\targument?: string;\n\tlastCommand?: ConsoleCommand;\n};\nexport default class extends React.Component {\n\tconstructor(props: ConsoleProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfocus: false,\n\t\t\tacceptInput: true,\n\t\t\ttyper: '',\n\t\t\tpoint: 0,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t\tpromptText: '',\n\t\t\trestoreText: '',\n\t\t\tsearchText: '',\n\t\t\tsearchDirection: null,\n\t\t\tsearchInit: false,\n\t\t\tlog: [],\n\t\t\thistory: [],\n\t\t\thistoryn: 0,\n\t\t\tkill: [],\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tstatic defaultProps = {\n\t\tpromptLabel: '> ',\n\t\tcontinue: function() { return false; },\n\t\tcancel: function() {},\n\t};\n\tchild: {\n\t\ttyper?: HTMLTextAreaElement;\n\t\tcontainer?: HTMLElement;\n\t\tfocus?: HTMLElement;\n\t} = {};\n\t// Command API\n\tsetBusy = () => {\n\t\tthis.setState({acceptInput: false});\n\t}\n\tgetSafeLog = () => {\n\t\tif(!this.state.log.length){\n\t\t\tthis.state.log.push({label: '', command: '', message: [] });\n\t\t}\n\t\treturn this.state.log;\n\t}\n\tupdateLastLog = (...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tlet indexToReplace = log[this.state.log.length-1].message.length > 0 ? log[this.state.log.length-1].message.length - 1 : 0;\n\t\tlog[this.state.log.length-1].message[indexToReplace] = {value: messages};\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlog = (...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tlog[this.state.log.length-1].message.push({value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogX = (type: string, ...messages: any[]) => {\n\t\tlet log = this.getSafeLog();\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({type: type, value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogTable = (tableData: ConsoleTableObject, type?: string) => {\n\t\tlet log = this.getSafeLog();\n\t\tif(type){\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, type: type, value: [tableData]});\n\t\t}else{\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, value: [tableData]});\n\t\t}\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\treturn = () => {\n\t\tthis.setState({\n\t\t\tacceptInput: true,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t}, this.scrollIfBottom() );\n\t}\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tif(this.props.autofocus) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\t// Event Handlers\n\tfocus = () => {\n\t\tif(!window.getSelection().toString()) {\n\t\t\tthis.child.typer.focus();\n\t\t\tthis.setState({ focus: true }, this.scrollToBottom );\n\t\t}\n\t}\n\tblur = () => {\n\t\tthis.setState({ focus: false });\n\t}\n\tkeyDown = (e: KeyboardEvent) => {\n\t\tinterface keyMap {\n\t\t\t[key: number]: ()=>void\n\t\t}\n\t\tlet keyCodes: keyMap = {\n\t\t\t// return\n\t\t\t13: this.acceptLine,\n\t\t\t// left\n\t\t\t37: this.backwardChar,\n\t\t\t// right\n\t\t\t39: this.forwardChar,\n\t\t\t// up\n\t\t\t38: this.previousHistory,\n\t\t\t// down\n\t\t\t40: this.nextHistory,\n\t\t\t// backspace\n\t\t\t8: this.backwardDeleteChar,\n\t\t\t// delete\n\t\t\t46: this.deleteChar,\n\t\t\t// end\n\t\t\t35: this.endOfLine,\n\t\t\t// start\n\t\t\t36: this.beginningOfLine,\n\t\t\t// tab\n\t\t\t9: this.complete,\n\t\t\t// esc\n\t\t\t27: this.prefixMeta,\n\t\t};\n\t\tvar ctrlCodes: keyMap = {\n\t\t\t// C-a\n\t\t\t65: this.beginningOfLine,\n\t\t\t// C-e\n\t\t\t69: this.endOfLine,\n\t\t\t// C-f\n\t\t\t70: this.forwardChar,\n\t\t\t// C-b\n\t\t\t66: this.backwardChar,\n\t\t\t// C-l\n\t\t\t76: this.clearScreen,\n\t\t\t// C-p\n\t\t\t80: this.previousHistory,\n\t\t\t// C-n\n\t\t\t78: this.nextHistory,\n\t\t\t// C-r\n\t\t\t82: this.reverseSearchHistory,\n\t\t\t// C-s\n\t\t\t83: this.forwardSearchHistory,\n\t\t\t// C-d\n\t\t\t68: this.deleteChar, // TODO EOF\n\t\t\t// C-q TODO\n\t\t\t//81: this.quotedInsert,\n\t\t\t// C-v TODO\n\t\t\t//86: this.quotedInsert,\n\t\t\t// C-t TODO\n\t\t\t//84: this.transposeChars,\n\t\t\t// C-k\n\t\t\t75: this.killLine,\n\t\t\t// C-u\n\t\t\t85: this.backwardKillLine,\n\t\t\t// C-y TODO\n\t\t\t89: this.yank,\n\t\t\t// C-c\n\t\t\t67: this.cancelCommand,\n\t\t\t// C-w TODO\n\t\t\t//87: this.killPreviousWhitespace,\n\t\t\t// C-] TODO\n\t\t\t//221: this.characterSearch,\n\t\t\t// C-x TODO\n\t\t\t//88: this.prefixCtrlX,\n\t\t};\n\t\tvar ctrlXCodes: keyMap = { // TODO state\n\t\t\t// C-x Rubout\n\t\t\t8: this.backwardKillLine,\n\t\t\t// C-x ( TODO\n\t\t\t//57: this.startKbdMacro,\n\t\t\t// C-x ) TODO\n\t\t\t//48: this.endKbdMacro,\n\t\t\t// C-x e TODO\n\t\t\t//69: this.callLastKbdMacro,\n\t\t\t// C-x C-u TODO\n\t\t\t//85: this.undo,\n\t\t\t// C-x C-x TODO\n\t\t\t//88: this.exchangePointAndMark,\n\t\t};\n\t\tvar ctrlShiftCodes: keyMap = {\n\t\t\t// C-_ TODO\n\t\t\t//189: this.undo,\n\t\t\t// C-@ TODO\n\t\t\t//50: this.setMark,\n\t\t};\n\t\tvar metaCodes: keyMap = {\n\t\t\t// M-f\n\t\t\t70: this.forwardWord,\n\t\t\t// M-b\n\t\t\t66: this.backwardWord,\n\t\t\t// M-p\n\t\t\t80: this.nonIncrementalReverseSearchHistory,\n\t\t\t// M-n\n\t\t\t78: this.nonIncrementalForwardSearchHistory,\n\t\t\t// M-.\n\t\t\t190: this.yankLastArg,\n\t\t\t// M-TAB TODO\n\t\t\t//9: this.tabInsert,\n\t\t\t// M-t TODO\n\t\t\t//84: this.transposeWords,\n\t\t\t// M-u TODO\n\t\t\t//85: this.upcaseWord,\n\t\t\t// M-l TODO\n\t\t\t//76: this.downcaseWord,\n\t\t\t// M-c TODO\n\t\t\t//67: this.capitalizeWord,\n\t\t\t// M-d\n\t\t\t68: this.killWord,\n\t\t\t// M-backspace\n\t\t\t8: this.backwardKillWord,\n\t\t\t// M-w TODO\n\t\t\t//87: this.unixWordRubout,\n\t\t\t// M-\\ TODO\n\t\t\t//220: this.deleteHorizontalSpace,\n\t\t\t// M-y\n\t\t\t89: this.yankPop,\n\t\t\t// M-0 TODO\n\t\t\t//48: () => this.digitArgument(0),\n\t\t\t// M-1 TODO\n\t\t\t//49: () => this.digitArgument(1),\n\t\t\t// M-2 TODO\n\t\t\t//50: () => this.digitArgument(2),\n\t\t\t// M-3 TODO\n\t\t\t//51: () => this.digitArgument(3),\n\t\t\t// M-4 TODO\n\t\t\t//52: () => this.digitArgument(4),\n\t\t\t// M-5 TODO\n\t\t\t//53: () => this.digitArgument(5),\n\t\t\t// M-6 TODO\n\t\t\t//54: () => this.digitArgument(6),\n\t\t\t// M-7 TODO\n\t\t\t//55: () => this.digitArgument(7),\n\t\t\t// M-8 TODO\n\t\t\t//56: () => this.digitArgument(8),\n\t\t\t// M-9 TODO\n\t\t\t//57: () => this.digitArgument(9),\n\t\t\t// M-- TODO\n\t\t\t//189: () => this.digitArgument('-'),\n\t\t\t// M-f TODO\n\t\t\t//71: () => this.abort,\n\t\t\t// M-r TODO\n\t\t\t//82: this.revertLine,\n\t\t\t// M-SPACE TODO\n\t\t\t//32: this.setMark,\n\t\t};\n\t\tvar metaShiftCodes: keyMap = { // TODO hook in\n\t\t\t// M-<\n\t\t\t188: this.beginningOfHistory,\n\t\t\t// M->\n\t\t\t190: this.endOfHistory,\n\t\t\t// M-_\n\t\t\t189: this.yankLastArg,\n\t\t\t// M-? TODO\n\t\t\t//191: this.possibleCompletions,\n\t\t\t// M-* TODO\n\t\t\t//56: this.insertCompletions,\n\t\t}\n\t\tvar metaCtrlCodes: keyMap = {\n\t\t\t// M-C-y\n\t\t\t89: this.yankNthArg,\n\t\t\t// M-C-] TODO\n\t\t\t//221: this.characterSearchBackward,\n\t\t\t// M-C-j TODO !!!\n\t\t\t//74: this.viEditingMode,\n\t\t};\n\t\tif(this.state.acceptInput) {\n\t\t\tif (e.altKey) {\n\t\t\t\tif (e.ctrlKey) {\n\t\t\t\t\tif (e.keyCode in metaCtrlCodes) {\n\t\t\t\t\t\tmetaCtrlCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.shiftKey) {\n\t\t\t\t\tif (e.keyCode in metaShiftCodes) {\n\t\t\t\t\t\tmetaShiftCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.keyCode in metaCodes) {\n\t\t\t\t\tmetaCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.ctrlKey) {\n\t\t\t\tif (e.keyCode in ctrlCodes) {\n\t\t\t\t\tctrlCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.keyCode in keyCodes) {\n\t\t\t\tkeyCodes[e.keyCode]();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t} else if(e.ctrlKey && e.keyCode === 67) {\n\t\t\t// if input is blocked, ctrl+c should still call cancel\n\t\t\tctrlCodes[e.keyCode]();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\tchange = () => {\n\t\tlet idx = 0;\n\t\tfor(;idx < this.state.typer.length && idx < this.child.typer.value.length; idx++) {\n\t\t\tif(this.state.typer[idx] != this.child.typer.value[idx]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet insert = this.child.typer.value.substring(idx);\n\t\tlet replace = this.state.typer.length - idx;\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText, replace),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert, replace),{\n\t\t\t\t\ttyper: this.child.typer.value,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\tpaste = (e: ClipboardEvent) => {\n\t\tlet insert = e.clipboardData.getData('text');\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert),{\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t\te.preventDefault();\n\t}\n\t// Commands for Moving\n\tbeginningOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tendOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.state.promptText.length,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(-1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.nextWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\t// Commands for Manipulating the History\n\tacceptLine = () => {\n\t\tthis.child.typer.value = \"\";\n\t\tif(this.props.continue(this.state.promptText)) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(\"\\n\"),{\n\t\t\t\t\ttyper: \"\",\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tlet command = this.state.promptText;\n\t\t\tlet history = this.state.history;\n\t\t\tlet log = this.state.log;\n\t\t\tif(!history || history[history.length-1] != command) {\n\t\t\t\thistory.push(command);\n\t\t\t}\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: command,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\tacceptInput: false,\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistory: history,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, () => {\n\t\t\t\tthis.scrollToBottom();\n\t\t\t\tif(this.props.handler) {\n\t\t\t\t\tthis.props.handler(command)\n\t\t\t\t} else {\n\t\t\t\t\tthis.return();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tpreviousHistory = () => {\n\t\tthis.rotateHistory(-1);\n\t}\n\tnextHistory = () => {\n\t\tthis.rotateHistory(1);\n\t}\n\tbeginningOfHistory = () => {\n\t\tthis.rotateHistory(-this.state.history.length);\n\t}\n\tendOfHistory = () => {\n\t\tthis.rotateHistory(this.state.history.length);\n\t}\n\ttriggerSearch = () => {\n\t\tif(this.state.searchDirection == SearchDirection.Reverse) {\n\t\t\tthis.reverseSearchHistory();\n\t\t} else {\n\t\t\tthis.forwardSearchHistory();\n\t\t}\n\t}\n\treverseSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Reverse, true),{\n\t\t\t\t\targument: `(reverse-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Reverse,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(reverse-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tforwardSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Forward, true),{\n\t\t\t\t\targument: `(forward-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Forward,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(forward-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tclearScreen = () => {\n\t\tthis.setState({ log: [] });\n\t}\n\tnonIncrementalReverseSearchHistory = () => {\n\t\t// TODO\n\t}\n\tnonIncrementalForwardSearchHistory = () => {\n\t\t// TODO\n\t}\n\thistorySearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySearchForward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchForward = () => {\n\t\t// TODO\n\t}\n\tyankNthArg = () => {\n\t\t// TODO\n\t}\n\tyankLastArg = () => {\n\t\t// TODO\n\t}\n\t// Commands for Changing Text\n\tdeleteChar = () => {\n\t\tif(this.state.point < this.state.promptText.length) {\n\t\t\tthis.setState({\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point+1),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tbackwardDeleteChar = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchText.substring(0,this.state.searchText.length-1),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else if(this.state.point > 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.movePoint(-1),\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point-1)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\t// Killing and Yanking\n\tkillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(0,this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWholeLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText);\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: '',\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point,this.nextWord());\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point,this.nextWord()));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ this.state.promptText.substring(this.nextWord()),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(this.previousWord(),this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.previousWord(),this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\tpromptText: this.state.promptText.substring(0,this.previousWord())\n\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tyank = () => {\n\t\tthis.setState(Object.assign(\n\t\t\tthis.consoleInsert(this.state.kill[this.state.killn]),{\n\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t}), this.scrollToBottom\n\t\t);\n\t}\n\tyankPop = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Yank) {\n\t\t\tlet killn = this.rotateRing(1, this.state.killn, this.state.kill.length);\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(this.state.kill[killn], this.state.kill[this.state.killn].length),{\n\t\t\t\t\tkilln: killn,\n\t\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\t// Numeric Arguments\n\t// Completing\n\tcomplete = () => {\n\t\tif(this.props.complete) {\n\t\t\t// Split text and find current word\n\t\t\tlet words = this.state.promptText.split(\" \");\n\t\t\tlet curr = 0;\n\t\t\tlet idx = words[0].length;\n\t\t\twhile(idx < this.state.point && curr + 1 < words.length) {\n\t\t\t\tidx += words[++curr].length + 1;\n\t\t\t}\n\n\t\t\tlet completions = this.props.complete(words, curr, this.state.promptText);\n\t\t\tif(completions.length == 1) {\n\t\t\t\t// Perform completion\n\t\t\t\twords[curr] = completions[0];\n\t\t\t\tlet point = -1;\n\t\t\t\tfor(let i = 0; i <= curr; i++) {\n\t\t\t\t\tpoint += words[i].length + 1;\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: words.join(\" \"),\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t} else if (completions.length > 1) {\n\t\t\t\t// show completions\n\t\t\t\tlet log = this.state.log;\n\t\t\t\tlog.push({\n\t\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\t\tcommand: this.state.promptText,\n\t\t\t\t\tmessage: [{\n\t\t\t\t\t\ttype: \"completion\",\n\t\t\t\t\t\tvalue: [completions.join(\"\\t\")],\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tthis.setState({\n\t\t\t\t\tcurrLabel: this.nextLabel(),\n\t\t\t\t\tlog: log,\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t}\n\t\t}\n\t}\n\t// Keyboard Macros\n\t// Miscellaneous\n\tprefixMeta = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t});\n\t\t}\n\t\t// TODO Meta prefixed state\n\t}\n\tcancelCommand = () => {\n\t\tif(this.state.acceptInput) { // Typing command\n\t\t\tthis.child.typer.value = \"\";\n\t\t\tlet log = this.state.log;\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: this.state.promptText,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t} else { // command is executing, call handler\n\t\t\tthis.props.cancel();\n\t\t}\n\t}\n\t// Helper functions\n\ttextInsert = (insert: string, text: string, replace: number = 0, point: number = text.length): string => {\n\t\treturn text.substring(0, point - replace) + insert + text.substring(point);\n\t}\n\tconsoleInsert = (insert: string, replace: number = 0): ConsoleState => {\n\t\tlet promptText = this.textInsert(insert, this.state.promptText, replace, this.state.point);\n\t\treturn {\n\t\t\tpoint: this.movePoint(insert.length - replace, insert.length - replace + this.state.promptText.length),\n\t\t\tpromptText: promptText,\n\t\t\trestoreText: promptText,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tmovePoint = (n: number, max: number = this.state.promptText.length) => {\n\t\tlet pos = this.state.point + n;\n\t\tif (pos < 0) {\n\t\t\treturn 0;\n\t\t} if (pos > max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n\tnextWord(): number {\n\t\t// Find first alphanumeric char after first non-alphanumeric char\n\t\tlet search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t\tif(search) {\n\t\t\treturn search.index + this.state.point + 1;\n\t\t} else {\n\t\t\treturn this.state.promptText.length;\n\t\t}\n\t}\n\tpreviousWord(): number {\n\t\t// Find first non-alphanumeric char after first alphanumeric char in reverse\n\t\tlet search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0,this.state.point-1));\n\t\tif(search) {\n\t\t\treturn search.index + 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\trotateRing = (n: number, ringn: number, ring: number, circular: boolean = true): number => {\n\t\tif(ring == 0) return 0;\n\t\tif(circular) {\n\t\t\treturn (ring + (ringn + n) % ring) % ring;\n\t\t} else {\n\t\t\tringn = ringn - n;\n\t\t\tif(ringn < 0) {\n\t\t\t\treturn 0;\n\t\t\t} else if (ringn >= ring) {\n\t\t\t\treturn ring;\n\t\t\t} else {\n\t\t\t\treturn ringn;\n\t\t\t}\n\t\t}\n\t}\n\trotateHistory = (n: number) => {\n\t\tlet historyn = this.rotateRing(n, this.state.historyn, this.state.history.length, false);\n\t\tif(historyn == 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.state.restoreText.length,\n\t\t\t\tpromptText: this.state.restoreText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t} else {\n\t\t\tlet promptText = this.state.history[this.state.history.length-historyn];\n\t\t\tthis.setState({\n\t\t\t\tpoint: promptText.length,\n\t\t\t\tpromptText: promptText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t}\n\t}\n\tsearchHistory = (direction: SearchDirection = this.state.searchDirection, next: boolean = false): ConsoleState => {\n\t\tlet idx = this.state.historyn;\n\t\tlet inc = (direction == SearchDirection.Reverse)?1:-1;\n\t\tif(next) {\n\t\t\tidx = idx + inc;\n\t\t}\n\t\tfor(;idx > 0 && idx <= this.state.history.length; idx = idx + inc) {\n\t\t\tlet entry = this.state.history[this.state.history.length-idx];\n\t\t\tlet point = entry.indexOf(this.state.searchText);\n\t\t\tif(point > -1) {\n\t\t\t\treturn {\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: entry,\n\t\t\t\t\tsearchDirection: direction,\n\t\t\t\t\tsearchInit: false,\n\t\t\t\t\thistoryn: idx,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tsearchDirection: direction,\n\t\t\tsearchInit: false,\n\t\t};\n\t}\n\t// DOM management\n\tscrollSemaphore = 0;\n\tscrollIfBottom = () => {\n\t\tif(this.scrollSemaphore > 0 || this.child.container.scrollTop == this.child.container.scrollHeight - this.child.container.offsetHeight) {\n\t\t\tthis.scrollSemaphore++;\n\t\t\treturn this.scrollIfBottomTrue;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\tscrollIfBottomTrue = () => {\n\t\tthis.scrollToBottom();\n\t\tthis.scrollSemaphore--;\n\t}\n\tscrollToBottom = () => {\n\t\tthis.child.container.scrollTop = this.child.container.scrollHeight;\n\t\tlet rect = this.child.focus.getBoundingClientRect();\n\t\tif(rect.top < 0 || rect.left < 0 ||\n\t\t\trect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t\t\trect.right > (window.innerWidth || document.documentElement.clientWidth)\n\t\t) { this.child.typer.scrollIntoView(false); }\n\t}\n\tnextLabel = () => {\n\t\tif(typeof this.props.promptLabel === \"string\") {\n\t\t\treturn this.props.promptLabel as string;\n\t\t} else {\n\t\t\treturn (this.props.promptLabel as ()=>string)();\n\t\t}\n\t}\n\trender() {\n\t\treturn
this.child.container = ref}\n\t\t\t\tclassName={\"react-console-container \" + (this.state.focus?\"react-console-focus\":\"react-console-nofocus\")}\n\t\t\t\tonClick={this.focus}\n\t\t\t>\n\t\t\t{this.props.welcomeMessage?\n\t\t\t\t
\n\t\t\t\t\t{this.props.welcomeMessage}\n\t\t\t\t
\n\t\t\t\t: null\n\t\t\t}\n\t\t\t{this.state.log.map( (val: LogEntry) => {\n\t\t\t\treturn [\n\t\t\t\t\t,\n\t\t\t\t\t...val.message.map( (val: LogMessage, idx: number) => {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t})}\n\t\t\t{this.state.acceptInput?\n\t\t\t\t\n\t\t\t\t: null\n\t\t\t}\n\t\t\t
\n\t\t\t\t this.child.typer = ref}\n\t\t\t\t\tclassName=\"react-console-typer\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tstyle={{ outline: \"none\",\n\t\t\t\t\t\tcolor: \"transparent\",\n\t\t\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tresize: \"none\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t}}\n\t\t\t\t\tonBlur={this.blur}\n\t\t\t\t\tonKeyDown={this.keyDown}\n\t\t\t\t\tonChange={this.change}\n\t\t\t\t\tonPaste={this.paste}\n\t\t\t\t>\n\t\t\t
\n\t\t\t
this.child.focus = ref}> 
\n\t\t
;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./react-console.tsx","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 1\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./react-console.scss\n// module id = 2\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/src/react-console.tsx b/src/react-console.tsx index 148e812..881e85b 100644 --- a/src/react-console.tsx +++ b/src/react-console.tsx @@ -484,9 +484,8 @@ export default class extends React.Component { if (e.keyCode in ctrlCodes) { ctrlCodes[e.keyCode](); e.preventDefault(); - }else if(e.keyCode !== 86){ // allow ctrl+v for paste on windows - e.preventDefault(); } + e.preventDefault(); } else if (e.keyCode in keyCodes) { keyCodes[e.keyCode](); e.preventDefault();