react-templates/playground/dist/home.min.js

10 lines
197 KiB
JavaScript
Raw Normal View History

2017-06-29 09:47:09 +02:00
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
/**
* @license RequireJS text 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/requirejs/text for details
*/
(function(e){if(typeof exports=="object"&&typeof module=="object")module.exports=e();else{if(typeof define=="function"&&define.amd)return define("libs/codemirror-4.8/lib/codemirror",[],e);this.CodeMirror=e()}})(function(){"use strict";function S(e,t){if(!(this instanceof S))return new S(e,t);this.options=t=t?zo(t):{},zo(fi,t,!1),H(t);var n=t.value;typeof n=="string"&&(n=new js(n,t.mode)),this.doc=n;var s=this.display=new x(e,n);s.wrapper.CodeMirror=this,M(this),A(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),t.autofocus&&!d&&er(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new Do,keySeq:null},r&&i<11&&setTimeout(Wo(Zn,this,!0),20),rr(this),fu(),kn(this),this.curOp.forceUpdate=!0,Rs(this,n),t.autofocus&&!d||nu()==s.input?setTimeout(Wo(Pr,this),20):Hr(this);for(var o in li)li.hasOwnProperty(o)&&li[o](this,t[o],hi);R(this);for(var u=0;u<mi.length;++u)mi[u](this);An(this)}function x(e,t){var n=this,o=n.input=Go("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");s?o.style.width="1000px":o.setAttribute("wrap","off"),p&&(o.style.border="1px solid black"),o.setAttribute("autocorrect","off"),o.setAttribute("autocapitalize","off"),o.setAttribute("spellcheck","false"),n.inputDiv=Go("div",[o],null,"overflow: hidden; position: relative; width: 3px; height: 0px;"),n.scrollbarH=Go("div",[Go("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar"),n.scrollbarV=Go("div",[Go("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n.scrollbarFiller=Go("div",null,"CodeMirror-scrollbar-filler"),n.gutterFiller=Go("div",null,"CodeMirror-gutter-filler"),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.heightForcer=Go("div",null,null,"position: absolute; height: "+Lo+"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.inputDiv,n.scrollbarH,n.scrollbarV,n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),r&&i<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),p&&(o.style.width="0px"),s||(n.scroller.draggable=!0),l&&(n.inputDiv.style.height="1px",n.inputDiv.style.position="absolute"),r&&i<8&&(n.scrollbarH.style.minHeight=n.scrollbarV.style.minWidth="18px"),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.view=[],n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.prevInput="",n.alignWidgets=!1,n.pollingFast=!1,n.poll=new Do,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.inaccurateSelection=!1,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null}function T(e){e.doc.mode=S.getMode(e.options,e.doc.modeOption),N(e)}function N(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Xt(e,100),e.state.modeGen++,e.curOp&&Un(e)}function C(e){e.options.lineWrapping?(su(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth=""):(iu(e.display.wrapper,"CodeMirror-wrap"),P(e)),L(e),Un(e),cn(e),setTimeout(function(){F(e)},100)}function k(e){var t=xn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Tn(e.display)-3);return function(i){if(ss(e.doc,i))return 0;var s=0;if(i.widget