From 344aaee7ea5f64faaebc60ca22e261461acfa3d6 Mon Sep 17 00:00:00 2001 From: benweet Date: Mon, 21 Apr 2014 18:27:03 +0100 Subject: [PATCH] Release v3.1.13 --- bower.json | 2 +- package.json | 2 +- public/cache.manifest | 2 +- public/res-min/main.js | 2 +- public/res/constants.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bower.json b/bower.json index 2819482f..621ccabf 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "3.1.12", + "version": "3.1.13", "description": "StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.", "dependencies": { "bootstrap": "v3.0.0", diff --git a/package.json b/package.json index fe358b35..d6f7440c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "3.1.12", + "version": "3.1.13", "private": true, "description": "StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.", "main": "res/main.js", diff --git a/public/cache.manifest b/public/cache.manifest index d5992826..31f48fdb 100644 --- a/public/cache.manifest +++ b/public/cache.manifest @@ -1,5 +1,5 @@ CACHE MANIFEST -#Date Mon Apr 21 2014 18:25:05 +#Date Mon Apr 21 2014 18:27:03 CACHE: res/worker.js diff --git a/public/res-min/main.js b/public/res-min/main.js index d1ae47ea..1e3285c5 100644 --- a/public/res-min/main.js +++ b/public/res-min/main.js @@ -914,7 +914,7 @@ return a.end.row=o.getCurrentTokenRow(),a.end.column=o.getCurrentTokenColumn()+r var i=e.needle;if(!e.needle)return e.re=!1;e.regExp||(i=n.escapeRegExp(i)),e.wholeWord&&(i="\\b"+i+"\\b");var o=e.caseSensitive?"g":"gi";if(e.$isMultiLine=!t&&/[\n\r]/.test(i),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(i,o);try{var r=new RegExp(i,o)}catch(s){r=!1}return e.re=r},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],o=0;o=s;i--)if(n(e.getLine(i),i))return;if(0!=t.wrap)for(i=a,s=r.row;i>=s;i--)if(n(e.getLine(i),i))return}}:function(n){var i=r.row,o=e.getLine(i).substr(r.column);if(!n(o,i,r.column)){for(i+=1;a>=i;i++)if(n(e.getLine(i),i))return;if(0!=t.wrap)for(i=s,a=r.row;a>=i;i++)if(n(e.getLine(i),i))return}};return{forEach:l}}}).call(r.prototype),t.Search=r}),define("ace/keyboard/hash_handler",["require","exports","module","../lib/keys","../lib/useragent"],function(e,t){function n(e,t){if(this.platform=t||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.__defineGetter__&&this.__defineSetter__&&"undefined"!=typeof console&&console.error){var n=!1,i=function(){n||(n=!0,console.error("commmandKeyBinding has too many m's. use commandKeyBinding"))};this.__defineGetter__("commmandKeyBinding",function(){return i(),this.commandKeyBinding}),this.__defineSetter__("commmandKeyBinding",function(e){return i(),this.commandKeyBinding=e})}else this.commmandKeyBinding=this.commandKeyBinding;this.addCommands(e)}var i=e("../lib/keys"),o=e("../lib/useragent");(function(){this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e){var t="string"==typeof e?e:e.name;e=this.commands[t],delete this.commands[t];var n=this.commandKeyBinding;for(var i in n)for(var o in n[i])n[i][o]==e&&delete n[i][o]},this.bindKey=function(e,t){if(e){if("function"==typeof t)return void this.addCommand({exec:t,bindKey:e,name:t.name||e});var n=this.commandKeyBinding;e.split("|").forEach(function(e){var i=this.parseKeys(e,t),o=i.hashId;(n[o]||(n[o]={}))[i.key]=t},this)}},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),n.name||(n.name=t),this.addCommand(n)}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){var t=e.bindKey;if(t){var n="string"==typeof t?t:t[this.platform];this.bindKey(n,e)}},this.parseKeys=function(e){-1!=e.indexOf(" ")&&(e=e.split(/\s+/).pop());var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),o=i[n];if(i.FUNCTION_KEYS[o])n=i.FUNCTION_KEYS[o].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var r=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;r|=a}return{key:n,hashId:r}},this.findKeyCommand=function(e,t){var n=this.commandKeyBinding;return n[e]&&n[e][t]},this.handleKeyboard=function(e,t,n){return{command:this.findKeyCommand(t,n)}}}).call(n.prototype),t.HashHandler=n}),define("ace/commands/command_manager",["require","exports","module","../lib/oop","../keyboard/hash_handler","../lib/event_emitter"],function(e,t){var n=e("../lib/oop"),i=e("../keyboard/hash_handler").HashHandler,o=e("../lib/event_emitter").EventEmitter,r=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};n.inherits(r,i),function(){n.implement(this,o),this.exec=function(e,t,n){if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var i={editor:t,command:e,args:n},o=this._emit("exec",i);return this._signal("afterExec",i),o===!1?!1:!0},this.toggleRecording=function(e){return this.$inReplay?void 0:(e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0))},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(r.prototype),t.CommandManager=r}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t){function n(e,t){return{win:e,mac:t}}var i=e("ace/lib/lang"),o=(e("ace/config"),e("ace/range").Range);t.commands=[{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:n("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0},{name:"gotostart",bindKey:n("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectup",bindKey:n("Shift-Up","Shift-Up"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",readOnly:!0},{name:"golineup",bindKey:n("Up","Up"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selecttoend",bindKey:n("Ctrl-Shift-End","Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoend",bindKey:n("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"selectdown",bindKey:n("Shift-Down","Shift-Down"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",readOnly:!0},{name:"golinedown",bindKey:n("Down","Down"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectwordleft",bindKey:n("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"gotowordleft",bindKey:n("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttolinestart",bindKey:n("Alt-Shift-Left","Command-Shift-Left"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"gotolinestart",bindKey:n("Alt-Left|Home","Command-Left|Home"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectleft",bindKey:n("Shift-Left","Shift-Left"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoleft",bindKey:n("Left","Left"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectwordright",bindKey:n("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",readOnly:!0},{name:"gotowordright",bindKey:n("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttolineend",bindKey:n("Alt-Shift-Right","Command-Shift-Right"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"gotolineend",bindKey:n("Alt-Right|End","Command-Right|End"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"selectright",bindKey:n("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoright",bindKey:n("Right","Right"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:n(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:n("PageDown","PageDown"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:n(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:n("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:n("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},multiSelectAction:"forEach"},{name:"undo",bindKey:n("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:n("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"del",bindKey:n("Delete","Delete|Ctrl-D"),exec:function(e){e.remove("right")},multiSelectAction:"forEach"},{name:"backspace",bindKey:n("Command-Backspace|Option-Backspace|Shift-Backspace|Backspace","Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach"},{name:"removetolinestart",bindKey:n("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach"},{name:"removetolineend",bindKey:n("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach"},{name:"removewordleft",bindKey:n("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach"},{name:"removewordright",bindKey:n("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach"},{name:"outdent",bindKey:n("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach"},{name:"indent",bindKey:n("Tab","Tab"),exec:function(e){var t=e.getSelectionRange(),n=new o(t.end.row,0,t.end.row,t.end.column),i=e.session.getTextRange(n),r=e.session.getTokenAt(t.end.row,t.end.column);r&&"markup.list"==r.type&&/^\s*(?:[-+*]|\d+\.)\s+$/.test(i)?e.blockIndent():e.indent()},multiSelectAction:"forEach"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach"},{name:"inserttext",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach"}]}),define("ace/editor",["require","exports","module","./lib/fixoldbrowsers","./lib/oop","./lib/dom","./lib/lang","./lib/useragent","./keyboard/textinput","./mouse/mouse_handler","./mouse/fold_handler","./keyboard/keybinding","./edit_session","./search","./range","./lib/event_emitter","./commands/command_manager","./commands/default_commands","./config"],function(e,t){e("./lib/fixoldbrowsers");var n=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/lang"),r=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,l=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,u=e("./edit_session").EditSession,d=e("./search").Search,h=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,f=e("./commands/command_manager").CommandManager,g=e("./commands/default_commands").commands,m=e("./config"),v=function(e,t){var n=e.getContainerElement();this.container=n,this.renderer=e,this.commands=new f(r.isMac?"mac":"win",g),this.textInput=new s(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new c(this),this.$mouseHandler=new a(this),new l(this),this.$blockScrolling=0,this.$search=(new d).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||new u("")),m.resetOptions(this),m._emit("editor",this)};(function(){n.implement(this,p),this.$initOperationListeners=function(){function e(e){return e[e.length-1]}this.selections=[],this.commands.on("exec",function(t){this.startOperation(t);var n=t.command;if("fileJump"==n.group){var i=this.prevOp;i&&"fileJump"==i.command.group||(this.lastFileJumpPos=e(this.selections))}else this.lastFileJumpPos=null}.bind(this),!0),this.commands.on("afterExec",function(e){var t=e.command;return"fileJump"==t.group&&this.lastFileJumpPos&&!this.curOp.selectionChanged?void this.selection.fromJSON(this.lastFileJumpPos):void this.endOperation(e)}.bind(this),!0),this.$opResetTimer=o.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args},this.selections.push(this.selection.toJSON())},this.endOperation=function(){this.curOp&&(this.prevOp=this.curOp,this.curOp=null)},this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=["backspace","del","insertstring"],i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e){if(e)if("string"==typeof e){this.$keybindingId=e;var t=this;m.loadModule(["keybinding",e],function(n){t.$keybindingId==e&&t.keyBinding.setKeyboardHandler(n&&n.handler)})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e);else this.keyBinding.setKeyboardHandler(null)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){if(this.session){var t=this.session;this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.removeEventListener("changeCursor",this.$onCursorChange),n.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=e,this.$onDocumentChange=this.onDocumentChange.bind(this),e.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull(),this._emit("changeSession",{session:e,oldSession:t})}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e){this.renderer.setTheme(e)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session.findMatchingBracket(e.getCursorPosition());if(t)var n=new h(t.row,t.column,t.row,t.column+1);else if(e.session.$mode.getMatching)var n=e.session.$mode.getMatching(e.session);n&&(e.session.$bracketHighlight=e.session.addMarker(n,"ace_bracket","text"))},50)}},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus"))},this.onBlur=function(){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur"))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t,n=e.data,i=n.range;t=i.start.row==i.end.row&&"insertLines"!=n.action&&"removeLines"!=n.action?i.end.row:1/0,this.renderer.updateLines(i.start.row,t),this._emit("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$updateHighlightActiveLine(),this._emit("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.$maxLines&&1===this.session.getLength()&&(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new h(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._emit("changeBackMarker"))},this.onSelectionChange=function(){var e=this.session;if(e.$selectionMarker&&e.removeMarker(e.$selectionMarker),e.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var t=this.selection.getRange(),n=this.getSelectionStyle();e.$selectionMarker=e.addMarker(t,"ace_selection",n)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._emit("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column-1,i=t.end.column+1,o=e.getLine(t.start.row),r=o.length,s=o.substring(Math.max(n,0),Math.min(i,r));if(!(n>=0&&/^[\w\d]/.test(s)||r>=i&&/[\w\d]$/.test(s))&&(s=o.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(s))){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s});return a}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e){this.$readOnly||(this._emit("paste",e),this.insert(e))},this.execCommand=function(e,t){this.commands.exec(e,this,t)},this.insert=function(e){var t=this.session,n=t.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()){var o=n.transformAction(t.getState(i.row),"insertion",this,t,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if(" "==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var r=new h.fromPoints(i,i);r.end.column+=e.length,this.session.remove(r)}}else{var r=this.getSelectionRange();i=this.session.remove(r),this.clearSelection()}if("\n"==e||"\r\n"==e){var s=t.getLine(i.row);if(i.column>s.search(/\S|$/)){var a=s.substr(i.column).search(/\S|$/);t.doc.removeInLine(i.row,i.column,i.column+a)}}this.clearSelection();{var l=i.column,c=t.getState(i.row),s=t.getLine(i.row),u=n.checkOutdent(c,s,e);t.insert(i,e)}if(o&&o.selection&&this.selection.setSelectionRange(2==o.selection.length?new h(i.row,l+o.selection[0],i.row,l+o.selection[1]):new h(i.row+o.selection[0],o.selection[1],i.row+o.selection[2],o.selection[3])),t.getDocument().isNewLine(e)){var d=n.getNextLineIndent(c,s.slice(0,i.column),t.getTabString());t.insert({row:i.row+1,column:0},d)}u&&n.autoOutdent(c,t,i.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),o=n.getMode().transformAction(i,"deletion",this,n,t);if(0==t.end.column){var r=n.getTextRange(t);if("\n"==r[r.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,o=this.session.getLine(e.row);tt.toLowerCase()?1:0});for(var i=new h(0,0,0,0),o=e.first;o<=e.last;o++){var r=t.getLine(o);i.start.row=o,i.end.row=o,i.end.column=r.length,t.replace(i,n[o-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0; for(var i=this.session.getLine(e);n.lastIndex=t){var r={value:o[0],start:o.index,end:o.index+o[0].length};return r}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new h(t,n-1,t,n),o=this.session.getTextRange(i);if(!isNaN(parseFloat(o))&&isFinite(o)){var r=this.getNumberAt(t,n);if(r){var s=r.value.indexOf(".")>=0?r.start+r.value.indexOf(".")+1:r.end,a=r.start+r.value.length-s,l=parseFloat(r.value);l*=Math.pow(10,a),e*=s!==r.end&&s>n?Math.pow(10,r.end-n-1):Math.pow(10,r.end-n),l+=e,l/=Math.pow(10,a);var c=l.toFixed(a),u=new h(t,r.start,t,r.end);this.session.replace(u,c),this.moveCursorTo(t,Math.max(r.start+1,n+c.length-r.value.length))}}},this.removeLines=function(){var e,t=this.$getSelectedRows();e=0===t.first||t.last+1=s;)r[a].moveBy(o,0),a--}t.fromOrientedRange(t.ranges[0]),t.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var e=this.getSelectionRange().collapseRows();return{first:e.start.row,last:e.end.row}},this.onCompositionStart=function(){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,o=e*Math.floor(i.height/i.lineHeight);this.$blockScrolling++,1==t?this.selection.$moveSelection(function(){this.moveCursorBy(o,0)}):0==t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection()),this.$blockScrolling--;var r=n.scrollTop;n.scrollBy(0,o*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(r)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e){var t=this.getCursorPosition(),n=this.session.getBracketRange(t);if(!n){if(n=this.find({needle:/[{}()\[\]]/g,preventScroll:!0,start:{row:t.row,column:t.column-1}}),!n)return;var i=n.start;i.row==t.row&&Math.abs(i.column-t.column)<2&&(n=this.session.getBracketRange(i))}i=n&&n.cursor||i,i&&(e?n&&n.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(i.row,i.column):(this.clearSelection(),this.moveCursorTo(i.row,i.column)))},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),e=e||1,this.selection.moveCursorBy(-e,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),e=e||1,this.selection.moveCursorBy(e,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){var e=this.renderer.scrollTop;this.selection.moveCursorFileEnd(),this.clearSelection(),this.renderer.animateScrolling(e)},this.navigateFileStart=function(){var e=this.renderer.scrollTop;this.selection.moveCursorFileStart(),this.clearSelection(),this.renderer.animateScrolling(e)},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),i=0;return n?(this.$tryReplace(n,e)&&(i=1),null!==n&&(this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end)),i):i},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),i=0;if(!n.length)return i;this.$blockScrolling+=1;var o=this.getSelectionRange();this.clearSelection(),this.selection.moveCursorTo(0,0);for(var r=n.length-1;r>=0;--r)this.$tryReplace(n[r],e)&&i++;return this.selection.setSelectionRange(o),this.$blockScrolling-=1,i},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),null!==t?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,i){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var o=this.selection.getRange();null==t.needle&&(e=this.session.getTextRange(o)||this.$search.$options.needle,e||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRange(o)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:o});var r=this.$search.find(this.session);return t.preventScroll?r:r?(this.revealRange(r,i),r):(t.backwards?o.start=o.end:o.end=o.start,void this.selection.setRange(o))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),0!=t&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._emit("destroy",this)},this.setAutoScrollEditorIntoView=function(e){if(e!==!1){var t,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var o=this.$scrollAnchor;o.style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild);var r=this.on("changeSelection",function(){i=!0}),s=this.renderer.on("beforeRender",function(){i&&(t=n.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(i&&t&&n.isFocused()){var e=n.renderer,r=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=r.top-s.offset;i=r.top>=0&&a+t.top<0?!0:r.topwindow.innerHeight?!1:null,null!=i&&(o.style.top=a+"px",o.style.left=r.left+"px",o.style.height=s.lineHeight+"px",o.scrollIntoView(i)),i=t=null}});this.setAutoScrollEditorIntoView=function(e){e!==!0&&(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",r),this.renderer.removeEventListener("afterRender",a),this.renderer.removeEventListener("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking("smooth"==e),t.isBlinking=!this.$readOnly&&"wide"!=e)}}).call(v.prototype),m.defineOptions(v.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._emit("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session"}),t.Editor=v}),define("ace/undomanager",["require","exports","module"],function(e,t){var n=function(){this.reset()};(function(){this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=0/0),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),n=null;return t&&(n=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),n},this.redo=function(e){var t=this.$redoStack.pop(),n=null;return t&&(n=this.$doc.redoChanges(t,e),this.$undoStack.push(t),this.dirtyCounter++),n},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter}}).call(n.prototype),t.UndoManager=n}),define("ace/layer/gutter",["require","exports","module","../lib/dom","../lib/oop","../lib/lang","../lib/event_emitter"],function(e,t){var n=e("../lib/dom"),i=e("../lib/oop"),o=e("../lib/lang"),r=e("../lib/event_emitter").EventEmitter,s=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){i.implement(this,r),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t,n,i=0;ir&&(p=o.end.row+1,o=this.session.getNextFoldLine(p,o),r=o?o.start.row:1/0),p>i){for(;this.$cells.length>h+1;)d=this.$cells.pop(),this.element.removeChild(d.element);break}d=this.$cells[++h],d||(d={element:null,textNode:null,foldWidget:null},d.element=n.createElement("div"),d.textNode=document.createTextNode(""),d.element.appendChild(d.textNode),this.element.appendChild(d.element),this.$cells[h]=d);var f="ace_gutter-cell ";a[p]&&(f+=a[p]),l[p]&&(f+=l[p]),this.$annotations[p]&&(f+=this.$annotations[p].className),d.element.className!=f&&(d.element.className=f);var g=this.session.getRowLength(p)*e.lineHeight+"px";g!=d.element.style.height&&(d.element.style.height=g);var m=u=p+c;if(m!=d.textNode.data&&(d.textNode.data=m),s){var v=s[p];null==v&&(v=s[p]=this.session.getFoldWidget(p))}if(v){d.foldWidget||(d.foldWidget=n.createElement("span"),d.element.appendChild(d.foldWidget));var f="ace_fold-widget ace_"+v;f+="start"==v&&p==r&&pn.right-t.right?"foldWidgets":void 0}}).call(s.prototype),t.Gutter=s}),define("ace/layer/marker",["require","exports","module","../range","../lib/dom"],function(e,t){var n=e("../range").Range,i=e("../lib/dom"),o=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(e){this.config=e;var t=[];for(var n in this.markers){var o=this.markers[n];if(o.range){var r=o.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),o.renderer){var s=this.$getTop(r.start.row,e),a=this.$padding+r.start.column*e.characterWidth;o.renderer(t,r,a,s,e)}else"fullLine"==o.type?this.drawFullLineMarker(t,r,o.clazz,e):"screenLine"==o.type?this.drawScreenLineMarker(t,r,o.clazz,e):r.isMultiLine()?"text"==o.type?this.drawTextMarker(t,r,o.clazz,e):this.drawMultiLineMarker(t,r,o.clazz,e):this.drawSingleLineMarker(t,r,o.clazz+" ace_start",e)}else o.update(t,this,this.session,e)}this.element=i.setInnerHtml(this.element,t.join(""))}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,i,o,r){var s=t.start.row,a=new n(s,t.start.column,s,this.session.getScreenLastRowColumn(s));for(this.drawSingleLineMarker(e,a,i+" ace_start",o,1,r),s=t.end.row,a=new n(s,0,s,t.end.column),this.drawSingleLineMarker(e,a,i,o,0,r),s=t.start.row+1;s"),a=this.$getTop(t.end.row,i);var c=t.end.column*i.characterWidth;e.push("
"),s=(t.end.row-t.start.row-1)*i.lineHeight,0>s||(a=this.$getTop(t.start.row+1,i),e.push("
"))},this.drawSingleLineMarker=function(e,t,n,i,o,r){var s=i.lineHeight,a=(t.end.column+(o||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;e.push("
")},this.drawFullLineMarker=function(e,t,n,i,o){var r=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-r),e.push("
")},this.drawScreenLineMarker=function(e,t,n,i,o){var r=this.$getTop(t.start.row,i),s=i.lineHeight;e.push("
")}}).call(o.prototype),t.Marker=o}),define("ace/layer/text",["require","exports","module","../lib/oop","../lib/dom","../lib/lang","../lib/useragent","../lib/event_emitter"],function(e,t){var n=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),r=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$characterSize={width:0,height:0},this.checkForSizeChanges(),this.$pollSizeChanges()};(function(){n.implement(this,s),this.EOF_CHAR="¶",this.EOL_CHAR="¬",this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$characterSize.height||0},this.getCharacterWidth=function(){return this.$characterSize.width||0},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){var e=this;this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=r.isIE||r.isOldGecko?function(){var e=1e3;if(!this.$measureNode){var t=this.$measureNode=i.createElement("div"),n=t.style;if(n.width=n.height="auto",n.left=n.top=40*-e+"px",n.visibility="hidden",n.position="fixed",n.overflow="visible",n.whiteSpace="nowrap",t.innerHTML=o.stringRepeat("Xy",e),this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(t);else{for(var r=this.element.parentNode;!i.hasCssClass(r,"ace_editor");)r=r.parentNode;r.appendChild(t)}}if(!this.element.offsetWidth)return null;var n=this.$measureNode.style,s=i.computedStyle(this.element);for(var a in this.$fontStyles)n[a]=s[a];var l={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(2*e)};return 0==l.width||0==l.height?null:l}:function(){if(!this.$measureNode){var e=this.$measureNode=i.createElement("div"),t=e.style;t.width=t.height="auto",t.left=t.top="-100px",t.visibility="hidden",t.position="fixed",t.overflow="visible",t.whiteSpace="nowrap",e.innerHTML=o.stringRepeat("X",100);for(var n=this.element.parentNode;n&&!i.hasCssClass(n,"ace_editor");)n=n.parentNode;if(!n)return this.$measureNode=null;n.appendChild(e)}var r=this.$measureNode.getBoundingClientRect(),s={height:r.height,width:r.width/100};return 0==s.width||0==s.height?null:s},this.setSession=function(e){this.session=e,this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;e+1>n;n++)t.push(this.showInvisibles?""+this.TAB_CHAR+o.stringRepeat(" ",n-1)+"":o.stringRepeat(" ",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var i="ace_indent-guide";if(this.showInvisibles){i+=" ace_invisible";var r=o.stringRepeat(this.SPACE_CHAR,this.tabSize),s=this.TAB_CHAR+o.stringRepeat(" ",this.tabSize-1)}else var r=o.stringRepeat(" ",this.tabSize),s=r;this.$tabStrings[" "]=""+r+"",this.$tabStrings[" "]=""+s+""}},this.updateLines=function(e,t,n){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;for(var o=Math.max(t,e.firstRow),r=Math.min(n,e.lastRow),s=this.element.childNodes,a=0,l=e.firstRow;o>l;l++){var c=this.session.getFoldLine(l);if(c){if(c.containsRow(o)){o=c.start.row;break}l=c.end.row}a++}for(var l=o,c=this.session.getNextFoldLine(l),u=c?c.start.row:1/0;;){if(l>u&&(l=c.end.row+1,c=this.session.getNextFoldLine(l,c),u=c?c.start.row:1/0),l>r)break;var d=s[a++];if(d){var h=[];this.$renderLine(h,l,!this.$useLineGroups(),l==u?c:!1),i.setInnerHtml(d,h.join(""))}l++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow0;i--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(var i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)n.removeChild(n.lastChild);if(e.firstRowt.lastRow){var o=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(o)}},this.$renderLinesFragment=function(e,t,n){for(var o=this.element.ownerDocument.createDocumentFragment(),r=t,s=this.session.getNextFoldLine(r),a=s?s.start.row:1/0;;){if(r>a&&(r=s.end.row+1,s=this.session.getNextFoldLine(r,s),a=s?s.start.row:1/0),r>n)break;var l=i.createElement("div"),c=[];if(this.$renderLine(c,r,!1,r==a?s:!1),l.innerHTML=c.join(""),this.$useLineGroups())l.className="ace_line_group",o.appendChild(l);else for(var u=l.childNodes;u.length;)o.appendChild(u[0]);r++}return o},this.update=function(e){this.config=e;for(var t=[],n=e.firstRow,o=e.lastRow,r=n,s=this.session.getNextFoldLine(r),a=s?s.start.row:1/0;;){if(r>a&&(r=s.end.row+1,s=this.session.getNextFoldLine(r,s),a=s?s.start.row:1/0),r>o)break;this.$useLineGroups()&&t.push("
"),this.$renderLine(t,r,!1,r==a?s:!1),this.$useLineGroups()&&t.push("
"),r++}this.element=i.setInnerHtml(this.element,t.join(""))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,i){var r=this,s=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,a=function(e,n,i,s){if(n)return r.showInvisibles?""+o.stringRepeat(r.SPACE_CHAR,e.length)+"":o.stringRepeat(" ",e.length);if("&"==e)return"&";if("<"==e)return"<";if(" "==e){var a=r.session.getScreenTabSize(t+s);return t+=a-1,r.$tabStrings[a]}if(" "==e){var l=r.showInvisibles?"ace_cjk ace_invisible":"ace_cjk",c=r.showInvisibles?r.SPACE_CHAR:"";return t+=1,""+c+""}return i?""+r.SPACE_CHAR+"":(t+=1,""+e+"")},l=i.replace(s,a);if(this.$textToken[n.type])e.push(l);else{var c="ace_"+n.type.replace(/\./g," ace_"),u="";"fold"==n.type&&(u=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("",l,"")}return t+i.length},this.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);return 0>=i||i>=n?t:" "==t[0]?(i-=i%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],i/this.tabSize)),t.substr(i)):" "==t[0]?(e.push(o.stringRepeat(this.$tabStrings[" "],i)),t.substr(i)):t},this.$renderWrappedLine=function(e,t,n,i){for(var o=0,r=0,s=n[0],a=0,l=0;l=s;)a=this.$renderToken(e,a,c,u.substring(0,s-o)),u=u.substring(s-o),o=s,i||e.push("","
"),r++,a=0,s=n[r]||Number.MAX_VALUE;0!=u.length&&(o+=u.length,a=this.$renderToken(e,a,c,u))}}},this.$renderSimpleLine=function(e,t){var n=0,i=t[0],o=i.value;this.displayIndentGuides&&(o=this.renderIndentGuide(e,o)),o&&(n=this.$renderToken(e,n,i,o));for(var r=1;r"),o.length){var r=this.session.getRowSplitData(t);r&&r.length?this.$renderWrappedLine(e,o,r,n):this.$renderSimpleLine(e,o)}this.showInvisibles&&(i&&(t=i.end.row),e.push("",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),n||e.push("
")},this.$getFoldLineTokens=function(e,t){function n(e,t,n){for(var i=0,r=0;r+e[i].value.lengthn-t&&(s=s.substring(0,n-t)),o.push({type:e[i].type,value:s}),r=t+s.length,i+=1}for(;n>r&&in?{type:e[i].type,value:s.substring(0,n-r)}:e[i]),r+=s.length,i+=1}}var i=this.session,o=[],r=i.getTokens(e);return t.walk(function(e,t,s,a,l){null!=e?o.push({type:"fold",value:e}):(l&&(r=i.getTokens(t)),r.length&&n(r,a,s))},t.end.row,this.session.getLine(t.end.row).length),o},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a}),define("ace/layer/cursor",["require","exports","module","../lib/dom"],function(e,t){var n=e("../lib/dom"),i=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),n.addCssClass(this.element,"ace_hidden-cursors")};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,e?n.addCssClass(this.element,"ace_smooth-blinking"):n.removeCssClass(this.element,"ace_smooth-blinking"),this.restartTimer())},this.addCursor=function(){var e=n.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,n.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,n.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&n.removeCssClass(this.element,"ace_smooth-blinking"); for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity="";if(this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){n.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity=0}.bind(this),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity="";t()}.bind(this),this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),i=this.$padding+n.column*this.config.characterWidth,o=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:o}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;(void 0===t||0===t.length)&&(t=[{cursor:null}]);for(var n=0,o=t.length;o>n;n++){var r=this.getPixelPosition(t[n].cursor,!0);if(!((r.top>e.height+e.offset||r.top<-e.offset)&&n>1)){var s=(this.cursors[i++]||this.addCursor()).style;s.left=r.left+"px",s.top=r.top+"px",s.width=e.characterWidth+"px",s.height=e.lineHeight+"px"}}for(;this.cursors.length>i;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=r,this.restartTimer()},this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?n.addCssClass(this.element,"ace_overwrite-cursors"):n.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),t.Cursor=i}),define("ace/scrollbar",["require","exports","module","./lib/oop","./lib/dom","./lib/event","./lib/event_emitter"],function(e,t){var n=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/event"),r=e("./lib/event_emitter").EventEmitter,s=function(e,t){this.element=i.createElement("div"),this.element.className="ace_scrollbar",this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.fullWidth=this.width,this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.setVisible(!1),this.element.style.overflowY="scroll",o.addListener(this.element,"scroll",this.onScrollV.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)},a=function(e,t){this.element=i.createElement("div"),this.element.className="ace_scrollbar-h",this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.height=t.$scrollbarWidth,this.fullHeight=this.height,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px",this.setVisible(!1),this.element.style.overflowX="scroll",o.addListener(this.element,"scroll",this.onScrollH.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){n.implement(this,r),this.setVisible=function(e){e?(this.element.style.display="",this.fullWidth&&(this.width=this.fullWidth),this.fullHeight&&(this.height=this.fullHeight)):(this.element.style.display="none",this.height=this.width=0)},this.onScrollV=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.onScrollH=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getWidth=function(){return this.width},this.getHeight=function(){return this.height},this.setHeight=function(e){this.element.style.height=e+"px"},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}).call(s.prototype),a.prototype=s.prototype,t.ScrollBar=s,t.ScrollBarV=s,t.ScrollBarH=a}),define("ace/renderloop",["require","exports","module","./lib/event"],function(e,t){var n=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending){this.pending=!0;var t=this;n.nextFrame(function(){t.pending=!1;for(var e;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(i.prototype),t.RenderLoop=i}),function(){define("ace/requirejs/text",["require","exports","module"],function(e,t){t.load=function(e,t,n){n("","utf8")}})}(),define("ace/virtual_renderer",["require","exports","module","./lib/oop","./lib/dom","./lib/useragent","./config","./layer/gutter","./layer/marker","./layer/text","./layer/cursor","./scrollbar","./scrollbar","./renderloop","./lib/event_emitter","./requirejs/text!./css/editor.css"],function(e,t){var n=e("./lib/oop"),i=e("./lib/dom"),o=(e("./lib/useragent"),e("./config")),r=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,a=e("./layer/text").Text,l=e("./layer/cursor").Cursor,c=e("./scrollbar").ScrollBarH,u=e("./scrollbar").ScrollBarV,d=e("./renderloop").RenderLoop,h=e("./lib/event_emitter").EventEmitter,p=e("./requirejs/text!./css/editor.css");i.importCssString(p,"ace_editor");var f=function(e,t){var n=this;this.container=e||i.createElement("div"),this.$keepTextAreaAtCursor=!0,i.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new r(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var h=this.$textLayer=new a(this.content);this.canvas=h.element,this.$markerFront=new s(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new u(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$textLayer.addEventListener("changeCharacterSize",function(){n.updateCharacterSize(),n.onResize(!0),n._signal("changeCharacterSize")}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,h),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session=e,this.scroller.className="ace_scroller",this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),this.$loop.schedule(this.CHANGE_FULL)},this.updateLines=function(e,t){void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$changedLines.lastRow2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var o=this.container;i||(i=o.clientHeight||o.scrollHeight),n||(n=o.clientWidth||o.scrollWidth);var r=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(r,!0):this.$loop.schedule(r|this.$changes),this.resizing&&(this.resizing=0)}},this.$updateCachedSize=function(e,t,n,i){var o=0,r=this.$size,s={width:r.width,height:r.height,scrollerHeight:r.scrollerHeight,scrollerWidth:r.scrollerWidth};return i&&(e||r.height!=i)&&(r.height=i,o=this.CHANGE_SIZE,r.scrollerHeight=r.height,this.$horizScroll&&(r.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",this.session&&(this.session.setScrollTop(this.getScrollTop()),o|=this.CHANGE_SCROLL)),n&&(e||r.width!=n)&&(o=this.CHANGE_SIZE,r.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",r.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)),o&&this._signal("resize",s),o},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var i=this.lineHeight;if(!(0>t||t>e.height-i)){var o=this.characterWidth;if(this.$composition){var r=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(r)[0]+2,i+=2,t-=1}n-=this.scrollLeft,n>this.$size.scrollerWidth-o&&(n=this.$size.scrollerWidth-o),n-=this.scrollBar.width,this.textarea.style.height=i+"px",this.textarea.style.width=o+"px",this.textarea.style.right=Math.max(0,this.$size.scrollerWidth-n-o)+"px",this.textarea.style.bottom=Math.max(0,this.$size.height-t-i)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){this.scrollBarV.setInnerHeight(this.layerConfig.maxHeight+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setInnerWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$renderChanges=function(e,t){return this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&(e||t)?this.$size.width?(this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL)&&(e|=this.$computeLayerConfig()),e&this.CHANGE_H_SCROLL&&(this.$updateScrollBarH(),this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$updateScrollBarV(),this.$updateScrollBarH(),this.$textLayer.update(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):e&this.CHANGE_SCROLL?(this.$updateScrollBarV(),e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(this.layerConfig):this.$textLayer.scrollLines(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(e&this.CHANGE_TEXT?(this.$textLayer.update(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(this.layerConfig):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(this.layerConfig),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(this.layerConfig),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(this.layerConfig),(e&this.CHANGE_SIZE||e&this.CHANGE_LINES)&&(this.$updateScrollBarV(),this.$updateScrollBarH()),void this._signal("afterRender"))):(this.$changes|=e,this.onResize(!0)):void(this.$changes|=e)},this.$autosize=function(e){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.max((this.$minLines||1)*this.lineHeight,Math.min(t,e)),i=e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var o=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,n),this.desiredHeight=n}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var e=this.session,t=this.$size.height<=2*this.lineHeight,n=this.session.getScreenLength(),i=n*this.lineHeight,o=this.scrollTop%this.lineHeight,r=this.$size.scrollerHeight+this.lineHeight,s=this.$getLongestLine(),a=!t&&(this.$hScrollBarAlwaysVisible||this.$size.scrollerWidth-s-2*this.$padding<0),l=this.$horizScroll!==a;l&&(this.$horizScroll=a,this.scrollBarH.setVisible(a)),!this.$maxLines&&this.$scrollPastEnd&&this.scrollTop>i-this.$size.scrollerHeight&&(i+=Math.min((this.$size.scrollerHeight-this.lineHeight)*this.$scrollPastEnd,this.scrollTop-i+this.$size.scrollerHeight));var c=!t&&(this.$vScrollBarAlwaysVisible||this.$size.scrollerHeight-i<0),u=this.$vScroll!==c;u&&(this.$vScroll=c,this.scrollBarV.setVisible(c)),this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,i-this.$size.scrollerHeight+this.scrollMargin.v))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,s+2*this.$padding-this.$size.scrollerWidth+this.scrollMargin.h)));var d,h,p=Math.ceil(r/this.lineHeight)-1,f=Math.max(0,Math.round((this.scrollTop-o)/this.lineHeight)),g=f+p,m=this.lineHeight;f=e.screenToDocumentRow(f,0);var v=e.getFoldLine(f);v&&(f=v.start.row),d=e.documentToScreenRow(f,0),h=e.getRowLength(f)*m,g=Math.min(e.screenToDocumentRow(g,0),e.getLength()-1),r=this.$size.scrollerHeight+e.getRowLength(g)*m+h,o=this.scrollTop-d*m;var b=0;return(l||u)&&(b=this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this._signal("scrollbarVisibilityChanged"),u&&(s=this.$getLongestLine())),this.layerConfig={width:s,padding:this.$padding,firstRow:f,firstRowScreen:d,lastRow:g,lineHeight:m,characterWidth:this.characterWidth,minHeight:r,maxHeight:i,offset:o,height:this.$size.scrollerHeight},this.$gutterLayer.element.style.marginTop=-o+"px",this.content.style.marginTop=-o+"px",this.content.style.width=s+2*this.$padding+"px",this.content.style.height=r+"px",b},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;return e>n.lastRow+1||to?(t&&(o-=t*this.$size.scrollerHeight),0==o?o=-this.scrollMargin.top:0==o&&(o=+this.scrollMargin.bottom),this.session.setScrollTop(o)):r+this.$size.scrollerHeighti?(in;++n)o.push(r(n/this.STEPS,e,t-e));return o},this.scrollToLine=function(e,t,n,i){var o=this.$cursorLayer.getPixelPosition({row:e,column:0}),r=o.top;t&&(r-=this.$size.scrollerHeight/2);var s=this.scrollTop;this.session.setScrollTop(r),n!==!1&&this.animateScrolling(s,i)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(e!=n){if(this.$scrollAnimation){var o=this.$scrollAnimation.steps;if(o.length&&(e=o[0],e==n))return}var r=i.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:r},clearInterval(this.$timer),i.session.setScrollTop(r.shift()),this.$timer=setInterval(function(){r.length?(i.session.setScrollTop(r.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):(i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,t&&t())},10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return 0>t&&this.session.getScrollTop()>=1-this.scrollMargin.top?!0:t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight-(this.$size.scrollerHeight-this.lineHeight)*this.$scrollPastEnd<-1+this.scrollMargin.bottom?!0:0>e&&this.session.getScrollLeft()>=1-this.scrollMargin.left?!0:e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right?!0:void 0},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=(e+this.scrollLeft-n.left-this.$padding)/this.characterWidth,o=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),r=Math.round(i);return{row:o,column:r,side:i-r>0?1:-1}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=Math.round((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),o=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(o,Math.max(i,0))},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),o=this.$padding+Math.round(i.column*this.characterWidth),r=i.row*this.lineHeight;return{pageX:n.left+o-this.scrollLeft,pageY:n.top+r-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(i.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){function n(n){if(r.$themeValue!=e)return t&&t();if(n.cssClass){i.importCssString(n.cssText,n.cssClass,r.container.ownerDocument),r.theme&&i.removeCssClass(r.container,r.theme.cssClass),r.$theme=n.cssClass,r.theme=n,i.addCssClass(r.container,n.cssClass),i.setCssClass(r.container,"ace_dark",n.isDark);var o="padding"in n?n.padding:4;r.$padding&&o!=r.$padding&&r.setPadding(o),r.$size&&(r.$size.width=0,r.onResize()),r._dispatchEvent("themeLoaded",{theme:n}),t&&t()}}var r=this;if(this.$themeValue=e,r._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)n(e);else{var s=e||"ace/theme/textmate";o.loadModule(["theme",s],n)}},this.getTheme=function(){return this.$themeValue},this.setStyle=function(e,t){i.setCssClass(this.container,e,0!=t)},this.unsetStyle=function(e){i.removeCssClass(this.container,e)},this.setMouseCursor=function(e){this.content.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(f.prototype),o.defineOptions(f.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=e?"":"none",void(this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight())):(this.$gutterLineHighlight=i.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight))},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(){this.updateFull()}},minLines:{set:function(){this.updateFull()}},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}}}),t.VirtualRenderer=f}),define("ace/mouse/multi_select_handler",["require","exports","module","../lib/event"],function(e,t){function n(e,t){return e.row==t.row&&e.column==t.column}function i(e){var t=e.domEvent,i=t.altKey,r=t.shiftKey,s=e.getAccelKey(),a=e.getButton();if(e.editor.inMultiSelectMode&&2==a)return void e.editor.textInput.onContextMenu(e.domEvent);if(!s&&!i)return void(0==a&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode());var l=e.editor,c=l.selection,u=l.inMultiSelectMode,d=e.getDocumentPosition(),h=c.getCursor(),p=e.inSelection()||c.isEmpty()&&n(d,h),f=e.x,g=e.y,m=function(e){f=e.clientX,g=e.clientY},v=function(){var e=l.renderer.pixelToScreenCoordinates(f,g),t=b.screenToDocumentPosition(e.row,e.column);n(w,e)&&n(t,c.selectionLead)||(w=e,l.selection.moveCursorToPosition(t),l.selection.clearSelection(),l.renderer.scrollCursorIntoView(),l.removeSelectionMarkers(C),C=c.rectangularRangeBlock(w,y),C.forEach(l.addSelectionMarker,l),l.updateSelectionMarkers())},b=l.session,y=l.renderer.pixelToScreenCoordinates(f,g),w=y;if(!s||r||i||0!=a){if(i&&0==a){e.stop(),u&&!s?c.toSingleRange():!u&&s&&c.addRange();var C=[];r?(y=b.documentToScreenPosition(c.lead),v()):(c.moveCursorToPosition(d),c.clearSelection());var x=function(){clearInterval(E),l.removeSelectionMarkers(C);for(var e=0;e1&&!this.inMultiSelectMode&&(this._emit("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);return t?(this.$onRemoveRange(t),t[0]):void 0},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._emit("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._emit("removeRange",{ranges:e}),0==this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._emit("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=a.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var n=this.getRange(),i=this.isBackwards(),o=n.start.row,r=n.end.row;if(o==r){if(i)var s=n.end,l=n.start;else var s=n.start,l=n.end;return this.addRange(a.fromPoints(l,l)),void this.addRange(a.fromPoints(s,s))}var c=[],u=this.getLineRange(o,!0);u.start.column=n.start.column,c.push(u);for(var d=o+1;r>d;d++)c.push(this.getLineRange(d,!0));u=this.getLineRange(r,!0),u.end.column=n.end.column,c.push(u),c.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=a.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.selectionLead),o=this.session.documentToScreenPosition(this.selectionAnchor),r=this.rectangularRangeBlock(i,o);r.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var o=[],r=e.columns&&(s=0),0>u&&(u=0),u==d&&(n=!0);for(var h=u;d>=h;h++){var p=a.fromPoints(this.session.screenToDocumentPosition(h,s),this.session.screenToDocumentPosition(h,l));if(p.isEmpty()){if(f&&i(p.end,f))break;var f=p.end}p.cursor=r?p.start:p.end,o.push(p)}if(c&&o.reverse(),!n){for(var g=o.length-1;o[g].isEmpty()&&g>0;)g--;if(g>0)for(var m=0;o[m].isEmpty();)m++;for(var v=g;v>=m;v--)o[v].isEmpty()&&o.splice(v,1)}return o}}.call(l.prototype);var m=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var o=t.indexOf(i);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,o=this.session,r=this.selection,s=r.rangeList,a=r._eventRegistry;r._eventRegistry={};var c=new l(o);this.inVirtualSelectionMode=!0;for(var u=s.ranges.length;u--;){if(n)for(;u>0&&s.ranges[u].start.row==s.ranges[u-1].end.row;)u--;c.fromOrientedRange(s.ranges[u]),this.selection=o.selection=c;var d=e.exec(this,t||{});void 0==!i&&(i=d),c.toOrientedRange(s.ranges[u])}c.detach(),this.selection=o.selection=r,this.inVirtualSelectionMode=!1,r._eventRegistry=a,r.mergeOverlappingRanges();var h=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),h&&h.from==h.to&&this.renderer.animateScrolling(h.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;in.length||t.length<2||!t[1])return this.commands.exec("insertstring",this,e);for(var i=n.length;i--;){var o=n[i];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,t[i])}}},this.findAll=function(e,t,n){t=t||{},t.needle=e||t.needle,this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;this.$blockScrolling+=1;var o=this.multiSelect;n||o.toSingleRange(i[0]);for(var r=i.length;r--;)o.addRange(i[r],!0);return this.$blockScrolling-=1,i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),i=n.cursor==n.end,o=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var r=this.session.screenToDocumentPosition(o.row+e,o.column);if(n.isEmpty())var s=r;else var l=this.session.documentToScreenPosition(i?n.end:n.start),s=this.session.screenToDocumentPosition(l.row+e,l.column);if(i){var c=a.fromPoints(r,s);c.cursor=c.start}else{var c=a.fromPoints(s,r);c.cursor=c.end}if(c.desiredColumn=o.column,this.selection.inMultiSelectMode){if(t)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(c),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,i=n.ranges,o=i.length;o--;){var r=i[o];if(r.isEmpty()){var s=t.getWordRange(r.start.row,r.start.column);r.start.row=s.start.row,r.start.column=s.start.column,r.end.row=s.end.row,r.end.column=s.end.column}}n.mergeOverlappingRanges();for(var a=[],o=i.length;o--;){var r=i[o];a.unshift(t.getTextRange(r))}0>e?a.unshift(a.pop()):a.push(a.shift());for(var o=i.length;o--;){var r=i[o],s=r.clone();t.replace(r,a[o]),r.start.row=s.start.row,r.start.column=s.start.column}},this.selectMore=function(e,t){var i=this.session,o=i.multiSelect,r=o.toOrientedRange();if(r.isEmpty()){var r=i.getWordRange(r.start.row,r.start.column);return r.cursor=-1==e?r.start:r.end,void this.multiSelect.addRange(r)}var s=i.getTextRange(r),a=n(i,s,e);a&&(a.cursor=-1==e?a.start:a.end,this.multiSelect.addRange(a)),t&&this.multiSelect.substractPoint(r.cursor)},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges;if(n.length){var i=-1,o=n.filter(function(e){return e.cursor.row==i?!0:void(i=e.cursor.row)});t.$onRemoveRange(o);var r=0,s=1/0,l=n.map(function(t){var n=t.cursor,i=e.getLine(n.row),o=i.substr(n.column).search(/\S/g);return-1==o&&(o=0),n.column>r&&(r=n.column),s>o&&(s=o),o});n.forEach(function(t,n){var i=t.cursor,o=r-i.column,c=l[n]-s;o>c?e.insert(i,d.stringRepeat(" ",o-c)):e.remove(new a(i.row,i.column,i.row,i.column-o+c)),t.start.column=t.end.column=r,t.start.row=t.end.row=i.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var c=this.selection.getRange(),u=c.start.row,h=c.end.row,p=this.session.doc.removeLines(u,h);p=this.$reAlignText(p),this.session.doc.insertLines(u,p),c.start.column=0,c.end.column=p[p.length-1].length,this.selection.setRange(c)}},this.$reAlignText=function(e){function t(e){return d.stringRepeat(" ",e)}function n(e){return e[2]?t(r)+e[2]+t(s-e[2].length+a)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function i(e){return e[2]?t(r+s-e[2].length)+e[2]+t(a," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function o(e){return e[2]?t(r)+e[2]+t(a)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var r,s,a,l=!0,c=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==r?(r=t[1].length,s=t[2].length,a=t[3].length,t):(r+s+a!=t[1].length+t[2].length+t[3].length&&(c=!1),r!=t[1].length&&(l=!1),r>t[1].length&&(r=t[1].length),st[3].length&&(a=t[3].length),t):[e]}).map(l?c?i:n:o)}}).call(m.prototype),t.onSessionChange=function(e){var t=e.session;t.multiSelect||(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.removeEventListener("addRange",this.$onAddRange),n.multiSelect.removeEventListener("removeRange",this.$onRemoveRange),n.multiSelect.removeEventListener("multiSelect",this.$onMultiSelect),n.multiSelect.removeEventListener("singleSelect",this.$onSingleSelect)),t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=o,e("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(e){o(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",c)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",c))},value:!0}})}),define("ace/worker/worker_client",["require","exports","module","../lib/oop","../lib/event_emitter","../config"],function(e,t){var n=e("../lib/oop"),i=e("../lib/event_emitter").EventEmitter,o=e("../config"),r=function(t,n,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.onError=this.onError.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl);var r;if(o.get("packaged")||!e.toUrl)r=o.moduleUrl(n,"worker");else{var s=this.$normalizePath;r=s(e.toUrl("ace/worker/worker.js",null,"_"));var a={};t.forEach(function(t){a[t]=s(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=new Worker(r),this.$worker.postMessage({init:!0,tlns:a,module:n,classname:i}),this.callbackId=1,this.callbacks={},this.$worker.onerror=this.onError,this.$worker.onmessage=this.onMessage};(function(){n.implement(this,i),this.onError=function(e){throw window.console&&console.log&&console.log(e),e},this.onMessage=function(e){var t=e.data;switch(t.type){case"log":window.console&&console.log&&console.log.apply(console,t.data);break;case"event":this._emit(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id])}},this.$normalizePath=function(e){return location.host?(e=e.replace(/^[a-z]+:\/\/[^\/]+/,""),e=location.protocol+"//"+location.host+("/"==e.charAt(0)?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+e.replace(/^[\/]+/,"")):e},this.terminate=function(){this._emit("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue?this.deltaQueue.push(e.data):(this.deltaQueue=[e.data],setTimeout(this.$sendDeltaQueue,1))},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>20&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(r.prototype);var s=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var r=null,s=Object.create(i),a=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){a.messageBuffer.push(e),r&&setTimeout(l)};var l=function(){var e=a.messageBuffer.shift();e.command?r[e.command].apply(r,e.args):e.event&&s._emit(e.event,e.data)};s.postMessage=function(e){a.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},o.loadModule(["worker",t],function(e){for(r=new e[n](s);a.messageBuffer.length;)l()})};s.prototype=r.prototype,t.UIWorkerClient=s,t.WorkerClient=r}),define("ace/placeholder",["require","exports","module","./range","./lib/event_emitter","./lib/oop"],function(e,t){var n=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),r=function(e,t,n,i,o,r){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,i),this.setup=function(){var e=this,t=this.doc,i=this.session,o=this.$pos;this.pos=t.createAnchor(o.row,o.column),this.markerId=i.addMarker(new n(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(t){i.removeMarker(e.markerId),e.markerId=i.addMarker(new n(t.value.row,t.value.column,t.value.row,t.value.column+e.length),e.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(n){var i=t.createAnchor(n.row,n.column);e.others.push(i)}),i.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=e.addMarker(new n(i.row,i.column,i.row,i.column+t.length),t.othersClass,null,!1),i.on("change",function(o){e.removeMarker(i.markerId),i.markerId=e.addMarker(new n(o.value.row,o.value.column,o.value.row,o.value.column+t.length),t.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&i.start.column<=this.pos.column+this.length+1){var r=i.start.column-this.pos.column;if(this.length+=o,!this.session.$fromUndo){if("insertText"===t.action)for(var s=this.others.length-1;s>=0;s--){var a=this.others[s],l={row:a.row,column:a.column+r};a.row===i.start.row&&i.start.column=0;s--){var a=this.others[s],l={row:a.row,column:a.column+r};a.row===i.start.row&&i.start.column=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var e=0;en;n++)e.undo(!0)}}).call(r.prototype),t.PlaceHolder=r}),define("ace/mode/folding/fold_mode",["require","exports","module","../../range"],function(e,t){var n=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(){return null},this.indentationBlock=function(e,t,i){var o=/\S/,r=e.getLine(t),s=r.search(o);if(-1!=s){for(var a=i||r.length,l=e.getLength(),c=t,u=t;++t=d)break;u=t}}if(u>c){var h=e.getLine(u).length;return new n(c,a,u,h)}}},this.openingBracketBlock=function(e,t,i,o,r){var s={row:i,column:o+1},a=e.$findClosingBracket(t,s,r);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=this.getFoldWidget(e,a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),n.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,i,o){var r={row:i,column:o},s=e.$findOpeningBracket(t,r);return s?(s.column++,r.column--,n.fromPoints(s,r)):void 0}}).call(i.prototype)}),define("ace/theme/textmate",["require","exports","module","../requirejs/text!./textmate.css","../lib/dom"],function(e,t){t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("../requirejs/text!./textmate.css");var n=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)}),define("ace/ace",["require","exports","module","./lib/fixoldbrowsers","./lib/dom","./lib/event","./editor","./edit_session","./undomanager","./virtual_renderer","./multi_select","./worker/worker_client","./keyboard/hash_handler","./placeholder","./mode/folding/fold_mode","./theme/textmate","./config"],function(e,t){e("./lib/fixoldbrowsers");var n=e("./lib/dom"),i=e("./lib/event"),o=e("./editor").Editor,r=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer,l=e("./multi_select").MultiSelect;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./mode/folding/fold_mode"),e("./theme/textmate"),t.config=e("./config"),t.require=e,t.edit=function(e){if("string"==typeof e){var r=e,e=document.getElementById(r);if(!e)throw new Error("ace.edit can't find div #"+r)}if(e.env&&e.env.editor instanceof o)return e.env.editor;var s=t.createEditSession(n.getInnerText(e));e.innerHTML="";var c=new o(new a(e));new l(c),c.setSession(s);var u={document:s,editor:c,onResize:c.resize.bind(c,null)};return i.addListener(window,"resize",u.onResize),c.on("destroy",function(){i.removeListener(window,"resize",u.onResize)}),e.env=c.env=u,c},t.createEditSession=function(e,t){var n=new r(e,t);return n.setUndoManager(new s),n},t.EditSession=r,t.UndoManager=s}),define("ace",["ace/ace"],function(e){return e}),define("constants",[],function(){var e={};return e.VERSION="3.1.12",e.MAIN_URL="https://stackedit.io/",e.GOOGLE_ANALYTICS_ACCOUNT_ID="UA-39556145-1",e.GOOGLE_API_KEY="AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw",e.GOOGLE_DRIVE_APP_ID="241271498917",e.DROPBOX_APP_KEY="lq6mwopab8wskas",e.DROPBOX_APP_SECRET="851fgnucpezy84t",e.DROPBOX_RESTRICTED_APP_KEY="sw0hlixhr8q1xk0",e.DROPBOX_RESTRICTED_APP_SECRET="1r808p2xygs6lbg",e.BITLY_ACCESS_TOKEN="317e033bfd48cf31155a68a536b1860013b09c4c",e.DEFAULT_FILE_TITLE="Title",e.DEFAULT_FOLDER_NAME="New folder",e.GDRIVE_DEFAULT_FILE_TITLE="New Markdown document",e.EDITOR_DEFAULT_PADDING=15,e.CHECK_ONLINE_PERIOD=12e4,e.AJAX_TIMEOUT=3e4,e.ASYNC_TASK_DEFAULT_TIMEOUT=6e4,e.ASYNC_TASK_LONG_TIMEOUT=18e4,e.USER_IDLE_THRESHOLD=3e5,e.IMPORT_FILE_MAX_CONTENT_SIZE=1e5,e.IMPORT_IMG_MAX_CONTENT_SIZE=1e7,e.TEMPORARY_FILE_INDEX="file.tempIndex",e.WELCOME_DOCUMENT_TITLE="Welcome document",e.DOWNLOAD_PROXY_URL="https://stackedit-download-proxy.herokuapp.com/",e.PICASA_PROXY_URL="https://stackedit-picasa-proxy.herokuapp.com/",e.SSH_PROXY_URL="https://stackedit-ssh-proxy.herokuapp.com/",e.HTMLTOPDF_URL="https://stackedit-htmltopdf.herokuapp.com/",e.BASE_URL="http://localhost/",e.GOOGLE_CLIENT_ID="241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com",e.GITHUB_CLIENT_ID="e47fef6055344579799d",e.GATEKEEPER_URL="https://stackedit-gatekeeper-localhost.herokuapp.com/",e.TUMBLR_PROXY_URL="https://stackedit-tumblr-proxy-local.herokuapp.com/",e.WORDPRESS_CLIENT_ID="23361",e.WORDPRESS_PROXY_URL="https://stackedit-io-wordpress-proxy.herokuapp.com/",0===location.hostname.indexOf("stackedit.io")?(e.BASE_URL=e.MAIN_URL,e.GOOGLE_CLIENT_ID="241271498917-t4t7d07qis7oc0ahaskbif3ft6tk63cd.apps.googleusercontent.com",e.GITHUB_CLIENT_ID="710fc67886ab1ae8fee6",e.GATEKEEPER_URL="https://stackedit-io-gatekeeper.herokuapp.com/",e.TUMBLR_PROXY_URL="https://stackedit-io-tumblr-proxy.herokuapp.com/"):0===location.hostname.indexOf("benweet.github.io")?(e.BASE_URL="http://benweet.github.io/stackedit/",e.GOOGLE_CLIENT_ID="241271498917-jpto9lls9fqnem1e4h6ppds9uob8rpvu.apps.googleusercontent.com",e.GITHUB_CLIENT_ID="fa0d09514da8377ee32e",e.GATEKEEPER_URL="https://stackedit-gatekeeper.herokuapp.com/",e.TUMBLR_PROXY_URL="https://stackedit-tumblr-proxy.herokuapp.com/",e.WORDPRESS_CLIENT_ID="3185",e.WORDPRESS_PROXY_URL="https://stackedit-wordpress-proxy.herokuapp.com/"):0===location.hostname.indexOf("benweet.insomnia247.nl")&&(e.BASE_URL="http://benweet.insomnia247.nl/stackedit/",e.GOOGLE_CLIENT_ID="241271498917-52hae7a08hv7ltenv7km8h7lghno9sk3.apps.googleusercontent.com",e.GITHUB_CLIENT_ID="d2943d6074b2d9c4a830",e.GATEKEEPER_URL="https://stackedit-gatekeeper-insomnia.herokuapp.com/",e.TUMBLR_PROXY_URL="https://stackedit-tumblr-proxy-beta.herokuapp.com/"),e.THEME_LIST={"default":"Default",gray:"Gray",night:"Night",school:"School"},e}),define("storage",["underscore"],function(e){function t(t){try{return e.compact(localStorage[t].split(";"))}catch(n){return localStorage[t]=";",[]}}var n,i,o=t("file.list"),r=localStorage.version;if(void 0===r&&(localStorage.removeItem("sync.queue"),localStorage.removeItem("sync.current"),localStorage.removeItem("file.counter"),e.each(o,function(n){localStorage[n+".publish"]=";";var i=t(n+".sync");e.each(i,function(e){localStorage[e+".contentCRC"]="0",void 0!==localStorage[e+".etag"]&&(localStorage[e+".titleCRC"]="0")})}),r="v1"),"v1"==r){var s=localStorage["sync.gdrive.lastChangeId"];s&&(localStorage["gdrive.lastChangeId"]=s,localStorage.removeItem("sync.gdrive.lastChangeId"));var a=localStorage["sync.dropbox.lastChangeId"];a&&(localStorage["dropbox.lastChangeId"]=a,localStorage.removeItem("sync.dropbox.lastChangeId"));var l="gdrive",c="dropbox",u="sync."+l+".",d="sync."+c+".";e.each(o,function(n){var i=t(n+".sync");e.each(i,function(e){var t={};0===e.indexOf(u)?(t.provider=l,t.id=e.substring(u.length),t.etag=localStorage[e+".etag"],t.contentCRC=localStorage[e+".contentCRC"],t.titleCRC=localStorage[e+".titleCRC"]):0===e.indexOf(d)&&(t.provider=c,t.path=decodeURIComponent(e.substring(d.length)),t.version=localStorage[e+".version"],t.contentCRC=localStorage[e+".contentCRC"]),localStorage[e]=JSON.stringify(t),localStorage.removeItem(e+".etag"),localStorage.removeItem(e+".version"),localStorage.removeItem(e+".contentCRC"),localStorage.removeItem(e+".titleCRC")})}),r="v2"}return"v2"==r&&(e.each(o,function(t){e.has(localStorage,t+".sync")||(localStorage.removeItem(t+".title"),localStorage.removeItem(t+".publish"),localStorage.removeItem(t+".content"),localStorage["file.list"].replace(";"+t+";",";"))}),r="v3"),"v3"==r&&(n=localStorage["file.current"],void 0!==n&&-1===localStorage["file.list"].indexOf(";"+n+";")&&localStorage.removeItem("file.current"),r="v4"),"v4"==r&&(localStorage.removeItem("githubToken"),r="v5"),"v5"==r&&(e.each(o,function(n){var i=t(n+".publish");e.each(i,function(e){var t=JSON.parse(localStorage[e]);"gdrive"==t.provider&&(t.id=t.fileId,t.fileId=void 0,localStorage[e]=JSON.stringify(t))})}),r="v6"),"v6"==r&&(n=localStorage["file.current"],void 0!==n&&(localStorage[n+".selectTime"]=(new Date).getTime(),localStorage.removeItem("file.current")),r="v7"),"v7"==r&&(e.each(e.keys(localStorage),function(t){var n=t.match(/(file\.\S+\.)\S+/);n&&(e.has(localStorage,n[1]+"title")||localStorage.removeItem(t))}),r="v8"),"v8"==r&&(e.each(e.keys(localStorage),function(e){var t=e.match(/file\.\S+\.(editorEnd|editorStart)/);t&&localStorage.removeItem(e)}),r="v9"),"v9"==r&&(e.has(localStorage,"settings")&&(i=JSON.parse(localStorage.settings),delete i.editorFontFamily,delete i.editorFontSize,i.template&&(i.template=i.template.replace("http://benweet.github.io/stackedit/css/main-min.css","http://benweet.github.io/stackedit/res-min/themes/default.css")),localStorage.settings=JSON.stringify(i)),r="v10"),"v10"==r&&(e.has(localStorage,"settings")&&(i=JSON.parse(localStorage.settings),((i.extensionSettings||{}).markdownExtra||{}).extensions&&i.extensionSettings.markdownExtra.extensions.push("smartypants"),"http://stackedit-ssh-proxy.herokuapp.com/"==i.sshProxy&&(i.sshProxy="https://stackedit-ssh-proxy.herokuapp.com/"),i.template&&(i.template=i.template.replace("http://benweet.github.io/stackedit/lib/","https://stackedit.io/libs/")),i.template&&(i.template=i.template.replace("http://benweet.github.io/stackedit/","https://stackedit.io/")),i.pdfTemplate&&(i.pdfTemplate=i.pdfTemplate.replace("http://benweet.github.io/stackedit/lib/","https://stackedit.io/libs/")),i.pdfTemplate&&(i.pdfTemplate=i.pdfTemplate.replace("http://benweet.github.io/stackedit/","https://stackedit.io/")),i.defaultContent&&(i.defaultContent=i.defaultContent.replace("http://benweet.github.io/stackedit/","https://stackedit.io/")),i.commitMsg&&(i.commitMsg=i.commitMsg.replace("http://benweet.github.io/stackedit/","https://stackedit.io/")),localStorage.settings=JSON.stringify(i)),r="v11"),"v11"==r&&(localStorage.removeItem("theme"),e.has(localStorage,"settings")&&(i=JSON.parse(localStorage.settings),delete i.editorFontFamily,delete i.editorFontSize,i.template&&(i.template=i.template.replace("https://stackedit.io/res-min/themes/default.css","https://stackedit.io/res-min/themes/base.css")),i.pdfTemplate&&(i.pdfTemplate=i.pdfTemplate.replace("https://stackedit.io/res-min/themes/default.css","https://stackedit.io/res-min/themes/base.css")),localStorage.settings=JSON.stringify(i)),r="v12"),("v12"==r||"v13"==r)&&(e.has(localStorage,"settings")&&(i=JSON.parse(localStorage.settings),delete i.editorFontFamily,localStorage.settings=JSON.stringify(i)),r="v14"),"v14"==r&&(e.has(localStorage,"settings")&&(i=JSON.parse(localStorage.settings),i.template&&(i.template=i.template.replace("https://stackedit.io/res-min/themes/default.css","https://stackedit.io/res-min/themes/base.css")),i.pdfTemplate&&(i.pdfTemplate=i.pdfTemplate.replace("https://stackedit.io/res-min/themes/default.css","https://stackedit.io/res-min/themes/base.css")),localStorage.settings=JSON.stringify(i)),r="v15"),"v15"==r&&(localStorage.removeItem("gdrivePermissions"),e.has(localStorage,"gdrive.lastChangeId")&&(localStorage["google.gdrive0.gdrive.lastChangeId"]=localStorage["gdrive.lastChangeId"],localStorage.removeItem("gdrive.lastChangeId")),e.has(localStorage,"settings")&&(i=JSON.parse(localStorage.settings),((i.extensionSettings||{}).markdownExtra||{}).extensions&&(i.extensionSettings.markdownExtra.extensions.push("newlines"),i.extensionSettings.markdownExtra.extensions.push("strikethrough")),localStorage.settings=JSON.stringify(i)),r="v16"),"v16"==r&&(e.each(e.keys(localStorage),function(t){var n=t.match(/(file\.\S+\.)\S+/); +t.onMouseDown=i}),define("ace/commands/multi_select_commands",["require","exports","module","../keyboard/hash_handler"],function(e,t){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},readonly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},readonly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},readonly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},readonly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},readonly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},readonly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},readonly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},readonly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readonly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"}}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},readonly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var n=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new n(t.multiSelectCommands)}),define("ace/multi_select",["require","exports","module","./range_list","./range","./selection","./mouse/multi_select_handler","./lib/event","./lib/lang","./commands/multi_select_commands","./search","./edit_session","./editor","./config"],function(e,t){function n(e,t,n){return f.$options.wrap=!0,f.$options.needle=t,f.$options.backwards=-1==n,f.find(e)}function i(e,t){return e.row==t.row&&e.column==t.column}function o(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",c),e.commands.addCommands(h.defaultCommands),r(e))}function r(e){function t(){i&&(e.renderer.setMouseCursor(""),i=!1)}var n=e.textInput.getElement(),i=!1;u.addListener(n,"keydown",function(n){18!=n.keyCode||n.ctrlKey||n.shiftKey||n.metaKey?i&&t():i||(e.renderer.setMouseCursor("crosshair"),i=!0)}),u.addListener(n,"keyup",t),u.addListener(n,"blur",t)}var s=e("./range_list").RangeList,a=e("./range").Range,l=e("./selection").Selection,c=e("./mouse/multi_select_handler").onMouseDown,u=e("./lib/event"),d=e("./lib/lang"),h=e("./commands/multi_select_commands");t.commands=h.defaultCommands.concat(h.multiSelectCommands);var p=e("./search").Search,f=new p,g=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0==this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._emit("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);return t?(this.$onRemoveRange(t),t[0]):void 0},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._emit("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._emit("removeRange",{ranges:e}),0==this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._emit("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=a.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var n=this.getRange(),i=this.isBackwards(),o=n.start.row,r=n.end.row;if(o==r){if(i)var s=n.end,l=n.start;else var s=n.start,l=n.end;return this.addRange(a.fromPoints(l,l)),void this.addRange(a.fromPoints(s,s))}var c=[],u=this.getLineRange(o,!0);u.start.column=n.start.column,c.push(u);for(var d=o+1;r>d;d++)c.push(this.getLineRange(d,!0));u=this.getLineRange(r,!0),u.end.column=n.end.column,c.push(u),c.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=a.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.selectionLead),o=this.session.documentToScreenPosition(this.selectionAnchor),r=this.rectangularRangeBlock(i,o);r.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var o=[],r=e.columns&&(s=0),0>u&&(u=0),u==d&&(n=!0);for(var h=u;d>=h;h++){var p=a.fromPoints(this.session.screenToDocumentPosition(h,s),this.session.screenToDocumentPosition(h,l));if(p.isEmpty()){if(f&&i(p.end,f))break;var f=p.end}p.cursor=r?p.start:p.end,o.push(p)}if(c&&o.reverse(),!n){for(var g=o.length-1;o[g].isEmpty()&&g>0;)g--;if(g>0)for(var m=0;o[m].isEmpty();)m++;for(var v=g;v>=m;v--)o[v].isEmpty()&&o.splice(v,1)}return o}}.call(l.prototype);var m=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var o=t.indexOf(i);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,o=this.session,r=this.selection,s=r.rangeList,a=r._eventRegistry;r._eventRegistry={};var c=new l(o);this.inVirtualSelectionMode=!0;for(var u=s.ranges.length;u--;){if(n)for(;u>0&&s.ranges[u].start.row==s.ranges[u-1].end.row;)u--;c.fromOrientedRange(s.ranges[u]),this.selection=o.selection=c;var d=e.exec(this,t||{});void 0==!i&&(i=d),c.toOrientedRange(s.ranges[u])}c.detach(),this.selection=o.selection=r,this.inVirtualSelectionMode=!1,r._eventRegistry=a,r.mergeOverlappingRanges();var h=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),h&&h.from==h.to&&this.renderer.animateScrolling(h.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;in.length||t.length<2||!t[1])return this.commands.exec("insertstring",this,e);for(var i=n.length;i--;){var o=n[i];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,t[i])}}},this.findAll=function(e,t,n){t=t||{},t.needle=e||t.needle,this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;this.$blockScrolling+=1;var o=this.multiSelect;n||o.toSingleRange(i[0]);for(var r=i.length;r--;)o.addRange(i[r],!0);return this.$blockScrolling-=1,i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),i=n.cursor==n.end,o=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var r=this.session.screenToDocumentPosition(o.row+e,o.column);if(n.isEmpty())var s=r;else var l=this.session.documentToScreenPosition(i?n.end:n.start),s=this.session.screenToDocumentPosition(l.row+e,l.column);if(i){var c=a.fromPoints(r,s);c.cursor=c.start}else{var c=a.fromPoints(s,r);c.cursor=c.end}if(c.desiredColumn=o.column,this.selection.inMultiSelectMode){if(t)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(c),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,i=n.ranges,o=i.length;o--;){var r=i[o];if(r.isEmpty()){var s=t.getWordRange(r.start.row,r.start.column);r.start.row=s.start.row,r.start.column=s.start.column,r.end.row=s.end.row,r.end.column=s.end.column}}n.mergeOverlappingRanges();for(var a=[],o=i.length;o--;){var r=i[o];a.unshift(t.getTextRange(r))}0>e?a.unshift(a.pop()):a.push(a.shift());for(var o=i.length;o--;){var r=i[o],s=r.clone();t.replace(r,a[o]),r.start.row=s.start.row,r.start.column=s.start.column}},this.selectMore=function(e,t){var i=this.session,o=i.multiSelect,r=o.toOrientedRange();if(r.isEmpty()){var r=i.getWordRange(r.start.row,r.start.column);return r.cursor=-1==e?r.start:r.end,void this.multiSelect.addRange(r)}var s=i.getTextRange(r),a=n(i,s,e);a&&(a.cursor=-1==e?a.start:a.end,this.multiSelect.addRange(a)),t&&this.multiSelect.substractPoint(r.cursor)},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges;if(n.length){var i=-1,o=n.filter(function(e){return e.cursor.row==i?!0:void(i=e.cursor.row)});t.$onRemoveRange(o);var r=0,s=1/0,l=n.map(function(t){var n=t.cursor,i=e.getLine(n.row),o=i.substr(n.column).search(/\S/g);return-1==o&&(o=0),n.column>r&&(r=n.column),s>o&&(s=o),o});n.forEach(function(t,n){var i=t.cursor,o=r-i.column,c=l[n]-s;o>c?e.insert(i,d.stringRepeat(" ",o-c)):e.remove(new a(i.row,i.column,i.row,i.column-o+c)),t.start.column=t.end.column=r,t.start.row=t.end.row=i.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var c=this.selection.getRange(),u=c.start.row,h=c.end.row,p=this.session.doc.removeLines(u,h);p=this.$reAlignText(p),this.session.doc.insertLines(u,p),c.start.column=0,c.end.column=p[p.length-1].length,this.selection.setRange(c)}},this.$reAlignText=function(e){function t(e){return d.stringRepeat(" ",e)}function n(e){return e[2]?t(r)+e[2]+t(s-e[2].length+a)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function i(e){return e[2]?t(r+s-e[2].length)+e[2]+t(a," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function o(e){return e[2]?t(r)+e[2]+t(a)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var r,s,a,l=!0,c=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==r?(r=t[1].length,s=t[2].length,a=t[3].length,t):(r+s+a!=t[1].length+t[2].length+t[3].length&&(c=!1),r!=t[1].length&&(l=!1),r>t[1].length&&(r=t[1].length),st[3].length&&(a=t[3].length),t):[e]}).map(l?c?i:n:o)}}).call(m.prototype),t.onSessionChange=function(e){var t=e.session;t.multiSelect||(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.removeEventListener("addRange",this.$onAddRange),n.multiSelect.removeEventListener("removeRange",this.$onRemoveRange),n.multiSelect.removeEventListener("multiSelect",this.$onMultiSelect),n.multiSelect.removeEventListener("singleSelect",this.$onSingleSelect)),t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=o,e("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(e){o(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",c)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",c))},value:!0}})}),define("ace/worker/worker_client",["require","exports","module","../lib/oop","../lib/event_emitter","../config"],function(e,t){var n=e("../lib/oop"),i=e("../lib/event_emitter").EventEmitter,o=e("../config"),r=function(t,n,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.onError=this.onError.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl);var r;if(o.get("packaged")||!e.toUrl)r=o.moduleUrl(n,"worker");else{var s=this.$normalizePath;r=s(e.toUrl("ace/worker/worker.js",null,"_"));var a={};t.forEach(function(t){a[t]=s(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=new Worker(r),this.$worker.postMessage({init:!0,tlns:a,module:n,classname:i}),this.callbackId=1,this.callbacks={},this.$worker.onerror=this.onError,this.$worker.onmessage=this.onMessage};(function(){n.implement(this,i),this.onError=function(e){throw window.console&&console.log&&console.log(e),e},this.onMessage=function(e){var t=e.data;switch(t.type){case"log":window.console&&console.log&&console.log.apply(console,t.data);break;case"event":this._emit(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id])}},this.$normalizePath=function(e){return location.host?(e=e.replace(/^[a-z]+:\/\/[^\/]+/,""),e=location.protocol+"//"+location.host+("/"==e.charAt(0)?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+e.replace(/^[\/]+/,"")):e},this.terminate=function(){this._emit("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue?this.deltaQueue.push(e.data):(this.deltaQueue=[e.data],setTimeout(this.$sendDeltaQueue,1))},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>20&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(r.prototype);var s=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var r=null,s=Object.create(i),a=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){a.messageBuffer.push(e),r&&setTimeout(l)};var l=function(){var e=a.messageBuffer.shift();e.command?r[e.command].apply(r,e.args):e.event&&s._emit(e.event,e.data)};s.postMessage=function(e){a.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},o.loadModule(["worker",t],function(e){for(r=new e[n](s);a.messageBuffer.length;)l()})};s.prototype=r.prototype,t.UIWorkerClient=s,t.WorkerClient=r}),define("ace/placeholder",["require","exports","module","./range","./lib/event_emitter","./lib/oop"],function(e,t){var n=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),r=function(e,t,n,i,o,r){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,i),this.setup=function(){var e=this,t=this.doc,i=this.session,o=this.$pos;this.pos=t.createAnchor(o.row,o.column),this.markerId=i.addMarker(new n(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(t){i.removeMarker(e.markerId),e.markerId=i.addMarker(new n(t.value.row,t.value.column,t.value.row,t.value.column+e.length),e.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(n){var i=t.createAnchor(n.row,n.column);e.others.push(i)}),i.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=e.addMarker(new n(i.row,i.column,i.row,i.column+t.length),t.othersClass,null,!1),i.on("change",function(o){e.removeMarker(i.markerId),i.markerId=e.addMarker(new n(o.value.row,o.value.column,o.value.row,o.value.column+t.length),t.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&i.start.column<=this.pos.column+this.length+1){var r=i.start.column-this.pos.column;if(this.length+=o,!this.session.$fromUndo){if("insertText"===t.action)for(var s=this.others.length-1;s>=0;s--){var a=this.others[s],l={row:a.row,column:a.column+r};a.row===i.start.row&&i.start.column=0;s--){var a=this.others[s],l={row:a.row,column:a.column+r};a.row===i.start.row&&i.start.column=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var e=0;en;n++)e.undo(!0)}}).call(r.prototype),t.PlaceHolder=r}),define("ace/mode/folding/fold_mode",["require","exports","module","../../range"],function(e,t){var n=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(){return null},this.indentationBlock=function(e,t,i){var o=/\S/,r=e.getLine(t),s=r.search(o);if(-1!=s){for(var a=i||r.length,l=e.getLength(),c=t,u=t;++t=d)break;u=t}}if(u>c){var h=e.getLine(u).length;return new n(c,a,u,h)}}},this.openingBracketBlock=function(e,t,i,o,r){var s={row:i,column:o+1},a=e.$findClosingBracket(t,s,r);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=this.getFoldWidget(e,a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),n.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,i,o){var r={row:i,column:o},s=e.$findOpeningBracket(t,r);return s?(s.column++,r.column--,n.fromPoints(s,r)):void 0}}).call(i.prototype)}),define("ace/theme/textmate",["require","exports","module","../requirejs/text!./textmate.css","../lib/dom"],function(e,t){t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("../requirejs/text!./textmate.css");var n=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)}),define("ace/ace",["require","exports","module","./lib/fixoldbrowsers","./lib/dom","./lib/event","./editor","./edit_session","./undomanager","./virtual_renderer","./multi_select","./worker/worker_client","./keyboard/hash_handler","./placeholder","./mode/folding/fold_mode","./theme/textmate","./config"],function(e,t){e("./lib/fixoldbrowsers");var n=e("./lib/dom"),i=e("./lib/event"),o=e("./editor").Editor,r=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer,l=e("./multi_select").MultiSelect;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./mode/folding/fold_mode"),e("./theme/textmate"),t.config=e("./config"),t.require=e,t.edit=function(e){if("string"==typeof e){var r=e,e=document.getElementById(r);if(!e)throw new Error("ace.edit can't find div #"+r)}if(e.env&&e.env.editor instanceof o)return e.env.editor;var s=t.createEditSession(n.getInnerText(e));e.innerHTML="";var c=new o(new a(e));new l(c),c.setSession(s);var u={document:s,editor:c,onResize:c.resize.bind(c,null)};return i.addListener(window,"resize",u.onResize),c.on("destroy",function(){i.removeListener(window,"resize",u.onResize)}),e.env=c.env=u,c},t.createEditSession=function(e,t){var n=new r(e,t);return n.setUndoManager(new s),n},t.EditSession=r,t.UndoManager=s}),define("ace",["ace/ace"],function(e){return e}),define("constants",[],function(){var e={};return e.VERSION="3.1.13",e.MAIN_URL="https://stackedit.io/",e.GOOGLE_ANALYTICS_ACCOUNT_ID="UA-39556145-1",e.GOOGLE_API_KEY="AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw",e.GOOGLE_DRIVE_APP_ID="241271498917",e.DROPBOX_APP_KEY="lq6mwopab8wskas",e.DROPBOX_APP_SECRET="851fgnucpezy84t",e.DROPBOX_RESTRICTED_APP_KEY="sw0hlixhr8q1xk0",e.DROPBOX_RESTRICTED_APP_SECRET="1r808p2xygs6lbg",e.BITLY_ACCESS_TOKEN="317e033bfd48cf31155a68a536b1860013b09c4c",e.DEFAULT_FILE_TITLE="Title",e.DEFAULT_FOLDER_NAME="New folder",e.GDRIVE_DEFAULT_FILE_TITLE="New Markdown document",e.EDITOR_DEFAULT_PADDING=15,e.CHECK_ONLINE_PERIOD=12e4,e.AJAX_TIMEOUT=3e4,e.ASYNC_TASK_DEFAULT_TIMEOUT=6e4,e.ASYNC_TASK_LONG_TIMEOUT=18e4,e.USER_IDLE_THRESHOLD=3e5,e.IMPORT_FILE_MAX_CONTENT_SIZE=1e5,e.IMPORT_IMG_MAX_CONTENT_SIZE=1e7,e.TEMPORARY_FILE_INDEX="file.tempIndex",e.WELCOME_DOCUMENT_TITLE="Welcome document",e.DOWNLOAD_PROXY_URL="https://stackedit-download-proxy.herokuapp.com/",e.PICASA_PROXY_URL="https://stackedit-picasa-proxy.herokuapp.com/",e.SSH_PROXY_URL="https://stackedit-ssh-proxy.herokuapp.com/",e.HTMLTOPDF_URL="https://stackedit-htmltopdf.herokuapp.com/",e.BASE_URL="http://localhost/",e.GOOGLE_CLIENT_ID="241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com",e.GITHUB_CLIENT_ID="e47fef6055344579799d",e.GATEKEEPER_URL="https://stackedit-gatekeeper-localhost.herokuapp.com/",e.TUMBLR_PROXY_URL="https://stackedit-tumblr-proxy-local.herokuapp.com/",e.WORDPRESS_CLIENT_ID="23361",e.WORDPRESS_PROXY_URL="https://stackedit-io-wordpress-proxy.herokuapp.com/",0===location.hostname.indexOf("stackedit.io")?(e.BASE_URL=e.MAIN_URL,e.GOOGLE_CLIENT_ID="241271498917-t4t7d07qis7oc0ahaskbif3ft6tk63cd.apps.googleusercontent.com",e.GITHUB_CLIENT_ID="710fc67886ab1ae8fee6",e.GATEKEEPER_URL="https://stackedit-io-gatekeeper.herokuapp.com/",e.TUMBLR_PROXY_URL="https://stackedit-io-tumblr-proxy.herokuapp.com/"):0===location.hostname.indexOf("benweet.github.io")?(e.BASE_URL="http://benweet.github.io/stackedit/",e.GOOGLE_CLIENT_ID="241271498917-jpto9lls9fqnem1e4h6ppds9uob8rpvu.apps.googleusercontent.com",e.GITHUB_CLIENT_ID="fa0d09514da8377ee32e",e.GATEKEEPER_URL="https://stackedit-gatekeeper.herokuapp.com/",e.TUMBLR_PROXY_URL="https://stackedit-tumblr-proxy.herokuapp.com/",e.WORDPRESS_CLIENT_ID="3185",e.WORDPRESS_PROXY_URL="https://stackedit-wordpress-proxy.herokuapp.com/"):0===location.hostname.indexOf("benweet.insomnia247.nl")&&(e.BASE_URL="http://benweet.insomnia247.nl/stackedit/",e.GOOGLE_CLIENT_ID="241271498917-52hae7a08hv7ltenv7km8h7lghno9sk3.apps.googleusercontent.com",e.GITHUB_CLIENT_ID="d2943d6074b2d9c4a830",e.GATEKEEPER_URL="https://stackedit-gatekeeper-insomnia.herokuapp.com/",e.TUMBLR_PROXY_URL="https://stackedit-tumblr-proxy-beta.herokuapp.com/"),e.THEME_LIST={"default":"Default",gray:"Gray",night:"Night",school:"School"},e}),define("storage",["underscore"],function(e){function t(t){try{return e.compact(localStorage[t].split(";"))}catch(n){return localStorage[t]=";",[]}}var n,i,o=t("file.list"),r=localStorage.version;if(void 0===r&&(localStorage.removeItem("sync.queue"),localStorage.removeItem("sync.current"),localStorage.removeItem("file.counter"),e.each(o,function(n){localStorage[n+".publish"]=";";var i=t(n+".sync");e.each(i,function(e){localStorage[e+".contentCRC"]="0",void 0!==localStorage[e+".etag"]&&(localStorage[e+".titleCRC"]="0")})}),r="v1"),"v1"==r){var s=localStorage["sync.gdrive.lastChangeId"];s&&(localStorage["gdrive.lastChangeId"]=s,localStorage.removeItem("sync.gdrive.lastChangeId"));var a=localStorage["sync.dropbox.lastChangeId"];a&&(localStorage["dropbox.lastChangeId"]=a,localStorage.removeItem("sync.dropbox.lastChangeId"));var l="gdrive",c="dropbox",u="sync."+l+".",d="sync."+c+".";e.each(o,function(n){var i=t(n+".sync");e.each(i,function(e){var t={};0===e.indexOf(u)?(t.provider=l,t.id=e.substring(u.length),t.etag=localStorage[e+".etag"],t.contentCRC=localStorage[e+".contentCRC"],t.titleCRC=localStorage[e+".titleCRC"]):0===e.indexOf(d)&&(t.provider=c,t.path=decodeURIComponent(e.substring(d.length)),t.version=localStorage[e+".version"],t.contentCRC=localStorage[e+".contentCRC"]),localStorage[e]=JSON.stringify(t),localStorage.removeItem(e+".etag"),localStorage.removeItem(e+".version"),localStorage.removeItem(e+".contentCRC"),localStorage.removeItem(e+".titleCRC")})}),r="v2"}return"v2"==r&&(e.each(o,function(t){e.has(localStorage,t+".sync")||(localStorage.removeItem(t+".title"),localStorage.removeItem(t+".publish"),localStorage.removeItem(t+".content"),localStorage["file.list"].replace(";"+t+";",";"))}),r="v3"),"v3"==r&&(n=localStorage["file.current"],void 0!==n&&-1===localStorage["file.list"].indexOf(";"+n+";")&&localStorage.removeItem("file.current"),r="v4"),"v4"==r&&(localStorage.removeItem("githubToken"),r="v5"),"v5"==r&&(e.each(o,function(n){var i=t(n+".publish");e.each(i,function(e){var t=JSON.parse(localStorage[e]);"gdrive"==t.provider&&(t.id=t.fileId,t.fileId=void 0,localStorage[e]=JSON.stringify(t))})}),r="v6"),"v6"==r&&(n=localStorage["file.current"],void 0!==n&&(localStorage[n+".selectTime"]=(new Date).getTime(),localStorage.removeItem("file.current")),r="v7"),"v7"==r&&(e.each(e.keys(localStorage),function(t){var n=t.match(/(file\.\S+\.)\S+/);n&&(e.has(localStorage,n[1]+"title")||localStorage.removeItem(t))}),r="v8"),"v8"==r&&(e.each(e.keys(localStorage),function(e){var t=e.match(/file\.\S+\.(editorEnd|editorStart)/);t&&localStorage.removeItem(e)}),r="v9"),"v9"==r&&(e.has(localStorage,"settings")&&(i=JSON.parse(localStorage.settings),delete i.editorFontFamily,delete i.editorFontSize,i.template&&(i.template=i.template.replace("http://benweet.github.io/stackedit/css/main-min.css","http://benweet.github.io/stackedit/res-min/themes/default.css")),localStorage.settings=JSON.stringify(i)),r="v10"),"v10"==r&&(e.has(localStorage,"settings")&&(i=JSON.parse(localStorage.settings),((i.extensionSettings||{}).markdownExtra||{}).extensions&&i.extensionSettings.markdownExtra.extensions.push("smartypants"),"http://stackedit-ssh-proxy.herokuapp.com/"==i.sshProxy&&(i.sshProxy="https://stackedit-ssh-proxy.herokuapp.com/"),i.template&&(i.template=i.template.replace("http://benweet.github.io/stackedit/lib/","https://stackedit.io/libs/")),i.template&&(i.template=i.template.replace("http://benweet.github.io/stackedit/","https://stackedit.io/")),i.pdfTemplate&&(i.pdfTemplate=i.pdfTemplate.replace("http://benweet.github.io/stackedit/lib/","https://stackedit.io/libs/")),i.pdfTemplate&&(i.pdfTemplate=i.pdfTemplate.replace("http://benweet.github.io/stackedit/","https://stackedit.io/")),i.defaultContent&&(i.defaultContent=i.defaultContent.replace("http://benweet.github.io/stackedit/","https://stackedit.io/")),i.commitMsg&&(i.commitMsg=i.commitMsg.replace("http://benweet.github.io/stackedit/","https://stackedit.io/")),localStorage.settings=JSON.stringify(i)),r="v11"),"v11"==r&&(localStorage.removeItem("theme"),e.has(localStorage,"settings")&&(i=JSON.parse(localStorage.settings),delete i.editorFontFamily,delete i.editorFontSize,i.template&&(i.template=i.template.replace("https://stackedit.io/res-min/themes/default.css","https://stackedit.io/res-min/themes/base.css")),i.pdfTemplate&&(i.pdfTemplate=i.pdfTemplate.replace("https://stackedit.io/res-min/themes/default.css","https://stackedit.io/res-min/themes/base.css")),localStorage.settings=JSON.stringify(i)),r="v12"),("v12"==r||"v13"==r)&&(e.has(localStorage,"settings")&&(i=JSON.parse(localStorage.settings),delete i.editorFontFamily,localStorage.settings=JSON.stringify(i)),r="v14"),"v14"==r&&(e.has(localStorage,"settings")&&(i=JSON.parse(localStorage.settings),i.template&&(i.template=i.template.replace("https://stackedit.io/res-min/themes/default.css","https://stackedit.io/res-min/themes/base.css")),i.pdfTemplate&&(i.pdfTemplate=i.pdfTemplate.replace("https://stackedit.io/res-min/themes/default.css","https://stackedit.io/res-min/themes/base.css")),localStorage.settings=JSON.stringify(i)),r="v15"),"v15"==r&&(localStorage.removeItem("gdrivePermissions"),e.has(localStorage,"gdrive.lastChangeId")&&(localStorage["google.gdrive0.gdrive.lastChangeId"]=localStorage["gdrive.lastChangeId"],localStorage.removeItem("gdrive.lastChangeId")),e.has(localStorage,"settings")&&(i=JSON.parse(localStorage.settings),((i.extensionSettings||{}).markdownExtra||{}).extensions&&(i.extensionSettings.markdownExtra.extensions.push("newlines"),i.extensionSettings.markdownExtra.extensions.push("strikethrough")),localStorage.settings=JSON.stringify(i)),r="v16"),"v16"==r&&(e.each(e.keys(localStorage),function(t){var n=t.match(/(file\.\S+\.)\S+/); n&&(e.has(localStorage,n[1]+"title")||localStorage.removeItem(t))}),r="v17"),localStorage.version=r,localStorage}),function(e){var t;"function"==typeof define?define("xregexp",e):"object"==typeof exports?(t=e(),("object"==typeof module?module.exports=t:exports).XRegExp=t):XRegExp=e()}(function(){var e=function(e){function t(e,t,n){var i;if(n)if(e.__proto__)e.__proto__=m.prototype;else for(i in m.prototype)e[i]=m.prototype[i];return e[b]={captureNames:t},e}function n(e){return w.replace.call(e,/([\s\S])(?=[\s\S]*\1)/g,"")}function i(e,i){if(!m.isRegExp(e))throw new TypeError("Type RegExp expected");var o=w.exec.call(/\/([a-z]*)$/i,String(e))[1];return i=i||{},i.add&&(o=n(o+i.add)),i.remove&&(o=w.replace.call(o,new RegExp("["+i.remove+"]+","g"),"")),e=t(new RegExp(e.source,o),r(e)?e[b].captureNames.slice(0):null,i.addProto)}function o(){return{captureNames:null}}function r(e){return!(!e[b]||!e[b].captureNames)}function s(e,t){if(Array.prototype.indexOf)return e.indexOf(t);var n,i=e.length;for(n=0;i>n;++n)if(e[n]===t)return n;return-1}function a(e,t){return I.call(e)==="[object "+t+"]"}function l(e,t,n){return w.test.call(n.indexOf("x")>-1?/^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,e.slice(t))}function c(e,t){var i;if(n(t)!==t)throw new SyntaxError("Invalid duplicate regex flag "+t);for(e=w.replace.call(e,/^\(\?([\w$]+)\)/,function(e,i){if(w.test.call(/[gy]/,i))throw new SyntaxError("Cannot use flag g or y in mode modifier "+e);return t=n(t+i),""}),i=0;i-1)&&(r=m.exec(e,s.regex,n,"sticky"))){l={matchLength:r[0].length,output:s.handler.call(o,r,i,t),reparse:s.reparse};break}return l}function p(e){m.cache.flush("patterns"),y.astral=e}function f(e){RegExp.prototype.exec=(e?C:w).exec,RegExp.prototype.test=(e?C:w).test,String.prototype.match=(e?C:w).match,String.prototype.replace=(e?C:w).replace,String.prototype.split=(e?C:w).split,y.natives=e}function g(e){if(null==e)throw new TypeError("Cannot convert null or undefined to object");return e}var m,v,b="xregexp",y={astral:!1,natives:!1},w={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},C={},x={},S={},E=[],k="default",A="class",F={"default":/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,"class":/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|[\s\S]/},T=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,D=w.exec.call(/()??/,"")[1]===e,_=RegExp.prototype.sticky!==e,L={g:!0,i:!0,m:!0,y:_},I={}.toString;return m=function(n,o){var r,s,a,l={hasNamedCapture:!1,captureNames:[]},u=k,d="",p=0;if(m.isRegExp(n)){if(o!==e)throw new TypeError("Cannot supply flags when copying a RegExp");return i(n,{addProto:!0})}if(n=n===e?"":String(n),o=o===e?"":String(o),a=n+"***"+o,!S[a]){for(r=c(n,o),n=r.pattern,o=r.flags;p"}else if(o)return"\\"+(+o+n);return e};if(!a(e,"Array")||!e.length)throw new TypeError("Must provide a nonempty array of patterns to merge");for(r=0;r1&&s(l,"")>-1&&(o=i(this,{remove:"g"}),w.replace.call(String(t).slice(l.index),o,function(){var t,n=arguments.length;for(t=1;n-2>t;++t)arguments[t]===e&&(l[t]=e)})),this[b]&&this[b].captureNames)for(r=1;rl.index&&(this.lastIndex=l.index)}return this.global||(this.lastIndex=a),l},C.test=function(e){return!!C.exec.call(this,e)},C.match=function(e){var t;if(m.isRegExp(e)){if(e.global)return t=w.match.apply(this,arguments),e.lastIndex=0,t}else e=new RegExp(e);return C.exec.call(e,g(this))},C.replace=function(t,n){var i,o,r,l=m.isRegExp(t);return l?(t[b]&&(o=t[b].captureNames),i=t.lastIndex):t+="",r=a(n,"Function")?w.replace.call(String(this),t,function(){var i,r=arguments;if(o)for(r[0]=new String(r[0]),i=0;ir)throw new SyntaxError("Backreference to undefined group "+t);return e[r+1]||""}if("$"===i)return"$";if("&"===i||0===+i)return e[0];if("`"===i)return e[e.length-1].slice(0,e[e.length-2]);if("'"===i)return e[e.length-1].slice(e[e.length-2]+e[0].length);if(i=+i,!isNaN(i)){if(i>e.length-3)throw new SyntaxError("Backreference to undefined group "+t);return e[i]||""}throw new SyntaxError("Invalid token "+t)})}),l&&(t.lastIndex=t.global?0:i),r},C.split=function(t,n){if(!m.isRegExp(t))return w.split.apply(this,arguments);var i,o=String(this),r=[],s=t.lastIndex,a=0;return n=(n===e?-1:n)>>>0,m.forEach(o,t,function(e){e.index+e[0].length>a&&(r.push(o.slice(a,e.index)),e.length>1&&e.indexn?r.slice(0,n):r},v=m.addToken,v(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/,function(e,t){if("B"===e[1]&&t===k)return e[0];throw new SyntaxError("Invalid escape "+e[0])},{scope:"all"}),v(/\[(\^?)]/,function(e){return e[1]?"[\\s\\S]":"\\b\\B"}),v(/\(\?#[^)]*\)/,function(e,t,n){return l(e.input,e.index+e[0].length,n)?"":"(?:)"}),v(/\s+|#.*/,function(e,t,n){return l(e.input,e.index+e[0].length,n)?"":"(?:)"},{flag:"x"}),v(/\./,function(){return"[\\s\\S]"},{flag:"s"}),v(/\\k<([\w$]+)>/,function(e){var t=isNaN(e[1])?s(this.captureNames,e[1])+1:+e[1],n=e.index+e[0].length;if(!t||t>this.captureNames.length)throw new SyntaxError("Backreference to undefined group "+e[0]);return"\\"+t+(n===e.input.length||isNaN(e.input.charAt(n))?"":"(?:)")}),v(/\\(\d+)/,function(e,t){if(!(t===k&&/^[1-9]/.test(e[1])&&+e[1]<=this.captureNames.length)&&"0"!==e[1])throw new SyntaxError("Cannot use octal escape or backreference to undefined group "+e[0]);return e[0]},{scope:"all"}),v(/\(\?P?<([\w$]+)>/,function(e){if(!isNaN(e[1]))throw new SyntaxError("Cannot use integer as capture name "+e[0]);if("length"===e[1]||"__proto__"===e[1])throw new SyntaxError("Cannot use reserved word as capture name "+e[0]);if(s(this.captureNames,e[1])>-1)throw new SyntaxError("Cannot use same name for multiple groups "+e[0]);return this.captureNames.push(e[1]),this.hasNamedCapture=!0,"("}),v(/\((?!\?)/,function(e,t,n){return n.indexOf("n")>-1?"(?:":(this.captureNames.push(null),"(")},{optionalFlags:"n"}),m}();return function(e){function t(e){var t=/^\^/,n=/\$$/;return t.test(e)&&n.test(e.replace(/\\[\s\S]/g,""))?e.replace(t,"").replace(n,""):e}function n(t){return e.isRegExp(t)?t[i]&&t[i].captureNames?t:e(t.source):e(t)}var i="xregexp",o=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g,r=e.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,o],"g");e.build=function(s,a,l){var c,u,d,h,p=/^\(\?([\w$]+)\)/.exec(s),f={},g=0,m=0,v=[0];p&&(l=l||"",p[1].replace(/./g,function(e){l+=l.indexOf(e)>-1?"":e}));for(h in a)a.hasOwnProperty(h)&&(d=n(a[h]),f[h]={pattern:t(d.source),names:d[i].captureNames||[]});return s=n(s),u=s[i].captureNames||[],s=s.source.replace(r,function(e,t,n,i,r){var s,a,l=t||n;if(l){if(!f.hasOwnProperty(l))throw new ReferenceError("Undefined property "+e);return t?(s=u[m],v[++m]=++g,a="(?<"+(s||l)+">"):a="(?:",c=g,a+f[l].pattern.replace(o,function(e,t,n){if(t){if(s=f[l].names[g-c],++g,s)return"(?<"+s+">"}else if(n)return"\\"+(+n+c);return e})+")"}if(i){if(s=u[m],v[++m]=++g,s)return"(?<"+s+">"}else if(r)return"\\"+v[+r];return e}),e(s,l)}}(e),function(e){function t(e,t,n,i){return{name:e,value:t,start:n,end:i}}e.matchRecursive=function(n,i,o,r,s){r=r||"",s=s||{};var a,l,c,u,d,h=r.indexOf("g")>-1,p=r.indexOf("y")>-1,f=r.replace(/y/g,""),g=s.escapeChar,m=s.valueNames,v=[],b=0,y=0,w=0,C=0;if(i=e(i,f),o=e(o,f),g){if(g.length>1)throw new Error("Cannot use more than one escape character");g=e.escape(g),d=new RegExp("(?:"+g+"[\\S\\s]|(?:(?!"+e.union([i,o]).source+")[^"+g+"])+)+",r.replace(/[^im]+/g,""))}for(;;){if(g&&(w+=(e.exec(n,d,w,"sticky")||[""])[0].length),c=e.exec(n,i,w),u=e.exec(n,o,w),c&&u&&(c.index<=u.index?u=null:c=null),c||u)y=(c||u).index,w=y+(c||u)[0].length;else if(!b)break;if(p&&!b&&y>C)break;if(c)b||(a=y,l=w),++b;else{if(!u||!b)throw new Error("Unbalanced delimiter found in string");if(!--b&&(m?(m[0]&&a>C&&v.push(t(m[0],n.slice(C,a),C,a)),m[1]&&v.push(t(m[1],n.slice(a,l),a,l)),m[2]&&v.push(t(m[2],n.slice(l,y),l,y)),m[3]&&v.push(t(m[3],n.slice(y,w),y,w))):v.push(n.slice(l,y)),C=w,!h))break}y===w&&++w}return h&&!p&&m&&m[0]&&n.length>C&&v.push(t(m[0],n.slice(C),C,n.length)),v}}(e),function(e){function t(e){return e.replace(/[- _]+/g,"").toLowerCase()}function n(e){for(;e.length<4;)e="0"+e;return e}function i(e){return parseInt(e,16)}function o(e){return parseInt(e,10).toString(16)}function r(e){var t=/^\\[xu](.+)/.exec(e);return t?i(t[1]):e.charCodeAt("\\"===e.charAt(0)?1:0)}function s(t){var i,s="",a=-1;return e.forEach(t,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(e){i=r(e[1]),i>a+1&&(s+="\\u"+n(o(a+1)),i>a+2&&(s+="-\\u"+n(o(i-1)))),a=r(e[2]||e[1])}),65535>a&&(s+="\\u"+n(o(a+1)),65534>a&&(s+="-\\uFFFF")),s}function a(e){var t="b!";return u[e][t]||(u[e][t]=s(u[e].bmp))}function l(e,t){var n=u[e],i="";return n.bmp&&!n.isBmpLast&&(i="["+n.bmp+"]"+(n.astral?"|":"")),n.astral&&(i+=n.astral),n.isBmpLast&&n.bmp&&(i+=(n.astral?"|":"")+"["+n.bmp+"]"),t?"(?:(?!"+i+")(?:[-][-]|[\x00-￿]))":"(?:"+i+")"}function c(e,t){var n=t?"a!":"a=";return u[e][n]||(u[e][n]=l(e,t))}var u={};e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(n,i,o){var r="Invalid double negation ",s="Unknown Unicode token ",l="Unicode token missing data ",d="Astral mode required for Unicode token ",h="Astral mode does not support Unicode tokens within character classes",p="P"===n[1]||!!n[2],f=o.indexOf("A")>-1||e.isInstalled("astral"),g=t(n[4]||n[3]),m=u[g];if("P"===n[1]&&n[2])throw new SyntaxError(r+n[0]);if(!u.hasOwnProperty(g))throw new SyntaxError(s+n[0]);if(m.inverseOf){if(g=t(m.inverseOf),!u.hasOwnProperty(g))throw new ReferenceError(l+n[0]+" -> "+m.inverseOf);m=u[g],p=!p}if(!m.bmp&&!f)throw new SyntaxError(d+n[0]);if(f){if("class"===i)throw new SyntaxError(h);return c(g,p)}return"class"===i?p?a(g):m.bmp:(p?"[^":"[")+m.bmp+"]"},{scope:"all",optionalFlags:"A"}),e.addUnicodeData=function(n){var i,o,r="Unicode token requires name",s="Unicode token has no character data ";for(o=0;o\\x5E`\\x7C~¢-¦¨©¬®-±´¸×÷˂-˅˒-˟˥-˫˭˯-˿͵΄΅϶҂֏؆-؈؋؎؏۞۩۽۾߶৲৳৺৻૱୰௳-௺౿൹฿༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙៛᥀᧞-᧿᭡-᭪᭴-᭼᾽᾿-῁῍-῏῝-῟῭-`´῾⁄⁒⁺-⁼₊-₌₠-₺℀℁℃-℆℈℉℔№-℘℞-℣℥℧℩℮℺℻⅀-⅄⅊-⅍⅏←-⌨⌫-⏳␀-␦⑀-⑊⒜-ⓩ─-⛿✁-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭌⭐-⭙⳥-⳪⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿゛゜㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㋾㌀-㏿䷀-䷿꒐-꓆꜀-꜖꜠꜡꞉꞊꠨-꠫꠶-꠹꩷-꩹﬩﮲-﯁﷼﷽﹢﹤-﹦﹩$+<->^`|~¢-₩│-○�",astral:"[----------]|[]|[-------------------]|[--------]|[----]|[]"},{name:"Sc",alias:"Currency_Symbol",bmp:"\\x24¢-¥֏؋৲৳৻૱௹฿៛₠-₺꠸﷼﹩$¢£¥₩"},{name:"Sk",alias:"Modifier_Symbol",bmp:"\\x5E`¨¯´¸˂-˅˒-˟˥-˫˭˯-˿͵΄΅᾽᾿-῁῍-῏῝-῟῭-`´῾゛゜꜀-꜖꜠꜡꞉꞊﮲-﯁^` ̄"},{name:"Sm",alias:"Math_Symbol",bmp:"\\x2B<->\\x7C~¬±×÷϶؆-؈⁄⁒⁺-⁼₊-₌℘⅀-⅄⅋←-↔↚↛↠↣↦↮⇎⇏⇒⇔⇴-⋿⌈-⌋⌠⌡⍼⎛-⎳⏜-⏡▷◁◸-◿♯⟀-⟄⟇-⟥⟰-⟿⤀-⦂⦙-⧗⧜-⧻⧾-⫿⬰-⭄⭇-⭌﬩﹢﹤-﹦+<->|~¬←-↓",astral:"[]|[]"},{name:"So",alias:"Other_Symbol",bmp:"¦©®°҂؎؏۞۩۽۾߶৺୰௳-௸௺౿൹༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᥀᧞-᧿᭡-᭪᭴-᭼℀℁℃-℆℈℉℔№℗℞-℣℥℧℩℮℺℻⅊⅌⅍⅏↕-↙↜-↟↡↢↤↥↧-↭↯-⇍⇐⇑⇓⇕-⇳⌀-⌇⌌-⌟⌢-⌨⌫-⍻⍽-⎚⎴-⏛⏢-⏳␀-␦⑀-⑊⒜-ⓩ─-▶▸-◀◂-◷☀-♮♰-⛿✁-❧➔-➿⠀-⣿⬀-⬯⭅⭆⭐-⭙⳥-⳪⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㋾㌀-㏿䷀-䷿꒐-꓆꠨-꠫꠶꠷꠹꩷-꩹﷽¦│■○�",astral:"[----------]|[--------]|[-------------------]|[----]"},{name:"Z",alias:"Separator",bmp:"   ᠎ - \u2028\u2029   "},{name:"Zl",alias:"Line_Separator",bmp:"\u2028"},{name:"Zp",alias:"Paragraph_Separator",bmp:"\u2029"},{name:"Zs",alias:"Space_Separator",bmp:"   ᠎ -    "}]) }(e),function(e){if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");e.addUnicodeData([{name:"ASCII",bmp:"\x00-"},{name:"Alphabetic",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͅͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևְ-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-ٗٙ-ٟٮ-ۓە-ۜۡ-ۭۨ-ۯۺ-ۼۿܐ-ܿݍ-ޱߊ-ߪߴߵߺࠀ-ࠗࠚ-ࠬࡀ-ࡘࢠࢢ-ࢬࣤ-ࣰࣩ-ࣾऀ-ऻऽ-ौॎ-ॐॕ-ॣॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হঽ-ৄেৈোৌৎৗড়ঢ়য়-ৣৰৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੂੇੈੋੌੑਖ਼-ੜਫ਼ੰ-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ૅે-ૉોૌૐૠ-ૣଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽ-ୄେୈୋୌୖୗଡ଼ଢ଼ୟ-ୣୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-ௌௐௗఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-ౌౕౖౘౙౠ-ౣಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊ-ೌೕೖೞೠ-ೣೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൌൎൗൠ-ൣൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆා-ුූෘ-ෟෲෳก-ฺเ-ๆํກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆໍໜ-ໟༀཀ-ཇཉ-ཬཱ-ཱྀྈ-ྗྙ-ྼက-ံးျ-ဿၐ-ၢၥ-ၨၮ-ႆႎႜႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜓᜠ-ᜳᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-ឳា-ៈៗៜᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-ᤸᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨛᨠ-ᩞᩡ-ᩴᪧᬀ-ᬳᬵ-ᭃᭅ-ᭋᮀ-ᮩᮬ-ᮯᮺ-ᯥᯧ-ᯱᰀ-ᰵᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳳᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙴ-ꙻꙿ-ꚗꚟ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠧꡀ-ꡳꢀ-ꣃꣲ-ꣷꣻꤊ-ꤪꤰ-ꥒꥠ-ꥼꦀ-ꦲꦴ-ꦿꧏꨀ-ꨶꩀ-ꩍꩠ-ꩶꩺꪀ-ꪾꫀꫂꫛ-ꫝꫠ-ꫯꫲ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"[-]|[-]|[-]|[-]|[------]|[--][-]|[-]|[--]|[-]|[-]|[--------------]|[---------------]|[---]|[-------------------------]|[--------------]|[--]|[]|[-]|[-]"},{name:"Any",isBmpLast:!0,bmp:"\x00-￿",astral:"[-][-]"},{name:"Assigned",inverseOf:"Cn"},{name:"Default_Ignorable_Code_Point",bmp:"­͏ᅟᅠ឴឵᠋-᠍​-‏‪-‮⁠-ㅤ︀-️ᅠ￰-￸",astral:"[-][-]|[-]"},{name:"Lowercase",bmp:"a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʸˀˁˠ-ˤͅͱͳͷͺ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧա-ևᴀ-ᶿḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷⁱⁿₐ-ₜℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎⅰ-ⅿↄⓐ-ⓩⰰ-ⱞⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱽⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓꞡꞣꞥꞧꞩꟸ-ꟺff-stﬓ-ﬗa-z",astral:"[--------------------------]|[-]"},{name:"Noncharacter_Code_Point",bmp:"﷐-﷯￾￿",astral:"[][]"},{name:"Uppercase",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԱ-ՖႠ-ჅჇჍḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅⅠ-ⅯↃⒶ-ⓏⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞠꞢꞤꞦꞨꞪA-Z",astral:"[-----------------------]|[-]"},{name:"White_Space",bmp:" -\r …  ᠎ - \u2028\u2029   "}])}(e),function(e){if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");e.addUnicodeData([{name:"Arabic",bmp:"؀-؄؆-؋؍-ؚ؞ؠ-ؿف-يٖ-ٟ٪-ٯٱ-ۜ۞-ۿݐ-ݿࢠࢢ-ࢬࣤ-ࣾﭐ-﯁ﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-﷼ﹰ-ﹴﹶ-ﻼ",astral:"[-]|[--------------]"},{name:"Armenian",bmp:"Ա-Ֆՙ-՟ա-և֊֏ﬓ-ﬗ"},{name:"Avestan",astral:"[--]"},{name:"Balinese",bmp:"ᬀ-ᭋ᭐-᭼"},{name:"Bamum",bmp:"ꚠ-꛷",astral:"[-]"},{name:"Batak",bmp:"ᯀ-᯳᯼-᯿"},{name:"Bengali",bmp:"ঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-৻"},{name:"Bopomofo",bmp:"˪˫ㄅ-ㄭㆠ-ㆺ"},{name:"Brahmi",astral:"[--]"},{name:"Braille",bmp:"⠀-⣿"},{name:"Buginese",bmp:"ᨀ-ᨛ᨞᨟"},{name:"Buhid",bmp:"ᝀ-ᝓ"},{name:"Canadian_Aboriginal",bmp:"᐀-ᙿᢰ-ᣵ"},{name:"Carian",astral:"[-]"},{name:"Chakma",astral:"[--]"},{name:"Cham",bmp:"ꨀ-ꨶꩀ-ꩍ꩐-꩙꩜-꩟"},{name:"Cherokee",bmp:"Ꭰ-Ᏼ"},{name:"Common",bmp:"\x00-@\\x5B-`\\x7B-©«-¹»-¿×÷ʹ-˟˥-˩ˬ-˿ʹ;΅·։،؛؟ـ٠-٩۝।॥฿࿕-࿘჻᛫-᛭᜵᜶᠂᠃᠅᳓᳡ᳩ-ᳬᳮ-ᳳᳵᳶ -​‎-⁤-⁰⁴-⁾₀-₎₠-₺℀-℥℧-℩ℬ-ℱℳ-⅍⅏-⅟↉←-⏳␀-␦⑀-⑊①-⛿✁-⟿⤀-⭌⭐-⭙⸀-⸻⿰-⿻ -〄〆〈-〠〰-〷〼-〿゛゜゠・ー㆐-㆟㇀-㇣㈠-㉟㉿-㋏㍘-㏿䷀-䷿꜀-꜡ꞈ-꞊꠰-꠹﴾﴿﷽︐-︙︰-﹒﹔-﹦﹨-﹫!-@[-`{-・ー゙゚¢-₩│-○-�",astral:"[-----]|[--------------------]|[-]|[----------------]|[--------]|[----------]"},{name:"Coptic",bmp:"Ϣ-ϯⲀ-ⳳ⳹-⳿"},{name:"Cuneiform",astral:"[--]|[-]"},{name:"Cypriot",astral:"[--]"},{name:"Cyrillic",bmp:"Ѐ-҄҇-ԧᴫᵸⷠ-ⷿꙀ-ꚗꚟ"},{name:"Deseret",astral:"[-]"},{name:"Devanagari",bmp:"ऀ-ॐ॓-ॣ०-ॷॹ-ॿ꣠-ꣻ"},{name:"Egyptian_Hieroglyphs",astral:"[-]|[-]"},{name:"Ethiopic",bmp:"ሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፼ᎀ-᎙ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮ"},{name:"Georgian",bmp:"Ⴀ-ჅჇჍა-ჺჼ-ჿⴀ-ⴥⴧⴭ"},{name:"Glagolitic",bmp:"Ⰰ-Ⱞⰰ-ⱞ"},{name:"Gothic",astral:"[-]"},{name:"Greek",bmp:"Ͱ-ͳ͵-ͷͺ-ͽ΄ΆΈ-ΊΌΎ-ΡΣ-ϡϰ-Ͽᴦ-ᴪᵝ-ᵡᵦ-ᵪᶿἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ῄῆ-ΐῖ-Ί῝-`ῲ-ῴῶ-῾Ω",astral:"[-]|[-]"},{name:"Gujarati",bmp:"ઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૱"},{name:"Gurmukhi",bmp:"ਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵ"},{name:"Han",bmp:"⺀-⺙⺛-⻳⼀-⿕々〇〡-〩〸-〻㐀-䶵一-鿌豈-舘並-龎",astral:"[--][-]|[--]|[-]|[--]|[-]"},{name:"Hangul",bmp:"ᄀ-ᇿ〮〯ㄱ-ㆎ㈀-㈞㉠-㉾ꥠ-ꥼ가-힣ힰ-ퟆퟋ-ퟻᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"},{name:"Hanunoo",bmp:"ᜠ-᜴"},{name:"Hebrew",bmp:"֑-ׇא-תװ-״יִ-זּטּ-לּמּנּסּףּפּצּ-ﭏ"},{name:"Hiragana",bmp:"ぁ-ゖゝ-ゟ",astral:"𛀁|🈀"},{name:"Imperial_Aramaic",astral:"[--]"},{name:"Inherited",bmp:"̀-ًͯ҅҆-ٰٕ॒॑᳐-᳔᳒-᳢᳠-᳨᳭᳴᷀-ᷦ᷼-᷿‌‍⃐-〪⃰-゙゚〭︀-️︠-︦",astral:"[----]|𐇽|[-]"},{name:"Inscriptional_Pahlavi",astral:"[--]"},{name:"Inscriptional_Parthian",astral:"[--]"},{name:"Javanese",bmp:"ꦀ-꧍ꧏ-꧙꧞꧟"},{name:"Kaithi",astral:"[-]"},{name:"Kannada",bmp:"ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲ"},{name:"Katakana",bmp:"ァ-ヺヽ-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ッア-ン",astral:"𛀀"},{name:"Kayah_Li",bmp:"꤀-꤯"},{name:"Kharoshthi",astral:"[-------]"},{name:"Khmer",bmp:"ក-៝០-៩៰-៹᧠-᧿"},{name:"Lao",bmp:"ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟ"},{name:"Latin",bmp:"A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿff-stA-Za-z"},{name:"Lepcha",bmp:"ᰀ-᰷᰻-᱉ᱍ-ᱏ"},{name:"Limbu",bmp:"ᤀ-ᤜᤠ-ᤫᤰ-᤻᥀᥄-᥏"},{name:"Linear_B",astral:"[------]"},{name:"Lisu",bmp:"ꓐ-꓿"},{name:"Lycian",astral:"[-]"},{name:"Lydian",astral:"[-]"},{name:"Malayalam",bmp:"ംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൵൹-ൿ"},{name:"Mandaic",bmp:"ࡀ-࡛࡞"},{name:"Meetei_Mayek",bmp:"ꫠ-꫶ꯀ-꯭꯰-꯹"},{name:"Meroitic_Cursive",astral:"[-]"},{name:"Meroitic_Hieroglyphs",astral:"[-]"},{name:"Miao",astral:"[---]"},{name:"Mongolian",bmp:"᠀᠁᠄᠆-᠎᠐-᠙ᠠ-ᡷᢀ-ᢪ"},{name:"Myanmar",bmp:"က-႟ꩠ-ꩻ"},{name:"New_Tai_Lue",bmp:"ᦀ-ᦫᦰ-ᧉ᧐-᧚᧞᧟"},{name:"Nko",bmp:"߀-ߺ"},{name:"Ogham",bmp:" -᚜"},{name:"Ol_Chiki",bmp:"᱐-᱿"},{name:"Old_Italic",astral:"[--]"},{name:"Old_Persian",astral:"[--]"},{name:"Old_South_Arabian",astral:"[-]"},{name:"Old_Turkic",astral:"[-]"},{name:"Oriya",bmp:"ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୷"},{name:"Osmanya",astral:"[--]"},{name:"Phags_Pa",bmp:"ꡀ-꡷"},{name:"Phoenician",astral:"[-]"},{name:"Rejang",bmp:"ꤰ-꥓꥟"},{name:"Runic",bmp:"ᚠ-ᛪᛮ-ᛰ"},{name:"Samaritan",bmp:"ࠀ-࠭࠰-࠾"},{name:"Saurashtra",bmp:"ꢀ-꣄꣎-꣙"},{name:"Sharada",astral:"[--]"},{name:"Shavian",astral:"[-]"},{name:"Sinhala",bmp:"ංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲ-෴"},{name:"Sora_Sompeng",astral:"[--]"},{name:"Sundanese",bmp:"ᮀ-ᮿ᳀-᳇"},{name:"Syloti_Nagri",bmp:"ꠀ-꠫"},{name:"Syriac",bmp:"܀-܍܏-݊ݍ-ݏ"},{name:"Tagalog",bmp:"ᜀ-ᜌᜎ-᜔"},{name:"Tagbanwa",bmp:"ᝠ-ᝬᝮ-ᝰᝲᝳ"},{name:"Tai_Le",bmp:"ᥐ-ᥭᥰ-ᥴ"},{name:"Tai_Tham",bmp:"ᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪠-᪭"},{name:"Tai_Viet",bmp:"ꪀ-ꫂꫛ-꫟"},{name:"Takri",astral:"[--]"},{name:"Tamil",bmp:"ஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௺"},{name:"Telugu",bmp:"ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯౸-౿"},{name:"Thaana",bmp:"ހ-ޱ"},{name:"Thai",bmp:"ก-ฺเ-๛"},{name:"Tibetan",bmp:"ༀ-ཇཉ-ཬཱ-ྗྙ-ྼ྾-࿌࿎-࿔࿙࿚"},{name:"Tifinagh",bmp:"ⴰ-ⵧⵯ⵰⵿"},{name:"Ugaritic",astral:"[-]"},{name:"Vai",bmp:"ꔀ-ꘫ"},{name:"Yi",bmp:"ꀀ-ꒌ꒐-꓆"}])}(e),e}),"undefined"!=typeof module&&module.exports&&(module.exports=printStackTrace),printStackTrace.implementation=function(){},printStackTrace.implementation.prototype={run:function(e,t){return e=e||this.createException(),t=t||this.mode(e),"other"===t?this.other(arguments.callee):this[t](e)},createException:function(){try{this.undef()}catch(e){return e}},mode:function(e){return e.arguments&&e.stack?"chrome":e.stack&&e.sourceURL?"safari":e.stack&&e.number?"ie":"string"==typeof e.message&&"undefined"!=typeof window&&window.opera?e.stacktrace?e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?"opera9":e.stack?e.stacktrace.indexOf("called from line")<0?"opera10b":"opera11":"opera10a":"opera9":e.stack&&!e.fileName?"chrome":e.stack?"firefox":"other"},instrumentFunction:function(e,t,n){e=e||window;var i=e[t];e[t]=function(){return n.call(this,printStackTrace().slice(4)),e[t]._instrumented.apply(this,arguments)},e[t]._instrumented=i},deinstrumentFunction:function(e,t){e[t].constructor===Function&&e[t]._instrumented&&e[t]._instrumented.constructor===Function&&(e[t]=e[t]._instrumented)},chrome:function(e){var t=(e.stack+"\n").replace(/^\S[^\(]+?[\n$]/gm,"").replace(/^\s+(at eval )?at\s+/gm,"").replace(/^([^\(]+?)([\n$])/gm,"{anonymous}()@$1$2").replace(/^Object.\s*\(([^\)]+)\)/gm,"{anonymous}()@$1").split("\n");return t.pop(),t},safari:function(e){return e.stack.replace(/\[native code\]\n/m,"").replace(/^(?=\w+Error\:).*$\n/m,"").replace(/^@/gm,"{anonymous}()@").split("\n")},ie:function(e){var t=/^.*at (\w+) \(([^\)]+)\)$/gm;return e.stack.replace(/at Anonymous function /gm,"{anonymous}()@").replace(/^(?=\w+Error\:).*$\n/m,"").replace(t,"$1@$2").split("\n")},firefox:function(e){return e.stack.replace(/(?:\n@:0)?\s+$/m,"").replace(/^[\(@]/gm,"{anonymous}()@").split("\n")},opera11:function(e){for(var t="{anonymous}",n=/^.*line (\d+), column (\d+)(?: in (.+))? in (\S+):$/,i=e.stacktrace.split("\n"),o=[],r=0,s=i.length;s>r;r+=2){var a=n.exec(i[r]);if(a){var l=a[4]+":"+a[1]+":"+a[2],c=a[3]||"global code";c=c.replace(//,"$1").replace(//,t),o.push(c+"@"+l+" -- "+i[r+1].replace(/^\s+/,""))}}return o},opera10b:function(e){for(var t=/^(.*)@(.+):(\d+)$/,n=e.stacktrace.split("\n"),i=[],o=0,r=n.length;r>o;o++){var s=t.exec(n[o]);if(s){var a=s[1]?s[1]+"()":"global code";i.push(a+"@"+s[2]+":"+s[3])}}return i},opera10a:function(e){for(var t="{anonymous}",n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,i=e.stacktrace.split("\n"),o=[],r=0,s=i.length;s>r;r+=2){var a=n.exec(i[r]);if(a){var l=a[3]||t;o.push(l+"()@"+a[2]+":"+a[1]+" -- "+i[r+1].replace(/^\s+/,""))}}return o},opera9:function(e){for(var t="{anonymous}",n=/Line (\d+).*script (?:in )?(\S+)/i,i=e.message.split("\n"),o=[],r=2,s=i.length;s>r;r+=2){var a=n.exec(i[r]);a&&o.push(t+"()@"+a[2]+":"+a[1]+" -- "+i[r+1].replace(/^\s+/,""))}return o},other:function(e){for(var t,n,i="{anonymous}",o=/function\s*([\w\-$]+)?\s*\(/i,r=[],s=10;e&&e.arguments&&r.lengthu;++u)if(n=e[t-u-1],o=n.indexOf("//"),o>=0&&(n=n.substr(0,o)),n){if(l=n+l,i=s.exec(l),i&&i[1])return i[1];if(i=r.exec(l),i&&i[1])return i[1];if(i=a.exec(l),i&&i[1])return i[1]}return"(?)"}},define("stacktrace",function(e){return function(){var t;return t||e.printStackTrace}}(this));var saveAs=saveAs||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(e){if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},i=e.URL||e.webkitURL||e,o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),r=!e.externalHost&&"download"in o,s=e.webkitRequestFileSystem,a=e.requestFileSystem||s||e.mozRequestFileSystem,l=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},c="application/octet-stream",u=0,d=[],h=function(){for(var e=d.length;e--;){var t=d[e];"string"==typeof t?i.revokeObjectURL(t):t.remove()}d.length=0},p=function(e,t,n){t=[].concat(t);for(var i=t.length;i--;){var o=e["on"+t[i]];if("function"==typeof o)try{o.call(e,n||e)}catch(r){l(r)}}},f=function(i,l){var h,f,g,m=this,v=i.type,b=!1,y=function(){var e=n().createObjectURL(i);return d.push(e),e},w=function(){p(m,"writestart progress write writeend".split(" "))},C=function(){(b||!h)&&(h=y(i)),f?f.location.href=h:window.open(h,"_blank"),m.readyState=m.DONE,w()},x=function(e){return function(){return m.readyState!==m.DONE?e.apply(this,arguments):void 0}},S={create:!0,exclusive:!1};if(m.readyState=m.INIT,l||(l="download"),r){h=y(i),t=e.document,o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o.href=h,o.download=l;var E=t.createEvent("MouseEvents");return E.initMouseEvent("click",!0,!1,e,0,0,0,0,0,!1,!1,!1,!1,0,null),o.dispatchEvent(E),m.readyState=m.DONE,void w()}return e.chrome&&v&&v!==c&&(g=i.slice||i.webkitSlice,i=g.call(i,0,i.size,c),b=!0),s&&"download"!==l&&(l+=".download"),(v===c||s)&&(f=e),a?(u+=i.size,void a(e.TEMPORARY,u,x(function(e){e.root.getDirectory("saved",S,x(function(e){var t=function(){e.getFile(l,S,x(function(e){e.createWriter(x(function(t){t.onwriteend=function(t){f.location.href=e.toURL(),d.push(e),m.readyState=m.DONE,p(m,"writeend",t)},t.onerror=function(){var e=t.error;e.code!==e.ABORT_ERR&&C()},"writestart progress write abort".split(" ").forEach(function(e){t["on"+e]=m["on"+e]}),t.write(i),m.abort=function(){t.abort(),m.readyState=m.DONE},m.readyState=m.WRITING}),C)}),C)};e.getFile(l,{create:!1},x(function(e){e.remove(),t()}),x(function(e){e.code===e.NOT_FOUND_ERR?t():C()}))}),C)}),C)):void C()},g=f.prototype,m=function(e,t){return new f(e,t)};return g.abort=function(){var e=this;e.readyState=e.DONE,p(e,"abort")},g.readyState=g.INIT=0,g.WRITING=1,g.DONE=2,g.error=g.onwritestart=g.onprogress=g.onwrite=g.onabort=g.onerror=g.onwriteend=null,e.addEventListener("unload",h,!1),m.unload=function(){h(),e.removeEventListener("unload",h,!1)},m}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&null!==module?module.exports=saveAs:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define("FileSaver",[],function(){return saveAs}),define("utils",["jquery","underscore","storage","crel","xregexp","stacktrace","FileSaver"],function($,_,storage,crel,XRegExp,printStackTrace,saveAs){function jqElt(e){return _.isString(e)?$(e):e}function inputError(e,t){void 0!==t&&(e.stop(!0,!0).addClass("error").delay(1e3).switchClass("error"),t.stopPropagation())}var utils={};utils.getURLParameter=function(e){var t=new RegExp("(?:\\?|\\#\\!|&)"+e+"=(.+?)(?:&|\\#|$)");try{return decodeURIComponent(t.exec(location.search+location.hash)[1])}catch(n){return void 0}},utils.getInputValue=function(e){return e=jqElt(e),e.val()},utils.setInputValue=function(e,t){e=jqElt(e),e.val(t)},utils.getInputTextValue=function(e,t,n){e=jqElt(e);var i=e.val();return void 0===i?void inputError(e,t):(i=utils.trim(i),0===i.length||void 0!==n&&!i.match(n)?void inputError(e,t):i)},utils.getInputIntValue=function(e,t,n,i){e=jqElt(e);var o=utils.getInputTextValue(e,t);return void 0===o?void 0:(o=parseInt(o,10),isNaN(o)||void 0!==n&&n>o||void 0!==i&&o>i?void inputError(e,t):o)},utils.getInputRegExpValue=function(e,t){e=jqElt(e);var n=utils.getInputTextValue(e,t);if(void 0===n)return void 0;try{new RegExp(n)}catch(i){return void inputError(e,t)}return n},utils.getInputJsValue=function(element,event){element=jqElt(element);var value=utils.getInputTextValue(element,event);if(void 0===value)return void 0;try{eval("var test="+value)}catch(e){return void inputError(element,event)}return value},utils.getInputChecked=function(e){return e=jqElt(e),e.prop("checked")},utils.setInputChecked=function(e,t){e=jqElt(e),e.prop("checked",t).change()},utils.getInputRadio=function(e){return $("input:radio[name="+e+"]:checked").prop("value")},utils.setInputRadio=function(e,t){$("input:radio[name="+e+"][value="+t+"]").prop("checked",!0).change()},utils.resetModalInputs=function(){$(".modal input[type=text]:not([disabled]), .modal input[type=password], .modal textarea").val(""),$(".modal input[type=checkbox]").prop("checked",!1).change()},utils.trim=function(e){return $.trim(e)};var nonWordChars=XRegExp("[^\\p{L}\\p{N}-]","g");utils.slugify=function(e){return e.toLowerCase().replace(/\s/g,"-").replace(nonWordChars,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},utils.checkUrl=function(e,t){return e?(0!==e.indexOf("http")&&(e="http://"+e),t&&-1===e.indexOf("/",e.length-1)&&(e+="/"),e):e},utils.addModal=function(e,t){var n=crel("div",{"class":"modal "+e});n.innerHTML=t,document.body.appendChild(n)},utils.createBackdrop=function(e,t){var n=crel("div",{"class":"modal-backdrop in","data-toggle":e,"data-target":t});return document.body.appendChild(n),n},utils.popupWindow=function(e,t,n,i){var o=screen.width/2-n/2,r=screen.height/2-i/2;return window.open(e,t,["toolbar=no, ","location=no, ","directories=no, ","status=no, ","menubar=no, ","scrollbars=no, ","resizable=no, ","copyhistory=no, ","width="+n+", ","height="+i+", ","top="+r+", ","left="+o].join(""))};var redirectCallbackConfirm,redirectCallbackCancel;utils.redirectConfirm=function(e,t,n){redirectCallbackConfirm=t,redirectCallbackCancel=n,$(".modal-redirect-confirm .redirect-msg").html(e),$(".modal-redirect-confirm").modal("show")},utils.init=function(){$(".action-redirect-confirm").click(function(){redirectCallbackCancel=void 0,redirectCallbackConfirm()}),$(".modal-redirect-confirm").on("hidden.bs.modal",function(){_.defer(function(){redirectCallbackCancel&&redirectCallbackCancel()})})},utils.saveAs=function(e,t){if(void 0===saveAs||/constructor/i.test(window.HTMLElement))if(_.isString(e)){var n="data:application/octet-stream;base64,"+utils.encodeBase64(e);window.open(n,"file")}else{var i=new FileReader;i.onload=function(e){utils.redirectConfirm("You are opening a PDF document.",function(){var t="data:application/pdf;"+e.target.result.substring(e.target.result.indexOf("base64"));window.open(t,"file")})},i.readAsDataURL(e)}else _.isString(e)&&(e=new Blob([e],{type:"text/plain;charset=utf-8"})),saveAs(e,t)},utils.randomString=function(){return _.random(4294967296).toString(36)},utils.updateCurrentTime=function(){utils.currentTime=(new Date).getTime()},utils.updateCurrentTime(),utils.storeAttributes=function(e){var t=e.syncIndex||e.publishIndex,n=_.omit(e,"syncIndex","publishIndex","provider");n.provider=e.provider.providerId,storage[t]=JSON.stringify(n)},utils.retrieveIndexArray=function(e){try{return _.compact(storage[e].split(";"))}catch(t){return storage[e]=";",[]}},utils.appendIndexToArray=function(e,t){storage[e]+=t+";"},utils.removeIndexFromArray=function(e,t){storage[e]=storage[e].replace(";"+t+";",";")},utils.retrieveIgnoreError=function(e){try{return JSON.parse(storage[e])}catch(t){return void 0}};var eventList=[];utils.logValue=function(e){eventList.unshift(e),eventList.length>5&&eventList.pop()},utils.logStackTrace=function(){eventList.unshift(printStackTrace()),eventList.length>5&&eventList.pop()},utils.formatEventList=function(){var e=[];return _.each(eventList,function(t){e.push("\n"),_.isString(t)?e.push(t):_.isArray(t)&&(e.push(t[5]||""),e.push(t[6]||""))}),e.join("")},utils.encodeBase64=function(e){if(0===e.length)return"";var t,n,i=[],o=0;for(e=encodeURI(e),t=e.length;t>o;)n=e[o],o+=1,"%"!==n?i.push(n.charCodeAt(0)):(n=e[o]+e[o+1],i.push(parseInt(n,16)),o+=2);var r,s,a="=",l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=[],u=i.length-i.length%3;for(r=0;u>r;r+=3)s=i[r]<<16|i[r+1]<<8|i[r+2],c.push(l.charAt(s>>18)),c.push(l.charAt(s>>12&63)),c.push(l.charAt(s>>6&63)),c.push(l.charAt(63&s));switch(i.length-u){case 1:s=i[r]<<16,c.push(l.charAt(s>>18)+l.charAt(s>>12&63)+a+a);break;case 2:s=i[r]<<16|i[r+1]<<8,c.push(l.charAt(s>>18)+l.charAt(s>>12&63)+l.charAt(s>>6&63)+a)}return c.join("")};var mHash=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];return utils.crc32=function(e){for(var t=0,n=-1,i=0;i>>8^mHash[t];return n=-1^n,0>n&&(n=4294967295+n+1),n.toString(16)},utils}),define("settings",["underscore","constants","storage"],function(e,t,n){var i={layoutOrientation:"horizontal",lazyRendering:!0,editorFontFamily:'Menlo, Consolas, "Courier New", Courier, monospace',editorFontSize:13,maxWidth:960,defaultContent:"\n\n\n> Written with [StackEdit]("+t.MAIN_URL+").",commitMsg:"Published with "+t.MAIN_URL,gdriveMultiAccount:1,gdriveFullAccess:!0,dropboxFullAccess:!0,githubFullAccess:!0,template:["\n","\n","\n",'\n',"<%= documentTitle %>\n",'\n','\n',"\n",'
<%= documentHTML %>
\n',""].join(""),pdfTemplate:["\n","\n","\n",'\n',"<%= documentTitle %>\n",'\n','\n",'\n',"\n",'<%= documentHTML %>\n',""].join(""),pdfPageSize:"A4",sshProxy:t.SSH_PROXY_URL,shortcuts:{},extensionSettings:{}};try{e.extend(i,JSON.parse(n.settings))}catch(o){}return i}),define("logger",[],function(){var e={log:function(){},info:function(){},warn:function(){},error:function(){}};return/(\?|&)console($|&)/.test(location.search)?console:e}),define("classes/Extension",[],function(){function e(e,t,n,i,o){this.extensionId=e,this.extensionName=t,this.isOptional=n,this.disableInViewer=i,this.disableInLight=o}return e}),define("text",["module"],function(e){var t,n,i,o,r,s=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],a=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,l=/]*>\s*([\s\S]+)\s*<\/body>/im,c="undefined"!=typeof location&&location.href,u=c&&location.protocol&&location.protocol.replace(/\:/,""),d=c&&location.hostname,h=c&&(location.port||void 0),p={},f=e.config&&e.config()||{};return t={version:"2.0.12",strip:function(e){if(e){e=e.replace(a,"");var t=e.match(l);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:f.createXhr||function(){var e,t,n;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(t=0;3>t;t+=1){n=s[t];try{e=new ActiveXObject(n)}catch(i){}if(e){s=[n];break}}return e},parseName:function(e){var t,n,i,o=!1,r=e.indexOf("."),s=0===e.indexOf("./")||0===e.indexOf("../");return-1!==r&&(!s||r>1)?(t=e.substring(0,r),n=e.substring(r+1,e.length)):t=e,i=n||t,r=i.indexOf("!"),-1!==r&&(o="strip"===i.substring(r+1),i=i.substring(0,r),n?n=i:t=i),{moduleName:t,ext:n,strip:o}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,i,o){var r,s,a,l=t.xdRegExp.exec(e);return l?(r=l[2],s=l[3],s=s.split(":"),a=s[1],s=s[0],!(r&&r!==n||s&&s.toLowerCase()!==i.toLowerCase()||(a||s)&&a!==o)):!0},finishLoad:function(e,n,i,o){i=n?t.strip(i):i,f.isBuild&&(p[e]=i),o(i)},load:function(e,n,i,o){if(o&&o.isBuild&&!o.inlineText)return void i();f.isBuild=o&&o.isBuild;var r=t.parseName(e),s=r.moduleName+(r.ext?"."+r.ext:""),a=n.toUrl(s),l=f.useXhr||t.useXhr;return 0===a.indexOf("empty:")?void i():void(!c||l(a,u,d,h)?t.get(a,function(n){t.finishLoad(e,r.strip,n,i)},function(e){i.error&&i.error(e)}):n([s],function(e){t.finishLoad(r.moduleName+"."+r.ext,r.strip,e,i)}))},write:function(e,n,i){if(p.hasOwnProperty(n)){var o=t.jsEscape(p[n]);i.asModule(e+"!"+n,"define(function () { return '"+o+"';});\n")}},writeFile:function(e,n,i,o,r){var s=t.parseName(n),a=s.ext?"."+s.ext:"",l=s.moduleName+a,c=i.toUrl(s.moduleName+a)+".js";t.load(l,i,function(){var n=function(e){return o(c,e)};n.asModule=function(e,t){return o.asModule(e,c,t)},t.write(e,l,n,r)},r)}},"node"===f.env||!f.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(n=require.nodeRequire("fs"),t.get=function(e,t,i){try{var o=n.readFileSync(e,"utf8");0===o.indexOf("")&&(o=o.substring(1)),t(o)}catch(r){i&&i(r)}}):"xhr"===f.env||!f.env&&t.createXhr()?t.get=function(e,n,i,o){var r,s=t.createXhr();if(s.open("GET",e,!0),o)for(r in o)o.hasOwnProperty(r)&&s.setRequestHeader(r.toLowerCase(),o[r]);f.onXhr&&f.onXhr(s,e),s.onreadystatechange=function(){var t,o;4===s.readyState&&(t=s.status||0,t>399&&600>t?(o=new Error(e+" HTTP status: "+t),o.xhr=s,i&&i(o)):n(s.responseText),f.onXhrComplete&&f.onXhrComplete(s,e))},s.send(null)}:"rhino"===f.env||!f.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?t.get=function(e,t){var n,i,o="utf-8",r=new java.io.File(e),s=java.lang.System.getProperty("line.separator"),a=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(r),o)),l="";try{for(n=new java.lang.StringBuffer,i=a.readLine(),i&&i.length()&&65279===i.charAt(0)&&(i=i.substring(1)),null!==i&&n.append(i);null!==(i=a.readLine());)n.append(s),n.append(i);l=String(n.toString())}finally{a.close()}t(l)}:("xpconnect"===f.env||!f.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(i=Components.classes,o=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),r="@mozilla.org/windows-registry-key;1"in i,t.get=function(e,t){var n,s,a,l={};r&&(e=e.replace(/\//g,"\\")),a=new FileUtils.File(e);try{n=i["@mozilla.org/network/file-input-stream;1"].createInstance(o.nsIFileInputStream),n.init(a,1,0,!1),s=i["@mozilla.org/intl/converter-input-stream;1"].createInstance(o.nsIConverterInputStream),s.init(n,"utf-8",n.available(),o.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),s.readString(n.available(),l),s.close(),n.close(),t(l.value)}catch(c){throw new Error((a&&a.path||"")+": "+c)}}),t}),define("text!html/settingsExtensionsAccordion.html",[],function(){return'
\n
\n
\n \n
\n \n <%= extensionName %> \n
\n
\n
<%= settingsBlock %>
\n
\n
\n' }),function(){var e=function(e,t,n,i){this.rawMessage=e,this.parsedLine=void 0!==t?t:-1,this.snippet=void 0!==n?n:null,this.parsedFile=void 0!==i?i:null,this.updateRepr(),this.message=e};e.prototype={name:"YamlParseException",message:null,parsedFile:null,parsedLine:-1,snippet:null,rawMessage:null,isDefined:function(e){return void 0!=e&&null!=e},getSnippet:function(){return this.snippet},setSnippet:function(e){this.snippet=e,this.updateRepr()},getParsedFile:function(){return this.parsedFile},setParsedFile:function(e){this.parsedFile=e,this.updateRepr()},getParsedLine:function(){return this.parsedLine},setParsedLine:function(e){this.parsedLine=e,this.updateRepr()},updateRepr:function(){this.message=this.rawMessage;var e=!1;"."===this.message.charAt(this.message.length-1)&&(this.message=this.message.substring(0,this.message.length-1),e=!0),null!==this.parsedFile&&(this.message+=" in "+JSON.stringify(this.parsedFile)),this.parsedLine>=0&&(this.message+=" at line "+this.parsedLine),this.snippet&&(this.message+=' (near "'+this.snippet+'")'),e&&(this.message+=".")}};var t=!1,n=function(){};n.prototype={parseFile:function(t,i){if(null==i){var o=this.getFileContents(t),r=null;try{r=this.parse(o)}catch(s){throw s instanceof e&&s.setParsedFile(t),s}return r}this.getFileContents(t,function(e){i((new n).parse(e))})},parse:function(e){var t=new r;return t.parse(e)},dump:function(e,t,n){null==t&&(t=2);var i=new a;return n&&(i.numSpacesForIndentation=n),i.dump(e,t)},getXHR:function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)for(var e=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"],t=0;4>t;t++)try{return new ActiveXObject(e[t])}catch(n){}return null},getFileContents:function(e,n){if(t){var i=require("fs");if(null==n){var o=i.readFileSync(e);return null==o?null:""+o}i.readFile(e,function(e,t){n(e?null:t)})}else{var r=this.getXHR();if(null==n)return r.open("GET",e,!1),r.send(null),200==r.status||0==r.status?r.responseText:null;r.onreadystatechange=function(){4==r.readyState&&n(200==r.status||0==r.status?r.responseText:null)},r.open("GET",e,!0),r.send(null)}}};var i={stringify:function(e,t,i){return(new n).dump(e,t,i)},parse:function(e){return(new n).parse(e)},load:function(e,t){return(new n).parseFile(e,t)}};"undefined"!=typeof exports&&"undefined"!=typeof module&&module.exports&&(exports=module.exports=i,t=!0,function(){var e=function(e,t){e.exports=i.load(t)};void 0!==require.extensions&&(require.extensions[".yml"]=e,require.extensions[".yaml"]=e)}()),"undefined"!=typeof window&&(window.YAML=i);var o=function(){};o.prototype={i:null,parse:function(t){var n=null;if(t=this.trim(t),0==t.length)return"";switch(t.charAt(0)){case"[":n=this.parseSequence(t);break;case"{":n=this.parseMapping(t);break;default:n=this.parseScalar(t)}if(""!=t.substr(this.i+1).replace(/^\s*#.*$/,""))throw console.log("oups "+t.substr(this.i+1)),new e('Unexpected characters near "'+t.substr(this.i)+'".');return n},dump:function(e){if(void 0==e||null==e)return"null";if(e instanceof Date)return e.toISOString();if("object"==typeof e)return this.dumpObject(e);if("boolean"==typeof e)return e?"true":"false";if(/^\d+$/.test(e))return"string"==typeof e?"'"+e+"'":parseInt(e);if(this.isNumeric(e))return"string"==typeof e?"'"+e+"'":parseFloat(e);if("number"==typeof e)return 1/0==e?".Inf":e==-1/0?"-.Inf":isNaN(e)?".NAN":e;var t=new YamlEscaper;return t.requiresDoubleQuoting(e)?t.escapeWithDoubleQuotes(e):t.requiresSingleQuoting(e)?t.escapeWithSingleQuotes(e):""==e?"":this.getTimestampRegex().test(e)?"'"+e+"'":this.inArray(e.toLowerCase(),["null","~","true","false"])?"'"+e+"'":e},dumpObject:function(e){var t,n=this.getKeys(e),i=null,o=n.length;if(e instanceof Array){for(i=[],t=0;o>t;t++)i.push(this.dump(e[n[t]]));return"["+i.join(", ")+"]"}for(i=[],t=0;o>t;t++)i.push(this.dump(n[t])+": "+this.dump(e[n[t]]));return"{ "+i.join(", ")+" }"},parseScalar:function(t,n,i,o,r){void 0==n&&(n=null),void 0==i&&(i=['"',"'"]),void 0==o&&(o=0),void 0==r&&(r=!0);var s=null,a=null,l=null;if(this.inArray(t[o],i)){if(s=this.parseQuotedScalar(t,o),o=this.i,null!==n){var c=t.substr(o).replace(/^\s+/,"");if(!this.inArray(c.charAt(0),n))throw new e("Unexpected characters ("+t.substr(o)+").")}}else{if(n){if(!(l=new RegExp("^(.+?)("+n.join("|")+")").exec((t+"").substring(o))))throw new e("Malformed inline YAML string ("+t+").");s=l[1],o+=s.length}else s=(t+"").substring(o),o+=s.length,a=s.indexOf(" #"),-1!=a&&(s=s.substr(0,a).replace(/\s+$/g,""));s=r?this.evaluateScalar(s):s}return this.i=o,s},parseQuotedScalar:function(t,n){var i=null;if(!(i=new RegExp("^"+o.REGEX_QUOTED_STRING).exec((t+"").substring(n))))throw new e("Malformed inline YAML string ("+(t+"").substring(n)+").");var r=i[0].substr(1,i[0].length-2),a=new s;return r='"'==(t+"").charAt(n)?a.unescapeDoubleQuotedString(r):a.unescapeSingleQuotedString(r),n+=i[0].length,this.i=n,r},parseSequence:function(t,n){void 0==n&&(n=0);var i=[],o=t.length;for(n+=1;o>n;){switch(t.charAt(n)){case"[":i.push(this.parseSequence(t,n)),n=this.i;break;case"{":i.push(this.parseMapping(t,n)),n=this.i;break;case"]":return this.i=n,i;case",":case" ":break;default:var r=this.inArray(t.charAt(n),['"',"'"]),s=this.parseScalar(t,[",","]"],['"',"'"],n);if(n=this.i,!r&&-1!=(s+"").indexOf(": "))try{s=this.parseMapping("{"+s+"}")}catch(a){if(!(a instanceof e))throw a}i.push(s),n--}n++}throw new e('Malformed inline YAML string "'+t+'"')},parseMapping:function(t,n){void 0==n&&(n=0);var i={},o=t.length;n+=1;for(var r=!1,s=!1;o>n;){switch(s=!1,t.charAt(n)){case" ":case",":n++,s=!0;break;case"}":return this.i=n,i}if(!s){var a=this.parseScalar(t,[":"," "],['"',"'"],n,!1);for(n=this.i,r=!1;o>n;){switch(t.charAt(n)){case"[":i[a]=this.parseSequence(t,n),n=this.i,r=!0;break;case"{":i[a]=this.parseMapping(t,n),n=this.i,r=!0;break;case":":case" ":break;default:i[a]=this.parseScalar(t,[",","}"],['"',"'"],n),n=this.i,r=!0,n--}if(++n,r){s=!0;break}}}}throw new e('Malformed inline YAML string "'+t+'"')},evaluateScalar:function(e){e=this.trim(e);var t=null,n=null;return"null"==e.toLowerCase()||""==e||"~"==e?null:0==(e+"").indexOf("!str ")?(""+e).substring(5):0==(e+"").indexOf("! ")?parseInt(this.parseScalar((e+"").substr(2))):/^\d+$/.test(e)?(t=e,n=parseInt(e),"0"==e.charAt(0)?this.octdec(e):""+t==""+n?n:t):"true"==(e+"").toLowerCase()?!0:"false"==(e+"").toLowerCase()?!1:this.isNumeric(e)?"0x"==(e+"").substr(0,2)?this.hexdec(e):parseFloat(e):".inf"==e.toLowerCase()?1/0:".nan"==e.toLowerCase()?0/0:"-.inf"==e.toLowerCase()?-1/0:/^(-|\+)?[0-9,]+(\.[0-9]+)?$/.test(e)?parseFloat(e.split(",").join("")):this.getTimestampRegex().test(e)?new Date(this.strtotime(e)):""+e},getTimestampRegex:function(){return new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ ]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:.([0-9]*))?(?:[ ]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$","gi")},trim:function(e){return(e+"").replace(/^\s+/,"").replace(/\s+$/,"")},isNumeric:function(e){return e-0==e&&e.length>0&&""!=e.replace(/\s+/g,"")},inArray:function(e,t){var n,i=t.length;for(n=0;i>n;n++)if(e==t[n])return!0;return!1},getKeys:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},octdec:function(e){return parseInt((e+"").replace(/[^0-7]/gi,""),8)},hexdec:function(e){return e=this.trim(e),"0x"==(e+"").substr(0,2)&&(e=(e+"").substring(2)),parseInt((e+"").replace(/[^a-f0-9]/gi,""),16)},strtotime:function(e,t){var n,i,o,r,s="";if(e=(e+"").replace(/\s{2,}|^\s|\s$/g," ").replace(/[\t\r\n]/g,""),"now"===e)return null===t||isNaN(t)?(new Date).getTime()||0:t||0;if(!isNaN(s=Date.parse(e)))return s||0;t=t?new Date(t):new Date,e=e.toLowerCase();var a={day:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},mon:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]},l=function(e){var n=e[2]&&"ago"===e[2],i=(i="last"===e[0]?-1:1)*(n?-1:1);switch(e[0]){case"last":case"next":switch(e[1].substring(0,3)){case"yea":t.setFullYear(t.getFullYear()+i);break;case"wee":t.setDate(t.getDate()+7*i);break;case"day":t.setDate(t.getDate()+i);break;case"hou":t.setHours(t.getHours()+i);break;case"min":t.setMinutes(t.getMinutes()+i);break;case"sec":t.setSeconds(t.getSeconds()+i);break;case"mon":if("month"===e[1]){t.setMonth(t.getMonth()+i);break}default:var o=a.day[e[1].substring(0,3)];if("undefined"!=typeof o){var r=o-t.getDay();0===r?r=7*i:r>0?"last"===e[0]&&(r-=7):"next"===e[0]&&(r+=7),t.setDate(t.getDate()+r),t.setHours(0,0,0,0)}}break;default:if(!/\d+/.test(e[0]))return!1;switch(i*=parseInt(e[0],10),e[1].substring(0,3)){case"yea":t.setFullYear(t.getFullYear()+i);break;case"mon":t.setMonth(t.getMonth()+i);break;case"wee":t.setDate(t.getDate()+7*i);break;case"day":t.setDate(t.getDate()+i);break;case"hou":t.setHours(t.getHours()+i);break;case"min":t.setMinutes(t.getMinutes()+i);break;case"sec":t.setSeconds(t.getSeconds()+i)}}return!0};if(o=e.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/),null!==o)return o[2]?o[3]||(o[2]+=":00"):o[2]="00:00:00",r=o[1].split(/-/g),r[1]=a.mon[r[1]-1]||r[1],r[0]=+r[0],r[0]=r[0]>=0&&r[0]<=69?"20"+(r[0]<10?"0"+r[0]:r[0]+""):r[0]>=70&&r[0]<=99?"19"+r[0]:r[0]+"",parseInt(this.strtotime(r[2]+" "+r[1]+" "+r[0]+" "+o[2])+(o[4]?o[4]:""),10);var c="([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))(\\sago)?";if(o=e.match(new RegExp(c,"gi")),null===o)return!1;for(n=0,i=o.length;i>n;n++)if(!l(o[n].split(" ")))return!1;return t.getTime()||0}},o.REGEX_QUOTED_STRING="(?:\"(?:[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"|'(?:[^']*(?:''[^']*)*)')";var r=function(e){this.offset=void 0!==e?e:0};r.prototype={offset:0,lines:[],currentLineNb:-1,currentLine:"",refs:{},parse:function(t){this.currentLineNb=-1,this.currentLine="",this.lines=this.cleanup(t).split("\n");for(var n=null,i=null;this.moveToNextLine();)if(!this.isCurrentLineEmpty()){if(" "==this.currentLine.charAt(0))throw new e("A YAML file cannot contain tabs as indentation.",this.getRealCurrentLineNb()+1,this.currentLine);var s=!1,a=!1,l=!1,c=null,u=null,d=null,h=null,p=null,f=null,g=null,m=null,v=null;if(c=/^\-((\s+)(.+?))?\s*$/.exec(this.currentLine)){if(i&&"mapping"==i)throw new e("You cannot define a sequence item when in a mapping",this.getRealCurrentLineNb()+1,this.currentLine);i="sequence",this.isDefined(n)||(n=[]),c={leadspaces:c[2],value:c[3]},this.isDefined(c.value)&&(u=/^&([^ ]+) *(.*)/.exec(c.value))&&(u={ref:u[1],value:u[2]},s=u.ref,c.value=u.value),this.isDefined(c.value)&&""!=this.trim(c.value)&&"#"!=c.value.replace(/^ +/,"").charAt(0)?this.isDefined(c.leadspaces)&&" "==c.leadspaces&&(u=new RegExp("^("+o.REGEX_QUOTED_STRING+"|[^ '\"{[].*?) *:(\\s+(.+?))?\\s*$").exec(c.value))?(u={key:u[1],value:u[3]},d=this.getRealCurrentLineNb(),h=new r(d),h.refs=this.refs,p=c.value,this.isNextLineIndented()||(p+="\n"+this.getNextEmbedBlock(this.getCurrentLineIndentation()+2)),n.push(h.parse(p)),this.refs=h.refs):n.push(this.parseValue(c.value)):(d=this.getRealCurrentLineNb()+1,h=new r(d),h.refs=this.refs,n.push(h.parse(this.getNextEmbedBlock())),this.refs=h.refs)}else{if(!(c=new RegExp("^("+o.REGEX_QUOTED_STRING+"|[^ '\"[{].*?) *:(\\s+(.+?))?\\s*$").exec(this.currentLine))){if(2==this.lines.length&&this.isEmpty(this.lines[1])){try{t=(new o).parse(this.lines[0])}catch(b){throw b instanceof e&&(b.setParsedLine(this.getRealCurrentLineNb()+1),b.setSnippet(this.currentLine)),b}if(this.isObject(t)){var y=t[0];if("string"==typeof t&&"*"==y.charAt(0)){n=[],m=t.length;for(var w=0;m>w;w++)n.push(this.refs[t[w].substr(1)]);t=n}}return t}throw new e("Unable to parse.",this.getRealCurrentLineNb()+1,this.currentLine)}if(this.isDefined(n)||(n={}),i&&"sequence"==i)throw new e("You cannot define a mapping item when in a sequence",this.getRealCurrentLineNb()+1,this.currentLine);i="mapping",c={key:c[1],value:c[3]};try{f=(new o).parseScalar(c.key)}catch(b){throw b instanceof e&&(b.setParsedLine(this.getRealCurrentLineNb()+1),b.setSnippet(this.currentLine)),b}if("<<"==f)if(this.isDefined(c.value)&&"*"==(c.value+"").charAt(0)){if(a=c.value.substr(1),void 0==this.refs[a])throw new e('Reference "'+t+'" does not exist',this.getRealCurrentLineNb()+1,this.currentLine)}else{t=this.isDefined(c.value)&&""!=c.value?c.value:this.getNextEmbedBlock(),d=this.getRealCurrentLineNb()+1,h=new r(d),h.refs=this.refs,g=h.parse(t),this.refs=h.refs;var C=[];if(!this.isObject(g))throw new e("YAML merge keys used with a scalar value instead of an array",this.getRealCurrentLineNb()+1,this.currentLine);if(this.isDefined(g[0])){v=this.reverseArray(g),m=v.length;for(var w=0;m>w;w++){{v[w]}if(!this.isObject(v[w]))throw new e("Merge items must be arrays",this.getRealCurrentLineNb()+1,this.currentLine);C=this.mergeObject(v[w],C)}}else C=this.mergeObject(C,g);l=C}else this.isDefined(c.value)&&(u=/^&([^ ]+) *(.*)/.exec(c.value))&&(u={ref:u[1],value:u[2]},s=u.ref,c.value=u.value);l?n=l:this.isDefined(c.value)&&""!=this.trim(c.value)&&"#"!=this.trim(c.value).charAt(0)?a?n=this.refs[a]:n[f]=this.parseValue(c.value):this.isNextLineIndented()&&!this.isNextLineUnIndentedCollection()?n[f]=null:(d=this.getRealCurrentLineNb()+1,h=new r(d),h.refs=this.refs,n[f]=h.parse(this.getNextEmbedBlock()),this.refs=h.refs)}if(s)if(n instanceof Array)this.refs[s]=n[n.length-1];else{var x=null;for(var S in n)n.hasOwnProperty(S)&&(x=S);this.refs[s]=n[S]}}return this.isEmpty(n)?null:n},getRealCurrentLineNb:function(){return this.currentLineNb+this.offset},getCurrentLineIndentation:function(){return this.currentLine.length-this.currentLine.replace(/^ +/g,"").length},getNextEmbedBlock:function(t){this.moveToNextLine();var n=null,i=null;if(this.isDefined(t))n=t;else{n=this.getCurrentLineIndentation();var o=this.isStringUnIndentedCollectionItem(this.currentLine);if(!this.isCurrentLineEmpty()&&0==n&&!o)throw new e("Indentation problem A",this.getRealCurrentLineNb()+1,this.currentLine)}var r=[this.currentLine.substr(n)],s=this.isStringUnIndentedCollectionItem(this.currentLine),a=-1;for(s===!0&&(a=1+/^\-((\s+)(.+?))?\s*$/.exec(this.currentLine)[2].length);this.moveToNextLine();){if(s&&!this.isStringUnIndentedCollectionItem(this.currentLine)&&this.getCurrentLineIndentation()!=a){this.moveToPreviousLine();break}if(this.isCurrentLineEmpty())this.isCurrentLineBlank()&&r.push(this.currentLine.substr(n));else{i=this.getCurrentLineIndentation();var l;if(l=/^( *)$/.exec(this.currentLine))r.push(l[1]);else{if(!(i>=n)){if(0==i){this.moveToPreviousLine();break}throw new e("Indentation problem B",this.getRealCurrentLineNb()+1,this.currentLine)}r.push(this.currentLine.substr(n))}}}return r.join("\n")},moveToNextLine:function(){return this.currentLineNb>=this.lines.length-1?!1:(this.currentLineNb++,this.currentLine=this.lines[this.currentLineNb],!0)},moveToPreviousLine:function(){this.currentLineNb--,this.currentLine=this.lines[this.currentLineNb]},parseValue:function(t){if("*"==(t+"").charAt(0)){if(t="#"==this.trim(t).charAt(0)?(t+"").substr(1,t.indexOf("#")-2):(t+"").substr(1),void 0==this.refs[t])throw new e('Reference "'+t+'" does not exist',this.getRealCurrentLineNb()+1,this.currentLine);return this.refs[t]}var n=null;if(n=/^(\||>)(\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?( +#.*)?$/.exec(t)){n={separator:n[1],modifiers:n[2],comments:n[3]};var i=this.isDefined(n.modifiers)?n.modifiers:"";return this.parseFoldedScalar(n.separator,i.replace(/\d+/g,""),Math.abs(parseInt(i)))}try{return(new o).parse(t)}catch(r){throw r instanceof e&&(r.setParsedLine(this.getRealCurrentLineNb()+1),r.setSnippet(this.currentLine)),r}},parseFoldedScalar:function(e,t,n){void 0==t&&(t=""),void 0==n&&(n=0),e="|"==e?"\n":" ";for(var i="",o=null,r=this.moveToNextLine();r&&this.isCurrentLineBlank();)i+="\n",r=this.moveToNextLine();if(!r)return"";var s=null;if(!(s=new RegExp("^("+(n?this.strRepeat(" ",n):" +")+")(.*)$").exec(this.currentLine)))return this.moveToPreviousLine(),"";s={indent:s[1],text:s[2]};var a=s.indent,l=0;for(i+=s.text+e;this.currentLineNb+1=0;i--)t.push(e[i]);return t},merge:function(e,t){var n,i={};for(n in e)e.hasOwnProperty(n)&&(/^\d+$/.test(n)?i.push(e):i[n]=e[n]);for(n in t)t.hasOwnProperty(n)&&(/^\d+$/.test(n)?i.push(t):i[n]=t[n]);return i},strRepeat:function(e,t){var n,i="";for(n=0;t>n;n++)i+=e;return i},subStrCount:function(e,t,n,i){var o=0;e=""+e,t=""+t,void 0!=n&&(e=e.substr(n)),void 0!=i&&(e=e.substr(0,i));for(var r=e.length,s=t.length,a=0;r>a;a++)t==e.substr(a,s)&&o++,a+=s-1;return o},trim:function(e){return(e+"").replace(/^ +/,"").replace(/ +$/,"")}},YamlEscaper=function(){},YamlEscaper.prototype={requiresDoubleQuoting:function(e){return new RegExp(YamlEscaper.REGEX_CHARACTER_TO_ESCAPE).test(e)},escapeWithDoubleQuotes:function(e){e+="";for(var t=YamlEscaper.escapees.length,n=YamlEscaper.escaped.length,i=YamlEscaper.escaped,o=0;t>o;++o)o>=n&&i.push("");var r="";return r=e.replace(new RegExp(YamlEscaper.escapees.join("|"),"g"),function(e){for(var n=0;t>n;++n)if(e==YamlEscaper.escapees[n])return i[n]}),'"'+r+'"'},requiresSingleQuoting:function(e){return/[\s'":{}[\],&*#?]|^[-?|<>=!%@`]/.test(e)},escapeWithSingleQuotes:function(e){return"'"+e.replace(/'/g,"''")+"'"}},YamlEscaper.REGEX_CHARACTER_TO_ESCAPE="[\\x00-\\x1f]|…| |
|
",YamlEscaper.escapees=["\\\\",'\\"','"',"\x00","","","","","","","","\b"," ","\n"," ","\f","\r","","","","","","","","","","","","","","","","","","","…"," ","
","
"],YamlEscaper.escaped=['\\"',"\\\\",'\\"',"\\0","\\x01","\\x02","\\x03","\\x04","\\x05","\\x06","\\a","\\b","\\t","\\n","\\v","\\f","\\r","\\x0e","\\x0f","\\x10","\\x11","\\x12","\\x13","\\x14","\\x15","\\x16","\\x17","\\x18","\\x19","\\x1a","\\e","\\x1c","\\x1d","\\x1e","\\x1f","\\N","\\_","\\L","\\P"];var s=function(){};s.prototype={unescapeSingleQuotedString:function(e){return e.replace(/''/g,"'")},unescapeDoubleQuotedString:function(e){var t=function(e){return(new s).unescapeCharacter(e)};return e.replace(new RegExp(s.REGEX_ESCAPED_CHARACTER,"g"),t)},unescapeCharacter:function(e){switch(e.charAt(1)){case"0":return String.fromCharCode(0);case"a":return String.fromCharCode(7);case"b":return String.fromCharCode(8);case"t":return" ";case" ":return" ";case"n":return"\n";case"v":return String.fromCharCode(11);case"f":return String.fromCharCode(12);case"r":return String.fromCharCode(13);case"e":return"";case" ":return" ";case'"':return'"';case"/":return"/";case"\\":return"\\";case"N":return"\x00…";case"_":return"\x00 ";case"L":return" (";case"P":return" )";case"x":return this.pack("n",(new o).hexdec(e.substr(2,2)));case"u":return this.pack("n",(new o).hexdec(e.substr(2,4)));case"U":return this.pack("N",(new o).hexdec(e.substr(2,8)))}},pack:function(e){for(var t,n,i=0,o=1,r="",s=0;iarguments.length-o)throw new Error("Warning: pack() Type "+t+": too few arguments");for(s=0;n>s;s++)r+=String.fromCharCode(arguments[o]>>8&255),r+=String.fromCharCode(255&arguments[o]),o++;break;case"N":if("*"===n&&(n=arguments.length-o),n>arguments.length-o)throw new Error("Warning: pack() Type "+t+": too few arguments");for(s=0;n>s;s++)r+=String.fromCharCode(arguments[o]>>24&255),r+=String.fromCharCode(arguments[o]>>16&255),r+=String.fromCharCode(arguments[o]>>8&255),r+=String.fromCharCode(255&arguments[o]),o++;break;default:throw new Error("Warning: pack() Type "+t+": unknown format code")}}if(o=t||!this.isObject(e)||this.isEmpty(e))i=new o,r+=s+i.dump(e);else{var a,l=!this.arrayEquals(this.getKeys(e),this.range(0,e.length-1));for(var c in e)e.hasOwnProperty(c)&&(a=0>=t-1||!this.isObject(e[c])||this.isEmpty(e[c]),l&&(i=new o),r+=s+""+(l?i.dump(c)+":":"-")+(a?" ":"\n")+this.dump(e[c],t-1,a?0:n+this.numSpacesForIndentation)+(a?"\n":""))}return r},strRepeat:function(e,t){var n,i="";for(n=0;t>n;n++)i+=e;return i},isObject:function(e){return this.isDefined(e)&&"object"==typeof e},isEmpty:function(e){var t=void 0==e||null==e||""==e||0==e||"0"==e||0==e;if(!(t||"object"!=typeof e||e instanceof Array)){var n=0;for(var i in e)e.hasOwnProperty(i)&&n++;t=!n}return t},isDefined:function(e){return void 0!=e&&null!=e},getKeys:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},range:function(e,t){if(e>t)return[];for(var n=[],i=e;t>=i;i++)n.push(i);return n},arrayEquals:function(e,t){if(e.length!=t.length)return!1;for(var n=e.length,i=0;n>i;i++)if(e[i]!=t[i])return!1;return!0}}}(),define("yaml-js",function(e){return function(){var t;return t||e.YAML}}(this)),define("extensions/yamlFrontMatterParser",["classes/Extension","yaml-js"],function(e,t){var n,i=new e("yamlFrontMatterParser","YAML front matter");i.onEventMgrCreated=function(e){n=e};var o;i.onFileSelected=function(e){o=e};var r=/^(\s*-{3}\s*\n([\w\W]+?)\n\s*-{3}\s*\n)?([\w\W]*)$/;return i.onPagedownConfigure=function(e){var i=e.getConverter();i.hooks.chain("preConversion",function(e){var i=r.exec(e),s=i[2];if(s&&(!o.frontMatter||o.frontMatter._yaml!=s)){o.frontMatter=void 0;try{o.frontMatter=t.parse(s),o.frontMatter._yaml=s,o.frontMatter._frontMatter=i[1]}catch(a){}}return n.onMarkdownTrim((i[1]||"").length),i[3]})},i}),define("text!html/markdownExtraSettingsBlock.html",[],function(){return'

Adds extra features to the original Markdown syntax.

\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n \n
\n
\n
\nMore info'}),window.PR_SHOULD_USE_CONTINUATION=!0;var prettyPrintOne,prettyPrint;!function(){function e(e){function t(e){var t=e.charCodeAt(0);if(92!==t)return t;var n=e.charAt(1);return t=d[n],t?t:n>="0"&&"7">=n?parseInt(e.substring(1),8):"u"===n||"x"===n?parseInt(e.substring(2),16):e.charCodeAt(1)}function n(e){if(32>e)return(16>e?"\\x0":"\\x")+e.toString(16);var t=String.fromCharCode(e);return"\\"===t||"-"===t||"]"===t||"^"===t?"\\"+t:t}function i(e){var i=e.substring(1,e.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),o=[],r="^"===i[0],s=["["];r&&s.push("^");for(var a=r?1:0,l=i.length;l>a;++a){var c=i[a];if(/\\[bdsw]/i.test(c))s.push(c);else{var u,d=t(c);l>a+2&&"-"===i[a+1]?(u=t(i[a+2]),a+=2):u=d,o.push([d,u]),65>u||d>122||(65>u||d>90||o.push([32|Math.max(65,d),32|Math.min(u,90)]),97>u||d>122||o.push([-33&Math.max(97,d),-33&Math.min(u,122)]))}}o.sort(function(e,t){return e[0]-t[0]||t[1]-e[1]});for(var h=[],p=[],a=0;af[0]&&(f[1]+1>f[0]&&s.push("-"),s.push(n(f[1])))}return s.push("]"),s.join("")}function o(e){for(var t=e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),o=t.length,a=[],l=0,c=0;o>l;++l){var u=t[l];if("("===u)++c;else if("\\"===u.charAt(0)){var d=+u.substring(1);d&&(c>=d?a[d]=-1:t[l]=n(d))}}for(var l=1;ll;++l){var u=t[l];if("("===u)++c,a[c]||(t[l]="(?:");else if("\\"===u.charAt(0)){var d=+u.substring(1);d&&c>=d&&(t[l]="\\"+a[d])}}for(var l=0;o>l;++l)"^"===t[l]&&"^"!==t[l+1]&&(t[l]="");if(e.ignoreCase&&s)for(var l=0;o>l;++l){var u=t[l],h=u.charAt(0);u.length>=2&&"["===h?t[l]=i(u):"\\"!==h&&(t[l]=u.replace(/[a-zA-Z]/g,function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"}))}return t.join("")}for(var r=0,s=!1,a=!1,l=0,c=e.length;c>l;++l){var u=e[l];if(u.ignoreCase)a=!0;else if(/[a-z]/i.test(u.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){s=!0,a=!1;break}}for(var d={b:8,t:9,n:10,v:11,f:12,r:13},h=[],l=0,c=e.length;c>l;++l){var u=e[l];if(u.global||u.multiline)throw new Error(""+u);h.push("(?:"+o(u)+")")}return new RegExp(h.join("|"),a?"gi":"g")}function t(e,t){function n(e){switch(e.nodeType){case 1:if(i.test(e.className))return;for(var l=e.firstChild;l;l=l.nextSibling)n(l);var c=e.nodeName.toLowerCase();("br"===c||"li"===c)&&(o[a]="\n",s[a<<1]=r++,s[a++<<1|1]=e);break;case 3:case 4:var u=e.nodeValue;u.length&&(u=t?u.replace(/\r\n?/g,"\n"):u.replace(/[ \t\r\n]+/g," "),o[a]=u,s[a<<1]=r,r+=u.length,s[a++<<1|1]=e)}}var i=/(?:^|\s)nocode(?:\s|$)/,o=[],r=0,s=[],a=0;return n(e),{sourceCode:o.join("").replace(/\n$/,""),spans:s}}function n(e,t,n,i){if(t){var o={sourceCode:t,basePos:e};n(o),i.push.apply(i,o.decorations)}}function i(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling){var i=n.nodeType;t=1===i?t?e:n:3===i?j.test(n.nodeValue)?e:t:t}return t===e?void 0:t}function o(t,i){var o,r={};!function(){for(var n=t.concat(i),s=[],a={},l=0,c=n.length;c>l;++l){var u=n[l],d=u[3];if(d)for(var h=d.length;--h>=0;)r[d.charAt(h)]=u;var p=u[1],f=""+p;a.hasOwnProperty(f)||(s.push(p),a[f]=null)}s.push(/[\0-\uffff]/),o=e(s)}();var s=i.length,a=function(e){for(var t=e.sourceCode,l=e.basePos,u=[l,R],d=0,h=t.match(o)||[],p={},f=0,g=h.length;g>f;++f){var m,v=h[f],b=p[v],y=void 0;if("string"==typeof b)m=!1;else{var w=r[v.charAt(0)];if(w)y=v.match(w[1]),b=w[0];else{for(var C=0;s>C;++C)if(w=i[C],y=v.match(w[1])){b=w[0];break}y||(b=R)}m=b.length>=5&&"lang-"===b.substring(0,5),!m||y&&"string"==typeof y[1]||(m=!1,b=P),m||(p[v]=b)}var x=d;if(d+=v.length,m){var S=y[1],E=v.indexOf(S),k=E+S.length;y[2]&&(k=v.length-y[2].length,E=k-S.length);var A=b.substring(5);n(l+x,v.substring(0,E),a,u),n(l+x+E,S,c(A,S),u),n(l+x+k,v.substring(k),a,u)}else u.push(l+x,b)}e.decorations=u};return a}function r(e){var t=[],n=[];t.push(e.tripleQuotedStrings?[T,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]:e.multiLineStrings?[T,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]:[T,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push([T,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]); diff --git a/public/res/constants.js b/public/res/constants.js index ad487784..03114193 100644 --- a/public/res/constants.js +++ b/public/res/constants.js @@ -1,6 +1,6 @@ define([], function() { var constants = {}; - constants.VERSION = "3.1.12"; + constants.VERSION = "3.1.13"; constants.MAIN_URL = "https://stackedit.io/"; constants.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1";