/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/ubervu-react-component-playground@0.3.11/build/bundle.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("lodash")):"function"==typeof define&&define.amd?define(["react","lodash"],t):"object"==typeof exports?exports.ComponentPlayground=t(require("react"),require("lodash")):e.ComponentPlayground=t(e.react,e.lodash)}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";var n=r(87),o=r(3),i=r(2),a=r(34),s=r(49),l=r(19).uri.stringifyParams,u=r(19).uri.parseLocation,c=r(29).isSerializable,f=r(30),d=r(59).Provider,p=r(88),h=r(14).changeFixture,m=r(15).resetStore,g=r(33)(),v=r(48),y=r(44);r(37),r(16),r(36),r(83),r(35),r(84),r(85),r(86),e.exports=i.createClass({displayName:"ComponentPlayground",propTypes:{components:i.PropTypes.object.isRequired,component:i.PropTypes.string,fixture:i.PropTypes.string,editor:i.PropTypes.bool,fullScreen:i.PropTypes.bool,reduxStore:i.PropTypes.object,containerClassName:i.PropTypes.string},mixins:[s.Mixin],statics:{isFixtureSelected:function(e){return!(!e.component||!e.fixture)},didFixtureChange:function(e,t){return e.component!==t.component||e.fixture!==t.fixture},getSelectedComponentClass:function(e){return e.components[e.component]["class"]},getSelectedFixtureContents:function(e){return e.components[e.component].fixtures[e.fixture]},getStringifiedFixtureContents:function(e){return JSON.stringify(e,null,2)},getFixtureState:function(e){var t={fixtureContents:{},fixtureUnserializableProps:{},fixtureUserInput:"{}",isFixtureUserInputValid:!0};if(this.isFixtureSelected(e)){var r=this.getSelectedFixtureContents(e),n={},i={};o.forEach(r,function(e,t){c(e)?n[t]=e:i[t]=e}),o.assign(t,{fixtureContents:n,fixtureUnserializableProps:i,fixtureUserInput:this.getStringifiedFixtureContents(n)})}return t}},getDefaultProps:function(){return{editor:!1,fullScreen:!1,reduxStore:{}}},getInitialState:function(){var e={fixtureChange:0,isEditorFocused:!1,orientation:"landscape",searchText:""};return o.assign(e,this.constructor.getFixtureState(this.props))},children:{preview:function(){var e={component:this.constructor.getSelectedComponentClass(this.props),ref:this._saveRef("preview"),key:this._getPreviewComponentKey()};return o.assign(e,this.state.fixtureUnserializableProps),o.merge(e,o.omit(this.state.fixtureContents,["reduxStore","state"]))},splitPane:function(){return{component:p,key:"editorPreviewSplitPane",split:this._getOrientationDirection(),defaultSize:f.get("splitPos"),onChange:this.onSplitPaneChange,minSize:20,className:this._getSplitPaneClasses("split-pane"),resizerClassName:this._getSplitPaneClasses("resizer"),children:[this._renderFixtureEditor(),this.loadChild("provider")]}},provider:function(){return{component:d,key:"provider",store:g,children:this._renderPreview()}},editor:function(){return{component:v,key:"editor",value:this.state.fixtureUserInput,onChange:this.onFixtureChange,onFocusChange:this.onEditorFocusChange,options:{mode:{name:"javascript",json:!0},foldGutter:!0,lineNumbers:!0,theme:"solarized light",gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}}}},render:function(){var e=this._isFixtureSelected(),t={};return t[n["component-playground"]]=!0,t[n["full-screen"]]=this.props.fullScreen,t=a(t),i.createElement("div",{className:t},i.createElement("div",{className:n["left-nav"]},i.createElement("div",{className:n.header},this._renderHomeButton(),e?this._renderMenu():null),i.createElement("div",{className:n.fixtures},i.createElement("div",{className:n["filter-input-container"]},i.createElement("input",{ref:"filterInput",className:n["filter-input"],placeholder:"Search",onChange:this.onSearchChange}),i.createElement("i",{className:n["filter-input-icon"]})),this._renderFixtures())),e?this._renderContentFrame():null)},_renderFixtures:function(){var e=this._getFilteredComponents(),t=o.keys(e).sort(function(t,r){return e[r].matchScore-e[t].matchScore});return i.createElement("ul",{className:n.components},o.map(t,function(t){var r=e[t];return i.createElement("li",{className:n.component,key:t},i.createElement("p",{ref:"componentName-"+t,className:n["component-name"]},t),this._renderComponentFixtures(t,r.fixtures))}.bind(this)))},_renderComponentFixtures:function(e,t){return i.createElement("ul",{className:n["component-fixtures"]},o.map(t,function(t,r){var n=this._extendFixtureRoute({component:e,fixture:r});return i.createElement("li",{className:this._getFixtureClasses(e,r),key:r},i.createElement("a",{ref:"fixtureButton-"+e+"-"+r,href:l(n),title:r,onClick:this.onFixtureClick},r))}.bind(this)))},_renderPreview:function(){return function(){return i.createElement("div",{ref:this._saveRef("previewContainer"),key:"previewContainer",className:this._getPreviewClasses()},this.loadChild("preview"))}.bind(this)},_renderContentFrame:function(){return i.createElement("div",{ref:"contentFrame",className:this._getContentFrameClasses()},this.props.editor?this.loadChild("splitPane"):this.loadChild("provider"))},_renderFixtureEditor:function(){return i.createElement("div",{key:"fixture-editor-outer",className:n["fixture-editor-outer"]},this.loadChild("editor"))},_renderHomeButton:function(){var e={};return e[n.button]=!0,e[n["play-button"]]=!0,e[n["selected-button"]]=!this._isFixtureSelected(),e=a(e),i.createElement("a",{ref:"homeButton",className:e,href:l({}),onClick:this.props.router.routeLink},i.createElement("span",{className:n.electron}))},_renderMenu:function(){return i.createElement("p",{className:n.menu},this._renderFixtureEditorButton(),this._renderFullScreenButton())},_renderFixtureEditorButton:function(){var e={};e[n.button]=!0,e[n["fixture-editor-button"]]=!0,e[n["selected-button"]]=this.props.editor,e=a(e);var t=this._extendFixtureRoute({editor:!this.props.editor});return i.createElement("a",{className:e,href:l(t),ref:"editorButton",onClick:this.props.router.routeLink})},_renderFullScreenButton:function(){var e=this._extendFixtureRoute({fullScreen:!0,editor:!1});return i.createElement("a",{className:n.button+" "+n["full-screen-button"],href:l(e),ref:"fullScreenButton",onClick:this.props.router.routeLink})},componentWillMount:function(){g.dispatch(m(this.props.reduxStore)),g.dispatch(h(this.state.fixtureContents))},componentDidMount:function(){this._fixtureUpdateInterval=setInterval(this.onFixtureUpdate,100),this.refs.preview&&this._injectPreviewChildState(),window.addEventListener("resize",this.onWindowResize),this._updateContentFrameOrientation(),this.props.component&&this.refs["componentName-"+this.props.component].getDOMNode().scrollIntoView({behavior:"smooth"})},componentWillReceiveProps:function(e){if(this.constructor.didFixtureChange(this.props,e)){var t=this.constructor.getFixtureState(e);this.setState(t),g.dispatch(m(this.props.reduxStore)),g.dispatch(h(t.fixtureContents))}},shouldComponentUpdate:function(e,t){return!o.isEqual(this.props,e)||!o.isEqual(o.omit(this.state,"isEditorFocused"),o.omit(t,"isEditorFocused"))},componentDidUpdate:function(e,t){this.refs.preview&&(this.constructor.didFixtureChange(e,this.props)||t.fixtureChange!==this.state.fixtureChange)&&this._injectPreviewChildState()},componentWillUnmount:function(){clearInterval(this._fixtureUpdateInterval),window.removeEventListener("resize",this.onWindowResize)},onFixtureClick:function(e){e.preventDefault();var t=e.currentTarget.href,r=u(t);if(this.constructor.didFixtureChange(this.props,r))this.props.router.goTo(t);else{var n=this.constructor.getFixtureState(this.props);this.setState(o.assign(n,{fixtureChange:this.state.fixtureChange+1}))}this.props.editor&&this._focusOnEditor()},onEditorFocusChange:function(e){this.setState({isEditorFocused:e})},onFixtureUpdate:function(){if(this.refs.preview&&!this.state.isEditorFocused){var e=s.serialize(this.refs.preview),t=o.omit(e,o.keys(this.state.fixtureUnserializableProps));this.setState({fixtureContents:t,fixtureUserInput:this.constructor.getStringifiedFixtureContents(t),isFixtureUserInputValid:!0})}},onFixtureChange:function(e){var t=e,r={fixtureUserInput:t};try{var n={};t&&o.merge(n,JSON.parse(t)),o.assign(r,{fixtureContents:n,fixtureChange:this.state.fixtureChange+1,isFixtureUserInputValid:!0})}catch(i){r.isFixtureUserInputValid=!1}this.setState(r)},onWindowResize:function(){this._updateContentFrameOrientation()},onSplitPaneChange:function(e){f.set("splitPos",e)},onSearchChange:function(e){this.setState({searchText:e.target.value})},_isFixtureSelected:function(){return this.constructor.isFixtureSelected(this.props)},_saveRef:function(e){return function(t){this.refs[e]=t}.bind(this)},_getOrientationDirection:function(){return"landscape"===this.state.orientation?"vertical":"horizontal"},_getSplitPaneClasses:function(e){return a(n[this._getOrientationDirection()],n[e])},_getPreviewComponentKey:function(){return this.props.component+"-"+this.props.fixture+"-"+this.state.fixtureChange},_getContentFrameClasses:function(){var e={};return e[n["content-frame"]]=!0,e[n["with-editor"]]=this.props.editor,e[n["orientation-"+this.state.orientation]]=!0,a(e)},_getPreviewClasses:function(){var e={};return e[n.preview]=!0,this.props.containerClassName&&(e[this.props.containerClassName]=!0),a(e)},_getFixtureClasses:function(e,t){var r={};return r[n["component-fixture"]]=!0,r[n.selected]=this._isCurrentFixtureSelected(e,t),a(r)},_isCurrentFixtureSelected:function(e,t){return e===this.props.component&&t===this.props.fixture},_extendFixtureRoute:function(e){var t={component:this.props.component,fixture:this.props.fixture,editor:this.props.editor,fullScreen:this.props.fullScreen},r=this.constructor.getDefaultProps(),n=o.assign(o.omit(t,o.keys(e)),e);return o.omit(n,function(e,t){return e===r[t]})},_focusOnEditor:function(){this.refs.editor.getCodeMirror().focus()},_injectPreviewChildState:function(){var e=this.state.fixtureContents.state;o.isEmpty(e)||s.injectState(this.refs.preview,o.cloneDeep(e))},_updateContentFrameOrientation:function(){if(this._isFixtureSelected()){var e=this.refs.contentFrame.getDOMNode();this.setState({orientation:e.offsetHeight>e.offsetWidth?"portrait":"landscape"})}},_getMatchingFixtures:function(e,t){var r=0;return{fixtures:o.pick(e,function(e,n){var i=t+n,a=n+t,s=this.state.searchText;return r=o.max([r,y.score(i,s),y.score(a,s)]),!o.isEmpty(y.match(i,s))||!o.isEmpty(y.match(a,s))||this._isCurrentFixtureSelected(t,n)}.bind(this)),matchScore:r}},_getFilteredComponents:function(){return this.state.searchText.length<2?this.props.components:o.pick(o.mapValues(this.props.components,function(e,t){return o.assign({},e,this._getMatchingFixtures(e.fixtures,t))}.bind(this)),function(e){return!o.isEmpty(e.fixtures)})}})},function(e,t){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(e){if(f===clearTimeout)return clearTimeout(e);if((f===n||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){m&&p&&(m=!1,p.length?h=p.concat(h):g=-1,h.length&&s())}function s(){if(!m){var e=o(a);m=!0;for(var t=h.length;t;){for(p=h,h=[];++g<t;)p&&p[g].run();g=-1,t=h.length}p=null,m=!1,i(e)}}function l(e,t){this.fun=e,this.array=t}function u(){}var c,f,d=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(e){c=r}try{f="function"==typeof clearTimeout?clearTimeout:n}catch(e){f=n}}();var p,h=[],m=!1,g=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];h.push(new l(e,t)),1!==h.length||m||o(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=u,d.addListener=u,d.once=u,d.off=u,d.removeListener=u,d.removeAllListeners=u,d.emit=u,d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t,r){!function(t){e.exports=t()}(function(){"use strict";function e(r,n){if(!(this instanceof e))return new e(r,n);this.options=n=n?jo(n):{},jo(ra,n,!1),p(n);var o=n.value;"string"==typeof o&&(o=new Ma(o,n.mode,null,n.lineSeparator)),this.doc=o;var i=new e.inputStyles[n.inputStyle](this),a=this.display=new t(r,o,i);a.wrapper.CodeMirror=this,u(this),s(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),n.autofocus&&!Ei&&a.input.focus(),v(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new No,keySeq:null,specialChars:null};var l=this;_i&&wi<11&&setTimeout(function(){l.display.input.reset(!0)},20),Ut(this),Jo(),_t(this),this.curOp.forceUpdate=!0,Qn(this,o),n.autofocus&&!Ei||l.hasFocus()?setTimeout(Ho(vr,this),20):yr(this);for(var c in na)na.hasOwnProperty(c)&&na[c](this,n[c],oa);w(this),n.finishInit&&n.finishInit(this);for(var f=0;f<la.length;++f)la[f](this);Ct(this),Ci&&n.lineWrapping&&"optimizelegibility"==getComputedStyle(a.lineDiv).textRendering&&(a.lineDiv.style.textRendering="auto")}function t(e,t,r){var n=this;this.input=r,n.scrollbarFiller=Go("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("cm-not-content","true"),n.gutterFiller=Go("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("cm-not-content","true"),n.lineDiv=Go("div",null,"CodeMirror-code"),n.selectionDiv=Go("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=Go("div",null,"CodeMirror-cursors"),n.measure=Go("div",null,"CodeMirror-measure"),n.lineMeasure=Go("div",null,"CodeMirror-measure"),n.lineSpace=Go("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none"),n.mover=Go("div",[Go("div",[n.lineSpace],"CodeMirror-lines")],null,"position: relative"),n.sizer=Go("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=Go("div",null,null,"position: absolute; height: "+Ra+"px; width: 1px;"),n.gutters=Go("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=Go("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=Go("div",[n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),_i&&wi<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),Ci||yi&&Ei||(n.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.reportedViewFrom=n.reportedViewTo=t.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.alignWidgets=!1,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null,n.activeTouch=null,r.init(n)}function r(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),n(t)}function n(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,We(e,100),e.state.modeGen++,e.curOp&&Ft(e)}function o(e){e.options.lineWrapping?(es(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):($a(e.display.wrapper,"CodeMirror-wrap"),d(e)),a(e),Ft(e),lt(e),setTimeout(function(){y(e)},100)}function i(e){var t=bt(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/xt(e.display)-3);return function(o){if(Cn(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a<o.widgets.length;a++)o.widgets[a].height&&(i+=o.widgets[a].height);return r?i+(Math.ceil(o.text.length/n)||1)*t:i+t}}function a(e){var t=e.doc,r=i(e);t.iter(function(e){var t=r(e);t!=e.height&&to(e,t)})}function s(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),lt(e)}function l(e){u(e),Ft(e),setTimeout(function(){_(e)},20)}function u(e){var t=e.display.gutters,r=e.options.gutters;Ko(t);for(var n=0;n<r.length;++n){var o=r[n],i=t.appendChild(Go("div",null,"CodeMirror-gutter "+o));"CodeMirror-linenumbers"==o&&(e.display.lineGutter=i,i.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none",c(e)}function c(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function f(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=gn(n);){var o=t.find(0,!0);n=o.from.line,r+=o.from.ch-o.to.ch}for(n=e;t=vn(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,n=o.to.line,r+=n.text.length-o.to.ch}return r}function d(e){var t=e.display,r=e.doc;t.maxLine=Jn(r,r.first),t.maxLineLength=f(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=f(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function p(e){var t=Do(e.gutters,"CodeMirror-linenumbers");t==-1&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function h(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Ve(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Ke(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function m(e,t,r){this.cm=r;var n=this.vert=Go("div",[Go("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=Go("div",[Go("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(n),e(o),Na(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Na(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,_i&&wi<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function g(){}function v(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&$a(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Na(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,r){"horizontal"==r?ir(t,e):or(t,e)},t),t.display.scrollbars.addClass&&es(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=h(e));var r=e.display.barWidth,n=e.display.barHeight;b(e,t);for(var o=0;o<4&&r!=e.display.barWidth||n!=e.display.barHeight;o++)r!=e.display.barWidth&&e.options.lineWrapping&&E(e),b(e,h(e)),r=e.display.barWidth,n=e.display.barHeight}function b(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}function x(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Ue(e));var o=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,i=no(t,n),a=no(t,o);if(r&&r.ensure){var s=r.ensure.from.line,l=r.ensure.to.line;s<i?(i=s,a=no(t,oo(Jn(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(i=no(t,oo(Jn(t,l))-e.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function _(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=k(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=i),r[a].gutterBackground&&(r[a].gutterBackground.style.left=i));var s=r[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=n+o+"px")}}function w(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=C(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var o=n.measure.appendChild(Go("div",[Go("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=o.firstChild.offsetWidth,a=o.offsetWidth-i;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(i,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",c(e),!0}return!1}function C(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function k(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function S(e,t,r){var n=e.display;this.viewport=t,this.visible=x(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Ye(e),this.force=r,this.dims=z(e),this.events=[]}function M(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ke(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ke(e)+"px",t.scrollbarsClipped=!0)}function T(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return It(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Bt(e))return!1;w(e)&&(It(e),t.dims=z(e));var o=n.first+n.size,i=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);r.viewFrom<i&&i-r.viewFrom<20&&(i=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(o,r.viewTo)),Wi&&(i=_n(e.doc,i),a=wn(e.doc,a));var s=i!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Ht(e,i,a),r.viewOffset=oo(Jn(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var l=Bt(e);if(!s&&0==l&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=qo();return l>4&&(r.lineDiv.style.display="none"),P(e,r.updateLineNumbers,t.dims),l>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,u&&qo()!=u&&u.offsetHeight&&u.focus(),Ko(r.cursorDiv),Ko(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,We(e,400)),r.updateLineNumbers=null,!0}function L(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Ye(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Ve(e.display)-qe(e),r.top)}),t.visible=x(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&T(e,t);n=!1){E(e);var o=h(e);Pe(e),y(e,o),O(e,o)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function A(e,t){var r=new S(e,t);if(T(e,r)){E(e),L(e,r);var n=h(e);Pe(e),y(e,n),O(e,n),r.finish()}}function O(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ke(e)+"px"}function E(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var o,i=t.view[n];if(!i.hidden){if(_i&&wi<8){var a=i.node.offsetTop+i.node.offsetHeight;o=a-r,r=a}else{var s=i.node.getBoundingClientRect();o=s.bottom-s.top}var l=i.line.height-o;if(o<2&&(o=bt(t)),(l>.001||l<-.001)&&(to(i.line,o),N(i.line),i.rest))for(var u=0;u<i.rest.length;u++)N(i.rest[u])}}}function N(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.parentNode.offsetHeight}function z(e){for(var t=e.display,r={},n={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a)r[e.options.gutters[a]]=i.offsetLeft+i.clientLeft+o,n[e.options.gutters[a]]=i.clientWidth;return{fixedPos:k(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function P(e,t,r){function n(t){var r=t.nextSibling;return Ci&&Ni&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var o=e.display,i=e.options.lineNumbers,a=o.lineDiv,s=a.firstChild,l=o.view,u=o.viewFrom,c=0;c<l.length;c++){var f=l[c];if(f.hidden);else if(f.node&&f.node.parentNode==a){for(;s!=f.node;)s=n(s);var d=i&&null!=t&&t<=u&&f.lineNumber;f.changes&&(Do(f.changes,"gutter")>-1&&(d=!1),D(e,f,u,r)),d&&(Ko(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(C(e.options,u)))),s=f.node.nextSibling}else{var p=U(e,f,u,r);a.insertBefore(p,s)}u+=f.size}for(;s;)s=n(s)}function D(e,t,r,n){for(var o=0;o<t.changes.length;o++){var i=t.changes[o];"text"==i?W(e,t):"gutter"==i?H(e,t,r,n):"class"==i?j(t):"widget"==i&&B(e,t,n)}t.changes=null}function F(e){return e.node==e.text&&(e.node=Go("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),_i&&wi<8&&(e.node.style.zIndex=2)),e.node}function R(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var r=F(e);e.background=r.insertBefore(Go("div",null,t),r.firstChild)}}function I(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Wn(e,t)}function W(e,t){var r=t.text.className,n=I(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,j(t)):r&&(t.text.className=r)}function j(e){R(e),e.line.wrapClass?F(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function H(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=F(t);t.gutterBackground=Go("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),o.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=F(t),a=t.gutter=Go("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(a),o.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(Go("div",C(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var s=0;s<e.options.gutters.length;++s){var l=e.options.gutters[s],u=i.hasOwnProperty(l)&&i[l];u&&a.appendChild(Go("div",[u],"CodeMirror-gutter-elt","left: "+n.gutterLeft[l]+"px; width: "+n.gutterWidth[l]+"px"))}}}function B(e,t,r){t.alignable&&(t.alignable=null);for(var n,o=t.node.firstChild;o;o=n){var n=o.nextSibling;"CodeMirror-linewidget"==o.className&&t.node.removeChild(o)}V(e,t,r)}function U(e,t,r,n){var o=I(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),j(t),H(e,t,r,n),V(e,t,n),t.node}function V(e,t,r){if(G(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)G(e,t.rest[n],t,r,!1)}function G(e,t,r,n,o){if(t.widgets)for(var i=F(r),a=0,s=t.widgets;a<s.length;++a){var l=s[a],u=Go("div",[l.node],"CodeMirror-linewidget");l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),K(l,u,r,n),e.display.input.setUneditable(u),o&&l.above?i.insertBefore(u,r.gutter||r.text):i.appendChild(u),Mo(l,"redraw")}}function K(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var o=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(o-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Y(e){return ji(e.line,e.ch)}function q(e,t){return Hi(e,t)<0?t:e}function X(e,t){return Hi(e,t)<0?e:t}function Z(e){e.state.focused||(e.display.input.focus(),vr(e))}function Q(e,t,r,n,o){var i=e.doc;e.display.shift=!1,n||(n=i.sel);var a=e.state.pasteIncoming||"paste"==o,s=i.splitLines(t),l=null;if(a&&n.ranges.length>1)if(Bi&&Bi.text.join("\n")==t){if(n.ranges.length%Bi.text.length==0){l=[];for(var u=0;u<Bi.text.length;u++)l.push(i.splitLines(Bi.text[u]))}}else s.length==n.ranges.length&&(l=Fo(s,function(e){return[e]}));for(var u=n.ranges.length-1;u>=0;u--){var c=n.ranges[u],f=c.from(),d=c.to();c.empty()&&(r&&r>0?f=ji(f.line,f.ch-r):e.state.overwrite&&!a?d=ji(d.line,Math.min(Jn(i,d.line).text.length,d.ch+Po(s).length)):Bi&&Bi.lineWise&&Bi.text.join("\n")==t&&(f=d=ji(f.line,0)));var p=e.curOp.updateInput,h={from:f,to:d,text:l?l[u%l.length]:s,origin:o||(a?"paste":e.state.cutIncoming?"cut":"+input")};Mr(e.doc,h),Mo(e,"inputRead",e,h)}t&&!a&&$(e,t),Ir(e),e.curOp.updateInput=p,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function J(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Ot(t,function(){Q(t,r,0,null,"paste")}),!0}function $(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var o=r.ranges[n];if(!(o.head.ch>100||n&&r.ranges[n-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var s=0;s<i.electricChars.length;s++)if(t.indexOf(i.electricChars.charAt(s))>-1){a=jr(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Jn(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=jr(e,o.head.line,"smart"));a&&Mo(e,"electricInput",e,o.head.line)}}}function ee(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var o=e.doc.sel.ranges[n].head.line,i={anchor:ji(o,0),head:ji(o+1,0)};r.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:r}}function te(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function re(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new No,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function ne(){var e=Go("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=Go("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ci?e.style.width="1000px":e.setAttribute("wrap","off"),Oi&&(e.style.border="1px solid black"),te(e),t}function oe(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new No,this.gracePeriod=!1;
}function ie(e,t){var r=$e(e,t.line);if(!r||r.hidden)return null;var n=Jn(e.doc,t.line),o=Ze(r,n,t.line),i=io(n),a="left";if(i){var s=di(i,t.ch);a=s%2?"right":"left"}var l=rt(o.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function ae(e,t){return t&&(e.bad=!0),e}function se(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return ae(e.clipPos(ji(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var i=e.display.view[o];if(i.node==n)return le(i,t,r)}}function le(e,t,r){function n(t,r,n){for(var o=-1;o<(c?c.length:0);o++)for(var i=o<0?u.map:c[o],a=0;a<i.length;a+=3){var s=i[a+2];if(s==t||s==r){var l=ro(o<0?e.line:e.rest[o]),f=i[a]+n;return(n<0||s!=t)&&(f=i[a+(n?1:0)]),ji(l,f)}}}var o=e.text.firstChild,i=!1;if(!t||!Za(o,t))return ae(ji(ro(e.line),0),!0);if(t==o&&(i=!0,t=o.childNodes[r],r=0,!t)){var a=e.rest?Po(e.rest):e.line;return ae(ji(ro(a),a.text.length),i)}var s=3==t.nodeType?t:null,l=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,r&&(r=s.nodeValue.length));l.parentNode!=o;)l=l.parentNode;var u=e.measure,c=u.maps,f=n(s,l,r);if(f)return ae(f,i);for(var d=l.nextSibling,p=s?s.nodeValue.length-r:0;d;d=d.nextSibling){if(f=n(d,d.firstChild,0))return ae(ji(f.line,f.ch-p),i);p+=d.textContent.length}for(var h=l.previousSibling,p=r;h;h=h.previousSibling){if(f=n(h,h.firstChild,-1))return ae(ji(f.line,f.ch+p),i);p+=h.textContent.length}}function ue(e,t,r,n,o){function i(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return""==r&&(r=t.textContent.replace(/\u200b/g,"")),void(s+=r);var c,f=t.getAttribute("cm-marker");if(f){var d=e.findMarks(ji(n,0),ji(o+1,0),i(+f));return void(d.length&&(c=d[0].find())&&(s+=$n(e.doc,c.from,c.to).join(u)))}if("false"==t.getAttribute("contenteditable"))return;for(var p=0;p<t.childNodes.length;p++)a(t.childNodes[p]);/^(pre|div|p)$/i.test(t.nodeName)&&(l=!0)}else if(3==t.nodeType){var h=t.nodeValue;if(!h)return;l&&(s+=u,l=!1),s+=h}}for(var s="",l=!1,u=e.doc.lineSeparator();a(t),t!=r;)t=t.nextSibling;return s}function ce(e,t){this.ranges=e,this.primIndex=t}function fe(e,t){this.anchor=e,this.head=t}function de(e,t){var r=e[t];e.sort(function(e,t){return Hi(e.from(),t.from())}),t=Do(e,r);for(var n=1;n<e.length;n++){var o=e[n],i=e[n-1];if(Hi(i.to(),o.from())>=0){var a=X(i.from(),o.from()),s=q(i.to(),o.to()),l=i.empty()?o.from()==o.head:i.from()==i.head;n<=t&&--t,e.splice(--n,2,new fe(l?s:a,l?a:s))}}return new ce(e,t)}function pe(e,t){return new ce([new fe(e,t||e)],0)}function he(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function me(e,t){if(t.line<e.first)return ji(e.first,0);var r=e.first+e.size-1;return t.line>r?ji(r,Jn(e,r).text.length):ge(t,Jn(e,t.line).text.length)}function ge(e,t){var r=e.ch;return null==r||r>t?ji(e.line,t):r<0?ji(e.line,0):e}function ve(e,t){return t>=e.first&&t<e.first+e.size}function ye(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=me(e,t[n]);return r}function be(e,t,r,n){if(e.cm&&e.cm.display.shift||e.extend){var o=t.anchor;if(n){var i=Hi(r,o)<0;i!=Hi(n,o)<0?(o=r,r=n):i!=Hi(r,n)<0&&(r=n)}return new fe(o,r)}return new fe(n||r,r)}function xe(e,t,r,n){Me(e,new ce([be(e,e.sel.primary(),t,r)],0),n)}function _e(e,t,r){for(var n=[],o=0;o<e.sel.ranges.length;o++)n[o]=be(e,e.sel.ranges[o],t[o],null);var i=de(n,e.sel.primIndex);Me(e,i,r)}function we(e,t,r,n){var o=e.sel.ranges.slice(0);o[t]=r,Me(e,de(o,e.sel.primIndex),n)}function Ce(e,t,r,n){Me(e,pe(t,r),n)}function ke(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new fe(me(e,t[r].anchor),me(e,t[r].head))},origin:r&&r.origin};return Da(e,"beforeSelectionChange",e,n),e.cm&&Da(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?de(n.ranges,n.ranges.length-1):t}function Se(e,t,r){var n=e.history.done,o=Po(n);o&&o.ranges?(n[n.length-1]=t,Te(e,t,r)):Me(e,t,r)}function Me(e,t,r){Te(e,t,r),po(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Te(e,t,r){(Oo(e,"beforeSelectionChange")||e.cm&&Oo(e.cm,"beforeSelectionChange"))&&(t=ke(e,t,r));var n=r&&r.bias||(Hi(t.primary().head,e.sel.primary().head)<0?-1:1);Le(e,Oe(e,t,n,!0)),r&&r.scroll===!1||!e.cm||Ir(e.cm)}function Le(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Ao(e.cm)),Mo(e,"cursorActivity",e))}function Ae(e){Le(e,Oe(e,e.sel,null,!1),Wa)}function Oe(e,t,r,n){for(var o,i=0;i<t.ranges.length;i++){var a=t.ranges[i],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],l=Ne(e,a.anchor,s&&s.anchor,r,n),u=Ne(e,a.head,s&&s.head,r,n);(o||l!=a.anchor||u!=a.head)&&(o||(o=t.ranges.slice(0,i)),o[i]=new fe(l,u))}return o?de(o,t.primIndex):t}function Ee(e,t,r,n,o){var i=Jn(e,t.line);if(i.markedSpans)for(var a=0;a<i.markedSpans.length;++a){var s=i.markedSpans[a],l=s.marker;if((null==s.from||(l.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(l.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(o&&(Da(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!l.atomic)continue;if(r){var u,c=l.find(n<0?1:-1);if((n<0?l.inclusiveRight:l.inclusiveLeft)&&(c=ze(e,c,-n,c&&c.line==t.line?i:null)),c&&c.line==t.line&&(u=Hi(c,r))&&(n<0?u<0:u>0))return Ee(e,c,t,n,o)}var f=l.find(n<0?-1:1);return(n<0?l.inclusiveLeft:l.inclusiveRight)&&(f=ze(e,f,n,f.line==t.line?i:null)),f?Ee(e,f,t,n,o):null}}return t}function Ne(e,t,r,n,o){var i=n||1,a=Ee(e,t,r,i,o)||!o&&Ee(e,t,r,i,!0)||Ee(e,t,r,-i,o)||!o&&Ee(e,t,r,-i,!0);return a?a:(e.cantEdit=!0,ji(e.first,0))}function ze(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?me(e,ji(t.line-1)):null:r>0&&t.ch==(n||Jn(e,t.line)).text.length?t.line<e.first+e.size-1?ji(t.line+1,0):null:new ji(t.line,t.ch+r)}function Pe(e){e.display.input.showSelection(e.display.input.prepareSelection())}function De(e,t){for(var r=e.doc,n={},o=n.cursors=document.createDocumentFragment(),i=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(t!==!1||a!=r.sel.primIndex){var s=r.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&Fe(e,s.head,o),l||Re(e,s,i)}}return n}function Fe(e,t,r){var n=ht(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=r.appendChild(Go("div"," ","CodeMirror-cursor"));if(o.style.left=n.left+"px",o.style.top=n.top+"px",o.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var i=r.appendChild(Go("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));i.style.display="",i.style.left=n.other.left+"px",i.style.top=n.other.top+"px",i.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Re(e,t,r){function n(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),s.appendChild(Go("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==r?c-e:r)+"px; height: "+(n-t)+"px"))}function o(t,r,o){function i(r,n){return pt(e,ji(t,r),"div",f,n)}var s,l,f=Jn(a,t),d=f.text.length;return ni(io(f),r||0,null==o?d:o,function(e,t,a){var f,p,h,m=i(e,"left");if(e==t)f=m,p=h=m.left;else{if(f=i(t-1,"right"),"rtl"==a){var g=m;m=f,f=g}p=m.left,h=f.right}null==r&&0==e&&(p=u),f.top-m.top>3&&(n(p,m.top,null,m.bottom),p=u,m.bottom<f.top&&n(p,m.bottom,null,f.top)),null==o&&t==d&&(h=c),(!s||m.top<s.top||m.top==s.top&&m.left<s.left)&&(s=m),(!l||f.bottom>l.bottom||f.bottom==l.bottom&&f.right>l.right)&&(l=f),p<u+1&&(p=u),n(p,f.top,h-p,f.bottom)}),{start:s,end:l}}var i=e.display,a=e.doc,s=document.createDocumentFragment(),l=Ge(e.display),u=l.left,c=Math.max(i.sizerWidth,Ye(e)-i.sizer.offsetLeft)-l.right,f=t.from(),d=t.to();if(f.line==d.line)o(f.line,f.ch,d.ch);else{var p=Jn(a,f.line),h=Jn(a,d.line),m=bn(p)==bn(h),g=o(f.line,f.ch,m?p.text.length+1:null).end,v=o(d.line,m?0:null,d.ch).start;m&&(g.top<v.top-2?(n(g.right,g.top,null,g.bottom),n(u,v.top,v.left,v.bottom)):n(g.right,g.top,v.left-g.right,g.bottom)),g.bottom<v.top&&n(u,g.bottom,null,v.top)}r.appendChild(s)}function Ie(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function We(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,Ho(je,e))}function je(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=ca(t.mode,Be(e,t.frontier)),o=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(i){if(t.frontier>=e.display.viewFrom){var a=i.styles,s=i.text.length>e.options.maxHighlightLength,l=Dn(e,i,s?ca(t.mode,n):n,!0);i.styles=l.styles;var u=i.styleClasses,c=l.classes;c?i.styleClasses=c:u&&(i.styleClasses=null);for(var f=!a||a.length!=i.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!f&&d<a.length;++d)f=a[d]!=i.styles[d];f&&o.push(t.frontier),i.stateAfter=s?n:ca(t.mode,n)}else i.text.length<=e.options.maxHighlightLength&&Rn(e,i.text,n),i.stateAfter=t.frontier%5==0?ca(t.mode,n):null;if(++t.frontier,+new Date>r)return We(e,e.options.workDelay),!0}),o.length&&Ot(e,function(){for(var t=0;t<o.length;t++)Rt(e,o[t],"text")})}}function He(e,t,r){for(var n,o,i=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=i.first)return i.first;var l=Jn(i,s-1);if(l.stateAfter&&(!r||s<=i.frontier))return s;var u=Ba(l.text,null,e.options.tabSize);(null==o||n>u)&&(o=s-1,n=u)}return o}function Be(e,t,r){var n=e.doc,o=e.display;if(!n.mode.startState)return!0;var i=He(e,t,r),a=i>n.first&&Jn(n,i-1).stateAfter;return a=a?ca(n.mode,a):fa(n.mode),n.iter(i,t,function(r){Rn(e,r.text,a);var s=i==t-1||i%5==0||i>=o.viewFrom&&i<o.viewTo;r.stateAfter=s?ca(n.mode,a):null,++i}),r&&(n.frontier=i),a}function Ue(e){return e.lineSpace.offsetTop}function Ve(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ge(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Yo(e.measure,Go("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Ke(e){return Ra-e.display.nativeBarWidth}function Ye(e){return e.display.scroller.clientWidth-Ke(e)-e.display.barWidth}function qe(e){return e.display.scroller.clientHeight-Ke(e)-e.display.barHeight}function Xe(e,t,r){var n=e.options.lineWrapping,o=n&&Ye(e);if(!t.measure.heights||n&&t.measure.width!=o){var i=t.measure.heights=[];if(n){t.measure.width=o;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],u=a[s+1];Math.abs(l.bottom-u.bottom)>2&&i.push((l.bottom+u.top)/2-r.top)}}i.push(r.bottom-r.top)}}function Ze(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var n=0;n<e.rest.length;n++)if(ro(e.rest[n])>r)return{map:e.measure.maps[n],cache:e.measure.caches[n],before:!0}}function Qe(e,t){t=bn(t);var r=ro(t),n=e.display.externalMeasured=new Pt(e.doc,t,r);n.lineN=r;var o=n.built=Wn(e,n);return n.text=o.pre,Yo(e.display.lineMeasure,o.pre),n}function Je(e,t,r,n){return tt(e,et(e,t),r,n)}function $e(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Wt(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function et(e,t){var r=ro(t),n=$e(e,r);n&&!n.text?n=null:n&&n.changes&&(D(e,n,r,z(e)),e.curOp.forceUpdate=!0),n||(n=Qe(e,t));var o=Ze(n,t,r);return{line:t,view:n,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function tt(e,t,r,n,o){t.before&&(r=-1);var i,a=r+(n||"");return t.cache.hasOwnProperty(a)?i=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Xe(e,t.view,t.rect),t.hasHeights=!0),i=ot(e,t,r,n),i.bogus||(t.cache[a]=i)),{left:i.left,right:i.right,top:o?i.rtop:i.top,bottom:o?i.rbottom:i.bottom}}function rt(e,t,r){for(var n,o,i,a,s=0;s<e.length;s+=3){var l=e[s],u=e[s+1];if(t<l?(o=0,i=1,a="left"):t<u?(o=t-l,i=o+1):(s==e.length-3||t==u&&e[s+3]>t)&&(i=u-l,o=i-1,t>=u&&(a="right")),null!=o){if(n=e[s+2],l==u&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==o)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)n=e[(s-=3)+2],a="left";if("right"==r&&o==u-l)for(;s<e.length-3&&e[s+3]==e[s+4]&&!e[s+5].insertLeft;)n=e[(s+=3)+2],a="right";break}}return{node:n,start:o,end:i,collapse:a,coverStart:l,coverEnd:u}}function nt(e,t){var r=Ki;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var n=e.length-1;n>=0&&(r=e[n]).left==r.right;n--);return r}function ot(e,t,r,n){var o,i=rt(t.map,r,n),a=i.node,s=i.start,l=i.end,u=i.collapse;if(3==a.nodeType){for(var c=0;c<4;c++){for(;s&&Vo(t.line.text.charAt(i.coverStart+s));)--s;for(;i.coverStart+l<i.coverEnd&&Vo(t.line.text.charAt(i.coverStart+l));)++l;if(o=_i&&wi<9&&0==s&&l==i.coverEnd-i.coverStart?a.parentNode.getBoundingClientRect():nt(Ka(a,s,l).getClientRects(),n),o.left||o.right||0==s)break;l=s,s-=1,u="right"}_i&&wi<11&&(o=it(e.display.measure,o))}else{s>0&&(u=n="right");var f;o=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==n?f.length-1:0]:a.getBoundingClientRect()}if(_i&&wi<9&&!s&&(!o||!o.left&&!o.right)){var d=a.parentNode.getClientRects()[0];o=d?{left:d.left,right:d.left+xt(e.display),top:d.top,bottom:d.bottom}:Ki}for(var p=o.top-t.rect.top,h=o.bottom-t.rect.top,m=(p+h)/2,g=t.view.measure.heights,c=0;c<g.length-1&&!(m<g[c]);c++);var v=c?g[c-1]:0,y=g[c],b={left:("right"==u?o.right:o.left)-t.rect.left,right:("left"==u?o.left:o.right)-t.rect.left,top:v,bottom:y};return o.left||o.right||(b.bogus=!0),e.options.singleCursorHeightPerLine||(b.rtop=p,b.rbottom=h),b}function it(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!ri(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function at(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function st(e){e.display.externalMeasure=null,Ko(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)at(e.display.view[t])}function lt(e){st(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ut(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ct(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function ft(e,t,r,n){if(t.widgets)for(var o=0;o<t.widgets.length;++o)if(t.widgets[o].above){var i=Mn(t.widgets[o]);r.top+=i,r.bottom+=i}if("line"==n)return r;n||(n="local");var a=oo(t);if("local"==n?a+=Ue(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==n?0:ct());var l=s.left+("window"==n?0:ut());r.left+=l,r.right+=l}return r.top+=a,r.bottom+=a,r}function dt(e,t,r){if("div"==r)return t;var n=t.left,o=t.top;if("page"==r)n-=ut(),o-=ct();else if("local"==r||!r){var i=e.display.sizer.getBoundingClientRect();n+=i.left,o+=i.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:o-a.top}}function pt(e,t,r,n,o){return n||(n=Jn(e.doc,t.line)),ft(e,n,Je(e,n,t.ch,o),r)}function ht(e,t,r,n,o,i){function a(t,a){var s=tt(e,o,t,a?"right":"left",i);return a?s.left=s.right:s.right=s.left,ft(e,n,s,r)}function s(e,t){var r=l[t],n=r.level%2;return e==oi(r)&&t&&r.level<l[t-1].level?(r=l[--t],e=ii(r)-(r.level%2?0:1),n=!0):e==ii(r)&&t<l.length-1&&r.level<l[t+1].level&&(r=l[++t],e=oi(r)-r.level%2,n=!1),n&&e==r.to&&e>r.from?a(e-1):a(e,n)}n=n||Jn(e.doc,t.line),o||(o=et(e,n));var l=io(n),u=t.ch;if(!l)return a(u);var c=di(l,u),f=s(u,c);return null!=ls&&(f.other=s(u,ls)),f}function mt(e,t){var r=0,t=me(e.doc,t);e.options.lineWrapping||(r=xt(e.display)*t.ch);var n=Jn(e.doc,t.line),o=oo(n)+Ue(e.display);return{left:r,right:r,top:o,bottom:o+n.height}}function gt(e,t,r,n){var o=ji(e,t);return o.xRel=n,r&&(o.outside=!0),o}function vt(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return gt(n.first,0,!0,-1);var o=no(n,r),i=n.first+n.size-1;if(o>i)return gt(n.first+n.size-1,Jn(n,i).text.length,!0,1);t<0&&(t=0);for(var a=Jn(n,o);;){var s=yt(e,a,o,t,r),l=vn(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;o=ro(a=u.to.line)}}function yt(e,t,r,n,o){function i(n){var o=ht(e,ji(r,n),"line",t,u);return s=!0,a>o.bottom?o.left-l:a<o.top?o.left+l:(s=!1,o.left)}var a=o-oo(t),s=!1,l=2*e.display.wrapper.clientWidth,u=et(e,t),c=io(t),f=t.text.length,d=ai(t),p=si(t),h=i(d),m=s,g=i(p),v=s;if(n>g)return gt(r,p,v,1);for(;;){if(c?p==d||p==hi(t,d,1):p-d<=1){var y=n<h||n-h<=g-n?d:p,b=y==d?m:v,x=n-(y==d?h:g);if(v&&!c&&!/\s/.test(t.text.charAt(y))&&x>0&&y<t.text.length&&u.view.measure.heights.length>1){var _=tt(e,u,y,"right");a<=_.bottom&&a>=_.top&&Math.abs(n-_.right)<x&&(b=!1,y++,x=n-_.right)}for(;Vo(t.text.charAt(y));)++y;var w=gt(r,y,b,x<-1?-1:x>1?1:0);return w}var C=Math.ceil(f/2),k=d+C;if(c){k=d;for(var S=0;S<C;++S)k=hi(t,k,1)}var M=i(k);M>n?(p=k,g=M,(v=s)&&(g+=1e3),f=C):(d=k,h=M,m=s,f-=C)}}function bt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Ui){Ui=Go("pre");for(var t=0;t<49;++t)Ui.appendChild(document.createTextNode("x")),Ui.appendChild(Go("br"));Ui.appendChild(document.createTextNode("x"))}Yo(e.measure,Ui);var r=Ui.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),Ko(e.measure),r||1}function xt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Go("span","xxxxxxxxxx"),r=Go("pre",[t]);Yo(e.measure,r);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function _t(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++qi},Yi?Yi.ops.push(e.curOp):e.curOp.ownsGroup=Yi={ops:[e.curOp],delayedCallbacks:[]}}function wt(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var o=e.ops[n];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(r<t.length)}function Ct(e){var t=e.curOp,r=t.ownsGroup;if(r)try{wt(r)}finally{Yi=null;for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;kt(r)}}function kt(e){for(var t=e.ops,r=0;r<t.length;r++)St(t[r]);for(var r=0;r<t.length;r++)Mt(t[r]);for(var r=0;r<t.length;r++)Tt(t[r]);for(var r=0;r<t.length;r++)Lt(t[r]);for(var r=0;r<t.length;r++)At(t[r])}function St(e){var t=e.cm,r=t.display;M(t),e.updateMaxLine&&d(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new S(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Mt(e){e.updatedDisplay=e.mustUpdate&&T(e.cm,e.update)}function Tt(e){var t=e.cm,r=t.display;e.updatedDisplay&&E(t),e.barMeasure=h(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Je(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Ke(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Ye(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection(e.focus))}function Lt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&ir(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==qo()&&(!document.hasFocus||document.hasFocus());e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&y(t,e.barMeasure),e.updatedDisplay&&O(t,e.barMeasure),e.selectionChanged&&Ie(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Z(e.cm)}function At(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&L(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null==e.scrollTop||r.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(n.scrollTop=Math.max(0,Math.min(r.scroller.scrollHeight-r.scroller.clientHeight,e.scrollTop)),r.scrollbars.setScrollTop(n.scrollTop),r.scroller.scrollTop=n.scrollTop),null==e.scrollLeft||r.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(n.scrollLeft=Math.max(0,Math.min(r.scroller.scrollWidth-r.scroller.clientWidth,e.scrollLeft)),r.scrollbars.setScrollLeft(n.scrollLeft),r.scroller.scrollLeft=n.scrollLeft,_(t)),e.scrollToPos){var o=Pr(t,me(n,e.scrollToPos.from),me(n,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&zr(t,o)}var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var s=0;s<i.length;++s)i[s].lines.length||Da(i[s],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&Da(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Da(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Ot(e,t){if(e.curOp)return t();_t(e);try{return t()}finally{Ct(e)}}function Et(e,t){return function(){if(e.curOp)return t.apply(e,arguments);_t(e);try{return t.apply(e,arguments)}finally{Ct(e)}}}function Nt(e){return function(){if(this.curOp)return e.apply(this,arguments);_t(this);try{return e.apply(this,arguments)}finally{Ct(this)}}}function zt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);_t(t);try{return e.apply(this,arguments)}finally{Ct(t)}}}function Pt(e,t,r){this.line=t,this.rest=xn(t),this.size=this.rest?ro(Po(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Cn(e,t)}function Dt(e,t,r){for(var n,o=[],i=t;i<r;i=n){var a=new Pt(e.doc,Jn(e.doc,i),i);n=i+a.size,o.push(a)}return o}function Ft(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var o=e.display;if(n&&r<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Wi&&_n(e.doc,t)<o.viewTo&&It(e);else if(r<=o.viewFrom)Wi&&wn(e.doc,r+n)>o.viewFrom?It(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&r>=o.viewTo)It(e);else if(t<=o.viewFrom){var i=jt(e,r,r+n,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=n):It(e)}else if(r>=o.viewTo){var i=jt(e,t,t,-1);i?(o.view=o.view.slice(0,i.index),o.viewTo=i.lineN):It(e)}else{var a=jt(e,t,t,-1),s=jt(e,r,r+n,1);a&&s?(o.view=o.view.slice(0,a.index).concat(Dt(e,a.lineN,s.lineN)).concat(o.view.slice(s.index)),o.viewTo+=n):It(e)}var l=o.externalMeasured;l&&(r<l.lineN?l.lineN+=n:t<l.lineN+l.size&&(o.externalMeasured=null))}function Rt(e,t,r){e.curOp.viewChanged=!0;var n=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var i=n.view[Wt(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);Do(a,r)==-1&&a.push(r)}}}function It(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Wt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function jt(e,t,r,n){var o,i=Wt(e,t),a=e.display.view;if(!Wi||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var s=0,l=e.display.viewFrom;s<i;s++)l+=a[s].size;if(l!=t){if(n>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,r+=o}for(;_n(e.doc,r)!=r;){if(i==(n<0?0:a.length-1))return null;r+=n*a[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function Ht(e,t,r){var n=e.display,o=n.view;0==o.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Dt(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Dt(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Wt(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Dt(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Wt(e,r)))),n.viewTo=r}function Bt(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var o=t[n];o.hidden||o.node&&!o.changes||++r}return r}function Ut(e){function t(){o.activeTouch&&(i=setTimeout(function(){o.activeTouch=null},1e3),a=o.activeTouch,a.end=+new Date)}function r(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function n(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}var o=e.display;Na(o.scroller,"mousedown",Et(e,qt)),_i&&wi<11?Na(o.scroller,"dblclick",Et(e,function(t){if(!Lo(e,t)){var r=Yt(e,t);if(r&&!$t(e,t)&&!Kt(e.display,t)){Aa(t);var n=e.findWordAt(r);xe(e.doc,n.anchor,n.head)}}})):Na(o.scroller,"dblclick",function(t){Lo(e,t)||Aa(t)}),Ri||Na(o.scroller,"contextmenu",function(t){br(e,t)});var i,a={end:0};Na(o.scroller,"touchstart",function(t){if(!Lo(e,t)&&!r(t)){clearTimeout(i);var n=+new Date;o.activeTouch={start:n,moved:!1,prev:n-a.end<=300?a:null},1==t.touches.length&&(o.activeTouch.left=t.touches[0].pageX,o.activeTouch.top=t.touches[0].pageY)}}),Na(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),Na(o.scroller,"touchend",function(r){var i=o.activeTouch;if(i&&!Kt(o,r)&&null!=i.left&&!i.moved&&new Date-i.start<300){var a,s=e.coordsChar(o.activeTouch,"page");a=!i.prev||n(i,i.prev)?new fe(s,s):!i.prev.prev||n(i,i.prev.prev)?e.findWordAt(s):new fe(ji(s.line,0),me(e.doc,ji(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Aa(r)}t()}),Na(o.scroller,"touchcancel",t),Na(o.scroller,"scroll",function(){o.scroller.clientHeight&&(or(e,o.scroller.scrollTop),ir(e,o.scroller.scrollLeft,!0),Da(e,"scroll",e))}),Na(o.scroller,"mousewheel",function(t){ar(e,t)}),Na(o.scroller,"DOMMouseScroll",function(t){ar(e,t)}),Na(o.wrapper,"scroll",function(){o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(t){Lo(e,t)||Ea(t)},over:function(t){Lo(e,t)||(rr(e,t),Ea(t))},start:function(t){tr(e,t)},drop:Et(e,er),leave:function(t){Lo(e,t)||nr(e)}};var s=o.input.getField();Na(s,"keyup",function(t){hr.call(e,t)}),Na(s,"keydown",Et(e,dr)),Na(s,"keypress",Et(e,mr)),Na(s,"focus",Ho(vr,e)),Na(s,"blur",Ho(yr,e))}function Vt(t,r,n){var o=n&&n!=e.Init;if(!r!=!o){var i=t.display.dragFunctions,a=r?Na:Pa;a(t.display.scroller,"dragstart",i.start),a(t.display.scroller,"dragenter",i.enter),a(t.display.scroller,"dragover",i.over),a(t.display.scroller,"dragleave",i.leave),a(t.display.scroller,"drop",i.drop)}}function Gt(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Kt(e,t){for(var r=Co(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Yt(e,t,r,n){var o=e.display;if(!r&&"true"==Co(t).getAttribute("cm-not-content"))return null;var i,a,s=o.lineSpace.getBoundingClientRect();try{i=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,u=vt(e,i,a);if(n&&1==u.xRel&&(l=Jn(e.doc,u.line).text).length==u.ch){var c=Ba(l,l.length,e.options.tabSize)-l.length;u=ji(u.line,Math.max(0,Math.round((i-Ge(e.display).left)/xt(e.display))-c))}return u}function qt(e){var t=this,r=t.display;if(!(Lo(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.shift=e.shiftKey,Kt(r,e))return void(Ci||(r.scroller.draggable=!1,setTimeout(function(){r.scroller.draggable=!0},100)));if(!$t(t,e)){var n=Yt(t,e);switch(window.focus(),ko(e)){case 1:t.state.selectingText?t.state.selectingText(e):n?Xt(t,e,n):Co(e)==r.scroller&&Aa(e);break;case 2:Ci&&(t.state.lastMiddleDown=+new Date),n&&xe(t.doc,n),setTimeout(function(){r.input.focus()},20),Aa(e);break;case 3:Ri?br(t,e):gr(t)}}}}function Xt(e,t,r){_i?setTimeout(Ho(Z,e),0):e.curOp.focus=qo();var n,o=+new Date;Gi&&Gi.time>o-400&&0==Hi(Gi.pos,r)?n="triple":Vi&&Vi.time>o-400&&0==Hi(Vi.pos,r)?(n="double",Gi={time:o,pos:r}):(n="single",Vi={time:o,pos:r});var i,a=e.doc.sel,s=Ni?t.metaKey:t.ctrlKey;e.options.dragDrop&&rs&&!e.isReadOnly()&&"single"==n&&(i=a.contains(r))>-1&&(Hi((i=a.ranges[i]).from(),r)<0||r.xRel>0)&&(Hi(i.to(),r)>0||r.xRel<0)?Zt(e,t,r,s):Qt(e,t,r,n,s)}function Zt(e,t,r,n){var o=e.display,i=+new Date,a=Et(e,function(s){Ci&&(o.scroller.draggable=!1),e.state.draggingText=!1,Pa(document,"mouseup",a),Pa(o.scroller,"drop",a),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(Aa(s),!n&&+new Date-200<i&&xe(e.doc,r),Ci||_i&&9==wi?setTimeout(function(){document.body.focus(),o.input.focus()},20):o.input.focus())});Ci&&(o.scroller.draggable=!0),e.state.draggingText=a,a.copy=Ni?t.altKey:t.ctrlKey,o.scroller.dragDrop&&o.scroller.dragDrop(),Na(document,"mouseup",a),Na(o.scroller,"drop",a)}function Qt(e,t,r,n,o){function i(t){if(0!=Hi(g,t))if(g=t,"rect"==n){for(var o=[],i=e.options.tabSize,a=Ba(Jn(u,r.line).text,r.ch,i),s=Ba(Jn(u,t.line).text,t.ch,i),l=Math.min(a,s),p=Math.max(a,s),h=Math.min(r.line,t.line),m=Math.min(e.lastLine(),Math.max(r.line,t.line));h<=m;h++){var v=Jn(u,h).text,y=Ua(v,l,i);l==p?o.push(new fe(ji(h,y),ji(h,y))):v.length>y&&o.push(new fe(ji(h,y),ji(h,Ua(v,p,i))))}o.length||o.push(new fe(r,r)),Me(u,de(d.ranges.slice(0,f).concat(o),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,x=b.anchor,_=t;if("single"!=n){if("double"==n)var w=e.findWordAt(t);else var w=new fe(ji(t.line,0),me(u,ji(t.line+1,0)));Hi(w.anchor,x)>0?(_=w.head,x=X(b.from(),w.anchor)):(_=w.anchor,x=q(b.to(),w.head))}var o=d.ranges.slice(0);o[f]=new fe(me(u,x),_),Me(u,de(o,f),ja)}}function a(t){var r=++y,o=Yt(e,t,!0,"rect"==n);if(o)if(0!=Hi(o,g)){e.curOp.focus=qo(),i(o);var s=x(l,u);(o.line>=s.to||o.line<s.from)&&setTimeout(Et(e,function(){y==r&&a(t)}),150)}else{var c=t.clientY<v.top?-20:t.clientY>v.bottom?20:0;c&&setTimeout(Et(e,function(){y==r&&(l.scroller.scrollTop+=c,a(t))}),50)}}function s(t){e.state.selectingText=!1,y=1/0,Aa(t),l.input.focus(),Pa(document,"mousemove",b),Pa(document,"mouseup",_),u.history.lastSelOrigin=null}var l=e.display,u=e.doc;Aa(t);var c,f,d=u.sel,p=d.ranges;if(o&&!t.shiftKey?(f=u.sel.contains(r),c=f>-1?p[f]:new fe(r,r)):(c=u.sel.primary(),f=u.sel.primIndex),zi?t.shiftKey&&t.metaKey:t.altKey)n="rect",o||(c=new fe(r,r)),r=Yt(e,t,!0,!0),f=-1;else if("double"==n){var h=e.findWordAt(r);c=e.display.shift||u.extend?be(u,c,h.anchor,h.head):h}else if("triple"==n){var m=new fe(ji(r.line,0),me(u,ji(r.line+1,0)));c=e.display.shift||u.extend?be(u,c,m.anchor,m.head):m}else c=be(u,c,r);o?f==-1?(f=p.length,Me(u,de(p.concat([c]),f),{scroll:!1,origin:"*mouse"})):p.length>1&&p[f].empty()&&"single"==n&&!t.shiftKey?(Me(u,de(p.slice(0,f).concat(p.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),d=u.sel):we(u,f,c,ja):(f=0,Me(u,new ce([c],0),ja),d=u.sel);var g=r,v=l.wrapper.getBoundingClientRect(),y=0,b=Et(e,function(e){ko(e)?a(e):s(e)}),_=Et(e,s);e.state.selectingText=_,Na(document,"mousemove",b),Na(document,"mouseup",_)}function Jt(e,t,r,n){try{var o=t.clientX,i=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Aa(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(i>s.bottom||!Oo(e,r))return wo(t);i-=s.top-a.viewOffset;for(var l=0;l<e.options.gutters.length;++l){var u=a.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=o){var c=no(e.doc,i),f=e.options.gutters[l];return Da(e,r,e,c,f,t),wo(t)}}}function $t(e,t){return Jt(e,t,"gutterClick",!0)}function er(e){var t=this;if(nr(t),
!Lo(t,e)&&!Kt(t.display,e)){Aa(e),_i&&(Xi=+new Date);var r=Yt(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var o=n.length,i=Array(o),a=0,s=function(e,n){if(!t.options.allowDropFileTypes||Do(t.options.allowDropFileTypes,e.type)!=-1){var s=new FileReader;s.onload=Et(t,function(){var e=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),i[n]=e,++a==o){r=me(t.doc,r);var l={from:r,to:r,text:t.doc.splitLines(i.join(t.doc.lineSeparator())),origin:"paste"};Mr(t.doc,l),Se(t.doc,pe(r,ta(l)))}}),s.readAsText(e)}},l=0;l<o;++l)s(n[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var i=e.dataTransfer.getData("Text");if(i){if(t.state.draggingText&&!t.state.draggingText.copy)var u=t.listSelections();if(Te(t.doc,pe(r,r)),u)for(var l=0;l<u.length;++l)Nr(t.doc,"",u[l].anchor,u[l].head,"drag");t.replaceSelection(i,"around","paste"),t.display.input.focus()}}catch(e){}}}}function tr(e,t){if(_i&&(!e.state.draggingText||+new Date-Xi<100))return void Ea(t);if(!Lo(e,t)&&!Kt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Ti)){var r=Go("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Mi&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),Mi&&r.parentNode.removeChild(r)}}function rr(e,t){var r=Yt(e,t);if(r){var n=document.createDocumentFragment();Fe(e,r,n),e.display.dragCursor||(e.display.dragCursor=Go("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Yo(e.display.dragCursor,n)}}function nr(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function or(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,yi||A(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),yi&&A(e),We(e,100))}function ir(e,t,r){(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,_(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function ar(e,t){var r=Ji(t),n=r.x,o=r.y,i=e.display,a=i.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(n&&s||o&&l){if(o&&Ni&&Ci)e:for(var u=t.target,c=i.view;u!=a;u=u.parentNode)for(var f=0;f<c.length;f++)if(c[f].node==u){e.display.currentWheelTarget=u;break e}if(n&&!yi&&!Mi&&null!=Qi)return o&&l&&or(e,Math.max(0,Math.min(a.scrollTop+o*Qi,a.scrollHeight-a.clientHeight))),ir(e,Math.max(0,Math.min(a.scrollLeft+n*Qi,a.scrollWidth-a.clientWidth))),(!o||o&&l)&&Aa(t),void(i.wheelStartX=null);if(o&&null!=Qi){var d=o*Qi,p=e.doc.scrollTop,h=p+i.wrapper.clientHeight;d<0?p=Math.max(0,p+d-50):h=Math.min(e.doc.height,h+d+50),A(e,{top:p,bottom:h})}Zi<20&&(null==i.wheelStartX?(i.wheelStartX=a.scrollLeft,i.wheelStartY=a.scrollTop,i.wheelDX=n,i.wheelDY=o,setTimeout(function(){if(null!=i.wheelStartX){var e=a.scrollLeft-i.wheelStartX,t=a.scrollTop-i.wheelStartY,r=t&&i.wheelDY&&t/i.wheelDY||e&&i.wheelDX&&e/i.wheelDX;i.wheelStartX=i.wheelStartY=null,r&&(Qi=(Qi*Zi+r)/(Zi+1),++Zi)}},200)):(i.wheelDX+=n,i.wheelDY+=o))}}function sr(e,t,r){if("string"==typeof t&&(t=da[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),o=t(e)!=Ia}finally{e.display.shift=n,e.state.suppressEdits=!1}return o}function lr(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var o=ha(t,e.state.keyMaps[n],r,e);if(o)return o}return e.options.extraKeys&&ha(t,e.options.extraKeys,r,e)||ha(t,e.options.keyMap,r,e)}function ur(e,t,r,n){var o=e.state.keySeq;if(o){if(ma(t))return"handled";$i.set(50,function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())}),t=o+" "+t}var i=lr(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Mo(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(Aa(r),Ie(e)),o&&!i&&/\'$/.test(t)?(Aa(r),!0):!!i}function cr(e,t){var r=ga(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?ur(e,"Shift-"+r,t,function(t){return sr(e,t,!0)})||ur(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return sr(e,t)}):ur(e,r,t,function(t){return sr(e,t)}))}function fr(e,t,r){return ur(e,"'"+r+"'",t,function(t){return sr(e,t,!0)})}function dr(e){var t=this;if(t.curOp.focus=qo(),!Lo(t,e)){_i&&wi<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=cr(t,e);Mi&&(ea=n?r:null,!n&&88==r&&!is&&(Ni?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||pr(t)}}function pr(e){function t(e){18!=e.keyCode&&e.altKey||($a(r,"CodeMirror-crosshair"),Pa(document,"keyup",t),Pa(document,"mouseover",t))}var r=e.display.lineDiv;es(r,"CodeMirror-crosshair"),Na(document,"keyup",t),Na(document,"mouseover",t)}function hr(e){16==e.keyCode&&(this.doc.sel.shift=!1),Lo(this,e)}function mr(e){var t=this;if(!(Kt(t.display,e)||Lo(t,e)||e.ctrlKey&&!e.altKey||Ni&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(Mi&&r==ea)return ea=null,void Aa(e);if(!Mi||e.which&&!(e.which<10)||!cr(t,e)){var o=String.fromCharCode(null==n?r:n);fr(t,e,o)||t.display.input.onKeyPress(e)}}}function gr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yr(e))},100)}function vr(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Da(e,"focus",e),e.state.focused=!0,es(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),Ci&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ie(e))}function yr(e){e.state.delayingBlurEvent||(e.state.focused&&(Da(e,"blur",e),e.state.focused=!1,$a(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function br(e,t){Kt(e.display,t)||xr(e,t)||Lo(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function xr(e,t){return!!Oo(e,"gutterContextMenu")&&Jt(e,t,"gutterContextMenu",!1)}function _r(e,t){if(Hi(e,t.from)<0)return e;if(Hi(e,t.to)<=0)return ta(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=ta(t).ch-t.to.ch),ji(r,n)}function wr(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];r.push(new fe(_r(o.anchor,t),_r(o.head,t)))}return de(r,e.sel.primIndex)}function Cr(e,t,r){return e.line==t.line?ji(r.line,e.ch-t.ch+r.ch):ji(r.line+(e.line-t.line),e.ch)}function kr(e,t,r){for(var n=[],o=ji(e.first,0),i=o,a=0;a<t.length;a++){var s=t[a],l=Cr(s.from,o,i),u=Cr(ta(s),o,i);if(o=s.to,i=u,"around"==r){var c=e.sel.ranges[a],f=Hi(c.head,c.anchor)<0;n[a]=new fe(f?u:l,f?l:u)}else n[a]=new fe(l,l)}return new ce(n,e.sel.primIndex)}function Sr(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return r&&(n.update=function(t,r,n,o){t&&(this.from=me(e,t)),r&&(this.to=me(e,r)),n&&(this.text=n),void 0!==o&&(this.origin=o)}),Da(e,"beforeChange",e,n),e.cm&&Da(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Mr(e,t,r){if(e.cm){if(!e.cm.curOp)return Et(e.cm,Mr)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(Oo(e,"beforeChange")||e.cm&&Oo(e.cm,"beforeChange"))||(t=Sr(e,t,!0))){var n=Ii&&!r&&un(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)Tr(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text});else Tr(e,t)}}function Tr(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Hi(t.from,t.to)){var r=wr(e,t);co(e,t,r,e.cm?e.cm.curOp.id:NaN),Or(e,t,r,an(e,t));var n=[];Zn(e,function(e,r){r||Do(n,e.history)!=-1||(_o(e.history,t),n.push(e.history)),Or(e,t,null,an(e,t))})}}function Lr(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,o=e.history,i=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,l=0;l<a.length&&(n=a[l],r?!n.ranges||n.equals(e.sel):n.ranges);l++);if(l!=a.length){for(o.lastOrigin=o.lastSelOrigin=null;n=a.pop(),n.ranges;){if(ho(n,s),r&&!n.equals(e.sel))return void Me(e,n,{clearRedo:!1});i=n}var u=[];ho(i,s),s.push({changes:u,generation:o.generation}),o.generation=n.generation||++o.maxGeneration;for(var c=Oo(e,"beforeChange")||e.cm&&Oo(e.cm,"beforeChange"),l=n.changes.length-1;l>=0;--l){var f=n.changes[l];if(f.origin=t,c&&!Sr(e,f,!1))return void(a.length=0);u.push(so(e,f));var d=l?wr(e,f):Po(a);Or(e,f,d,ln(e,f)),!l&&e.cm&&e.cm.scrollIntoView({from:f.from,to:ta(f)});var p=[];Zn(e,function(e,t){t||Do(p,e.history)!=-1||(_o(e.history,f),p.push(e.history)),Or(e,f,null,ln(e,f))})}}}}function Ar(e,t){if(0!=t&&(e.first+=t,e.sel=new ce(Fo(e.sel.ranges,function(e){return new fe(ji(e.anchor.line+t,e.anchor.ch),ji(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Ft(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Rt(e.cm,n,"gutter")}}function Or(e,t,r,n){if(e.cm&&!e.cm.curOp)return Et(e.cm,Or)(e,t,r,n);if(t.to.line<e.first)return void Ar(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);Ar(e,o),t={from:ji(e.first,0),to:ji(t.to.line+o,t.to.ch),text:[Po(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:ji(i,Jn(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=$n(e,t.from,t.to),r||(r=wr(e,t)),e.cm?Er(e.cm,t,n):Yn(e,t,n),Te(e,r,Wa)}}function Er(e,t,r){var n=e.doc,o=e.display,a=t.from,s=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=ro(bn(Jn(n,a.line))),n.iter(u,s.line+1,function(e){if(e==o.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Ao(e),Yn(n,t,r,i(e)),e.options.lineWrapping||(n.iter(u,a.line+t.text.length,function(e){var t=f(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),n.frontier=Math.min(n.frontier,a.line),We(e,400);var c=t.text.length-(s.line-a.line)-1;t.full?Ft(e):a.line!=s.line||1!=t.text.length||Kn(e.doc,t)?Ft(e,a.line,s.line+1,c):Rt(e,a.line,"text");var d=Oo(e,"changes"),p=Oo(e,"change");if(p||d){var h={from:a,to:s,text:t.text,removed:t.removed,origin:t.origin};p&&Mo(e,"change",e,h),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Nr(e,t,r,n,o){if(n||(n=r),Hi(n,r)<0){var i=n;n=r,r=i}"string"==typeof t&&(t=e.splitLines(t)),Mr(e,{from:r,to:n,text:t,origin:o})}function zr(e,t){if(!Lo(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),o=null;if(t.top+n.top<0?o=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Ai){var i=Go("div","​",null,"position: absolute; top: "+(t.top-r.viewOffset-Ue(e.display))+"px; height: "+(t.bottom-t.top+Ke(e)+r.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}function Pr(e,t,r,n){null==n&&(n=0);for(var o=0;o<5;o++){var i=!1,a=ht(e,t),s=r&&r!=t?ht(e,r):a,l=Fr(e,Math.min(a.left,s.left),Math.min(a.top,s.top)-n,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+n),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(or(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(i=!0)),null!=l.scrollLeft&&(ir(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(i=!0)),!i)break}return a}function Dr(e,t,r,n,o){var i=Fr(e,t,r,n,o);null!=i.scrollTop&&or(e,i.scrollTop),null!=i.scrollLeft&&ir(e,i.scrollLeft)}function Fr(e,t,r,n,o){var i=e.display,a=bt(e.display);r<0&&(r=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:i.scroller.scrollTop,l=qe(e),u={};o-r>l&&(o=r+l);var c=e.doc.height+Ve(i),f=r<a,d=o>c-a;if(r<s)u.scrollTop=f?0:r;else if(o>s+l){var p=Math.min(r,(d?c:o)-l);p!=s&&(u.scrollTop=p)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:i.scroller.scrollLeft,m=Ye(e)-(e.options.fixedGutter?i.gutters.offsetWidth:0),g=n-t>m;return g&&(n=t+m),t<10?u.scrollLeft=0:t<h?u.scrollLeft=Math.max(0,t-(g?0:10)):n>m+h-3&&(u.scrollLeft=n+(g?0:10)-m),u}function Rr(e,t,r){null==t&&null==r||Wr(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=r&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+r)}function Ir(e){Wr(e);var t=e.getCursor(),r=t,n=t;e.options.lineWrapping||(r=t.ch?ji(t.line,t.ch-1):t,n=ji(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:n,margin:e.options.cursorScrollMargin,isCursor:!0}}function Wr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=mt(e,t.from),n=mt(e,t.to),o=Fr(e,Math.min(r.left,n.left),Math.min(r.top,n.top)-t.margin,Math.max(r.right,n.right),Math.max(r.bottom,n.bottom)+t.margin);e.scrollTo(o.scrollLeft,o.scrollTop)}}function jr(e,t,r,n){var o,i=e.doc;null==r&&(r="add"),"smart"==r&&(i.mode.indent?o=Be(e,t):r="prev");var a=e.options.tabSize,s=Jn(i,t),l=Ba(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&(u=i.mode.indent(o,s.text.slice(c.length),s.text),u==Ia||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>i.first?Ba(Jn(i,t-1).text,null,a):0:"add"==r?u=l+e.options.indentUnit:"subtract"==r?u=l-e.options.indentUnit:"number"==typeof r&&(u=l+r),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/a);p;--p)d+=a,f+="\t";if(d<u&&(f+=zo(u-d)),f!=c)return Nr(i,f,ji(t,0),ji(t,c.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<i.sel.ranges.length;p++){var h=i.sel.ranges[p];if(h.head.line==t&&h.head.ch<c.length){var d=ji(t,c.length);we(i,p,new fe(d,d));break}}}function Hr(e,t,r,n){var o=t,i=t;return"number"==typeof t?i=Jn(e,he(e,t)):o=ro(t),null==o?null:(n(i,o)&&e.cm&&Rt(e.cm,o,r),i)}function Br(e,t){for(var r=e.doc.sel.ranges,n=[],o=0;o<r.length;o++){for(var i=t(r[o]);n.length&&Hi(i.from,Po(n).to)<=0;){var a=n.pop();if(Hi(a.from,i.from)<0){i.from=a.from;break}}n.push(i)}Ot(e,function(){for(var t=n.length-1;t>=0;t--)Nr(e.doc,"",n[t].from,n[t].to,"+delete");Ir(e)})}function Ur(e,t,r,n,o){function i(){var t=s+r;return!(t<e.first||t>=e.first+e.size)&&(s=t,c=Jn(e,t))}function a(e){var t=(o?hi:mi)(c,l,r,!0);if(null==t){if(e||!i())return!1;l=o?(r<0?si:ai)(c):r<0?c.text.length:0}else l=t;return!0}var s=t.line,l=t.ch,u=r,c=Jn(e,s);if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var f=null,d="group"==n,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(r<0)||a(!h);h=!1){var m=c.text.charAt(l)||"\n",g=Bo(m,p)?"w":d&&"\n"==m?"n":!d||/\s/.test(m)?null:"p";if(!d||h||g||(g="s"),f&&f!=g){r<0&&(r=1,a());break}if(g&&(f=g),r>0&&!a(!h))break}var v=Ne(e,ji(s,l),t,u,!0);return Hi(t,v)||(v.hitSide=!0),v}function Vr(e,t,r,n){var o,i=e.doc,a=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);o=t.top+r*(s-(r<0?1.5:.5)*bt(e.display))}else"line"==n&&(o=r>0?t.bottom+3:t.top-3);for(;;){var l=vt(e,a,o);if(!l.outside)break;if(r<0?o<=0:o>=i.height){l.hitSide=!0;break}o+=5*r}return l}function Gr(t,r,n,o){e.defaults[t]=r,n&&(na[t]=o?function(e,t,r){r!=oa&&n(e,t,r)}:n)}function Kr(e){for(var t,r,n,o,i=e.split(/-(?!$)/),e=i[i.length-1],a=0;a<i.length-1;a++){var s=i[a];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Yr(e){return"string"==typeof e?pa[e]:e}function qr(e,t,r,n,o){if(n&&n.shared)return Xr(e,t,r,n,o);if(e.cm&&!e.cm.curOp)return Et(e.cm,qr)(e,t,r,n,o);var i=new ba(e,o),a=Hi(t,r);if(n&&jo(n,i,!1),a>0||0==a&&i.clearWhenEmpty!==!1)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=Go("span",[i.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(yn(e,t.line,t,r,i)||t.line!=r.line&&yn(e,r.line,t,r,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Wi=!0}i.addToHistory&&co(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,r.line+1,function(e){u&&i.collapsed&&!u.options.lineWrapping&&bn(e)==u.display.maxLine&&(s=!0),i.collapsed&&l!=t.line&&to(e,0),rn(e,new $r(i,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),i.collapsed&&e.iter(t.line,r.line+1,function(t){Cn(e,t)&&to(t,0)}),i.clearOnEnter&&Na(i,"beforeCursorEnter",function(){i.clear()}),i.readOnly&&(Ii=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++ya,i.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),i.collapsed)Ft(u,t.line,r.line+1);else if(i.className||i.title||i.startStyle||i.endStyle||i.css)for(var c=t.line;c<=r.line;c++)Rt(u,c,"text");i.atomic&&Ae(u.doc),Mo(u,"markerAdded",u,i)}return i}function Xr(e,t,r,n,o){n=jo(n),n.shared=!1;var i=[qr(e,t,r,n,o)],a=i[0],s=n.widgetNode;return Zn(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),i.push(qr(e,me(e,t),me(e,r),n,o));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=Po(i)}),new xa(i,a)}function Zr(e){return e.findMarks(ji(e.first,0),e.clipPos(ji(e.lastLine())),function(e){return e.parent})}function Qr(e,t){for(var r=0;r<t.length;r++){var n=t[r],o=n.find(),i=e.clipPos(o.from),a=e.clipPos(o.to);if(Hi(i,a)){var s=qr(e,i,a,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function Jr(e){for(var t=0;t<e.length;t++){var r=e[t],n=[r.primary.doc];Zn(r.primary.doc,function(e){n.push(e)});for(var o=0;o<r.markers.length;o++){var i=r.markers[o];Do(n,i.doc)==-1&&(i.parent=null,r.markers.splice(o--,1))}}}function $r(e,t,r){this.marker=e,this.from=t,this.to=r}function en(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function tn(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function rn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function nn(e,t,r){if(e)for(var n,o=0;o<e.length;++o){var i=e[o],a=i.marker,s=null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t);if(s||i.from==t&&"bookmark"==a.type&&(!r||!i.marker.insertLeft)){var l=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);(n||(n=[])).push(new $r(a,i.from,l?null:i.to))}}return n}function on(e,t,r){if(e)for(var n,o=0;o<e.length;++o){var i=e[o],a=i.marker,s=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);if(s||i.from==t&&"bookmark"==a.type&&(!r||i.marker.insertLeft)){var l=null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t);(n||(n=[])).push(new $r(a,l?null:i.from-t,null==i.to?null:i.to-t))}}return n}function an(e,t){if(t.full)return null;var r=ve(e,t.from.line)&&Jn(e,t.from.line).markedSpans,n=ve(e,t.to.line)&&Jn(e,t.to.line).markedSpans;if(!r&&!n)return null;var o=t.from.ch,i=t.to.ch,a=0==Hi(t.from,t.to),s=nn(r,o,a),l=on(n,i,a),u=1==t.text.length,c=Po(t.text).length+(u?o:0);if(s)for(var f=0;f<s.length;++f){var d=s[f];if(null==d.to){var p=en(l,d.marker);p?u&&(d.to=null==p.to?null:p.to+c):d.to=o}}if(l)for(var f=0;f<l.length;++f){var d=l[f];if(null!=d.to&&(d.to+=c),null==d.from){var p=en(s,d.marker);p||(d.from=c,u&&(s||(s=[])).push(d))}else d.from+=c,u&&(s||(s=[])).push(d)}s&&(s=sn(s)),l&&l!=s&&(l=sn(l));var h=[s];if(!u){var m,g=t.text.length-2;if(g>0&&s)for(var f=0;f<s.length;++f)null==s[f].to&&(m||(m=[])).push(new $r(s[f].marker,null,null));for(var f=0;f<g;++f)h.push(m);h.push(l)}return h}function sn(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function ln(e,t){var r=vo(e,t),n=an(e,t);if(!r)return n;if(!n)return r;for(var o=0;o<r.length;++o){var i=r[o],a=n[o];if(i&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],u=0;u<i.length;++u)if(i[u].marker==l.marker)continue e;i.push(l)}else a&&(r[o]=a)}return r}function un(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&Do(n,r)!=-1||(n||(n=[])).push(r)}}),!n)return null;for(var o=[{from:t,to:r}],i=0;i<n.length;++i)for(var a=n[i],s=a.find(0),l=0;l<o.length;++l){var u=o[l];if(!(Hi(u.to,s.from)<0||Hi(u.from,s.to)>0)){var c=[l,1],f=Hi(u.from,s.from),d=Hi(u.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),o.splice.apply(o,c),l+=c.length-1}}return o}function cn(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function fn(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function dn(e){return e.inclusiveLeft?-1:0}function pn(e){return e.inclusiveRight?1:0}function hn(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),o=t.find(),i=Hi(n.from,o.from)||dn(e)-dn(t);if(i)return-i;var a=Hi(n.to,o.to)||pn(e)-pn(t);return a?a:t.id-e.id}function mn(e,t){var r,n=Wi&&e.markedSpans;if(n)for(var o,i=0;i<n.length;++i)o=n[i],o.marker.collapsed&&null==(t?o.from:o.to)&&(!r||hn(r,o.marker)<0)&&(r=o.marker);return r}function gn(e){return mn(e,!0)}function vn(e){return mn(e,!1)}function yn(e,t,r,n,o){var i=Jn(e,t),a=Wi&&i.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var u=l.marker.find(0),c=Hi(u.from,r)||dn(l.marker)-dn(o),f=Hi(u.to,n)||pn(l.marker)-pn(o);if(!(c>=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?Hi(u.to,r)>=0:Hi(u.to,r)>0)||c>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?Hi(u.from,n)<=0:Hi(u.from,n)<0)))return!0}}}function bn(e){for(var t;t=gn(e);)e=t.find(-1,!0).line;return e}function xn(e){for(var t,r;t=vn(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function _n(e,t){var r=Jn(e,t),n=bn(r);return r==n?t:ro(n)}function wn(e,t){if(t>e.lastLine())return t;var r,n=Jn(e,t);if(!Cn(e,n))return t;for(;r=vn(n);)n=r.find(1,!0).line;return ro(n)+1}function Cn(e,t){var r=Wi&&t.markedSpans;if(r)for(var n,o=0;o<r.length;++o)if(n=r[o],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&kn(e,t,n))return!0}}function kn(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return kn(e,n.line,en(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var o,i=0;i<t.markedSpans.length;++i)if(o=t.markedSpans[i],o.marker.collapsed&&!o.marker.widgetNode&&o.from==r.to&&(null==o.to||o.to!=r.from)&&(o.marker.inclusiveLeft||r.marker.inclusiveRight)&&kn(e,t,o))return!0}function Sn(e,t,r){oo(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Rr(e,null,r)}function Mn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Za(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),Yo(t.display.measure,Go("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Tn(e,t,r,n){var o=new _a(e,r,n),i=e.cm;return i&&o.noHScroll&&(i.display.alignWidgets=!0),Hr(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==o.insertAt?r.push(o):r.splice(Math.min(r.length-1,Math.max(0,o.insertAt)),0,o),o.line=t,i&&!Cn(e,t)){var n=oo(t)<e.scrollTop;to(t,t.height+Mn(o)),n&&Rr(i,null,o.height),i.curOp.forceUpdate=!0}return!0}),o}function Ln(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),cn(e),fn(e,r);var o=n?n(e):1;o!=e.height&&to(e,o)}function An(e){e.parent=null,cn(e)}function On(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function En(t,r){if(t.blankLine)return t.blankLine(r);if(t.innerMode){var n=e.innerMode(t,r);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Nn(t,r,n,o){for(var i=0;i<10;i++){o&&(o[0]=e.innerMode(t,n).mode);var a=t.token(r,n);if(r.pos>r.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function zn(e,t,r,n){function o(e){return{start:f.start,end:f.pos,string:f.current(),type:i||null,state:e?ca(a.mode,c):c}}var i,a=e.doc,s=a.mode;t=me(a,t);var l,u=Jn(a,t.line),c=Be(e,t.line,r),f=new va(u.text,e.options.tabSize);for(n&&(l=[]);(n||f.pos<t.ch)&&!f.eol();)f.start=f.pos,i=Nn(s,f,c),n&&l.push(o(!0));return n?l:o()}function Pn(e,t,r,n,o,i,a){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,u=0,c=null,f=new va(t,e.options.tabSize),d=e.options.addModeClass&&[null];for(""==t&&On(En(r,n),i);!f.eol();){if(f.pos>e.options.maxHighlightLength?(s=!1,a&&Rn(e,t,n,f.pos),f.pos=t.length,l=null):l=On(Nn(r,f,n,d),i),d){var p=d[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||c!=l){for(;u<f.start;)u=Math.min(f.start,u+5e4),o(u,c);c=l}f.start=f.pos}for(;u<f.pos;){var h=Math.min(f.pos,u+5e4);o(h,c),u=h}}function Dn(e,t,r,n){var o=[e.state.modeGen],i={};Pn(e,t.text,e.doc.mode,r,function(e,t){o.push(e,t)},i,n);for(var a=0;a<e.state.overlays.length;++a){var s=e.state.overlays[a],l=1,u=0;Pn(e,t.text,s.mode,!0,function(e,t){for(var r=l;u<e;){var n=o[l];n>e&&o.splice(l,1,e,o[l+1],n),l+=2,u=Math.min(e,n)}if(t)if(s.opaque)o.splice(r,l-r,e,"cm-overlay "+t),l=r+2;else for(;r<l;r+=2){var i=o[r+1];o[r+1]=(i?i+" ":"")+"cm-overlay "+t}},i)}return{styles:o,classes:i.bgClass||i.textClass?i:null}}function Fn(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Be(e,ro(t)),o=Dn(e,t,t.text.length>e.options.maxHighlightLength?ca(e.doc.mode,n):n);t.stateAfter=n,t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.frontier&&e.doc.frontier++}return t.styles}function Rn(e,t,r,n){var o=e.doc.mode,i=new va(t,e.options.tabSize);for(i.start=i.pos=n||0,""==t&&En(o,r);!i.eol();)Nn(o,i,r),i.start=i.pos}function In(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?ka:Ca;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Wn(e,t){var r=Go("span",null,null,Ci?"padding-right: .1px":null),n={pre:Go("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(_i||Ci)&&e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i,a=o?t.rest[o-1]:t.line;n.pos=0,n.addToken=Hn,ti(e.display.measure)&&(i=io(a))&&(n.addToken=Un(n.addToken,i)),n.map=[];var s=t!=e.display.externalMeasured&&ro(a);Gn(a,n,Fn(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=Zo(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=Zo(a.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(ei(e.display.measure))),0==o?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Ci){var l=n.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Da(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Zo(n.pre.className,n.textClass||"")),n}function jn(e){var t=Go("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Hn(e,t,r,n,o,i,a){if(t){var s=e.splitSpaces?Bn(t,e.trailingSpace):t,l=e.cm.state.specialChars,u=!1;if(l.test(t))for(var c=document.createDocumentFragment(),f=0;;){l.lastIndex=f;var d=l.exec(t),p=d?d.index-f:t.length-f;if(p){var h=document.createTextNode(s.slice(f,f+p));_i&&wi<9?c.appendChild(Go("span",[h])):c.appendChild(h),e.map.push(e.pos,e.pos+p,h),e.col+=p,e.pos+=p}if(!d)break;if(f+=p+1,"\t"==d[0]){var m=e.cm.options.tabSize,g=m-e.col%m,h=c.appendChild(Go("span",zo(g),"cm-tab"));h.setAttribute("role","presentation"),h.setAttribute("cm-text","\t"),e.col+=g}else if("\r"==d[0]||"\n"==d[0]){var h=c.appendChild(Go("span","\r"==d[0]?"␍":"␤","cm-invalidchar"));h.setAttribute("cm-text",d[0]),e.col+=1}else{var h=e.cm.options.specialCharPlaceholder(d[0]);h.setAttribute("cm-text",d[0]),_i&&wi<9?c.appendChild(Go("span",[h])):c.appendChild(h),e.col+=1}e.map.push(e.pos,e.pos+1,h),e.pos++}else{e.col+=t.length;var c=document.createTextNode(s);e.map.push(e.pos,e.pos+t.length,c),_i&&wi<9&&(u=!0),e.pos+=t.length}if(e.trailingSpace=32==s.charCodeAt(t.length-1),r||n||o||u||a){var v=r||"";n&&(v+=n),o&&(v+=o);var y=Go("span",[c],v,a);return i&&(y.title=i),e.content.appendChild(y)}e.content.appendChild(c)}}function Bn(e,t){if(e.length>1&&!/  /.test(e))return e;for(var r=t,n="",o=0;o<e.length;o++){var i=e.charAt(o);" "!=i||!r||o!=e.length-1&&32!=e.charCodeAt(o+1)||(i=" "),n+=i,r=" "==i}return n}function Un(e,t){return function(r,n,o,i,a,s,l){o=o?o+" cm-force-border":"cm-force-border";for(var u=r.pos,c=u+n.length;;){for(var f=0;f<t.length;f++){var d=t[f];if(d.to>u&&d.from<=u)break}if(d.to>=c)return e(r,n,o,i,a,s,l);e(r,n.slice(0,d.to-u),o,i,null,s,l),i=null,n=n.slice(d.to-u),u=d.to}}}function Vn(e,t,r,n){var o=!n&&r.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!n&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",r.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function Gn(e,t,r){var n=e.markedSpans,o=e.text,i=0;if(n)for(var a,s,l,u,c,f,d,p=o.length,h=0,m=1,g="",v=0;;){if(v==h){l=u=c=f=s="",d=null,v=1/0;for(var y,b=[],x=0;x<n.length;++x){var _=n[x],w=_.marker;"bookmark"==w.type&&_.from==h&&w.widgetNode?b.push(w):_.from<=h&&(null==_.to||_.to>h||w.collapsed&&_.to==h&&_.from==h)?(null!=_.to&&_.to!=h&&v>_.to&&(v=_.to,u=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&_.from==h&&(c+=" "+w.startStyle),w.endStyle&&_.to==v&&(y||(y=[])).push(w.endStyle,_.to),w.title&&!f&&(f=w.title),w.collapsed&&(!d||hn(d.marker,w)<0)&&(d=_)):_.from>h&&v>_.from&&(v=_.from)}if(y)for(var x=0;x<y.length;x+=2)y[x+1]==v&&(u+=" "+y[x]);if(!d||d.from==h)for(var x=0;x<b.length;++x)Vn(t,0,b[x]);if(d&&(d.from||0)==h){if(Vn(t,(null==d.to?p+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}}if(h>=p)break;for(var C=Math.min(p,v);;){if(g){var k=h+g.length;if(!d){var S=k>C?g.slice(0,C-h):g;t.addToken(t,S,a?a+l:l,c,h+S.length==v?u:"",f,s)}if(k>=C){g=g.slice(C-h),h=C;break}h=k,c=""}g=o.slice(i,i=r[m++]),a=In(r[m++],t.cm.options)}}else for(var m=1;m<r.length;m+=2)t.addToken(t,o.slice(i,i=r[m]),In(r[m+1],t.cm.options))}function Kn(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Po(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Yn(e,t,r,n){function o(e){return r?r[e]:null}function i(e,r,o){Ln(e,r,o,n),Mo(e,"change",e,t)}function a(e,t){for(var r=e,i=[];r<t;++r)i.push(new wa(u[r],o(r),n));return i}var s=t.from,l=t.to,u=t.text,c=Jn(e,s.line),f=Jn(e,l.line),d=Po(u),p=o(u.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Kn(e,t)){var m=a(0,u.length-1);i(f,f.text,p),h&&e.remove(s.line,h),m.length&&e.insert(s.line,m)}else if(c==f)if(1==u.length)i(c,c.text.slice(0,s.ch)+d+c.text.slice(l.ch),p);else{var m=a(1,u.length-1);m.push(new wa(d+c.text.slice(l.ch),p,n)),i(c,c.text.slice(0,s.ch)+u[0],o(0)),e.insert(s.line+1,m)}else if(1==u.length)i(c,c.text.slice(0,s.ch)+u[0]+f.text.slice(l.ch),o(0)),e.remove(s.line+1,h);else{i(c,c.text.slice(0,s.ch)+u[0],o(0)),i(f,d+f.text.slice(l.ch),p);var m=a(1,u.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,m)}Mo(e,"change",e,t)}function qn(e){this.lines=e,this.parent=null;for(var t=0,r=0;t<e.length;++t)e[t].parent=this,r+=e[t].height;this.height=r}function Xn(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){
var o=e[n];t+=o.chunkSize(),r+=o.height,o.parent=this}this.size=t,this.height=r,this.parent=null}function Zn(e,t,r){function n(e,o,i){if(e.linked)for(var a=0;a<e.linked.length;++a){var s=e.linked[a];if(s.doc!=o){var l=i&&s.sharedHist;r&&!l||(t(s.doc,l),n(s.doc,e,l))}}}n(e,null,!0)}function Qn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,a(e),r(e),e.options.lineWrapping||d(e),e.options.mode=t.modeOption,Ft(e)}function Jn(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var o=r.children[n],i=o.chunkSize();if(t<i){r=o;break}t-=i}return r.lines[t]}function $n(e,t,r){var n=[],o=t.line;return e.iter(t.line,r.line+1,function(e){var i=e.text;o==r.line&&(i=i.slice(0,r.ch)),o==t.line&&(i=i.slice(t.ch)),n.push(i),++o}),n}function eo(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function to(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function ro(e){if(null==e.parent)return null;for(var t=e.parent,r=Do(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var o=0;n.children[o]!=t;++o)r+=n.children[o].chunkSize();return r+t.first}function no(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var o=e.children[n],i=o.height;if(t<i){e=o;continue e}t-=i,r+=o.chunkSize()}return r}while(!e.lines);for(var n=0;n<e.lines.length;++n){var a=e.lines[n],s=a.height;if(t<s)break;t-=s}return r+n}function oo(e){e=bn(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var o=r.lines[n];if(o==e)break;t+=o.height}for(var i=r.parent;i;r=i,i=r.parent)for(var n=0;n<i.children.length;++n){var a=i.children[n];if(a==r)break;t+=a.height}return t}function io(e){var t=e.order;return null==t&&(t=e.order=us(e.text)),t}function ao(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function so(e,t){var r={from:Y(t.from),to:ta(t),text:$n(e,t.from,t.to)};return mo(e,r,t.from.line,t.to.line+1),Zn(e,function(e){mo(e,r,t.from.line,t.to.line+1)},!0),r}function lo(e){for(;e.length;){var t=Po(e);if(!t.ranges)break;e.pop()}}function uo(e,t){return t?(lo(e.done),Po(e.done)):e.done.length&&!Po(e.done).ranges?Po(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Po(e.done)):void 0}function co(e,t,r,n){var o=e.history;o.undone.length=0;var i,a=+new Date;if((o.lastOp==n||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&o.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(i=uo(o,o.lastOp==n))){var s=Po(i.changes);0==Hi(t.from,t.to)&&0==Hi(t.from,s.to)?s.to=ta(t):i.changes.push(so(e,t))}else{var l=Po(o.done);for(l&&l.ranges||ho(e.sel,o.done),i={changes:[so(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(r),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=a,o.lastOp=o.lastSelOp=n,o.lastOrigin=o.lastSelOrigin=t.origin,s||Da(e,"historyAdded")}function fo(e,t,r,n){var o=t.charAt(0);return"*"==o||"+"==o&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function po(e,t,r,n){var o=e.history,i=n&&n.origin;r==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||fo(e,i,Po(o.done),t))?o.done[o.done.length-1]=t:ho(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=r,n&&n.clearRedo!==!1&&lo(o.undone)}function ho(e,t){var r=Po(t);r&&r.ranges&&r.equals(e)||t.push(e)}function mo(e,t,r,n){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=r.markedSpans),++i})}function go(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function vo(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=0,o=[];n<t.text.length;++n)o.push(go(r[n]));return o}function yo(e,t,r){for(var n=0,o=[];n<e.length;++n){var i=e[n];if(i.ranges)o.push(r?ce.prototype.deepCopy.call(i):i);else{var a=i.changes,s=[];o.push({changes:s});for(var l=0;l<a.length;++l){var u,c=a[l];if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var f in c)(u=f.match(/^spans_(\d+)$/))&&Do(t,Number(u[1]))>-1&&(Po(s)[f]=c[f],delete c[f])}}}return o}function bo(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function xo(e,t,r,n){for(var o=0;o<e.length;++o){var i=e[o],a=!0;if(i.ranges){i.copied||(i=e[o]=i.deepCopy(),i.copied=!0);for(var s=0;s<i.ranges.length;s++)bo(i.ranges[s].anchor,t,r,n),bo(i.ranges[s].head,t,r,n)}else{for(var s=0;s<i.changes.length;++s){var l=i.changes[s];if(r<l.from.line)l.from=ji(l.from.line+n,l.from.ch),l.to=ji(l.to.line+n,l.to.ch);else if(t<=l.to.line){a=!1;break}}a||(e.splice(0,o+1),o=0)}}}function _o(e,t){var r=t.from.line,n=t.to.line,o=t.text.length-(n-r)-1;xo(e.done,r,n,o),xo(e.undone,r,n,o)}function wo(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Co(e){return e.target||e.srcElement}function ko(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Ni&&e.ctrlKey&&1==t&&(t=3),t}function So(e,t,r){var n=e._handlers&&e._handlers[t];return r?n&&n.length>0?n.slice():za:n||za}function Mo(e,t){function r(e){return function(){e.apply(null,i)}}var n=So(e,t,!1);if(n.length){var o,i=Array.prototype.slice.call(arguments,2);Yi?o=Yi.delayedCallbacks:Fa?o=Fa:(o=Fa=[],setTimeout(To,0));for(var a=0;a<n.length;++a)o.push(r(n[a]))}}function To(){var e=Fa;Fa=null;for(var t=0;t<e.length;++t)e[t]()}function Lo(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Da(e,r||t.type,e,t),wo(t)||t.codemirrorIgnore}function Ao(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)Do(r,t[n])==-1&&r.push(t[n])}function Oo(e,t){return So(e,t).length>0}function Eo(e){e.prototype.on=function(e,t){Na(this,e,t)},e.prototype.off=function(e,t){Pa(this,e,t)}}function No(){this.id=null}function zo(e){for(;Va.length<=e;)Va.push(Po(Va)+" ");return Va[e]}function Po(e){return e[e.length-1]}function Do(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function Fo(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Ro(e,t,r){for(var n=0,o=r(t);n<e.length&&r(e[n])<=o;)n++;e.splice(n,0,t)}function Io(){}function Wo(e,t){var r;return Object.create?r=Object.create(e):(Io.prototype=e,r=new Io),t&&jo(t,r),r}function jo(e,t,r){t||(t={});for(var n in e)!e.hasOwnProperty(n)||r===!1&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function Ho(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Bo(e,t){return t?!!(t.source.indexOf("\\w")>-1&&qa(e))||t.test(e):qa(e)}function Uo(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Vo(e){return e.charCodeAt(0)>=768&&Xa.test(e)}function Go(e,t,r,n){var o=document.createElement(e);if(r&&(o.className=r),n&&(o.style.cssText=n),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)o.appendChild(t[i]);return o}function Ko(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Yo(e,t){return Ko(e).appendChild(t)}function qo(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Xo(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Zo(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!Xo(r[n]).test(t)&&(t+=" "+r[n]);return t}function Qo(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}function Jo(){ts||($o(),ts=!0)}function $o(){var e;Na(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Qo(Gt)},100))}),Na(window,"blur",function(){Qo(yr)})}function ei(e){if(null==Qa){var t=Go("span","​");Yo(e,Go("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Qa=t.offsetWidth<=1&&t.offsetHeight>2&&!(_i&&wi<8))}var r=Qa?Go("span","​"):Go("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function ti(e){if(null!=Ja)return Ja;var t=Yo(e,document.createTextNode("AخA")),r=Ka(t,0,1).getBoundingClientRect(),n=Ka(t,1,2).getBoundingClientRect();return Ko(e),!(!r||r.left==r.right)&&(Ja=n.right-r.right<3)}function ri(e){if(null!=as)return as;var t=Yo(e,Go("span","x")),r=t.getBoundingClientRect(),n=Ka(t,0,1).getBoundingClientRect();return as=Math.abs(r.left-n.left)>1}function ni(e,t,r,n){if(!e)return n(t,r,"ltr");for(var o=!1,i=0;i<e.length;++i){var a=e[i];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr"),o=!0)}o||n(t,r,"ltr")}function oi(e){return e.level%2?e.to:e.from}function ii(e){return e.level%2?e.from:e.to}function ai(e){var t=io(e);return t?oi(t[0]):0}function si(e){var t=io(e);return t?ii(Po(t)):e.text.length}function li(e,t){var r=Jn(e.doc,t),n=bn(r);n!=r&&(t=ro(n));var o=io(n),i=o?o[0].level%2?si(n):ai(n):0;return ji(t,i)}function ui(e,t){for(var r,n=Jn(e.doc,t);r=vn(n);)n=r.find(1,!0).line,t=null;var o=io(n),i=o?o[0].level%2?ai(n):si(n):n.text.length;return ji(null==t?ro(n):t,i)}function ci(e,t){var r=li(e,t.line),n=Jn(e.doc,r.line),o=io(n);if(!o||0==o[0].level){var i=Math.max(0,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=i&&t.ch;return ji(r.line,a?0:i)}return r}function fi(e,t,r){var n=e[0].level;return t==n||r!=n&&t<r}function di(e,t){ls=null;for(var r,n=0;n<e.length;++n){var o=e[n];if(o.from<t&&o.to>t)return n;if(o.from==t||o.to==t){if(null!=r)return fi(e,o.level,e[r].level)?(o.from!=o.to&&(ls=r),n):(o.from!=o.to&&(ls=n),r);r=n}}return r}function pi(e,t,r,n){if(!n)return t+r;do t+=r;while(t>0&&Vo(e.text.charAt(t)));return t}function hi(e,t,r,n){var o=io(e);if(!o)return mi(e,t,r,n);for(var i=di(o,t),a=o[i],s=pi(e,t,a.level%2?-r:r,n);;){if(s>a.from&&s<a.to)return s;if(s==a.from||s==a.to)return di(o,s)==i?s:(a=o[i+=r],r>0==a.level%2?a.to:a.from);if(a=o[i+=r],!a)return null;s=r>0==a.level%2?pi(e,a.to,-1,n):pi(e,a.from,1,n)}}function mi(e,t,r,n){var o=t+r;if(n)for(;o>0&&Vo(e.text.charAt(o));)o+=r;return o<0||o>e.text.length?null:o}var gi=navigator.userAgent,vi=navigator.platform,yi=/gecko\/\d/i.test(gi),bi=/MSIE \d/.test(gi),xi=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(gi),_i=bi||xi,wi=_i&&(bi?document.documentMode||6:xi[1]),Ci=/WebKit\//.test(gi),ki=Ci&&/Qt\/\d+\.\d+/.test(gi),Si=/Chrome\//.test(gi),Mi=/Opera\//.test(gi),Ti=/Apple Computer/.test(navigator.vendor),Li=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(gi),Ai=/PhantomJS/.test(gi),Oi=/AppleWebKit/.test(gi)&&/Mobile\/\w+/.test(gi),Ei=Oi||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(gi),Ni=Oi||/Mac/.test(vi),zi=/\bCrOS\b/.test(gi),Pi=/win/i.test(vi),Di=Mi&&gi.match(/Version\/(\d*\.\d*)/);Di&&(Di=Number(Di[1])),Di&&Di>=15&&(Mi=!1,Ci=!0);var Fi=Ni&&(ki||Mi&&(null==Di||Di<12.11)),Ri=yi||_i&&wi>=9,Ii=!1,Wi=!1;m.prototype=jo({update:function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var o=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+i+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=Ni&&!Li?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new No,this.disableVert=new No},enableZeroWidthBar:function(e,t){function r(){var n=e.getBoundingClientRect(),o=document.elementFromPoint(n.left+1,n.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},m.prototype),g.prototype=jo({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},g.prototype),e.scrollbarModel={"native":m,"null":g},S.prototype.signal=function(e,t){Oo(e,t)&&this.events.push(arguments)},S.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Da.apply(null,this.events[e])};var ji=e.Pos=function(e,t){return this instanceof ji?(this.line=e,void(this.ch=t)):new ji(e,t)},Hi=e.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch},Bi=null;re.prototype=jo({init:function(e){function t(e){if(!Lo(n,e)){if(n.somethingSelected())Bi={lineWise:!1,text:n.getSelections()},r.inaccurateSelection&&(r.prevInput="",r.inaccurateSelection=!1,i.value=Bi.text.join("\n"),Ga(i));else{if(!n.options.lineWiseCopyCut)return;var t=ee(n);Bi={lineWise:!0,text:t.text},"cut"==e.type?n.setSelections(t.ranges,null,Wa):(r.prevInput="",i.value=t.text.join("\n"),Ga(i))}"cut"==e.type&&(n.state.cutIncoming=!0)}}var r=this,n=this.cm,o=this.wrapper=ne(),i=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),Oi&&(i.style.width="0px"),Na(i,"input",function(){_i&&wi>=9&&r.hasSelection&&(r.hasSelection=null),r.poll()}),Na(i,"paste",function(e){Lo(n,e)||J(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),Na(i,"cut",t),Na(i,"copy",t),Na(e.scroller,"paste",function(t){Kt(e,t)||Lo(n,t)||(n.state.pasteIncoming=!0,r.focus())}),Na(e.lineSpace,"selectstart",function(t){Kt(e,t)||Aa(t)}),Na(i,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Na(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,r=e.doc,n=De(e);if(e.options.moveInputWithCursor){var o=ht(e,r.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return n},showSelection:function(e){var t=this.cm,r=t.display;Yo(r.cursorDiv,e.cursors),Yo(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,r,n=this.cm,o=n.doc;if(n.somethingSelected()){this.prevInput="";var i=o.sel.primary();t=is&&(i.to().line-i.from().line>100||(r=n.getSelection()).length>1e3);var a=t?"-":r||n.getSelection();this.textarea.value=a,n.state.focused&&Ga(this.textarea),_i&&wi>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",_i&&wi>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Ei||qo()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var n=r.poll();n||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||os(t)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var n=t.value;if(n==r&&!e.somethingSelected())return!1;if(_i&&wi>=9&&this.hasSelection===n||Ni&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=n.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var i=0,a=Math.min(r.length,n.length);i<a&&r.charCodeAt(i)==n.charCodeAt(i);)++i;var s=this;return Ot(e,function(){Q(e,n.slice(i),r.length-i,null,s.composing?"*compose":null),n.length>1e3||n.indexOf("\n")>-1?t.value=s.prevInput="":s.prevInput=n,s.composing&&(s.composing.range.clear(),s.composing.range=e.markText(s.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){_i&&wi>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=o.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,n.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,i.selForContextMenu=o.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=f,a.style.cssText=c,_i&&wi<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=l),null!=a.selectionStart){(!_i||_i&&wi<9)&&t();var e=0,r=function(){i.selForContextMenu==o.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==n.prevInput?Et(o,da.selectAll)(o):e++<10?i.detectingSelectAll=setTimeout(r,500):i.input.reset()};i.detectingSelectAll=setTimeout(r,200)}}var n=this,o=n.cm,i=o.display,a=n.textarea,s=Yt(o,e),l=i.scroller.scrollTop;if(s&&!Mi){var u=o.options.resetSelectionOnContextMenu;u&&o.doc.sel.contains(s)==-1&&Et(o,Me)(o.doc,pe(s),Wa);var c=a.style.cssText,f=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var d=n.wrapper.getBoundingClientRect();if(a.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-d.top-5)+"px; left: "+(e.clientX-d.left-5)+"px; z-index: 1000; background: "+(_i?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",Ci)var p=window.scrollY;if(i.input.focus(),Ci&&window.scrollTo(null,p),i.input.reset(),o.somethingSelected()||(a.value=n.prevInput=" "),n.contextMenuPending=!0,i.selForContextMenu=o.doc.sel,clearTimeout(i.detectingSelectAll),_i&&wi>=9&&t(),Ri){Ea(e);var h=function(){Pa(window,"mouseup",h),setTimeout(r,20)};Na(window,"mouseup",h)}else setTimeout(r,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Io,needsContentAttribute:!1},re.prototype),oe.prototype=jo({init:function(e){function t(e){if(!Lo(n,e)){if(n.somethingSelected())Bi={lineWise:!1,text:n.getSelections()},"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=ee(n);Bi={lineWise:!0,text:t.text},"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,Wa),n.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var i=Bi.text.join("\n");if(e.clipboardData.setData("Text",i),e.clipboardData.getData("Text")==i)return void e.preventDefault()}var a=ne(),s=a.firstChild;n.display.lineSpace.insertBefore(a,n.display.lineSpace.firstChild),s.value=Bi.text.join("\n");var l=document.activeElement;Ga(s),setTimeout(function(){n.display.lineSpace.removeChild(a),l.focus(),l==o&&r.showPrimarySelection()},50)}}var r=this,n=r.cm,o=r.div=e.lineDiv;te(o,n.options.spellcheck),Na(o,"paste",function(e){Lo(n,e)||J(e,n)||wi<=11&&setTimeout(Et(n,function(){r.pollContent()||Ft(n)}),20)}),Na(o,"compositionstart",function(e){var t=e.data;if(r.composing={sel:n.doc.sel,data:t,startData:t},t){var o=n.doc.sel.primary(),i=n.getLine(o.head.line),a=i.indexOf(t,Math.max(0,o.head.ch-t.length));a>-1&&a<=o.head.ch&&(r.composing.sel=pe(ji(o.head.line,a),ji(o.head.line,a+t.length)))}}),Na(o,"compositionupdate",function(e){r.composing.data=e.data}),Na(o,"compositionend",function(e){var t=r.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||r.applyComposition(t),r.composing==t&&(r.composing=null)},50))}),Na(o,"touchstart",function(){r.forceCompositionEnd()}),Na(o,"input",function(){r.composing||!n.isReadOnly()&&r.pollContent()||Ot(r.cm,function(){Ft(n)})}),Na(o,"copy",t),Na(o,"cut",t)},prepareSelection:function(){var e=De(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),r=se(this.cm,e.anchorNode,e.anchorOffset),n=se(this.cm,e.focusNode,e.focusOffset);if(!r||r.bad||!n||n.bad||0!=Hi(X(r,n),t.from())||0!=Hi(q(r,n),t.to())){var o=ie(this.cm,t.from()),i=ie(this.cm,t.to());if(o||i){var a=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(o){if(!i){var l=a[a.length-1].measure,u=l.maps?l.maps[l.maps.length-1]:l.map;i={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else o={node:a[0].measure.map[2],offset:0};try{var c=Ka(o.node,o.offset,i.offset,i.node)}catch(f){}c&&(!yi&&this.cm.state.focused?(e.collapse(o.node,o.offset),c.collapsed||e.addRange(c)):(e.removeAllRanges(),e.addRange(c)),s&&null==e.anchorNode?e.addRange(s):yi&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Yo(this.cm.display.cursorDiv,e.cursors),Yo(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Za(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():Ot(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var r=se(t,e.anchorNode,e.anchorOffset),n=se(t,e.focusNode,e.focusOffset);r&&n&&Ot(t,function(){Me(t.doc,pe(r,n),Wa),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),o=r.to();if(n.line<t.viewFrom||o.line>t.viewTo-1)return!1;var i;if(n.line==t.viewFrom||0==(i=Wt(e,n.line)))var a=ro(t.view[0].line),s=t.view[0].node;else var a=ro(t.view[i].line),s=t.view[i-1].node.nextSibling;var l=Wt(e,o.line);if(l==t.view.length-1)var u=t.viewTo-1,c=t.lineDiv.lastChild;else var u=ro(t.view[l+1].line)-1,c=t.view[l+1].node.previousSibling;for(var f=e.doc.splitLines(ue(e,s,c,a,u)),d=$n(e.doc,ji(a,0),ji(u,Jn(e.doc,u).text.length));f.length>1&&d.length>1;)if(Po(f)==Po(d))f.pop(),d.pop(),u--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),a++}for(var p=0,h=0,m=f[0],g=d[0],v=Math.min(m.length,g.length);p<v&&m.charCodeAt(p)==g.charCodeAt(p);)++p;for(var y=Po(f),b=Po(d),x=Math.min(y.length-(1==f.length?p:0),b.length-(1==d.length?p:0));h<x&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;f[f.length-1]=y.slice(0,y.length-h),f[0]=f[0].slice(p);var _=ji(a,p),w=ji(u,d.length?Po(d).length-h:0);return f.length>1||f[0]||Hi(_,w)?(Nr(e.doc,f,_,w,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Et(this.cm,Ft)(this.cm):e.data&&e.data!=e.startData&&Et(this.cm,Q)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Et(this.cm,Q)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Io,resetPosition:Io,needsContentAttribute:!0},oe.prototype),e.inputStyles={textarea:re,contenteditable:oe},ce.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(0!=Hi(r.anchor,n.anchor)||0!=Hi(r.head,n.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new fe(Y(this.ranges[t].anchor),Y(this.ranges[t].head));return new ce(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(Hi(t,n.from())>=0&&Hi(e,n.to())<=0)return r}return-1}},fe.prototype={from:function(){return X(this.anchor,this.head)},to:function(){return q(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Ui,Vi,Gi,Ki={left:0,right:0,top:0,bottom:0},Yi=null,qi=0,Xi=0,Zi=0,Qi=null;_i?Qi=-.53:yi?Qi=15:Si?Qi=-.7:Ti&&(Qi=-1/3);var Ji=function(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}};e.wheelEventPixels=function(e){var t=Ji(e);return t.x*=Qi,t.y*=Qi,t};var $i=new No,ea=null,ta=e.changeEnd=function(e){return e.text?ji(e.from.line+e.text.length-1,Po(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var r=this.options,n=r[e];r[e]==t&&"mode"!=e||(r[e]=t,na.hasOwnProperty(e)&&Et(this,na[e])(this,t,n))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Yr(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:Nt(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");Ro(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,Ft(this)}),removeOverlay:Nt(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Ft(this)}}),indentLine:Nt(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),ve(this.doc,e)&&jr(this,e,t,r)}),indentSelection:Nt(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var o=t[n];if(o.empty())o.head.line>r&&(jr(this,o.head.line,e,!0),r=o.head.line,n==this.doc.sel.primIndex&&Ir(this));else{var i=o.from(),a=o.to(),s=Math.max(r,i.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<r;++l)jr(this,l,e);var u=this.doc.sel.ranges;0==i.ch&&t.length==u.length&&u[n].from().ch>0&&we(this.doc,n,new fe(i,u[n].to()),Wa)}}}),getTokenAt:function(e,t){return zn(this,e,t)},getLineTokens:function(e,t){return zn(this,ji(e),t,!0)},getTokenTypeAt:function(e){e=me(this.doc,e);var t,r=Fn(this,Jn(this.doc,e.line)),n=0,o=(r.length-1)/2,i=e.ch;if(0==i)t=r[2];else for(;;){var a=n+o>>1;if((a?r[2*a-1]:0)>=i)o=a;else{if(!(r[2*a+1]<i)){t=r[2*a+2];break}n=a+1}}var s=t?t.indexOf("cm-overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!ua.hasOwnProperty(t))return r;var n=ua[t],o=this.getModeAt(e);if("string"==typeof o[t])n[o[t]]&&r.push(n[o[t]]);else if(o[t])for(var i=0;i<o[t].length;i++){var a=n[o[t][i]];a&&r.push(a)}else o.helperType&&n[o.helperType]?r.push(n[o.helperType]):n[o.name]&&r.push(n[o.name]);for(var i=0;i<n._global.length;i++){var s=n._global[i];s.pred(o,this)&&Do(r,s.val)==-1&&r.push(s.val)}return r},getStateAfter:function(e,t){var r=this.doc;return e=he(r,null==e?r.first+r.size-1:e),Be(this,e+1,t)},cursorCoords:function(e,t){var r,n=this.doc.sel.primary();return r=null==e?n.head:"object"==typeof e?me(this.doc,e):e?n.from():n.to(),ht(this,r,t||"page")},charCoords:function(e,t){return pt(this,me(this.doc,e),t||"page")},coordsChar:function(e,t){return e=dt(this,e,t||"page"),vt(this,e.left,e.top)},lineAtHeight:function(e,t){return e=dt(this,{top:e,left:0},t||"page").top,no(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var r,n=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,n=!0),r=Jn(this.doc,e)}else r=e;return ft(this,r,{top:0,left:0},t||"page").top+(n?this.doc.height-oo(r):0)},defaultTextHeight:function(){return bt(this.display)},defaultCharWidth:function(){return xt(this.display)},setGutterMarker:Nt(function(e,t,r){return Hr(this.doc,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&Uo(n)&&(e.gutterMarkers=null),!0})}),clearGutter:Nt(function(e){var t=this,r=t.doc,n=r.first;r.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&(r.gutterMarkers[e]=null,Rt(t,n,"gutter"),Uo(r.gutterMarkers)&&(r.gutterMarkers=null)),++n})}),lineInfo:function(e){if("number"==typeof e){if(!ve(this.doc,e))return null;var t=e;if(e=Jn(this.doc,e),!e)return null}else{var t=ro(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,o){var i=this.display;e=ht(this,me(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),i.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var l=Math.max(i.wrapper.clientHeight,this.doc.height),u=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==o?(s=i.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?s=0:"middle"==o&&(s=(i.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),r&&Dr(this,s,a,s+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:Nt(dr),triggerOnKeyPress:Nt(mr),triggerOnKeyUp:hr,
execCommand:function(e){if(da.hasOwnProperty(e))return da[e].call(null,this)},triggerElectric:Nt(function(e){$(this,e)}),findPosH:function(e,t,r,n){var o=1;t<0&&(o=-1,t=-t);for(var i=0,a=me(this.doc,e);i<t&&(a=Ur(this.doc,a,o,r,n),!a.hitSide);++i);return a},moveH:Nt(function(e,t){var r=this;r.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Ur(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},Ha)}),deleteH:Nt(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Br(this,function(r){var o=Ur(n,r.head,e,t,!1);return e<0?{from:o,to:r.head}:{from:r.head,to:o}})}),findPosV:function(e,t,r,n){var o=1,i=n;t<0&&(o=-1,t=-t);for(var a=0,s=me(this.doc,e);a<t;++a){var l=ht(this,s,"div");if(null==i?i=l.left:l.left=i,s=Vr(this,l,o,r),s.hitSide)break}return s},moveV:Nt(function(e,t){var r=this,n=this.doc,o=[],i=!r.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(a){if(i)return e<0?a.from():a.to();var s=ht(r,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),o.push(s.left);var l=Vr(r,s,e,t);return"page"==t&&a==n.sel.primary()&&Rr(r,null,pt(r,l,"div").top-s.top),l},Ha),o.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=o[a]}),findWordAt:function(e){var t=this.doc,r=Jn(t,e.line).text,n=e.ch,o=e.ch;if(r){var i=this.getHelper(e,"wordChars");(e.xRel<0||o==r.length)&&n?--n:++o;for(var a=r.charAt(n),s=Bo(a,i)?function(e){return Bo(e,i)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!Bo(e)};n>0&&s(r.charAt(n-1));)--n;for(;o<r.length&&s(r.charAt(o));)++o}return new fe(ji(e.line,n),ji(e.line,o))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?es(this.display.cursorDiv,"CodeMirror-overwrite"):$a(this.display.cursorDiv,"CodeMirror-overwrite"),Da(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==qo()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Nt(function(e,t){null==e&&null==t||Wr(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Ke(this)-this.display.barHeight,width:e.scrollWidth-Ke(this)-this.display.barWidth,clientHeight:qe(this),clientWidth:Ye(this)}},scrollIntoView:Nt(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ji(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)Wr(this),this.curOp.scrollToPos=e;else{var r=Fr(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(r.scrollLeft,r.scrollTop)}}),setSize:Nt(function(e,t){function r(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}var n=this;null!=e&&(n.display.wrapper.style.width=r(e)),null!=t&&(n.display.wrapper.style.height=r(t)),n.options.lineWrapping&&st(this);var o=n.display.viewFrom;n.doc.iter(o,n.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Rt(n,o,"widget");break}++o}),n.curOp.forceUpdate=!0,Da(n,"refresh",this)}),operation:function(e){return Ot(this,e)},refresh:Nt(function(){var e=this.display.cachedTextHeight;Ft(this),this.curOp.forceUpdate=!0,lt(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),c(this),(null==e||Math.abs(e-bt(this.display))>.5)&&a(this),Da(this,"refresh",this)}),swapDoc:Nt(function(e){var t=this.doc;return t.cm=null,Qn(this,e),lt(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Mo(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Eo(e);var ra=e.defaults={},na=e.optionHandlers={},oa=e.Init={toString:function(){return"CodeMirror.Init"}};Gr("value","",function(e,t){e.setValue(t)},!0),Gr("mode",null,function(e,t){e.doc.modeOption=t,r(e)},!0),Gr("indentUnit",2,r,!0),Gr("indentWithTabs",!1),Gr("smartIndent",!0),Gr("tabSize",4,function(e){n(e),lt(e),Ft(e)},!0),Gr("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(i==-1)break;o=i+t.length,r.push(ji(n,i))}n++});for(var o=r.length-1;o>=0;o--)Nr(e.doc,t,r[o],ji(r[o].line,r[o].ch+t.length))}}),Gr("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,r,n){t.state.specialChars=new RegExp(r.source+(r.test("\t")?"":"|\t"),"g"),n!=e.Init&&t.refresh()}),Gr("specialCharPlaceholder",jn,function(e){e.refresh()},!0),Gr("electricChars",!0),Gr("inputStyle",Ei?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Gr("spellcheck",!1,function(e,t){e.getInputField().spellcheck=t},!0),Gr("rtlMoveVisually",!Pi),Gr("wholeLineUpdateBefore",!0),Gr("theme","default",function(e){s(e),l(e)},!0),Gr("keyMap","default",function(t,r,n){var o=Yr(r),i=n!=e.Init&&Yr(n);i&&i.detach&&i.detach(t,o),o.attach&&o.attach(t,i||null)}),Gr("extraKeys",null),Gr("lineWrapping",!1,o,!0),Gr("gutters",[],function(e){p(e.options),l(e)},!0),Gr("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?k(e.display)+"px":"0",e.refresh()},!0),Gr("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Gr("scrollbarStyle","native",function(e){v(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Gr("lineNumbers",!1,function(e){p(e.options),l(e)},!0),Gr("firstLineNumber",1,l,!0),Gr("lineNumberFormatter",function(e){return e},l,!0),Gr("showCursorWhenSelecting",!1,Pe,!0),Gr("resetSelectionOnContextMenu",!0),Gr("lineWiseCopyCut",!0),Gr("readOnly",!1,function(e,t){"nocursor"==t?(yr(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),Gr("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Gr("dragDrop",!0,Vt),Gr("allowDropFileTypes",null),Gr("cursorBlinkRate",530),Gr("cursorScrollMargin",0),Gr("cursorHeight",1,Pe,!0),Gr("singleCursorHeightPerLine",!0,Pe,!0),Gr("workTime",100),Gr("workDelay",100),Gr("flattenSpans",!0,n,!0),Gr("addModeClass",!1,n,!0),Gr("pollInterval",100),Gr("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Gr("historyEventDelay",1250),Gr("viewportMargin",10,function(e){e.refresh()},!0),Gr("maxHighlightLength",1e4,n,!0),Gr("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Gr("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Gr("autofocus",null);var ia=e.modes={},aa=e.mimeModes={};e.defineMode=function(t,r){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),ia[t]=r},e.defineMIME=function(e,t){aa[e]=t},e.resolveMode=function(t){if("string"==typeof t&&aa.hasOwnProperty(t))t=aa[t];else if(t&&"string"==typeof t.name&&aa.hasOwnProperty(t.name)){var r=aa[t.name];"string"==typeof r&&(r={name:r}),t=Wo(r,t),t.name=r.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return e.resolveMode("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,r){var r=e.resolveMode(r),n=ia[r.name];if(!n)return e.getMode(t,"text/plain");var o=n(t,r);if(sa.hasOwnProperty(r.name)){var i=sa[r.name];for(var a in i)i.hasOwnProperty(a)&&(o.hasOwnProperty(a)&&(o["_"+a]=o[a]),o[a]=i[a])}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var a in r.modeProps)o[a]=r.modeProps[a];return o},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var sa=e.modeExtensions={};e.extendMode=function(e,t){var r=sa.hasOwnProperty(e)?sa[e]:sa[e]={};jo(t,r)},e.defineExtension=function(t,r){e.prototype[t]=r},e.defineDocExtension=function(e,t){Ma.prototype[e]=t},e.defineOption=Gr;var la=[];e.defineInitHook=function(e){la.push(e)};var ua=e.helpers={};e.registerHelper=function(t,r,n){ua.hasOwnProperty(t)||(ua[t]=e[t]={_global:[]}),ua[t][r]=n},e.registerGlobalHelper=function(t,r,n,o){e.registerHelper(t,r,o),ua[t]._global.push({pred:n,val:o})};var ca=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var o=t[n];o instanceof Array&&(o=o.concat([])),r[n]=o}return r},fa=e.startState=function(e,t,r){return!e.startState||e.startState(t,r)};e.innerMode=function(e,t){for(;e.innerMode;){var r=e.innerMode(t);if(!r||r.mode==e)break;t=r.state,e=r.mode}return r||{mode:e,state:t}};var da=e.commands={selectAll:function(e){e.setSelection(ji(e.firstLine(),0),ji(e.lastLine()),Wa)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Wa)},killLine:function(e){Br(e,function(t){if(t.empty()){var r=Jn(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:ji(t.head.line+1,0)}:{from:t.head,to:ji(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){Br(e,function(t){return{from:ji(t.from().line,0),to:me(e.doc,ji(t.to().line+1,0))}})},delLineLeft:function(e){Br(e,function(e){return{from:ji(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){Br(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){Br(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(ji(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(ji(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy(function(t){return li(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){e.extendSelectionsBy(function(t){return ci(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){e.extendSelectionsBy(function(t){return ui(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Ha)},goLineLeft:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Ha)},goLineLeftSmart:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?ci(e,t.head):n},Ha)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,o=0;o<r.length;o++){var i=r[o].from(),a=Ba(e.getLine(i.line),i.ch,n);t.push(zo(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){Ot(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){var o=t[n].head,i=Jn(e.doc,o.line).text;if(i)if(o.ch==i.length&&(o=new ji(o.line,o.ch-1)),o.ch>0)o=new ji(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),ji(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=Jn(e.doc,o.line-1).text;a&&e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ji(o.line-1,a.length-1),ji(o.line,1),"+transpose")}r.push(new fe(o,o))}e.setSelections(r)})},newlineAndIndent:function(e){Ot(e,function(){for(var t=e.listSelections().length,r=0;r<t;r++){var n=e.listSelections()[r];e.replaceRange(e.doc.lineSeparator(),n.anchor,n.head,"+input"),e.indentLine(n.from().line+1,null,!0)}Ir(e)})},openLine:function(e){e.replaceSelection("\n","start")},toggleOverwrite:function(e){e.toggleOverwrite()}},pa=e.keyMap={};pa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},pa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},pa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},pa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},pa["default"]=Ni?pa.macDefault:pa.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var o=Fo(r.split(" "),Kr),i=0;i<o.length;i++){var a,s;i==o.length-1?(s=o.join(" "),a=n):(s=o.slice(0,i+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[r]}for(var u in t)e[u]=t[u];return e};var ha=e.lookupKey=function(e,t,r,n){t=Yr(t);var o=t.call?t.call(e,n):t[e];if(o===!1)return"nothing";if("..."===o)return"multi";if(null!=o&&r(o))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return ha(e,t.fallthrough,r,n);for(var i=0;i<t.fallthrough.length;i++){var a=ha(e,t.fallthrough[i],r,n);if(a)return a}}},ma=e.isModifierKey=function(e){var t="string"==typeof e?e:ss[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},ga=e.keyName=function(e,t){if(Mi&&34==e.keyCode&&e["char"])return!1;var r=ss[e.keyCode],n=r;return null!=n&&!e.altGraphKey&&(e.altKey&&"Alt"!=r&&(n="Alt-"+n),(Fi?e.metaKey:e.ctrlKey)&&"Ctrl"!=r&&(n="Ctrl-"+n),(Fi?e.ctrlKey:e.metaKey)&&"Cmd"!=r&&(n="Cmd-"+n),!t&&e.shiftKey&&"Shift"!=r&&(n="Shift-"+n),n)};e.fromTextArea=function(t,r){function n(){t.value=u.getValue()}if(r=r?jo(r):{},r.value=t.value,!r.tabindex&&t.tabIndex&&(r.tabindex=t.tabIndex),!r.placeholder&&t.placeholder&&(r.placeholder=t.placeholder),null==r.autofocus){var o=qo();r.autofocus=o==t||null!=t.getAttribute("autofocus")&&o==document.body}if(t.form&&(Na(t.form,"submit",n),!r.leaveSubmitMethodAlone)){var i=t.form,a=i.submit;try{var s=i.submit=function(){n(),i.submit=a,i.submit(),i.submit=s}}catch(l){}}r.finishInit=function(e){e.save=n,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,n(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(Pa(t.form,"submit",n),"function"==typeof t.form.submit&&(t.form.submit=a))}},t.style.display="none";var u=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},r);return u};var va=e.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};va.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var r=t==e;else var r=t&&(e.test?e.test(t):e(t));if(r)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ba(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ba(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Ba(this.string,null,this.tabSize)-(this.lineStart?Ba(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&t!==!1&&(this.pos+=n[0].length),n)}var o=function(e){return r?e.toLowerCase():e},i=this.string.substr(this.pos,e.length);if(o(i)==o(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ya=0,ba=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ya};Eo(ba),ba.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&_t(e),Oo(this,"clear")){var r=this.find();r&&Mo(this,"clear",r.from,r.to)}for(var n=null,o=null,i=0;i<this.lines.length;++i){var a=this.lines[i],s=en(a.markedSpans,this);e&&!this.collapsed?Rt(e,ro(a),"text"):e&&(null!=s.to&&(o=ro(a)),null!=s.from&&(n=ro(a))),a.markedSpans=tn(a.markedSpans,s),null==s.from&&this.collapsed&&!Cn(this.doc,a)&&e&&to(a,bt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var i=0;i<this.lines.length;++i){var l=bn(this.lines[i]),u=f(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Ft(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ae(e.doc)),e&&Mo(e,"markerCleared",e,this),t&&Ct(e),this.parent&&this.parent.clear()}},ba.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var r,n,o=0;o<this.lines.length;++o){var i=this.lines[o],a=en(i.markedSpans,this);if(null!=a.from&&(r=ji(t?i:ro(i),a.from),e==-1))return r;if(null!=a.to&&(n=ji(t?i:ro(i),a.to),1==e))return n}return r&&{from:r,to:n}},ba.prototype.changed=function(){var e=this.find(-1,!0),t=this,r=this.doc.cm;e&&r&&Ot(r,function(){var n=e.line,o=ro(e.line),i=$e(r,o);if(i&&(at(i),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Cn(t.doc,n)&&null!=t.height){var a=t.height;t.height=null;var s=Mn(t)-a;s&&to(n,n.height+s)}})},ba.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&Do(t.maybeHiddenMarkers,this)!=-1||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ba.prototype.detachLine=function(e){if(this.lines.splice(Do(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var ya=0,xa=e.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};Eo(xa),xa.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Mo(this,"clear")}},xa.prototype.find=function(e,t){return this.primary.find(e,t)};var _a=e.LineWidget=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};Eo(_a),_a.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=ro(r);if(null!=n&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(r.widgets=null);var i=Mn(this);to(r,Math.max(0,r.height-i)),e&&Ot(e,function(){Sn(e,r,-i),Rt(e,n,"widget")})}},_a.prototype.changed=function(){var e=this.height,t=this.doc.cm,r=this.line;this.height=null;var n=Mn(this)-e;n&&(to(r,r.height+n),t&&Ot(t,function(){t.curOp.forceUpdate=!0,Sn(t,r,n)}))};var wa=e.Line=function(e,t,r){this.text=e,fn(this,t),this.height=r?r(this):1};Eo(wa),wa.prototype.lineNo=function(){return ro(this)};var Ca={},ka={};qn.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var o=this.lines[r];this.height-=o.height,An(o),Mo(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},Xn.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],o=n.chunkSize();if(e<o){var i=Math.min(t,o-e),a=n.height;if(n.removeInner(e,i),this.height-=a-n.height,o==i&&(this.children.splice(r--,1),n.parent=null),0==(t-=i))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof qn))){var s=[];this.collapse(s),this.children=[new qn(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var o=this.children[n],i=o.chunkSize();if(e<=i){if(o.insertInner(e,t,r),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,s=a;s<o.lines.length;){var l=new qn(o.lines.slice(s,s+=25));o.height-=l.height,this.children.splice(++n,0,l),l.parent=this}o.lines=o.lines.slice(0,a),this.maybeSpill()}break}e-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new Xn(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=Do(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var o=new Xn(e.children);o.parent=e,e.children=[o,r],e=o}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var o=this.children[n],i=o.chunkSize();if(e<i){var a=Math.min(t,i-e);if(o.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=i}}};var Sa=0,Ma=e.Doc=function(e,t,r,n){if(!(this instanceof Ma))return new Ma(e,t,r,n);null==r&&(r=0),Xn.call(this,[new qn([new wa("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=r;var o=ji(r,0);this.sel=pe(o),this.history=new ao(null),this.id=++Sa,this.modeOption=t,this.lineSep=n,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Yn(this,{from:o,to:o,text:e}),Me(this,pe(o),Wa)};Ma.prototype=Wo(Xn.prototype,{constructor:Ma,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=eo(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:zt(function(e){var t=ji(this.first,0),r=this.first+this.size-1;Mr(this,{from:t,to:ji(r,Jn(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),Me(this,pe(t))}),replaceRange:function(e,t,r,n){t=me(this,t),r=r?me(this,r):t,Nr(this,e,t,r,n)},getRange:function(e,t,r){var n=$n(this,me(this,e),me(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(ve(this,e))return Jn(this,e)},getLineNumber:function(e){return ro(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Jn(this,e)),bn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return me(this,e)},getCursor:function(e){var t,r=this.sel.primary();return t=null==e||"head"==e?r.head:"anchor"==e?r.anchor:"end"==e||"to"==e||e===!1?r.to():r.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:zt(function(e,t,r){Ce(this,me(this,"number"==typeof e?ji(e,t||0):e),null,r)}),setSelection:zt(function(e,t,r){Ce(this,me(this,e),me(this,t||e),r)}),extendSelection:zt(function(e,t,r){xe(this,me(this,e),t&&me(this,t),r)}),extendSelections:zt(function(e,t){_e(this,ye(this,e),t)}),extendSelectionsBy:zt(function(e,t){var r=Fo(this.sel.ranges,e);_e(this,ye(this,r),t)}),setSelections:zt(function(e,t,r){if(e.length){for(var n=0,o=[];n<e.length;n++)o[n]=new fe(me(this,e[n].anchor),me(this,e[n].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Me(this,de(o,t),r)}}),addSelection:zt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new fe(me(this,e),me(this,t||e))),Me(this,de(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var o=$n(this,r[n].from(),r[n].to());t=t?t.concat(o):o}return e===!1?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var o=$n(this,r[n].from(),r[n].to());e!==!1&&(o=o.join(e||this.lineSeparator())),t[n]=o}return t},replaceSelection:function(e,t,r){for(var n=[],o=0;o<this.sel.ranges.length;o++)n[o]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:zt(function(e,t,r){for(var n=[],o=this.sel,i=0;i<o.ranges.length;i++){var a=o.ranges[i];n[i]={from:a.from(),to:a.to(),text:this.splitLines(e[i]),origin:r}}for(var s=t&&"end"!=t&&kr(this,n,t),i=n.length-1;i>=0;i--)Mr(this,n[i]);s?Se(this,s):this.cm&&Ir(this.cm)}),undo:zt(function(){Lr(this,"undo")}),redo:zt(function(){Lr(this,"redo")}),undoSelection:zt(function(){Lr(this,"undo",!0)}),redoSelection:zt(function(){Lr(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var n=0;n<e.undone.length;n++)e.undone[n].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new ao(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:yo(this.history.done),undone:yo(this.history.undone)}},setHistory:function(e){var t=this.history=new ao(this.history.maxGeneration);t.done=yo(e.done.slice(0),null,!0),t.undone=yo(e.undone.slice(0),null,!0)},addLineClass:zt(function(e,t,r){return Hr(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(Xo(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0})}),removeLineClass:zt(function(e,t,r){return Hr(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",o=e[n];if(!o)return!1;if(null==r)e[n]=null;else{var i=o.match(Xo(r));if(!i)return!1;var a=i.index+i[0].length;e[n]=o.slice(0,i.index)+(i.index&&a!=o.length?" ":"")+o.slice(a)||null}return!0})}),addLineWidget:zt(function(e,t,r){return Tn(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return qr(this,me(this,e),me(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=me(this,e),qr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=me(this,e);var t=[],r=Jn(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var o=r[n];(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,r){e=me(this,e),t=me(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,function(i){var a=i.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&o==e.line&&e.ch>=l.to||null==l.from&&o!=e.line||null!=l.from&&o==t.line&&l.from>=t.ch||r&&!r(l.marker)||n.push(l.marker.parent||l.marker)}++o}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(o){var i=o.text.length+n;return i>e?(t=e,!0):(e-=i,void++r)}),me(this,ji(r,t))},indexFromPos:function(e){e=me(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new Ma(eo(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new Ma(eo(this,t,r),e.mode||this.modeOption,t,this.lineSep);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Qr(n,Zr(this)),n},unlinkDoc:function(t){if(t instanceof e&&(t=t.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=this.linked[r];if(n.doc==t){this.linked.splice(r,1),t.unlinkDoc(this),
Jr(Zr(this));break}}if(t.history==this.history){var o=[t.id];Zn(t,function(e){o.push(e.id)},!0),t.history=new ao(null),t.history.done=yo(this.history.done,o),t.history.undone=yo(this.history.undone,o)}},iterLinkedDocs:function(e){Zn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):ns(e)},lineSeparator:function(){return this.lineSep||"\n"}}),Ma.prototype.eachLine=Ma.prototype.iter;var Ta="iter insert remove copy getEditor constructor".split(" ");for(var La in Ma.prototype)Ma.prototype.hasOwnProperty(La)&&Do(Ta,La)<0&&(e.prototype[La]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ma.prototype[La]));Eo(Ma);var Aa=e.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},Oa=e.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},Ea=e.e_stop=function(e){Aa(e),Oa(e)},Na=e.on=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={}),o=n[t]||(n[t]=[]);o.push(r)}},za=[],Pa=e.off=function(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else for(var n=So(e,t,!1),o=0;o<n.length;++o)if(n[o]==r){n.splice(o,1);break}},Da=e.signal=function(e,t){var r=So(e,t,!0);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),o=0;o<r.length;++o)r[o].apply(null,n)},Fa=null,Ra=30,Ia=e.Pass={toString:function(){return"CodeMirror.Pass"}},Wa={scroll:!1},ja={origin:"*mouse"},Ha={origin:"+move"};No.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Ba=e.countColumn=function(e,t,r,n,o){null==t&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var i=n||0,a=o||0;;){var s=e.indexOf("\t",i);if(s<0||s>=t)return a+(t-i);a+=s-i,a+=r-a%r,i=s+1}},Ua=e.findColumn=function(e,t,r){for(var n=0,o=0;;){var i=e.indexOf("\t",n);i==-1&&(i=e.length);var a=i-n;if(i==e.length||o+a>=t)return n+Math.min(a,t-o);if(o+=i-n,o+=r-o%r,n=i+1,o>=t)return n}},Va=[""],Ga=function(e){e.select()};Oi?Ga=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:_i&&(Ga=function(e){try{e.select()}catch(t){}});var Ka,Ya=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,qa=e.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Ya.test(e))},Xa=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Ka=document.createRange?function(e,t,r,n){var o=document.createRange();return o.setEnd(n||e,r),o.setStart(e,t),o}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(o){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var Za=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};_i&&wi<11&&(qo=function(){try{return document.activeElement}catch(e){return document.body}});var Qa,Ja,$a=e.rmClass=function(e,t){var r=e.className,n=Xo(t).exec(r);if(n){var o=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(o?n[1]+o:"")}},es=e.addClass=function(e,t){var r=e.className;Xo(t).test(r)||(e.className+=(r?" ":"")+t)},ts=!1,rs=function(){if(_i&&wi<9)return!1;var e=Go("div");return"draggable"in e||"dragDrop"in e}(),ns=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var o=e.indexOf("\n",t);o==-1&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");a!=-1?(r.push(i.slice(0,a)),t+=a+1):(r.push(i),t=o+1)}return r}:function(e){return e.split(/\r\n?|\n/)},os=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(r){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},is=function(){var e=Go("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),as=null,ss=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;e<10;e++)ss[e+48]=ss[e+96]=String(e);for(var e=65;e<=90;e++)ss[e]=String.fromCharCode(e);for(var e=1;e<=12;e++)ss[e+111]=ss[e+63235]="F"+e}();var ls,us=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1773?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,u="L";return function(r){if(!o.test(r))return!1;for(var n,c=r.length,f=[],d=0;d<c;++d)f.push(n=e(r.charCodeAt(d)));for(var d=0,p=u;d<c;++d){var n=f[d];"m"==n?f[d]=p:p=n}for(var d=0,h=u;d<c;++d){var n=f[d];"1"==n&&"r"==h?f[d]="n":a.test(n)&&(h=n,"r"==n&&(f[d]="R"))}for(var d=1,p=f[0];d<c-1;++d){var n=f[d];"+"==n&&"1"==p&&"1"==f[d+1]?f[d]="1":","!=n||p!=f[d+1]||"1"!=p&&"n"!=p||(f[d]=p),p=n}for(var d=0;d<c;++d){var n=f[d];if(","==n)f[d]="N";else if("%"==n){for(var m=d+1;m<c&&"%"==f[m];++m);for(var g=d&&"!"==f[d-1]||m<c&&"1"==f[m]?"1":"N",v=d;v<m;++v)f[v]=g;d=m-1}}for(var d=0,h=u;d<c;++d){var n=f[d];"L"==h&&"1"==n?f[d]="L":a.test(n)&&(h=n)}for(var d=0;d<c;++d)if(i.test(f[d])){for(var m=d+1;m<c&&i.test(f[m]);++m);for(var y="L"==(d?f[d-1]:u),b="L"==(m<c?f[m]:u),g=y||b?"L":"R",v=d;v<m;++v)f[v]=g;d=m-1}for(var x,_=[],d=0;d<c;)if(s.test(f[d])){var w=d;for(++d;d<c&&s.test(f[d]);++d);_.push(new t(0,w,d))}else{var C=d,k=_.length;for(++d;d<c&&"L"!=f[d];++d);for(var v=C;v<d;)if(l.test(f[v])){C<v&&_.splice(k,0,new t(1,C,v));var S=v;for(++v;v<d&&l.test(f[v]);++v);_.splice(k,0,new t(2,S,v)),C=v}else++v;C<d&&_.splice(k,0,new t(1,C,d))}return 1==_[0].level&&(x=r.match(/^\s+/))&&(_[0].from=x[0].length,_.unshift(new t(0,0,x[0].length))),1==Po(_).level&&(x=r.match(/\s+$/))&&(Po(_).to-=x[0].length,_.push(new t(0,c-x[0].length,c))),2==_[0].level&&_.unshift(new t(1,_[0].to,_[0].to)),_[0].level!=Po(_).level&&_.push(new t(_[0].level,c,c)),_}}();return e.version="5.18.2",e})},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var r=this[t];r[2]?e.push("@media "+r[2]+"{"+r[1]+"}"):e.push(r[1])}return e.join("")},e.i=function(t,r){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(n[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&n[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),e.push(a))}},e}},function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return o.exec(e).slice(1)};t.resolve=function(){for(var t="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,o="/"===a.charAt(0))}return t=r(n(t.split("/"),function(e){return!!e}),!o).join("/"),(o?"/":"")+t||"."},t.normalize=function(e){var o=t.isAbsolute(e),i="/"===a(e,-1);return e=r(n(e.split("/"),function(e){return!!e}),!o).join("/"),e||o||(e="."),e&&i&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var o=n(e.split("/")),i=n(r.split("/")),a=Math.min(o.length,i.length),s=a,l=0;l<a;l++)if(o[l]!==i[l]){s=l;break}for(var u=[],l=s;l<o.length;l++)u.push("..");return u=u.concat(i.slice(s)),u.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){var t=i(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},t.basename=function(e,t){var r=i(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},t.extname=function(e){return i(e)[3]};var a="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(t,r(1))},function(e,t,r){function n(e,t){for(var r=0;r<e.length;r++){var n=e[r],o=f[n.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](n.parts[i]);for(;i<n.parts.length;i++)o.parts.push(s(n.parts[i],t))}else{for(var a=[],i=0;i<n.parts.length;i++)a.push(s(n.parts[i],t));f[n.id]={id:n.id,refs:1,parts:a}}}}function o(e){for(var t=[],r={},n=0;n<e.length;n++){var o=e[n],i=o[0],a=o[1],s=o[2],l=o[3],u={css:a,media:s,sourceMap:l};r[i]?r[i].parts.push(u):t.push(r[i]={id:i,parts:[u]})}return t}function i(){var e=document.createElement("style"),t=h();return e.type="text/css",t.appendChild(e),e}function a(){var e=document.createElement("link"),t=h();return e.rel="stylesheet",t.appendChild(e),e}function s(e,t){var r,n,o;if(t.singleton){var s=g++;r=m||(m=i()),n=l.bind(null,r,s,!1),o=l.bind(null,r,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=a(),n=c.bind(null,r),o=function(){r.parentNode.removeChild(r),r.href&&URL.revokeObjectURL(r.href)}):(r=i(),n=u.bind(null,r),o=function(){r.parentNode.removeChild(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}function l(e,t,r,n){var o=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=v(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function u(e,t){var r=t.css,n=t.media;t.sourceMap;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}function c(e,t){var r=t.css,n=(t.media,t.sourceMap);n&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var o=new Blob([r],{type:"text/css"}),i=e.href;e.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var f={},d=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},p=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=d(function(){return document.head||document.getElementsByTagName("head")[0]}),m=null,g=0;e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=p());var r=o(e);return n(r,t),function(e){for(var i=[],a=0;a<r.length;a++){var s=r[a],l=f[s.id];l.refs--,i.push(l)}if(e){var u=o(e);n(u,t)}for(var a=0;a<i.length;a++){var l=i[a];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete f[l.id]}}}};var v=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}()},function(e,t,r){(function(t){"use strict";var n=r(70),o=n;"production"!==t.env.NODE_ENV&&(o=function(e,t){for(var r=[],n=2,o=arguments.length;n<o;n++)r.push(arguments[n]);if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(t.length<10||/^[s\W]*$/.test(t))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+t);if(0!==t.indexOf("Failed Composite propType: ")&&!e){var i=0,a="Warning: "+t.replace(/%s/g,function(){return r[i++]});console.warn(a);try{throw new Error(a)}catch(s){}}}),e.exports=o}).call(t,r(1))},function(e,t,r){(function(){var e,n,o,i,a,s,l,u,c,f,d,p,h,m,g,v,y,b,x,_,w,C,k,S,M,T,L,A;n=r(6).sep,A=150,v=20,M=13,T=85,c=1.2,m=.75,g=/[ _\-:\/\\]/g,t.coreChars=a=function(e){return e.replace(g,"")},t.score=function(e,t,r,n){var a,s;return null==r&&(r=new o(t)),null==n&&(n=!1),n||f(e,r.core_lw,r.core_up)?(s=e.toLowerCase(),a=l(e,s,r),Math.ceil(i(e,s,r,a))):0},o=function(){function e(e){return(null!=e?e.length:void 0)?(this.query=e,this.query_lw=e.toLowerCase(),this.core=a(e),this.core_lw=this.core.toLowerCase(),this.core_up=L(this.core),void(this.depth=s(e,e.length))):null}return e}(),t.prepQuery=function(e){return new o(e)},t.isMatch=f=function(e,t,r){var n,o,i,a,s,l,u;if(i=e.length,a=t.length,!i||a>i)return!1;for(n=-1,o=-1;++o<a;){for(s=t[o],l=r[o];++n<i&&(u=e[n],u!==s&&u!==l););if(n===i)return!1}return!0},l=function(e,t,r){var n,o,i,a,s,l,u,c,f,d,p,g,v,C,k,M,T,L,A,O,E,N,z,P;if(k=r.query,M=r.query_lw,f=e.length,v=k.length,n=y(e,t,k,M),o=n.score,n.count===v)return _(v,f,o,n.pos);if(C=t.indexOf(M),C>-1)return w(e,t,k,M,C,v,f);for(O=new Array(v),s=new Array(v),P=S(v,f),d=Math.ceil(m*v)+5,p=d,c=-1;++c<v;)O[c]=0,s[c]=0;for(u=t.indexOf(M[0]),u>-1&&u--,g=t.lastIndexOf(M[v-1],f),g>u&&(f=g+1);++u<f;)for(L=0,A=0,a=0,N=t[u],T=!0,c=-1;++c<v;){if(E=O[c],E>L&&(L=E),l=0,M[c]===N)if(z=h(u,e,t),l=a>0?a:x(e,t,k,M,u,c,z),i=A+b(u,c,z,o,l),i>L)L=i,p=d;else{if(T&&--p<=0)return O[v-1]*P;T=!1}A=E,a=s[c],s[c]=l,O[c]=L}return L*P},t.isWordStart=h=function(e,t,r){var n,o;return 0===e||(n=t[e],o=t[e-1],d(n)||d(o)||n!==r[e]&&o===r[e-1])},t.isWordEnd=p=function(e,t,r,n){var o,i;return e===n-1||(o=t[e],i=t[e+1],d(o)||d(i)||o===r[e]&&i!==r[e+1])},d=function(e){return" "===e||"."===e||"-"===e||"_"===e||"/"===e||"\\"===e},k=function(e){var t;return e<v?(t=v-e,100+t*t):Math.max(100+v-e,0)},S=function(e,t){return T/(T+Math.abs(t-e))},_=function(e,t,r,n){return 2*e*(A*r+k(n))*S(e,t)},t.scorePattern=C=function(e,t,r,n,o){var i,a;return a=e,i=6,r===e&&(i+=2),n&&(i+=3),o&&(i+=1),e===t&&(n&&(a+=r===t?2:1),o&&(i+=1)),r+a*(a+i)},t.scoreCharacter=b=function(e,t,r,n,o){var i;return i=k(e),r?i+A*((n>o?n:o)+10):i+A*o},t.scoreConsecutives=x=function(e,t,r,n,o,i,a){var s,l,u,c,f,d,h,m;for(l=e.length,c=r.length,u=l-o,f=c-i,s=u<f?u:f,h=o,d=0,m=0,r[i]===e[o]&&d++;++m<s&&n[++i]===t[++o];)r[i]===e[o]&&d++;return 1===m?1+2*d:C(m,c,d,a,p(o,e,t,l))},t.scoreExactMatch=w=function(e,t,r,n,o,i,a){var s,l,u,c,f;for(f=h(o,e,t),f||(u=t.indexOf(n,o+1),u>-1&&(f=h(u,e,t),f&&(o=u))),l=-1,c=0;++l<i;)r[o+l]===e[l]&&c++;return s=p(o+i-1,e,t,a),_(i,a,C(i,i,c,f,s),o)},e=function(){function e(e,t,r){this.score=e,this.pos=t,this.count=r}return e}(),u=new e(0,.1,0),t.scoreAcronyms=y=function(t,r,n,o){var i,a,s,l,c,f,d,p,m;if(l=t.length,c=n.length,!(l>1&&c>1))return u;for(i=0,f=0,p=0,a=-1,s=-1;++s<c;){for(d=o[s];++a<l;)if(d===r[a]&&h(a,t,r)){n[s]===t[a]&&p++,f+=a,i++;break}if(a===l)break}return i<2?u:(m=C(i,c,p,!0,!1),new e(m,f/i,i))},i=function(e,t,r,o){var i,a,u,f,d;if(0===o)return 0;for(d=e.length-1;e[d]===n;)d--;if(u=e.lastIndexOf(n,d),u===-1)return o;for(f=r.depth;f-- >0;)if(u=e.lastIndexOf(n,u-1),u===-1)return o;return u++,d++,a=l(e.slice(u,d),t.slice(u,d),r),i=.5*M/(M+s(e,d+1)),i*a+(1-i)*o*S(0,c*(d-u))},t.countDir=s=function(e,t){var r,o;if(t<1)return 0;for(r=0,o=-1;++o<t&&e[o]===n;);for(;++o<t;)if(e[o]===n)for(r++;++o<t&&e[o]===n;);return r},L=function(e){var t,r,n,o;for(r="",n=0,o=e.length;n<o;n++)t=e[n],r+=t.toUpperCase()[0];return r}}).call(this)},function(e,t,r){"use strict";var n=r(3),o=r(2);t.loadChild=function(e,t,r,a,s,l,u,c){var f=i.call(this,e,t,r,a,s,l,u,c);try{return o.createElement(f.component,n.omit(f,"component","children"),f.children)}catch(u){console.error(u)}};var i=function(e,t,r,n,o,i,a,s){var l=e.children[t].call(e,r,n,o,i,a,s);return l.ref||(l.ref=t),l}},function(e,t){"use strict";function r(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var r=Object(e),n=Object.prototype.hasOwnProperty,o=1;o<arguments.length;o++){var i=arguments[o];if(null!=i){var a=Object(i);for(var s in a)n.call(a,s)&&(r[s]=a[s])}}return r}e.exports=r},function(e,t,r){(function(t){"use strict";function n(e,r){Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:function(){return this._store?this._store[r]:null},set:function(e){"production"!==t.env.NODE_ENV?l(!1,"Don't set the %s property of the React element. Instead, specify the correct value when initially creating the element.",r):null,this._store[r]=e}})}function o(e){try{var t={props:!0};for(var r in t)n(e,r);c=!0}catch(o){}}var i=r(63),a=r(23),s=r(11),l=r(8),u={key:!0,ref:!0},c=!1,f=function(e,r,n,o,i,a){if(this.type=e,this.key=r,this.ref=n,this._owner=o,this._context=i,"production"!==t.env.NODE_ENV){this._store={props:a,originalProps:s({},a)};try{Object.defineProperty(this._store,"validated",{configurable:!1,enumerable:!1,writable:!0})}catch(l){}if(this._store.validated=!1,c)return void Object.freeze(this)}this.props=a};f.prototype={_isReactElement:!0},"production"!==t.env.NODE_ENV&&o(f.prototype),f.createElement=function(e,t,r){var n,o={},s=null,l=null;if(null!=t){l=void 0===t.ref?null:t.ref,s=void 0===t.key?null:""+t.key;for(n in t)t.hasOwnProperty(n)&&!u.hasOwnProperty(n)&&(o[n]=t[n])}var c=arguments.length-2;if(1===c)o.children=r;else if(c>1){for(var d=Array(c),p=0;p<c;p++)d[p]=arguments[p+2];o.children=d}if(e&&e.defaultProps){var h=e.defaultProps;for(n in h)"undefined"==typeof o[n]&&(o[n]=h[n])}return new f(e,s,l,a.current,i.current,o)},f.createFactory=function(e){var t=f.createElement.bind(null,e);return t.type=e,t},f.cloneAndReplaceProps=function(e,r){var n=new f(e.type,e.key,e.ref,e._owner,e._context,r);return"production"!==t.env.NODE_ENV&&(n._store.validated=e._store.validated),n},f.cloneElement=function(e,t,r){var n,o=s({},e.props),i=e.key,l=e.ref,c=e._owner;if(null!=t){void 0!==t.ref&&(l=t.ref,c=a.current),void 0!==t.key&&(i=""+t.key);for(n in t)t.hasOwnProperty(n)&&!u.hasOwnProperty(n)&&(o[n]=t[n])}var d=arguments.length-2;if(1===d)o.children=r;else if(d>1){for(var p=Array(d),h=0;h<d;h++)p[h]=arguments[h+2];o.children=p}return new f(e.type,i,l,c,e._context,o)},f.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},e.exports=f}).call(t,r(1))},function(e,t,r){(function(t){"use strict";var r=function(e,r,n,o,i,a,s,l){if("production"!==t.env.NODE_ENV&&void 0===r)throw new Error("invariant requires an error message argument");if(!e){var u;if(void 0===r)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,i,a,s,l],f=0;u=new Error("Invariant Violation: "+r.replace(/%s/g,function(){return c[f++]}))}throw u.framesToPop=1,u}};e.exports=r}).call(t,r(1))},function(e,t){"use strict";var r="CHANGE_FIXTURE";e.exports={type:r,changeFixture:function(e){return{type:r,fixture:e}}}},function(e,t){"use strict";var r="RESET_STORE";e.exports={type:r,resetStore:function(e){return{type:r,reduxStore:e}}}},function(e,t,r){!function(e){e(r(4))}(function(e){"use strict";function t(t,o,i,a){function s(e){var r=l(t,o);if(!r||r.to.line-r.from.line<u)return null;for(var n=t.findMarksAt(r.from),i=0;i<n.length;++i)if(n[i].__isFold&&"fold"!==a){if(!e)return null;r.cleared=!0,n[i].clear()}return r}if(i&&i.call){var l=i;i=null}else var l=n(t,i,"rangeFinder");"number"==typeof o&&(o=e.Pos(o,0));var u=n(t,i,"minFoldSize"),c=s(!0);if(n(t,i,"scanUp"))for(;!c&&o.line>t.firstLine();)o=e.Pos(o.line-1,0),c=s(!1);if(c&&!c.cleared&&"unfold"!==a){var f=r(t,i);e.on(f,"mousedown",function(t){d.clear(),e.e_preventDefault(t)});var d=t.markText(c.from,c.to,{replacedWith:f,clearOnEnter:n(t,i,"clearOnEnter"),__isFold:!0});d.on("clear",function(r,n){e.signal(t,"unfold",t,r,n)}),e.signal(t,"fold",t,c.from,c.to)}}function r(e,t){var r=n(e,t,"widget");if("string"==typeof r){var o=document.createTextNode(r);r=document.createElement("span"),r.appendChild(o),r.className="CodeMirror-foldmarker"}return r}function n(e,t,r){if(t&&void 0!==t[r])return t[r];var n=e.options.foldOptions;return n&&void 0!==n[r]?n[r]:o[r]}e.newFoldFunction=function(e,r){return function(n,o){t(n,o,{rangeFinder:e,widget:r})}},e.defineExtension("foldCode",function(e,r,n){t(this,e,r,n)}),e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),r=0;r<t.length;++r)if(t[r].__isFold)return!0}),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},e.commands.foldAll=function(t){t.operation(function(){for(var r=t.firstLine(),n=t.lastLine();r<=n;r++)t.foldCode(e.Pos(r,0),null,"fold")})},e.commands.unfoldAll=function(t){t.operation(function(){for(var r=t.firstLine(),n=t.lastLine();r<=n;r++)t.foldCode(e.Pos(r,0),null,"unfold")})},e.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,r){for(var n=0;n<e.length;++n){var o=e[n](t,r);if(o)return o}}}),e.registerHelper("fold","auto",function(e,t){for(var r=e.getHelpers(t,"fold"),n=0;n<r.length;n++){var o=r[n](e,t);if(o)return o}});var o={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};e.defineOption("foldOptions",null),e.defineExtension("foldOption",function(e,t){return n(this,e,t)})})},function(e,t,r){(function(){var e,n;e=r(6).sep,t.basenameScore=function(r,n,o){var i,a,s,l,u,c;for(s=r.length-1;r[s]===e;)s--;for(c=0,l=s,i=null;s>=0;)r[s]===e?(c++,null==i&&(i=r.substring(s+1,l+1))):0===s&&(l<r.length-1?null==i&&(i=r.substring(0,l+1)):null==i&&(i=r)),s--;return i===r?o*=2:i&&(o+=t.score(i,n)),u=c+1,a=Math.max(1,10-u),o*=.01*a},t.score=function(t,r){var o,i,a,s,l,u,c,f,d,p,h,m;if(t===r)return 1;if(n(t,r))return 1;for(p=0,c=r.length,d=t.length,a=0,s=0;a<c;){if(o=r[a++],l=t.indexOf(o.toLowerCase()),h=t.indexOf(o.toUpperCase()),u=Math.min(l,h),u===-1&&(u=Math.max(l,h)),s=u,s===-1)return 0;i=.1,t[s]===o&&(i+=.1),0===s||t[s-1]===e?i+=.8:"-"!==(m=t[s-1])&&"_"!==m&&" "!==m||(i+=.7),t=t.substring(s+1,d),p+=i}return f=p/c,(f*(c/d)+f)/2},n=function(t,r){if(t[t.length-r.length-1]===e)return t.lastIndexOf(r)===t.length-r.length},t.match=function(e,t,r){var n,o,i,a,s,l,u,c,f,d;if(null==r&&(r=0),e===t)return function(){d=[];for(var t=r,n=r+e.length;r<=n?t<n:t>n;r<=n?t++:t--)d.push(t);return d}.apply(this);for(u=t.length,c=e.length,o=0,i=0,s=[];o<u;){if(n=t[o++],a=e.indexOf(n.toLowerCase()),f=e.indexOf(n.toUpperCase()),l=Math.min(a,f),l===-1&&(l=Math.max(a,f)),i=l,i===-1)return[];s.push(r+i),r+=i+1,e=e.substring(i+1,c)}return s}}).call(this)},function(e,t,r){"use strict";var n=r(3),o=r(2);t.render=function(e){var r=n.omit(e.snapshot,"state","children"),i=e.snapshot.state,a=e.snapshot.children,s=o.createElement(e.component,r,a),l=o.render(s,e.container);return n.isEmpty(i)||t.injectState(l,i),l},t.injectState=function(e,r){var o=n.omit(r,"children"),i=r.children;e.setState(o,function(){n.isEmpty(i)||n.each(e.refs,function(e,r){n.isEmpty(i[r])||t.injectState(e,i[r])})})}},function(e,t,r){e.exports={uri:r(20),Router:r(55)}},function(e,t){e.exports={parseLocation:function(e){var t={};if(e.indexOf("?")===-1)return t;var r=e.split("?").pop();if(!r.length)return t;for(var n,o,i,a=r.split("&"),s=0;s<a.length;s++){n=a[s].split("="),o=n[0],i=decodeURIComponent(n[1]);try{i=JSON.parse(i)}catch(l){}t[o]=i}return t},stringifyParams:function(e){var t,r=[];for(var n in e){if(t=e[n],"object"==typeof t)try{t=JSON.stringify(t)}catch(o){continue}r.push(n+"="+encodeURIComponent(t))}return"?"+r.join("&")}}},function(e,t){"use strict";function r(e){return e.shape({subscribe:e.func.isRequired,dispatch:e.func.isRequired,getState:e.func.isRequired})}t.__esModule=!0,t["default"]=r,e.exports=t["default"]},function(e,t){e.exports=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t){"use strict";function r(e){return a.js+e[0].toUpperCase()+e.substr(1)}function n(e){return Object.keys(e).reduce(function(t,n){return-1!==s.indexOf(n)?t[r(n)]=e[n]:t[n]=e[n],t},{})}function o(e){var t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("safari")&&-1===t.indexOf("chrome")?!function(){var t=function(e,t,r){e[r]=e[t],delete e[t]};"flex"===e.display&&(e.display="-webkit-flex"),["alignItems","justifyContent","flexDirection","flex","flexWrap"].forEach(function(n){t(e,n,r(n))})}():-1!==navigator.appVersion.indexOf("MSIE 10")&&"flex"===e.display&&(e.display="-ms-flexbox"),e}function i(e){return Object.keys(e).reduce(function(t,r){return t[r]=o(n(e[r])),t},{})}var a=function(){var e=window.getComputedStyle(document.documentElement,""),t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];return{dom:"ms"===t?"MS":t,lowercase:t,css:"-"+t+"-",js:"ms"===t?t:t[0].toUpperCase()+t.substr(1)}}(),s=["animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","backfaceVisibility","backgroundClip","borderImage","borderImageSlice","boxSizing","boxShadow","contentColumns","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","perspective","perspectiveOrigin","userSelect"];t.prefix=i}])},function(e,t){"use strict";var r={current:null};e.exports=r},function(e,t){"use strict";function r(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(){if(0===t.length)return arguments.length<=0?void 0:arguments[0];var e=t[t.length-1],r=t.slice(0,-1);return r.reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}t.__esModule=!0,t["default"]=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){function n(){h===p&&(h=p.slice())}function i(){return d}function l(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return n(),h.push(e),function(){if(t){t=!1,n();var r=h.indexOf(e);h.splice(r,1)}}}function u(e){if(!(0,a["default"])(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(m)throw new Error("Reducers may not dispatch actions.");try{m=!0,d=f(d,e)}finally{m=!1}for(var t=p=h,r=0;r<t.length;r++)t[r]();return e}function c(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");f=e,u({type:s.INIT})}if("function"==typeof t&&"undefined"==typeof r&&(r=t,t=void 0),"undefined"!=typeof r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(o)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var f=e,d=t,p=[],h=p,m=!1;return u({type:s.INIT}),{dispatch:u,subscribe:l,getState:i,replaceReducer:c}}t.__esModule=!0,t.ActionTypes=void 0,t["default"]=o;var i=r(28),a=n(i),s=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var i=r(25),a=n(i),s=r(78),l=n(s),u=r(77),c=n(u),f=r(76),d=n(f),p=r(24),h=n(p),m=r(27),g=n(m);"production"!==e.env.NODE_ENV&&"string"==typeof o.name&&"isCrushed"!==o.name&&(0,g["default"])("You are currently using minified code outside of NODE_ENV === 'production'. This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) to ensure you have the correct code for your production build."),t.createStore=a["default"],t.combineReducers=l["default"],t.bindActionCreators=c["default"],t.applyMiddleware=d["default"],t.compose=h["default"]}).call(t,r(1))},function(e,t){"use strict";function r(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}t.__esModule=!0,t["default"]=r},function(e,t,r){function n(e){if(!a(e)||p.call(e)!=s||i(e))return!1;var t=o(e);if(null===t)return!0;var r=f.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==d}var o=r(79),i=r(80),a=r(82),s="[object Object]",l=Function.prototype,u=Object.prototype,c=l.toString,f=u.hasOwnProperty,d=c.call(Object),p=u.toString;e.exports=n},function(e,t,r){"use strict";var n=r(3);t.isSerializable=function(e){if(n.isUndefined(e)||n.isNull(e)||n.isBoolean(e)||n.isNumber(e)||n.isString(e))return!0;if(!n.isPlainObject(e)&&!n.isArray(e))return!1;for(var r in e)if(!t.isSerializable(e[r]))return!1;return!0}},function(e,t){"use strict";e.exports={get:function(e){var t;try{t=localStorage.getItem(e)}catch(r){t=null}try{return JSON.parse(t)}catch(r){return null}},set:function(e,t){try{return localStorage.setItem(e,JSON.stringify(t))}catch(r){return null}}}},function(e,t,r){
"use strict";var n=r(14).type,o=r(15).type,i=r(3);e.exports=function(e,t){if("undefined"==typeof e)return{};switch(t.type){case n:return t.fixture&&t.fixture.reduxStore?i.merge({},e,t.fixture.reduxStore):e;case o:return t.reduxStore;default:return e}}},function(e,t,r){"use strict";var n=r(31);e.exports=n},function(e,t,r){"use strict";var n=r(26),o=r(75)["default"],i=r(32);e.exports=function(){return n.createStore(i,{},n.applyMiddleware(o))}},function(e,t,r){var n,o;/*!
	  Copyright (c) 2016 Jed Watson.
	  Licensed under the MIT License (MIT), see
	  http://jedwatson.github.io/classnames
	*/
!function(){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n))e.push(r.apply(null,n));else if("object"===o)for(var a in n)i.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=r:(n=[],o=function(){return r}.apply(t,n),!(void 0!==o&&(e.exports=o)))}()},function(e,t,r){!function(e){e(r(4))}(function(e){"use strict";e.registerHelper("fold","brace",function(t,r){function n(n){for(var s=r.ch,l=0;;){var u=s<=0?-1:a.lastIndexOf(n,s-1);if(u!=-1){if(1==l&&u<r.ch)break;if(o=t.getTokenTypeAt(e.Pos(i,u+1)),!/^(comment|string)/.test(o))return u+1;s=u-1}else{if(1==l)break;l=1,s=a.length}}}var o,i=r.line,a=t.getLine(i),s="{",l="}",u=n("{");if(null==u&&(s="[",l="]",u=n("[")),null!=u){var c,f,d=1,p=t.lastLine();e:for(var h=i;h<=p;++h)for(var m=t.getLine(h),g=h==i?u:0;;){var v=m.indexOf(s,g),y=m.indexOf(l,g);if(v<0&&(v=m.length),y<0&&(y=m.length),g=Math.min(v,y),g==m.length)break;if(t.getTokenTypeAt(e.Pos(h,g+1))==o)if(g==v)++d;else if(!--d){c=h,f=g;break e}++g}if(null!=c&&(i!=c||f!=u))return{from:e.Pos(i,u),to:e.Pos(c,f)}}}),e.registerHelper("fold","import",function(t,r){function n(r){if(r<t.firstLine()||r>t.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));if(/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1))),"keyword"!=n.type||"import"!=n.string)return null;for(var o=r,i=Math.min(t.lastLine(),r+10);o<=i;++o){var a=t.getLine(o),s=a.indexOf(";");if(s!=-1)return{startCh:n.end,end:e.Pos(o,s)}}}var o,i=r.line,a=n(i);if(!a||n(i-1)||(o=n(i-2))&&o.end.line==i-1)return null;for(var s=a.end;;){var l=n(s.line+1);if(null==l)break;s=l.end}return{from:t.clipPos(e.Pos(i,a.startCh+1)),to:s}}),e.registerHelper("fold","include",function(t,r){function n(r){if(r<t.firstLine()||r>t.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));return/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1))),"meta"==n.type&&"#include"==n.string.slice(0,8)?n.start+8:void 0}var o=r.line,i=n(o);if(null==i||null!=n(o-1))return null;for(var a=o;;){var s=n(a+1);if(null==s)break;++a}return{from:e.Pos(o,i+1),to:t.clipPos(e.Pos(a))}})})},function(e,t,r){!function(e){e(r(4),r(16))}(function(e){"use strict";function t(e){this.options=e,this.from=this.to=0}function r(e){return e===!0&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function n(e,t){for(var r=e.findMarks(f(t,0),f(t+1,0)),n=0;n<r.length;++n)if(r[n].__isFold&&r[n].find().from.line==t)return r[n]}function o(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function i(e,t,r){var i=e.state.foldGutter.options,a=t,s=e.foldOption(i,"minFoldSize"),l=e.foldOption(i,"rangeFinder");e.eachLine(t,r,function(t){var r=null;if(n(e,a))r=o(i.indicatorFolded);else{var u=f(a,0),c=l&&l(e,u);c&&c.to.line-c.from.line>=s&&(r=o(i.indicatorOpen))}e.setGutterMarker(t,i.gutter,r),++a})}function a(e){var t=e.getViewport(),r=e.state.foldGutter;r&&(e.operation(function(){i(e,t.from,t.to)}),r.from=t.from,r.to=t.to)}function s(e,t,r){var o=e.state.foldGutter;if(o){var i=o.options;if(r==i.gutter){var a=n(e,t);a?a.clear():e.foldCode(f(t,0),i.rangeFinder)}}}function l(e){var t=e.state.foldGutter;if(t){var r=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){a(e)},r.foldOnChangeTimeSpan||600)}}function u(e){var t=e.state.foldGutter;if(t){var r=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var r=e.getViewport();t.from==t.to||r.from-t.to>20||t.from-r.to>20?a(e):e.operation(function(){r.from<t.from&&(i(e,r.from,t.from),t.from=r.from),r.to>t.to&&(i(e,t.to,r.to),t.to=r.to)})},r.updateViewportTimeSpan||400)}}function c(e,t){var r=e.state.foldGutter;if(r){var n=t.line;n>=r.from&&n<r.to&&i(e,n,n+1)}}e.defineOption("foldGutter",!1,function(n,o,i){i&&i!=e.Init&&(n.clearGutter(n.state.foldGutter.options.gutter),n.state.foldGutter=null,n.off("gutterClick",s),n.off("change",l),n.off("viewportChange",u),n.off("fold",c),n.off("unfold",c),n.off("swapDoc",l)),o&&(n.state.foldGutter=new t(r(o)),a(n),n.on("gutterClick",s),n.on("change",l),n.on("viewportChange",u),n.on("fold",c),n.on("unfold",c),n.on("swapDoc",l))});var f=e.Pos})},function(e,t,r){!function(e){e(r(4))}(function(e){"use strict";function t(e,t,r){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}e.defineMode("javascript",function(r,n){function o(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function i(e,t,r){return we=e,Ce=r,t}function a(e,r){var n=e.next();if('"'==n||"'"==n)return r.tokenize=s(n),r.tokenize(e,r);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return i("number","number");if("."==n&&e.match(".."))return i("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return i(n);if("="==n&&e.eat(">"))return i("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),i("number","number");if("0"==n&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),i("number","number");if("0"==n&&e.eat(/b/i))return e.eatWhile(/[01]/i),i("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),i("number","number");if("/"==n)return e.eat("*")?(r.tokenize=l,l(e,r)):e.eat("/")?(e.skipToEnd(),i("comment","comment")):t(e,r,1)?(o(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),i("regexp","string-2")):(e.eatWhile(Ee),i("operator","operator",e.current()));if("`"==n)return r.tokenize=u,u(e,r);if("#"==n)return e.skipToEnd(),i("error","error");if(Ee.test(n))return e.eatWhile(Ee),i("operator","operator",e.current());if(Ae.test(n)){e.eatWhile(Ae);var a=e.current(),c=Oe.propertyIsEnumerable(a)&&Oe[a];return c&&"."!=r.lastType?i(c.type,c.style,a):i("variable","variable",a)}}function s(e){return function(t,r){var n,o=!1;if(Me&&"@"==t.peek()&&t.match(Ne))return r.tokenize=a,i("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||o);)o=!o&&"\\"==n;return o||(r.tokenize=a),i("string","string")}}function l(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=a;break}n="*"==r}return i("comment","comment")}function u(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=a;break}n=!n&&"\\"==r}return i("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){for(var n=0,o=!1,i=r-1;i>=0;--i){var a=e.string.charAt(i),s=ze.indexOf(a);if(s>=0&&s<3){if(!n){++i;break}if(0==--n){"("==a&&(o=!0);break}}else if(s>=3&&s<6)++n;else if(Ae.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!n){++i;break}}}o&&!n&&(t.fatArrowAt=i)}}function f(e,t,r,n,o,i){this.indented=e,this.column=t,this.type=r,this.prev=o,this.info=i,null!=n&&(this.align=n)}function d(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,o){var i=e.cc;for(De.state=e,De.stream=o,De.marked=null,De.cc=i,De.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=i.length?i.pop():Te?C:w;if(a(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return De.marked?De.marked:"variable"==r&&d(e,n)?"variable-2":t}}}function h(){for(var e=arguments.length-1;e>=0;e--)De.cc.push(arguments[e])}function m(){return h.apply(null,arguments),!0}function g(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var r=De.state;if(De.marked="def",r.context){if(t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function v(){De.state.context={prev:De.state.context,vars:De.state.localVars},De.state.localVars=Fe}function y(){De.state.localVars=De.state.context.vars,De.state.context=De.state.context.prev}function b(e,t){var r=function(){var r=De.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var o=r.lexical;o&&")"==o.type&&o.align;o=o.prev)n=o.indented;r.lexical=new f(n,De.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function x(){var e=De.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function _(e){function t(r){return r==e?m():";"==e?h():m(t)}return t}function w(e,t){return"var"==e?m(b("vardef",t.length),J,_(";"),x):"keyword a"==e?m(b("form"),C,w,x):"keyword b"==e?m(b("form"),w,x):"{"==e?m(b("}"),V,x):";"==e?m():"if"==e?("else"==De.state.lexical.info&&De.state.cc[De.state.cc.length-1]==x&&De.state.cc.pop()(),m(b("form"),C,w,x,ne)):"function"==e?m(ue):"for"==e?m(b("form"),oe,w,x):"variable"==e?m(b("stat"),R):"switch"==e?m(b("form"),C,b("}","switch"),_("{"),V,x,x):"case"==e?m(C,_(":")):"default"==e?m(_(":")):"catch"==e?m(b("form"),v,_("("),ce,_(")"),w,x,y):"class"==e?m(b("form"),fe,x):"export"==e?m(b("stat"),me,x):"import"==e?m(b("stat"),ge,x):"module"==e?m(b("form"),$,b("}"),_("{"),V,x,x):"async"==e?m(w):h(b("stat"),C,_(";"),x)}function C(e){return S(e,!1)}function k(e){return S(e,!0)}function S(e,t){if(De.state.fatArrowAt==De.stream.start){var r=t?z:N;if("("==e)return m(v,b(")"),B($,")"),x,_("=>"),r,y);if("variable"==e)return h(v,$,_("=>"),r,y)}var n=t?A:L;return Pe.hasOwnProperty(e)?m(n):"function"==e?m(ue,n):"keyword c"==e||"async"==e?m(t?T:M):"("==e?m(b(")"),M,_(")"),x,n):"operator"==e||"spread"==e?m(t?k:C):"["==e?m(b("]"),xe,x,n):"{"==e?U(W,"}",null,n):"quasi"==e?h(O,n):"new"==e?m(P(t)):m()}function M(e){return e.match(/[;\}\)\],]/)?h():h(C)}function T(e){return e.match(/[;\}\)\],]/)?h():h(k)}function L(e,t){return","==e?m(C):A(e,t,!1)}function A(e,t,r){var n=0==r?L:A,o=0==r?C:k;return"=>"==e?m(v,r?z:N,y):"operator"==e?/\+\+|--/.test(t)?m(n):"?"==t?m(C,_(":"),o):m(o):"quasi"==e?h(O,n):";"!=e?"("==e?U(k,")","call",n):"."==e?m(I,n):"["==e?m(b("]"),M,_("]"),x,n):void 0:void 0}function O(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?m(O):m(C,E)}function E(e){if("}"==e)return De.marked="string-2",De.state.tokenize=u,m(O)}function N(e){return c(De.stream,De.state),h("{"==e?w:C)}function z(e){return c(De.stream,De.state),h("{"==e?w:k)}function P(e){return function(t){return"."==t?m(e?F:D):h(e?k:C)}}function D(e,t){if("target"==t)return De.marked="keyword",m(L)}function F(e,t){if("target"==t)return De.marked="keyword",m(A)}function R(e){return":"==e?m(x,w):h(L,_(";"),x)}function I(e){if("variable"==e)return De.marked="property",m()}function W(e,t){return"async"==e?(De.marked="property",m(W)):"variable"==e||"keyword"==De.style?(De.marked="property",m("get"==t||"set"==t?j:H)):"number"==e||"string"==e?(De.marked=Me?"property":De.style+" property",m(H)):"jsonld-keyword"==e?m(H):"modifier"==e?m(W):"["==e?m(C,_("]"),H):"spread"==e?m(C):":"==e?h(H):void 0}function j(e){return"variable"!=e?h(H):(De.marked="property",m(ue))}function H(e){return":"==e?m(k):"("==e?h(ue):void 0}function B(e,t){function r(n,o){if(","==n){var i=De.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),m(function(r,n){return r==t||n==t?h():h(e)},r)}return n==t||o==t?m():m(_(t))}return function(n,o){return n==t||o==t?m():h(e,r)}}function U(e,t,r){for(var n=3;n<arguments.length;n++)De.cc.push(arguments[n]);return m(b(t,r),B(e,t),x)}function V(e){return"}"==e?m():h(w,V)}function G(e){if(Le&&":"==e)return m(Y)}function K(e,t){if("="==t)return m(k)}function Y(e){return"variable"==e?(De.marked="variable-3",m(Q)):"{"==e?m(B(X,"}")):"("==e?m(B(Z,")"),q):void 0}function q(e){if("=>"==e)return m(Y)}function X(e){return"variable"==e||"keyword"==De.style?(De.marked="property",m(X)):":"==e?m(Y):void 0}function Z(e){return"variable"==e?m(Z):":"==e?m(Y):void 0}function Q(e,t){return"<"==t?m(B(Y,">"),Q):"["==e?m(_("]"),Q):void 0}function J(){return h($,G,te,re)}function $(e,t){return"modifier"==e?m($):"variable"==e?(g(t),m()):"spread"==e?m($):"["==e?U($,"]"):"{"==e?U(ee,"}"):void 0}function ee(e,t){return"variable"!=e||De.stream.match(/^\s*:/,!1)?("variable"==e&&(De.marked="property"),"spread"==e?m($):"}"==e?h():m(_(":"),$,te)):(g(t),m(te))}function te(e,t){if("="==t)return m(k)}function re(e){if(","==e)return m(J)}function ne(e,t){if("keyword b"==e&&"else"==t)return m(b("form","else"),w,x)}function oe(e){if("("==e)return m(b(")"),ie,_(")"),x)}function ie(e){return"var"==e?m(J,_(";"),se):";"==e?m(se):"variable"==e?m(ae):h(C,_(";"),se)}function ae(e,t){return"in"==t||"of"==t?(De.marked="keyword",m(C)):m(L,se)}function se(e,t){return";"==e?m(le):"in"==t||"of"==t?(De.marked="keyword",m(C)):h(C,_(";"),le)}function le(e){")"!=e&&m(C)}function ue(e,t){return"*"==t?(De.marked="keyword",m(ue)):"variable"==e?(g(t),m(ue)):"("==e?m(v,b(")"),B(ce,")"),x,G,w,y):void 0}function ce(e){return"spread"==e?m(ce):h($,G,K)}function fe(e,t){if("variable"==e)return g(t),m(de)}function de(e,t){return"extends"==t?m(Le?Y:C,de):"{"==e?m(b("}"),pe,x):void 0}function pe(e,t){return"variable"==e||"keyword"==De.style?"static"==t?(De.marked="keyword",m(pe)):(De.marked="property","get"==t||"set"==t?m(he,ue,pe):m(ue,pe)):"*"==t?(De.marked="keyword",m(pe)):";"==e?m(pe):"}"==e?m():void 0}function he(e){return"variable"!=e?h():(De.marked="property",m())}function me(e,t){return"*"==t?(De.marked="keyword",m(be,_(";"))):"default"==t?(De.marked="keyword",m(C,_(";"))):h(w)}function ge(e){return"string"==e?m():h(ve,be)}function ve(e,t){return"{"==e?U(ve,"}"):("variable"==e&&g(t),"*"==t&&(De.marked="keyword"),m(ye))}function ye(e,t){if("as"==t)return De.marked="keyword",m(ve)}function be(e,t){if("from"==t)return De.marked="keyword",m(C)}function xe(e){return"]"==e?m():h(B(k,"]"))}function _e(e,t){return"operator"==e.lastType||","==e.lastType||Ee.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var we,Ce,ke=r.indentUnit,Se=n.statementIndent,Me=n.jsonld,Te=n.json||Me,Le=n.typescript,Ae=n.wordCharacters||/[\w$\xa1-\uffff]/,Oe=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),o=e("operator"),i={type:"atom",style:"atom"},a={"if":e("if"),"while":t,"with":t,"else":r,"do":r,"try":r,"finally":r,"return":n,"break":n,"continue":n,"new":e("new"),"delete":n,"throw":n,"debugger":n,"var":e("var"),"const":e("var"),"let":e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":o,"typeof":o,"instanceof":o,"true":i,"false":i,"null":i,undefined:i,NaN:i,Infinity:i,"this":e("this"),"class":e("class"),"super":e("atom"),"yield":n,"export":e("export"),"import":e("import"),"extends":n,await:n,async:e("async")};if(Le){var s={type:"variable",style:"variable-3"},l={"interface":e("class"),"implements":n,namespace:n,module:e("module"),"enum":e("module"),"public":e("modifier"),"private":e("modifier"),"protected":e("modifier"),"abstract":e("modifier"),as:o,string:s,number:s,"boolean":s,any:s};for(var u in l)a[u]=l[u]}return a}(),Ee=/[+\-*&%=<>!?|~^]/,Ne=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,ze="([{}])",Pe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},De={state:null,column:null,marked:null,cc:null},Fe={name:"this",next:{name:"arguments"}};return x.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new f((e||0)-ke,0,"block",(!1)),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==we?r:(t.lastType="operator"!=we||"++"!=Ce&&"--"!=Ce?we:"incdec",p(t,r,we,Ce,e))},indent:function(t,r){if(t.tokenize==l)return e.Pass;if(t.tokenize!=a)return 0;var o=r&&r.charAt(0),i=t.lexical;if(!/^\s*else\b/.test(r))for(var s=t.cc.length-1;s>=0;--s){var u=t.cc[s];if(u==x)i=i.prev;else if(u!=ne)break}"stat"==i.type&&"}"==o&&(i=i.prev),Se&&")"==i.type&&"stat"==i.prev.type&&(i=i.prev);var c=i.type,f=o==c;return"vardef"==c?i.indented+("operator"==t.lastType||","==t.lastType?i.info+1:0):"form"==c&&"{"==o?i.indented:"form"==c?i.indented+ke:"stat"==c?i.indented+(_e(t,r)?Se||ke:0):"switch"!=i.info||f||0==n.doubleIndentSwitch?i.align?i.column+(f?0:1):i.indented+(f?0:ke):i.indented+(/^(?:case|default)\b/.test(r)?ke:2*ke)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Te?null:"/*",blockCommentEnd:Te?null:"*/",lineComment:Te?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Te?"json":"javascript",jsonldMode:Me,jsonMode:Te,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=C&&t!=k||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(e,t,r){t=e.exports=r(5)(),t.push([e.id,'.CodeMirror-foldmarker{color:blue;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.CodeMirror-foldgutter{width:.7em}.CodeMirror-foldgutter-folded,.CodeMirror-foldgutter-open{cursor:pointer}.CodeMirror-foldgutter-open:after{content:"\\25BE"}.CodeMirror-foldgutter-folded:after{content:"\\25B8"}',""])},function(e,t,r){t=e.exports=r(5)(),t.push([e.id,".CodeMirror{font-family:monospace;height:300px;color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px;*zoom:1;*display:inline}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper{-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:none;font-variant-ligatures:none}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}",""])},function(e,t,r){t=e.exports=r(5)(),t.push([e.id,".solarized.base03{color:#002b36}.solarized.base02{color:#073642}.solarized.base01{color:#586e75}.solarized.base00{color:#657b83}.solarized.base0{color:#839496}.solarized.base1{color:#93a1a1}.solarized.base2{color:#eee8d5}.solarized.base3{color:#fdf6e3}.solarized.solar-yellow{color:#b58900}.solarized.solar-orange{color:#cb4b16}.solarized.solar-red{color:#dc322f}.solarized.solar-magenta{color:#d33682}.solarized.solar-violet{color:#6c71c4}.solarized.solar-blue{color:#268bd2}.solarized.solar-cyan{color:#2aa198}.solarized.solar-green{color:#859900}.cm-s-solarized{line-height:1.45em;color-profile:sRGB;rendering-intent:auto}.cm-s-solarized.cm-s-dark{color:#839496;background-color:#002b36;text-shadow:#002b36 0 1px}.cm-s-solarized.cm-s-light{background-color:#fdf6e3;color:#657b83;text-shadow:#eee8d5 0 1px}.cm-s-solarized .CodeMirror-widget{text-shadow:none}.cm-s-solarized .cm-header{color:#586e75}.cm-s-solarized .cm-quote{color:#93a1a1}.cm-s-solarized .cm-keyword{color:#cb4b16}.cm-s-solarized .cm-atom,.cm-s-solarized .cm-number{color:#d33682}.cm-s-solarized .cm-def{color:#2aa198}.cm-s-solarized .cm-variable{color:#839496}.cm-s-solarized .cm-variable-2{color:#b58900}.cm-s-solarized .cm-variable-3{color:#6c71c4}.cm-s-solarized .cm-property{color:#2aa198}.cm-s-solarized .cm-operator{color:#6c71c4}.cm-s-solarized .cm-comment{color:#586e75;font-style:italic}.cm-s-solarized .cm-string{color:#859900}.cm-s-solarized .cm-string-2{color:#b58900}.cm-s-solarized .cm-meta{color:#859900}.cm-s-solarized .cm-qualifier{color:#b58900}.cm-s-solarized .cm-builtin{color:#d33682}.cm-s-solarized .cm-bracket{color:#cb4b16}.cm-s-solarized .CodeMirror-matchingbracket{color:#859900}.cm-s-solarized .CodeMirror-nonmatchingbracket{color:#dc322f}.cm-s-solarized .cm-tag{color:#93a1a1}.cm-s-solarized .cm-attribute{color:#2aa198}.cm-s-solarized .cm-hr{color:transparent;border-top:1px solid #586e75;display:block}.cm-s-solarized .cm-link{color:#93a1a1;cursor:pointer}.cm-s-solarized .cm-special{color:#6c71c4}.cm-s-solarized .cm-em{color:#999;text-decoration:underline;text-decoration-style:dotted}.cm-s-solarized .cm-strong{color:#eee}.cm-s-solarized .cm-error,.cm-s-solarized .cm-invalidchar{color:#586e75;border-bottom:1px dotted #dc322f}.cm-s-solarized.cm-s-dark div.CodeMirror-selected{background:#073642}.cm-s-solarized.cm-s-dark.CodeMirror ::selection{background:rgba(7,54,66,.99)}.cm-s-dark .CodeMirror-line>span::-moz-selection,.cm-s-dark .CodeMirror-line>span>span::-moz-selection,.cm-s-solarized.cm-s-dark .CodeMirror-line::-moz-selection{background:rgba(7,54,66,.99)}.cm-s-light .CodeMirror-line>span::selection,.cm-s-light .CodeMirror-line>span>span::selection,.cm-s-solarized.cm-s-light .CodeMirror-line::selection,.cm-s-solarized.cm-s-light div.CodeMirror-selected{background:#eee8d5}.cm-s-ligh .CodeMirror-line>span::-moz-selection,.cm-s-ligh .CodeMirror-line>span>span::-moz-selection,.cm-s-solarized.cm-s-light .CodeMirror-line::-moz-selection{background:#eee8d5}.cm-s-solarized.CodeMirror{box-shadow:inset 7px 0 9pt -6px #000}.cm-s-solarized .CodeMirror-gutters{border-right:0}.cm-s-solarized.cm-s-dark .CodeMirror-gutters{background-color:#073642}.cm-s-solarized.cm-s-dark .CodeMirror-linenumber{color:#586e75;text-shadow:#021014 0 -1px}.cm-s-solarized.cm-s-light .CodeMirror-gutters{background-color:#eee8d5}.cm-s-solarized.cm-s-light .CodeMirror-linenumber{color:#839496}.cm-s-solarized .CodeMirror-linenumber{padding:0 5px}.cm-s-solarized .CodeMirror-guttermarker-subtle{color:#586e75}.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker{color:#ddd}.cm-s-solarized.cm-s-light .CodeMirror-guttermarker{color:#cb4b16}.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text{color:#586e75}.cm-s-solarized .CodeMirror-cursor{border-left:1px solid #819090}.cm-s-solarized.cm-s-light.cm-fat-cursor .CodeMirror-cursor{background:#7e7}.cm-s-solarized.cm-s-light .cm-animate-fat-cursor{background-color:#7e7}.cm-s-solarized.cm-s-dark.cm-fat-cursor .CodeMirror-cursor{background:#586e75}.cm-s-solarized.cm-s-dark .cm-animate-fat-cursor{background-color:#586e75}.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background{background:hsla(0,0%,100%,.06)}.cm-s-solarized.cm-s-light .CodeMirror-activeline-background{background:rgba(0,0,0,.06)}",""])},function(e,t,r){t=e.exports=r(5)(),t.push([e.id,".CodeMirror,.ReactCodeMirror{width:100%;height:100%}",""])},function(e,t,r){t=e.exports=r(5)(),t.push([e.id,"@keyframes component-playground__roundandround___1k4qK{to{transform:rotate(360deg)}}.component-playground__component-playground___1lxyK{position:absolute;width:100%;height:100%}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav{position:absolute;top:0;right:0;bottom:0;left:0;right:auto;width:250px;background:#2e2c29;font-family:Lucida Grande,Segoe UI,Ubuntu,Cantarell,sans-serif;font-size:9pt}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__header___2IoFk{position:relative;height:70px;overflow:hidden}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__header___2IoFk .component-playground__button___2_R9g{display:inline-block;width:50px;height:50px;border-radius:100%;background-position:center center;background-repeat:no-repeat;color:#adaaa4}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__header___2IoFk .component-playground__button___2_R9g.component-playground__selected-button___nlDMO,.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__header___2IoFk .component-playground__button___2_R9g:hover{background-color:#403f3a}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__header___2IoFk .component-playground__play-button___23zOe{position:absolute;top:10px;left:10px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAABCklEQVR4nLXULUsFQRSH8d+VWwxWg2AUtImYbBaD6Ecwix/AojaxCFaboGISLAoaBKvF4lsQzOIHkNu8GNaB5fqys7szTxqYmfMM5/yZztnpidwMldbHmM8tWcENLjCVSxJYwgP2MZpLAl2s4RUbGM4hCYxgBy+KdnZySALjimDcaRCOWElgRhGOc0zmkgSW8SgyHE0l1AhHG0mgMhwpJIFyOGZzSQJjBuaUUtLDNiZwWd7oJijexxG28PbbgbaSa6zj/r9DTdv1hEUsVAmaSN6ximlcxV6KbVcPe9jFR82HVUr6iuxv+mOobSVRQ20qef4uHt3zOpJbHOIAn6kEg5K5lIXL5Pi7fvAF1F8uXM5LDawAAAAASUVORK5CYII=);background-position:15px center}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__header___2IoFk .component-playground__play-button___23zOe.component-playground__selected-button___nlDMO{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAABCUlEQVR4nLXUrUpEQRiH8d/KFoPVIBgFbSImm8Ugeglm8QIsahOLYLUJ6iUoaBCsFotfQVmreAGyzcVwHDisH2fOnDNPGpiZ9xne9890XnsvcjNSWp9iMbdkDdc4x0wuSWAF9zjEeC4JdLGBHrYwmkMSGMMenhXt7OSQBCYVwbiVEI5YSWBOEY4zTOeSBFbxIDIcqRJqhKOJJFAZjjYkgXI45nNJAhOG5tSmpI9dTOGivNFtofgAJ9jB228HmkqusIm7/w6ltusRy1iqEqRI3rGOWVzGXoptVx8H2MdHzYdVSgaK7G/7Y6hNJVFDTZU8fReP7nkdyQ2OcYTPtgTDkoU2C5fJ8Xf94Auuuy70BQy3gwAAAABJRU5ErkJggg==)}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__header___2IoFk .component-playground__play-button___23zOe .component-playground__electron___srTwx{position:absolute;top:50%;left:50%;width:0;height:0;animation:component-playground__roundandround___1k4qK 5s infinite linear}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__header___2IoFk .component-playground__play-button___23zOe .component-playground__electron___srTwx:after{content:'';position:absolute;top:-25px;margin:-2.5px 0 0 -2.5px;width:5px;height:5px;border-radius:100%;background:#61dafb}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__header___2IoFk .component-playground__menu___EMtUX{position:absolute;bottom:10px;right:0;margin:0}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__header___2IoFk .component-playground__menu___EMtUX .component-playground__button___2_R9g{margin-right:10px}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__header___2IoFk .component-playground__menu___EMtUX .component-playground__fixture-editor-button___3QZBS{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAB/ElEQVR4nL3WX4iMURjH8c/MjkJWhORPKEXKlUIkyeZPmyillb1y5dKFElfbXohLF3LhbmtLDUOaTYOolba4FCWSP+GGWGZtyp9xcc40b+Odmnm1+9Tbe3rOeZ7vec57nt9MrlQcNtWWn3ICCvE9ByewF/OQazP+D97hDEajbxNOYQg36pD5uI/1GTe6Cj/jeAPuYC72ow+lPM5GwEgMyHXw5LEYY+iKlf2OwC5cRm8eB/EDR/CmwypqqGIjnsY8u/E1zs/AxTwW4W1cnMU2C0e0BvfwTfi29XyP67erlhGwBbdxDZewJII+oTeO+//nCm/FLZTwGseif1lM/h49qGaFbIuAqxEw2DT/UeO7ZGrG7ajgSgvAI6GCz1khO3ATxRaAMezCeNJZ0L7tRBmzsQBHm+ZHsQ8TzYHtQnoioIzlQjcn7W70TaYFt3NcM2PyEaFh9+BBYr4iVDCJhVkhBczCK6GzJ3Bc6K0yDgidPqAhkv8kaNdOCj3wRajqOg5riOMAnqcFdnq7+vFM2HFfAkAQzFTlKAhaszSOf6Ws+Y51Tb4XGmoLK+N7PA2SF7SnG+elH18t7j75JAHduBDHlTRIrlQcXo2Hwt2v4kPawhaWwwrhBj4RBDO1T14Kcn1O+C1Y2wGEoFNDOJ0GqENE0KEOk7dt0/JvZVogfwHdM3Runhr5dwAAAABJRU5ErkJggg==)}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__header___2IoFk .component-playground__menu___EMtUX .component-playground__fixture-editor-button___3QZBS.component-playground__selected-button___nlDMO{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAB+UlEQVR4nL3WT4iNURjH8c995ypkREj+hFKkrBQiSSZ/mkTZjMzKytJCidVkMbG0kIXdrBSGdCddRI00xVKUxtz8CRtiuGNS/lyLc2737Xqn7n0189Tbe3rOOc/3POc9z++8hcrYqOm2ZNoJKMb3PJzEfixAocX5f/AO/RiOvi04jQHcqkMW4iE25lzoGvyM7U24h/k4iB4MJjgXAUNxQqGNJ8FSjKAjZvY7AjtwBd0JDuMHjuJNm1nUUMVmPI9x9uJr7J+FSwmW4G0cnMe2Clu0Dg/wTfi29XhP66erlhOwDXdxA5exLII+oTu2e//nCG/HHQziNY5H/4oY/D26UM0L2REB1yPgbFP/R43vkqsYd6KMa1MAnggZfM4L2YXbuDoFYAR7MJ52FrVuu1HCXCzCsab+YRzARPPEViFdEVDCSqGa03Y/+iazJreyXbNj8CGhYPfhUaq/LGQwicV5IUXMwSuhsidwQqitEg4Jld6nIZL/BGjVTgk18EXI6iaOaIhjHzIvp3ZPVy9eCCvuSQEIgpmpHEVBa5bH9q+MMd+xocn3UkNtYXV8j2dBEkF7OnFB9vbV4urTTxrQiYuxXc6CFCpjo2vxWDj7VXzIGjiFFbBKOIHPBMHMrJOKINfnhbtgfRsQgk4N4EwWgJBJmzHbtxn5W5kRyF+GYXb8gC07QAAAAABJRU5ErkJggg==)}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__header___2IoFk .component-playground__menu___EMtUX .component-playground__full-screen-button___1Td5Y{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAABxUlEQVR4nL3Wv2sUQRTA8c+eGsHCxipa2QSxUgRLC0WDGITkUgv+ABsRCxv/CEmpiCiIogZSBLUQCwUrY2GjoGArdmJCEHPgj2J3cG5uZ1Yi8cFxu+/te9+d92Nmq4X5uzZaes3/G/zK/N5mfC/gR8ZnDYdTyL7Ci3zK6D+jytjGsDeF5OQ5pjO2BZxTv3lRSpAVzOJb4ZlbuPEvkO24g62FZ/o4ux7ISnR9Qp2WNlAfD7C5uV+VSV0KeYHdeNIBmkkAyziiXtXPHOQdnjUBvzRBcqAZPEwAx7CE2ziN7/gQnKtmGKuWpY41gaci3RL2Y0sEOIrXie9QvLCStlwO1Hl/HOkORoCvGcBIvK45CaBXLbapDGBEuiBwEgda9FeU2/uvIbO470+RYym1dyvkYhOwBFjGITzqAI1jDrtSyBzmcaYAmMTLxhY3QwzaqZ61S+o0D0F66ra7iesZQCh+aIZ0jhbVG+pEo9uUQoJUOF8ABBkYHdjJCDAkpcKvZgAxqI+nhRidkG3Y0+G/Q73XrRvSU58XpzL2ccM16IQMCvZr2o/Zyx2AtXARCnxcdCYn8l773nYVH0VdlADuhZvqf34Sbaj8Bk6ycMLiKlQaAAAAAElFTkSuQmCC)}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__fixtures___zgzFs{position:absolute;top:0;right:0;bottom:0;left:0;top:70px;background:rgba(0,0,0,.2);overflow-x:hidden;overflow-y:auto}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__fixtures___zgzFs .component-playground__components___2TURY{margin:0;padding:0;list-style-type:none}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__fixtures___zgzFs .component-playground__components___2TURY .component-playground__component___10GXL{padding:5px 0}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__fixtures___zgzFs .component-playground__components___2TURY .component-playground__component___10GXL .component-playground__component-name___14XEV{display:block;height:30px;margin:0;padding:0 10px;color:#dddcda;font-size:1pc;line-height:30px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__fixtures___zgzFs .component-playground__components___2TURY .component-playground__component___10GXL .component-playground__component-fixtures___1-sVz{margin:0;padding:0;list-style-type:none}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__fixtures___zgzFs .component-playground__components___2TURY .component-playground__component___10GXL .component-playground__component-fixtures___1-sVz .component-playground__component-fixture___30dD_{margin:0;padding:0}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__fixtures___zgzFs .component-playground__components___2TURY .component-playground__component___10GXL .component-playground__component-fixtures___1-sVz .component-playground__component-fixture___30dD_ a{display:block;height:30px;padding:0 10px;color:#adaaa4;line-height:30px;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__fixtures___zgzFs .component-playground__components___2TURY .component-playground__component___10GXL .component-playground__component-fixtures___1-sVz .component-playground__component-fixture___30dD_ a:hover{background:#403f3a}.component-playground__component-playground___1lxyK>.component-playground__left-nav___7Tiav .component-playground__fixtures___zgzFs .component-playground__components___2TURY .component-playground__component___10GXL .component-playground__component-fixtures___1-sVz .component-playground__component-fixture___30dD_.component-playground__selected___3e-IO a{background:#403f3a;color:#dddcda}.component-playground__component-playground___1lxyK>.component-playground__content-frame___34Klb{position:absolute;top:0;right:0;bottom:0;left:0;left:250px}.component-playground__component-playground___1lxyK>.component-playground__content-frame___34Klb>.component-playground__fixture-editor-outer___1i5B3{position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid hsla(0,0%,6%,.1);background:#f8f5ec}.component-playground__component-playground___1lxyK>.component-playground__content-frame___34Klb>.component-playground__preview___mpAPx{height:100%;position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto;background-image:linear-gradient(45deg,#f1f1f1 25%,transparent 25%,transparent 75%,#f1f1f1 75%,#f1f1f1 100%),linear-gradient(45deg,#f1f1f1 25%,transparent 25%,transparent 75%,#f1f1f1 75%,#f1f1f1 100%);background-size:50px 50px;background-position:0 0,25px 25px}.component-playground__component-playground___1lxyK>.component-playground__content-frame___34Klb>.component-playground__split-pane___13Wft .component-playground__fixture-editor-outer___1i5B3{height:100%;width:100%;border:1px solid hsla(0,0%,6%,.1);background:#f8f5ec}.component-playground__component-playground___1lxyK>.component-playground__content-frame___34Klb>.component-playground__split-pane___13Wft .component-playground__preview___mpAPx{height:100%;overflow:auto;background-image:linear-gradient(45deg,#f1f1f1 25%,transparent 25%,transparent 75%,#f1f1f1 75%,#f1f1f1 100%),linear-gradient(45deg,#f1f1f1 25%,transparent 25%,transparent 75%,#f1f1f1 75%,#f1f1f1 100%);background-size:50px 50px;background-position:0 0,25px 25px}.component-playground__component-playground___1lxyK>.component-playground__content-frame___34Klb>.component-playground__split-pane___13Wft .component-playground__resizer___1rItS{background:hsla(0,0%,67%,.8);z-index:5;background-clip:padding-box;border:solid transparent}.component-playground__component-playground___1lxyK>.component-playground__content-frame___34Klb>.component-playground__split-pane___13Wft .component-playground__resizer___1rItS.component-playground__horizontal___l4agI{height:1px;border-width:5px 0;margin:-5px 0;cursor:row-resize}.component-playground__component-playground___1lxyK>.component-playground__content-frame___34Klb>.component-playground__split-pane___13Wft .component-playground__resizer___1rItS.component-playground__vertical___1ZYIe{width:1px;border-width:0 5px;margin:0 -5px;cursor:col-resize}.component-playground__component-playground___1lxyK>.component-playground__content-frame___34Klb>.component-playground__split-pane___13Wft .component-playground__resizer___1rItS:hover{border-color:rgba(0,0,0,.15)}.component-playground__component-playground___1lxyK>.component-playground__content-frame___34Klb>.component-playground__split-pane___13Wft .component-playground__resizer___1rItS.component-playground__disabled___1NdOo{cursor:not-allowed}.component-playground__component-playground___1lxyK>.component-playground__content-frame___34Klb>.component-playground__split-pane___13Wft .component-playground__resizer___1rItS.component-playground__disabled___1NdOo:hover{border-color:transparent}.component-playground__component-playground___1lxyK.component-playground__full-screen___1LaNt>.component-playground__left-nav___7Tiav{display:none}.component-playground__component-playground___1lxyK.component-playground__full-screen___1LaNt>.component-playground__content-frame___34Klb{top:0;left:0}.component-playground__filter-input-container___1CRo5{position:relative;border-bottom:1px solid #403f3a}.component-playground__filter-input-icon___1Nuuk{position:absolute;top:50%;transform:translateY(-50%);left:10px;width:22.5px;height:22.5px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAgVBMVEUAAACRkZGSkpKRkZGRkZGRkZGRkZGSkpKQkJCRkZGQkJCRkZGSkpKSkpKRkZGdnZ2SkpKRkZGRkZGSkpKRkZGSkpKSkpKPj4+UlJSRkZGSkpKRkZGSkpKSkpKRkZGTk5OSkpKRkZGRkZGRkZGQkJCRkZGSkpKRkZF/f3+NjY2SkpL3kFzUAAAAKnRSTlMAgfc3Co0TV/ba0bOlRCkDzTHmxp5xbCIHtyzrdV8+HdO6+8CZfN1pBhuWzHJmAAACrklEQVR42u3ai3KqMBAG4J+LgAgoKBc5Kt5q233/BzxzRpLWM1aBTco4k+8B2n8S2E0WYRiGYRiGYRiG0du83k5m+ywgCrJwNtkmc/wi14/+0H/+RL6L3+GsbLorWDnQL17SA6cYeqUneuJQQx93Qs8drQqa1HvqJKyhhW9TR4EPDd7o1vT8Hpfex4dXxu/nKd16g3K327/IG9xo8pC+m2j9/zMHdzizHgk4679w8ANnoWsXfJLsYv6gQxQ2ST6UqW0SpikeSqdfURMo4u5JWHp4wluSEFbKH8C12yHumgQLSqQkLF104Mo1OCZQ4ST330Mn3lR2JigQywJbd14zm1o78MkFLdBZTq0T2BxZf+bobC4rkgOulfxTg2KvwOTaov6jF/Eu2i54/IFruVNVkCPxBKAn0Z0jsMzF+T9HTxtxXwBLTa0GPTXUSsCxFUUQvYlyuFXSh87o7azkaDSjq3f0Vsj3l0OcBOLhPSQER0ZXJXor6SoDR0BXHnrzRC0EB7U+0FtFrdcOMPoWjP4QhvzXcPHahYhRile8UsxvRhclzSgZ3I5L2Y5f+0Aij2Th0DYWvfqh1A14x/LAffWLycCrWUitFGwnzuX0oPJ6bqfjXM9x6D2guFBrDRXq48gjGlj9hlQH1UMqVOGwMV1WQZE66D6ovNAXS8uoNn80qs1t+s4aa1gtWXrG9esd7titSdCegMJNgxvlZk93WRo/2RRx6VWVV8bF6kI/skb4aKUrQbKnTjJtCSrr2OnDpaUtAZIDPbFOAGhMgN2JHjjsADAScD/fpxAYCXg/YNCeQEq2k1mY2UR2tvj3Ew4IjAQ8JoFJYBKYBJ0T5GDhJ7AbsPATbMDCTxDh91ljB4DF2ALVCYJPcPATFBjJ9eIaFBhNs4mizScMwzAMwzCMe/4CYtww/dv4UKgAAAAASUVORK5CYII=);background-size:contain;background-position:center;background-repeat:no-repeat}.component-playground__filter-input___Af45s{background-color:#2e2c29;box-sizing:border-box;display:block;height:30px;width:100%;padding:0 10px;padding-left:40px;border:0;box-shadow:none;font-size:13px;transition:all .3s ease;color:#adaaa4}.component-playground__filter-input___Af45s:active,.component-playground__filter-input___Af45s:focus{outline:0;background-color:#403f3a}",""]),
t.locals={"component-playground":"component-playground__component-playground___1lxyK","left-nav":"component-playground__left-nav___7Tiav",header:"component-playground__header___2IoFk",button:"component-playground__button___2_R9g","selected-button":"component-playground__selected-button___nlDMO","play-button":"component-playground__play-button___23zOe",electron:"component-playground__electron___srTwx",roundandround:"component-playground__roundandround___1k4qK",menu:"component-playground__menu___EMtUX","fixture-editor-button":"component-playground__fixture-editor-button___3QZBS","full-screen-button":"component-playground__full-screen-button___1Td5Y",fixtures:"component-playground__fixtures___zgzFs",components:"component-playground__components___2TURY",component:"component-playground__component___10GXL","component-name":"component-playground__component-name___14XEV","component-fixtures":"component-playground__component-fixtures___1-sVz","component-fixture":"component-playground__component-fixture___30dD_",selected:"component-playground__selected___3e-IO","content-frame":"component-playground__content-frame___34Klb","fixture-editor-outer":"component-playground__fixture-editor-outer___1i5B3",preview:"component-playground__preview___mpAPx","split-pane":"component-playground__split-pane___13Wft",resizer:"component-playground__resizer___1rItS",horizontal:"component-playground__horizontal___l4agI",vertical:"component-playground__vertical___1ZYIe",disabled:"component-playground__disabled___1NdOo","full-screen":"component-playground__full-screen___1LaNt","filter-input-container":"component-playground__filter-input-container___1CRo5","filter-input-icon":"component-playground__filter-input-icon___1Nuuk","filter-input":"component-playground__filter-input___Af45s"}},function(e,t,r){(function(){var t,n,o,i,a;i=r(9),n=r(17),o=function(e){return e.candidate},a=function(e,t){return t.score-e.score},t=r(6).sep,e.exports=function(e,t,r){var s,l,u,c,f,d,p,h,m,g,v,y,b,x,_,w,C,k,S,M;if(M=null!=r?r:{},d=M.key,m=M.maxResults,h=M.maxInners,s=M.allowErrors,p=M.legacy,b=[],x=null!=h&&h>0?h:e.length,l=!!s,u=null!=d,g=i.prepQuery(t),p)for(v=g.depth>0,f=g.core,C=0,S=e.length;C<S;C++)c=e[C],_=null!=d?c[d]:c,_&&(y=n.score(_,f,v),v||(y=n.basenameScore(_,f,y)),y>0&&b.push({candidate:c,score:y}));else for(w=0,k=e.length;w<k&&(c=e[w],_=u?c[d]:c,!(_&&(y=i.score(_,t,g,l),y>0&&(b.push({candidate:c,score:y}),!--x))));w++);return b.sort(a),e=b.map(o),null!=m&&(e=e.slice(0,m)),e}}).call(this)},function(e,t,r){(function(){var t,n,o,i,a,s;s=r(9),o=r(17),n=r(43),i=r(45),t=r(6).sep,a=null,e.exports={filter:function(e,t,r){return(null!=t?t.length:void 0)&&(null!=e?e.length:void 0)?n(e,t,r):[]},prepQuery:function(e){return s.prepQuery(e)},score:function(e,t,r,n){var i,l,u,c,f,d;return d=null!=n?n:{},i=d.allowErrors,u=d.legacy,(null!=e?e.length:void 0)&&(null!=t?t.length:void 0)?(null==r&&(r=a&&a.query===t?a:a=s.prepQuery(t)),u?(c=r.depth>0,l=r.core,f=o.score(e,l,c),c||(f=o.basenameScore(e,l,f))):f=s.score(e,t,r,!!i),f):0},match:function(e,r,n,o){var l,u,c,f,d,p;return l=(null!=o?o:{}).allowErrors,e&&r?e===r?function(){p=[];for(var t=0,r=e.length;0<=r?t<r:t>r;0<=r?t++:t--)p.push(t);return p}.apply(this):(null==n&&(n=a&&a.query===r?a:a=s.prepQuery(r)),l||s.isMatch(e,n.core_lw,n.core_up)?(d=e.toLowerCase(),f=n.query_lw,c=i.match(e,d,n),0===c.length?c:(e.indexOf(t)>-1&&(u=i.basenameMatch(e,d,n),c=i.mergeMatches(c,u)),c)):[]):[]}}}).call(this)},function(e,t,r){(function(){var e,n;e=r(6).sep,n=r(9),t.basenameMatch=function(r,n,o){var i,a,s;for(s=r.length-1;r[s]===e;)s--;if(i=r.lastIndexOf(e,s),i===-1)return[];for(a=o.depth;a-- >0;)if(i=r.lastIndexOf(e,i-1),i===-1)return[];return i++,s++,t.match(r.slice(i,s),n.slice(i,s),o,i)},t.mergeMatches=function(e,t){var r,n,o,i,a,s,l;if(a=e.length,s=t.length,0===s)return e.slice();if(0===a)return t.slice();for(o=-1,i=0,n=t[i],l=[];++o<a;){for(r=e[o];n<=r&&++i<s;)n<r&&l.push(n),n=t[i];l.push(r)}for(;i<s;)l.push(t[i++]);return l},t.match=function(e,t,r,o){var i,a,s,l,u,c,f,d,p,h,m,g,v,y,b,x,_,w,C,k,S,M,T,L,A,O;for(null==o&&(o=0),w=r.query,C=r.query_lw,v=e.length,x=w.length,u=n.scoreAcronyms(e,t,w,C).score,M=new Array(x),p=new Array(x),s=0,l=1,a=2,i=3,O=new Array(v*x),_=-1,g=-1;++g<x;)M[g]=0,p[g]=0;for(m=-1;++m<v;)for(k=0,T=0,d=0,L=t[m],g=-1;++g<x;)h=0,c=0,S=T,C[g]===L&&(A=n.isWordStart(m,e,t),h=d>0?d:n.scoreConsecutives(e,t,w,C,m,g,A),c=S+n.scoreCharacter(m,g,A,u,h)),T=M[g],d=p[g],k>T?b=a:(k=T,b=l),c>k?(k=c,b=i):h=0,M[g]=k,p[g]=h,O[++_]=k>0?b:s;for(m=v-1,g=x-1,_=m*x+g,f=!0,y=[];f&&m>=0&&g>=0;)switch(O[_]){case l:m--,_-=x;break;case a:g--,_--;break;case i:y.push(m+o),g--,m--,_-=x+1;break;default:f=!1}return y.reverse(),y}}).call(this)},function(e,t){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},o="function"==typeof Object.getOwnPropertySymbols;e.exports=function(e,t,i){if("string"!=typeof t){var a=Object.getOwnPropertyNames(t);o&&(a=a.concat(Object.getOwnPropertySymbols(t)));for(var s=0;s<a.length;++s)if(!(r[a[s]]||n[a[s]]||i&&i[a[s]]))try{e[a[s]]=t[a[s]]}catch(l){}}return e}},function(e,t,r){(function(t){"use strict";var r=function(e,r,n,o,i,a,s,l){if("production"!==t.env.NODE_ENV&&void 0===r)throw new Error("invariant requires an error message argument");if(!e){var u;if(void 0===r)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,i,a,s,l],f=0;u=new Error(r.replace(/%s/g,function(){return c[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};e.exports=r}).call(t,r(1))},function(e,t,r){"use strict";var n=r(4),o=r(2),i=o.createClass({displayName:"CodeMirror",propTypes:{onChange:o.PropTypes.func,onFocusChange:o.PropTypes.func,options:o.PropTypes.object,path:o.PropTypes.string,value:o.PropTypes.string},getInitialState:function(){return{isFocused:!1}},componentDidMount:function(){var e=o.findDOMNode(this.refs.textarea);this.codeMirror=n.fromTextArea(e,this.props.options),this.codeMirror.on("change",this.codemirrorValueChanged),this.codeMirror.on("focus",this.focusChanged.bind(this,!0)),this.codeMirror.on("blur",this.focusChanged.bind(this,!1)),this._currentCodemirrorValue=this.props.value,this.codeMirror.setValue(this.props.value)},componentWillUnmount:function(){this.codeMirror&&this.codeMirror.toTextArea()},componentWillReceiveProps:function(e){if(this.codeMirror&&this._currentCodemirrorValue!==e.value&&this.codeMirror.setValue(e.value),"object"==typeof e.options)for(var t in e.options)e.options.hasOwnProperty(t)&&this.codeMirror.setOption(t,e.options[t])},getCodeMirror:function(){return this.codeMirror},focus:function(){this.codeMirror&&this.codeMirror.focus()},focusChanged:function(e){this.setState({isFocused:e}),this.props.onFocusChange&&this.props.onFocusChange(e)},codemirrorValueChanged:function(e,t){var r=e.getValue();this._currentCodemirrorValue=r,this.props.onChange&&this.props.onChange(r)},render:function(){var e="ReactCodeMirror";return this.state.isFocused&&(e+=" ReactCodeMirror--focused"),o.createElement("div",{className:e},o.createElement("textarea",{ref:"textarea",name:this.props.path,defaultValue:"",autoComplete:"off"}))}});e.exports=i},function(e,t,r){"use strict";e.exports={Mixin:r(51),Component:r(50),loadChild:r(10),serialize:r(52).serialize,render:r(18).render,injectState:r(18).injectState}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var o=e,i=t,a=r;s=u=l=void 0,n=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(o);if(null===u)return;e=u,t=i,r=a,n=!0}},s=r(2),l=r(10),u=function(e){function t(){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return o(t,e),i(t,[{key:"loadChild",value:function(e,t,r,n,o,i,a){return l.loadChild(this,e,t,r,n,o,i,a)}}]),t}(s.Component);e.exports=u},function(e,t,r){"use strict";var n=r(10);e.exports={loadChild:function(e,t,r,o,i,a,s){return n.loadChild(this,e,t,r,o,i,a,s)}}},function(e,t,r){"use strict";var n=r(3);t.serialize=function(e){var t=n.clone(e.props),r=o(e);return n.isEmpty(r)||(t.state=r),t};var o=function i(e){var t,r=e.state?n.clone(e.state):{},o={};return n.each(e.refs,function(e,r){t=i(e),n.isEmpty(t)||(o[r]=t)}),n.isEmpty(o)||(r.children=o),r}},function(e,t,r){"use strict";e.exports=function(e){var t=parseFloat(e.version);if(!(t>=.14)){var n=e.render,o=e.unmountComponentAtNode;return{findDOMNode:function(e){return"function"==typeof e.getDOMNode?e.getDOMNode():e},render:n,unmountComponentAtNode:o}}try{return r(54)}catch(i){return null}}},function(e,t,r){"use strict";e.exports=r(64)},function(e,t,r){var n=r(2),o=r(3),i=r(20),a=function(e){this._options=o.extend({defaultProps:{}},e),this.routeLink=this.routeLink.bind(this),this.onPopState=this.onPopState.bind(this),this._bindPopStateEvent(),this._loadParams(i.parseLocation(this._getCurrentLocation()))};a.prototype={stop:function(){this._unbindPopStateEvent()},routeLink:function(e){e.preventDefault(),this._pushLocation(e.currentTarget.href)},goTo:function(e){this._pushLocation(e)},onPopState:function(e){var t=this._getCurrentLocation(),r=i.parseLocation(t);this._loadParams(r)},_pushLocation:function(e){return this._isPushStateSupported()?(this._pushHistoryState({},e),void this._loadParams(i.parseLocation(e))):void(window.location=e)},_loadParams:function(e){var t=o.extend({router:this},this._options.defaultProps,e),r=this._options.getComponentClass(t),i=n.createElement(r,t);this.rootComponent=n.render(i,this._options.container),o.isFunction(this._options.onChange)&&this._options.onChange.call(this,t)},_getCurrentLocation:function(){return window.location.href},_bindPopStateEvent:function(){window.addEventListener("popstate",this.onPopState)},_unbindPopStateEvent:function(){window.removeEventListener("popstate",this.onPopState)},_pushHistoryState:function(e,t){window.history.pushState(e,"",t)},_isPushStateSupported:function(){return!!window.history.pushState}},e.exports=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=a["default"](e),r=l["default"](e);return{Provider:t,connect:r}}t.__esModule=!0,t["default"]=o;var i=r(58),a=n(i),s=r(57),l=n(s);e.exports=t["default"]},function(e,t,r){(function(n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e.displayName||e.name||"Component"}function l(e){var t=e.Component,r=e.PropTypes,o=f["default"](r);return function(r,l,c){function f(e,t){var r=e.getState(),n=L?x(r,t):x(r);return _["default"](m["default"](n),"`mapStateToProps` must return an object. Instead received %s.",n),n}function d(e,t){var r=e.dispatch,n=A?M(r,t):M(r);return _["default"](m["default"](n),"`mapDispatchToProps` must return an object. Instead received %s.",n),n}function h(e,t,r){var n=T(e,t,r);return _["default"](m["default"](n),"`mergeProps` must return an object. Instead received %s.",n),n}var g=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],y=Boolean(r),x=r||w,M=m["default"](l)?v["default"](l):l||C,T=c||k,L=x.length>1,A=M.length>1,O=g.pure,E=void 0===O||O,N=S++;return function(r){var l=function(t){function n(e,r){i(this,n),t.call(this,e,r),this.version=N,this.store=e.store||r.store,_["default"](this.store,'Could not find "store" in either the context or '+('props of "'+this.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+this.constructor.displayName+'".')),this.stateProps=f(this.store,e),this.dispatchProps=d(this.store,e),this.state={storeState:null},this.updateState()}return a(n,t),n.prototype.shouldComponentUpdate=function(e,t){if(!E)return this.updateStateProps(e),this.updateDispatchProps(e),this.updateState(e),!0;var r=t.storeState!==this.state.storeState,n=!p["default"](e,this.props),o=!1,i=!1;return(r||n&&L)&&(o=this.updateStateProps(e)),n&&A&&(i=this.updateDispatchProps(e)),!!(n||o||i)&&(this.updateState(e),!0)},n.prototype.computeNextState=function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];return h(this.stateProps,this.dispatchProps,e)},n.prototype.updateStateProps=function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],t=f(this.store,e);return!p["default"](t,this.stateProps)&&(this.stateProps=t,!0)},n.prototype.updateDispatchProps=function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],t=d(this.store,e);return!p["default"](t,this.dispatchProps)&&(this.dispatchProps=t,!0)},n.prototype.updateState=function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];this.nextState=this.computeNextState(e)},n.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},n.prototype.trySubscribe=function(){y&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},n.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},n.prototype.componentDidMount=function(){this.trySubscribe()},n.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},n.prototype.handleChange=function(){this.unsubscribe&&this.setState({storeState:this.store.getState()})},n.prototype.getWrappedInstance=function(){return this.refs.wrappedInstance},n.prototype.render=function(){return e.createElement(r,u({ref:"wrappedInstance"},this.nextState))},n}(t);return l.displayName="Connect("+s(r)+")",l.WrappedComponent=r,l.contextTypes={store:o},l.propTypes={store:o},"production"!==n.env.NODE_ENV&&(l.prototype.componentWillUpdate=function(){this.version!==N&&(this.version=N,this.trySubscribe(),this.updateStateProps(),this.updateDispatchProps(),this.updateState())}),b["default"](l,r)}}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t["default"]=l;var c=r(21),f=o(c),d=r(61),p=o(d),h=r(60),m=o(h),g=r(62),v=o(g),y=r(46),b=o(y),x=r(47),_=o(x),w=function(){return{}},C=function(e){return{dispatch:e}},k=function(e,t,r){return u({},r,e,t)},S=0;e.exports=t["default"]}).call(t,r(1))},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){var t=e.version;if("string"!=typeof t)return!0;var r=t.split("."),n=parseInt(r[0],10),o=parseInt(r[1],10);return 0===n&&13===o}function s(e){function t(){p||d||(p=!0,console.error("With React 0.14 and later versions, you no longer need to wrap <Provider> child into a function."))}function r(){!p&&d&&(p=!0,console.error("With React 0.13, you need to wrap <Provider> child into a function. This restriction will be removed with React 0.14."))}function n(){h||(h=!0,console.error("<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/rackt/react-redux/releases/tag/v2.0.0 for the migration instructions."))}var s=e.Component,l=e.PropTypes,c=e.Children,f=u["default"](l),d=a(e),p=!1,h=!1,m=function(e){function a(t,r){o(this,a),e.call(this,t,r),this.store=t.store}return i(a,e),a.prototype.getChildContext=function(){return{store:this.store}},a.prototype.componentWillReceiveProps=function(e){var t=this.store,r=e.store;t!==r&&n()},a.prototype.render=function(){var e=this.props.children;return"function"==typeof e?(t(),e=e()):r(),c.only(e)},a}(s);return m.childContextTypes={store:f.isRequired},m.propTypes={store:f.isRequired,children:(d?l.func:l.element).isRequired},m}t.__esModule=!0,t["default"]=s;var l=r(21),u=n(l);e.exports=t["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=r(2),i=n(o),a=r(56),s=n(a),l=s["default"](i["default"]),u=l.Provider,c=l.connect;t.Provider=u,t.connect=c},function(e,t){"use strict";function r(e){if(!e||"object"!=typeof e)return!1;var t="function"==typeof e.constructor?Object.getPrototypeOf(e):Object.prototype;if(null===t)return!0;var r=t.constructor;return"function"==typeof r&&r instanceof r&&n(r)===n(Object)}t.__esModule=!0,t["default"]=r;var n=function(e){return Function.prototype.toString.call(e)};e.exports=t["default"]},function(e,t){"use strict";function r(e,t){if(e===t)return!0;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,i=0;i<r.length;i++)if(!o.call(t,r[i])||e[r[i]]!==t[r[i]])return!1;return!0}t.__esModule=!0,t["default"]=r,e.exports=t["default"]},function(e,t,r){"use strict";function n(e){return function(t){return o.bindActionCreators(e,t)}}t.__esModule=!0,t["default"]=n;var o=r(26);e.exports=t["default"]},function(e,t,r){(function(t){"use strict";var n=r(11),o=r(71),i=r(8),a=!1,s={current:o,withContext:function(e,r){"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?i(a,"withContext is deprecated and will be removed in a future version. Use a wrapper component with getChildContext instead."):null,a=!0);var o,l=s.current;s.current=n({},l,e);try{o=r()}finally{s.current=l}return o}};e.exports=s}).call(t,r(1))},function(e,t,r){(function(t){"use strict";function n(e){return"production"!==t.env.NODE_ENV?i.createFactory(e):o.createFactory(e)}var o=r(12),i=r(65),a=r(74),s=a({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},n);e.exports=s}).call(t,r(1))},function(e,t,r){(function(t){"use strict";function n(){if(b.current){var e=b.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(e){var t=e&&e.getPublicInstance();if(t){var r=t.constructor;if(r)return r.displayName||r.name||void 0}}function i(){var e=b.current;return e&&o(e)||void 0}function a(e,t){e._store.validated||null!=e.key||(e._store.validated=!0,l('Each child in an array or iterator should have a unique "key" prop.',e,t))}function s(e,t,r){M.test(e)&&l("Child objects should have non-numeric keys so ordering is preserved.",t,r)}function l(e,r,n){var a=i(),s="string"==typeof n?n:n.displayName||n.name,l=a||s,u=k[e]||(k[e]={});if(!u.hasOwnProperty(l)){u[l]=!0;var c=a?" Check the render method of "+a+".":s?" Check the React.render call using <"+s+">.":"",f="";if(r&&r._owner&&r._owner!==b.current){var d=o(r._owner);f=" It was passed a child from "+d+"."}"production"!==t.env.NODE_ENV?C(!1,e+"%s%s See https://fb.me/react-warning-keys for more information.",c,f):null}}function u(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];m.isValidElement(n)&&a(n,t)}else if(m.isValidElement(e))e._store.validated=!0;else if(e){var o=_(e);if(o){if(o!==e.entries)for(var i,l=o.call(e);!(i=l.next()).done;)m.isValidElement(i.value)&&a(i.value,t)}else if("object"==typeof e){var u=g.extractIfFragment(e);for(var c in u)u.hasOwnProperty(c)&&s(c,u[c],t)}}}function c(e,r,o,i){for(var a in r)if(r.hasOwnProperty(a)){var s;try{"production"!==t.env.NODE_ENV?w("function"==typeof r[a],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e||"React class",y[i],a):w("function"==typeof r[a]),s=r[a](o,a,e,i)}catch(l){s=l}if(s instanceof Error&&!(s.message in S)){S[s.message]=!0;var u=n(this);"production"!==t.env.NODE_ENV?C(!1,"Failed propType: %s%s",s.message,u):null}}}function f(e,r){var n=r.type,o="string"==typeof n?n:n.displayName,i=r._owner?r._owner.getPublicInstance().constructor.displayName:null,a=e+"|"+o+"|"+i;if(!T.hasOwnProperty(a)){T[a]=!0;var s="";o&&(s=" <"+o+" />");var l="";i&&(l=" The element was created by "+i+"."),"production"!==t.env.NODE_ENV?C(!1,"Don't set .props.%s of the React component%s. Instead, specify the correct value when initially creating the element or use React.cloneElement to make a new element with updated props.%s",e,s,l):null}}function d(e,t){return e!==e?t!==t:0===e&&0===t?1/e===1/t:e===t}function p(e){if(e._store){var t=e._store.originalProps,r=e.props;for(var n in r)r.hasOwnProperty(n)&&(t.hasOwnProperty(n)&&d(t[n],r[n])||(f(n,e),t[n]=r[n]))}}function h(e){if(null!=e.type){var r=x.getComponentClassForElement(e),n=r.displayName||r.name;r.propTypes&&c(n,r.propTypes,e.props,v.prop),"function"==typeof r.getDefaultProps&&("production"!==t.env.NODE_ENV?C(r.getDefaultProps.isReactClassApproved,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."):null)}}var m=r(12),g=r(66),v=r(69),y=r(68),b=r(23),x=r(67),_=r(72),w=r(13),C=r(8),k={},S={},M=/^\d+$/,T={},L={checkAndWarnForMutatedProps:p,createElement:function(e,r,n){"production"!==t.env.NODE_ENV?C(null!=e,"React.createElement: type should not be null or undefined. It should be a string (for DOM elements) or a ReactClass (for composite components)."):null;var o=m.createElement.apply(this,arguments);if(null==o)return o;for(var i=2;i<arguments.length;i++)u(arguments[i],e);return h(o),o},createFactory:function(e){var r=L.createElement.bind(null,e);if(r.type=e,"production"!==t.env.NODE_ENV)try{Object.defineProperty(r,"type",{enumerable:!1,get:function(){return"production"!==t.env.NODE_ENV?C(!1,"Factory.type is deprecated. Access the class directly before passing it to createFactory."):null,Object.defineProperty(this,"type",{value:e}),e}})}catch(n){}return r},cloneElement:function(e,t,r){for(var n=m.cloneElement.apply(this,arguments),o=2;o<arguments.length;o++)u(arguments[o],n.type);return h(n),n}};e.exports=L}).call(t,r(1))},function(e,t,r){(function(t){"use strict";var n=r(12),o=r(8);if("production"!==t.env.NODE_ENV){var i="_reactFragment",a="_reactDidWarn",s=!1;try{var l=function(){return 1};Object.defineProperty({},i,{enumerable:!1,value:!0}),Object.defineProperty({},"key",{enumerable:!0,get:l}),s=!0}catch(u){}var c=function(e,r){Object.defineProperty(e,r,{enumerable:!0,get:function(){return"production"!==t.env.NODE_ENV?o(this[a],"A ReactFragment is an opaque type. Accessing any of its properties is deprecated. Pass it to one of the React.Children helpers."):null,this[a]=!0,this[i][r]},set:function(e){"production"!==t.env.NODE_ENV?o(this[a],"A ReactFragment is an immutable opaque type. Mutating its properties is deprecated."):null,this[a]=!0,this[i][r]=e}})},f={},d=function(e){var t="";for(var r in e)t+=r+":"+typeof e[r]+",";var n=!!f[t];return f[t]=!0,n}}var p={create:function(e){if("production"!==t.env.NODE_ENV){if("object"!=typeof e||!e||Array.isArray(e))return"production"!==t.env.NODE_ENV?o(!1,"React.addons.createFragment only accepts a single object.",e):null,e;if(n.isValidElement(e))return"production"!==t.env.NODE_ENV?o(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."):null,e;if(s){var r={};Object.defineProperty(r,i,{enumerable:!1,value:e}),Object.defineProperty(r,a,{writable:!0,enumerable:!1,value:!1});for(var l in e)c(r,l);return Object.preventExtensions(r),r}}return e},extract:function(e){return"production"!==t.env.NODE_ENV&&s?e[i]?e[i]:("production"!==t.env.NODE_ENV?o(d(e),"Any use of a keyed object should be wrapped in React.addons.createFragment(object) before being passed as a child."):null,e):e},extractIfFragment:function(e){if("production"!==t.env.NODE_ENV&&s){if(e[i])return e[i];for(var r in e)if(e.hasOwnProperty(r)&&n.isValidElement(e[r]))return p.extract(e)}return e}};e.exports=p}).call(t,r(1))},function(e,t,r){(function(t){"use strict";function n(e){if("function"==typeof e.type)return e.type;var t=e.type,r=f[t];return null==r&&(f[t]=r=u(t)),r}function o(e){return"production"!==t.env.NODE_ENV?l(c,"There is no registered component for the tag %s",e.type):l(c),new c(e.type,e.props)}function i(e){return new d(e)}function a(e){return e instanceof d}var s=r(11),l=r(13),u=null,c=null,f={},d=null,p={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){d=e},injectComponentClasses:function(e){s(f,e)},injectAutoWrapper:function(e){u=e}},h={getComponentClassForElement:n,createInternalComponent:o,createInstanceForText:i,isTextComponent:a,injection:p};e.exports=h}).call(t,r(1))},function(e,t,r){(function(t){"use strict";var r={};"production"!==t.env.NODE_ENV&&(r={prop:"prop",context:"context",childContext:"child context"}),e.exports=r}).call(t,r(1))},function(e,t,r){"use strict";var n=r(73),o=n({prop:null,context:null,childContext:null});e.exports=o},function(e,t){function r(e){return function(){return e}}function n(){}n.thatReturns=r,n.thatReturnsFalse=r(!1),n.thatReturnsTrue=r(!0),n.thatReturnsNull=r(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},function(e,t,r){(function(t){"use strict";var r={};"production"!==t.env.NODE_ENV&&Object.freeze(r),e.exports=r}).call(t,r(1))},function(e,t){"use strict";function r(e){var t=e&&(n&&e[n]||e[o]);if("function"==typeof t)return t}var n="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=r},function(e,t,r){(function(t){"use strict";var n=r(13),o=function(e){var r,o={};"production"!==t.env.NODE_ENV?n(e instanceof Object&&!Array.isArray(e),"keyMirror(...): Argument must be an object."):n(e instanceof Object&&!Array.isArray(e));for(r in e)e.hasOwnProperty(r)&&(o[r]=r);return o};e.exports=o}).call(t,r(1))},function(e,t){"use strict";function r(e,t,r){if(!e)return null;var o={};for(var i in e)n.call(e,i)&&(o[i]=t.call(r,e[i],i,e));return o}var n=Object.prototype.hasOwnProperty;e.exports=r},function(e,t){"use strict";function r(e){var t=e.dispatch,r=e.getState;return function(e){return function(n){return"function"==typeof n?n(t,r):e(n)}}}t.__esModule=!0,t["default"]=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(r,n,o){var a=e(r,n,o),l=a.dispatch,u=[],c={getState:a.getState,dispatch:function(e){return l(e)}};return u=t.map(function(e){return e(c)}),l=s["default"].apply(void 0,u)(a.dispatch),i({},a,{dispatch:l})}}}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.__esModule=!0,t["default"]=o;var a=r(24),s=n(a)},function(e,t){"use strict";function r(e,t){return function(){return t(e.apply(void 0,arguments))}}function n(e,t){if("function"==typeof e)return r(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(e),o={},i=0;i<n.length;i++){var a=n[i],s=e[a];"function"==typeof s&&(o[a]=r(s,t))}return o}t.__esModule=!0,t["default"]=n},function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r=t&&t.type,n=r&&'"'+r.toString()+'"'||"an action";return'Reducer "'+e+'" returned undefined handling '+n+". To ignore an action, you must explicitly return the previous state."}function i(e,t,r){var n=Object.keys(t),o=r&&r.type===l.ActionTypes.INIT?"initialState argument passed to createStore":"previous state received by the reducer";if(0===n.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!(0,c["default"])(e))return"The "+o+' has unexpected type of "'+{}.toString.call(e).match(/\s([a-z|A-Z]+)/)[1]+'". Expected argument to be an object with the following '+('keys: "'+n.join('", "')+'"');var i=Object.keys(e).filter(function(e){return!t.hasOwnProperty(e)});return i.length>0?"Unexpected "+(i.length>1?"keys":"key")+" "+('"'+i.join('", "')+'" found in '+o+". ")+"Expected to find one of the known reducer keys instead: "+('"'+n.join('", "')+'". Unexpected keys will be ignored.'):void 0}function a(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:l.ActionTypes.INIT});if("undefined"==typeof n)throw new Error('Reducer "'+t+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof r(void 0,{type:o}))throw new Error('Reducer "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle "+l.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.");
})}function s(t){for(var r=Object.keys(t),n={},s=0;s<r.length;s++){var l=r[s];"function"==typeof t[l]&&(n[l]=t[l])}var u,c=Object.keys(n);try{a(n)}catch(f){u=f}return function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=arguments[1];if(u)throw u;if("production"!==e.env.NODE_ENV){var a=i(t,n,r);a&&(0,d["default"])(a)}for(var s=!1,l={},f=0;f<c.length;f++){var p=c[f],h=n[p],m=t[p],g=h(m,r);if("undefined"==typeof g){var v=o(p,r);throw new Error(v)}l[p]=g,s=s||g!==m}return s?l:t}}t.__esModule=!0,t["default"]=s;var l=r(25),u=r(28),c=n(u),f=r(27),d=n(f)}).call(t,r(1))},function(e,t,r){var n=r(81),o=n(Object.getPrototypeOf,Object);e.exports=o},function(e,t){function r(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(r){}return t}e.exports=r},function(e,t){function r(e,t){return function(r){return e(t(r))}}e.exports=r},function(e,t){function r(e){return!!e&&"object"==typeof e}e.exports=r},function(e,t,r){var n=r(38);"string"==typeof n&&(n=[[e.id,n,""]]);r(7)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,r){var n=r(39);"string"==typeof n&&(n=[[e.id,n,""]]);r(7)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,r){var n=r(40);"string"==typeof n&&(n=[[e.id,n,""]]);r(7)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,r){var n=r(41);"string"==typeof n&&(n=[[e.id,n,""]]);r(7)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,r){var n=r(42);"string"==typeof n&&(n=[[e.id,n,""]]);r(7)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,r){var n=r(91);e.exports=n},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),i=n(o),a=r(22),s=n(a);t["default"]=i["default"].createClass({displayName:"Pane",getInitialState:function(){return{}},render:function(){var e={flex:1,position:"relative",outline:"none",overflow:"none"};this.state.size&&("horizontal"===this.props.split?(e.height=this.state.size,e.display="flex"):e.width=this.state.size,e.flex="none");var t=s["default"].prefix({styles:e});return i["default"].createElement("div",{className:this.props.className,style:t.styles},this.props.children)}}),e.exports=t["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),i=n(o);t["default"]=i["default"].createClass({displayName:"Resizer",onMouseDown:function(e){this.props.onMouseDown(e)},render:function(){return i["default"].createElement("span",{className:this.props.className,onMouseDown:this.onMouseDown})}}),e.exports=t["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),i=n(o),a=r(53),s=n(a),l=r(89),u=n(l),c=r(90),f=n(c),d=r(22),p=n(d),h=(0,s["default"])(i["default"]).findDOMNode;t["default"]=i["default"].createClass({displayName:"SplitPane",propTypes:{},getInitialState:function(){return{active:!1,resized:!1}},getDefaultProps:function(){return{minSize:0}},componentDidMount:function(){document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("mousemove",this.onMouseMove);var e=this.refs.pane1;e&&this.props.defaultSize&&!this.state.resized&&e.setState({size:this.props.defaultSize})},componentWillUnmount:function(){document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("mousemove",this.onMouseMove)},onMouseDown:function(e){var t="vertical"===this.props.split?e.clientX:e.clientY;this.setState({active:!0,position:t})},onMouseMove:function(e){if(this.state.active){var t=this.refs.pane1;if(t){var r=h(t);if(window.getComputedStyle){var n=window.getComputedStyle(r),o=n.width.replace("px",""),i=n.height.replace("px",""),a="vertical"===this.props.split?e.clientX:e.clientY,s="vertical"===this.props.split?o:i,l=this.state.position,u=s-(l-a);this.setState({position:a,resized:!0}),this.props.onChange&&this.props.onChange(u),u>=this.props.minSize&&t.setState({size:u})}}}},onMouseUp:function(){this.setState({active:!1})},merge:function(e,t){for(var r in t)e[r]=t[r]},render:function(){var e=this.props.split||"vertical",t={display:"flex",flex:1,position:"relative",outline:"none",overflow:"hidden",userSelect:"none"};"horizontal"===e?this.merge(t,{flexDirection:"column",height:"100%",minHeight:"100%",position:"absolute",top:0,bottom:0,width:"100%"}):this.merge(t,{flexDirection:"row",height:"100%",position:"absolute",left:0,right:0});var r=this.props.children,n=p["default"].prefix({styles:t});return i["default"].createElement("div",{className:this.props.className,style:n.styles,ref:"splitPane"},i["default"].createElement(u["default"],{className:this.props.paneClassName,ref:"pane1",key:"pane1",split:e},r[0]),i["default"].createElement(f["default"],{className:this.props.resizerClassName,ref:"resizer",key:"resizer",onMouseDown:this.onMouseDown,split:e}),i["default"].createElement(u["default"],{className:this.props.paneClassName,ref:"pane2",key:"pane2",split:e},r[1]))}}),e.exports=t["default"]}])});