"use strict";function_classCallCheck(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functionsetInputSelection(e,t,a){if(e.focus(),"undefined"!=typeofe.selectionStart)e.selectionStart=t,e.selectionEnd=a;elseif(document.selection&&document.selection.createRange){e.select();varo=document.selection.createRange();o.collapse(!0),o.moveEnd("character",a),o.moveStart("character",t),o.select()}}functionmakeSafePath(e){vart=_.split(_.trim(e),"/");returnt=_.map(t,function(e){return_.kebabCase(_.deburr(_.trim(e)))}),_.join(_.filter(t,function(e){return!_.isEmpty(e)}),"/")}var_createClass=function(){functione(e,t){for(vara=0;a<t.length;a++){varo=t[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}returnfunction(t,a,o){returna&&e(t.prototype,a),o&&e(t,o),t}}();jQuery(document).ready(function(e){vart=this;e("a").smoothScroll({speed:400,offset:-70});newSticky(".stickyscroll");e(window).bind("beforeunload",function(){e("#notifload").addClass("active")}),e(document).ajaxSend(function(){e("#notifload").addClass("active")}).ajaxComplete(function(){e("#notifload").removeClass("active")});vara=newAlerts;alertsData&&_.forEach(alertsData,function(e){a.push(e)});varo=io(window.location.origin);if(e("#search-input").length){e("#search-input").focus(),e(".searchresults").css("display","block");varn=newVue({el:"#header-container",data:{searchq:"",searchres:[],searchsuggest:[],searchload:0,searchactive:!1,searchmoveidx:0,searchmovekey:"",searchmovearr:[]},watch:{searchq:function(e,t){n.searchmoveidx=0,e.length>=3?(n.searchactive=!0,n.searchload++,o.emit("search",{terms:e},function(e){n.searchres=e.match,n.searchsuggest=e.suggest,n.searchmovearr=_.concat([],n.searchres,n.searchsuggest),n.searchload>0&&n.searchload--})):(n.searchactive=!1,n.searchres=[],n.searchsuggest=[],n.searchmovearr=[],n.searchload=0)},searchmoveidx:function(e,t){e>0?n.searchmovekey=n.searchmovearr[e-1]?"res."+n.searchmovearr[e-1]._id:"sug."+n.searchmovearr[e-1]:n.searchmovekey=""}},methods:{useSuggestion:function(e){n.searchq=e},closeSearch:function(){n.searchq=""},moveSelectSearch:function(){if(!(n.searchmoveidx<1)){vare=n.searchmoveidx-1;n.searchmovearr[e]?window.location.assign("/"+n.searchmovearr[e]._id):n.searchq=n.searchmovearr[e]}},moveDownSearch:function(){n.searchmoveidx<n.searchmovearr.length&&n.searchmoveidx++},moveUpSearch:function(){n.searchmoveidx>0&&n.searchmoveidx--}}});e("main").on("click",n.closeSearch)}if(e("#page-type-view").length&&!function(){vart="home"!==e("#page-type-view").data("entrypath")?e("#page-type-view").data("entrypath"):"",o=t+"/new-page";e(".btn-create-prompt").on("click",function(a){e("#txt-create-prompt").val(o),e("#modal-create-prompt").toggleClass("is-active"),setInputSelection(e("#txt-create-prompt").get(0),t.length+1,o.length),e("#txt-create-prompt").removeClass("is-danger").next().addClass("is-hidden")}),e("#txt-create-prompt").on("keypress",function(t){13===t.which&&e(".btn-create-go").trigger("click")}),e(".btn-create-go").on("click",function(t){vara=makeSafePath(e("#txt-create-prompt").val());_.isEmpty(a)?e("#txt-create-prompt").addClass("is-danger").next().removeClass("is-hidden"):(e("#txt-create-prompt").parent().addClass("is-loading"),window.location.assign("/create/"+a))}),""!==t&&e(".btn-move-prompt").removeClass("is-hidden");varn=_.lastIndexOf(t,"/")+1;e(".btn-move-prompt").on("click",function(a){e("#txt-move-prompt").val(t),e("#modal-move-prompt").toggleClass("is-active"),setInputSelection(e("#txt-move-prompt").get(0),n,t.length),e("#txt-move-prompt").removeClass("is-danger").next().addClass("is-hidden")}),e("#txt-move-prompt").on("keypress",function(t){13===t.which&&e(".btn-move-go").trigger("click")}),e(".btn-move-go").on("click",function(o){varn=makeSafePath(e("#txt-move-prompt").val());_.isEmpty(n)||n===t||"home"===n?e("#txt-move-prompt").addClass("is-danger").next().removeClass("is-hidden"):(e("#txt-move-prompt").parent().addClass("is-loading"),e.ajax(window.location.href,{data:{move:n},dataType:"json",method:"PUT"}).then(function(e,t,o){e.ok?window.location.assign("/"+n):a.pushError("Something went wrong",e.error)},function(e,t,o){a.pushError("Something went wrong","Save operation failed.")}))})}(),e("#page-type-create").length){vari;!function(){varn=e("#page-type-create").data("entrypath");e(".btn-create-discard").on("click",function(t){e("#modal-create-discard").toggleClass("is-active")}),1===e("#mk-editor").length&&!function(){varr=!1;Vue.filter("filesize",function(e){return_.toUpper(filesize(e))});varl=newVue({el:"#modal-editor-image",data:{isLoading:!1,isLoadingText:"",newFolderName:"",newFolderShow:!1,newFolderError:!1,fetchFromUrlURL:"",fetchFromUrlShow:!1,folders:[],currentFolder:"",currentImage:"",currentAlign:"left",images:[],uploadSucceeded:!1,postUploadChecks:0,renameImageShow:!1,renameImageId:"",renameImageFilename:"",deleteImageShow:!1,deleteImageId:"",deleteImaLine truncated
"use strict";function_classCallCheck(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functionsetInputSelection(e,t,o){if(e.focus(),"undefined"!=typeofe.selectionStart)e.selectionStart=t,e.selectionEnd=o;elseif(document.selection&&document.selection.createRange){e.select();varn=document.selection.createRange();n.collapse(!0),n.moveEnd("character",o),n.moveStart("character",t),n.select()}}functionmakeSafePath(e){vart=_.split(_.trim(e),"/");returnt=_.map(t,function(e){return_.kebabCase(_.deburr(_.trim(e)))}),_.join(_.filter(t,function(e){return!_.isEmpty(e)}),"/")}var_createClass=function(){functione(e,t){for(varo=0;o<t.length;o++){varn=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,o,n){returno&&e(t.prototype,o),n&&e(t,n),t}}();jQuery(document).ready(function(e){vart=this;e("a").smoothScroll({speed:400,offset:-70});newSticky(".stickyscroll");e(window).bind("beforeunload",function(){e("#notifload").addClass("active")}),e(document).ajaxSend(function(){e("#notifload").addClass("active")}).ajaxComplete(function(){e("#notifload").removeClass("active")});varo=newAlerts;alertsData&&_.forEach(alertsData,function(e){o.push(e)});varn=io(window.location.origin);if(e("#search-input").length){e("#search-input").focus(),e(".searchresults").css("display","block");vari=newVue({el:"#header-container",data:{searchq:"",searchres:[],searchsuggest:[],searchload:0,searchactive:!1,searchmoveidx:0,searchmovekey:"",searchmovearr:[]},watch:{searchq:function(e,t){i.searchmoveidx=0,e.length>=3?(i.searchactive=!0,i.searchload++,n.emit("search",{terms:e},function(e){i.searchres=e.match,i.searchsuggest=e.suggest,i.searchmovearr=_.concat([],i.searchres,i.searchsuggest),i.searchload>0&&i.searchload--})):(i.searchactive=!1,i.searchres=[],i.searchsuggest=[],i.searchmovearr=[],i.searchload=0)},searchmoveidx:function(e,t){e>0?i.searchmovekey=i.searchmovearr[e-1]?"res."+i.searchmovearr[e-1]._id:"sug."+i.searchmovearr[e-1]:i.searchmovekey=""}},methods:{useSuggestion:function(e){i.searchq=e},closeSearch:function(){i.searchq=""},moveSelectSearch:function(){if(!(i.searchmoveidx<1)){vare=i.searchmoveidx-1;i.searchmovearr[e]?window.location.assign("/"+i.searchmovearr[e]._id):i.searchq=i.searchmovearr[e]}},moveDownSearch:function(){i.searchmoveidx<i.searchmovearr.length&&i.searchmoveidx++},moveUpSearch:function(){i.searchmoveidx>0&&i.searchmoveidx--}}});e("main").on("click",i.closeSearch)}if(e("#page-type-view").length&&!function(){vart="home"!==e("#page-type-view").data("entrypath")?e("#page-type-view").data("entrypath"):"",n=t+"/new-page";e(".btn-create-prompt").on("click",function(o){e("#txt-create-prompt").val(n),e("#modal-create-prompt").toggleClass("is-active"),setInputSelection(e("#txt-create-prompt").get(0),t.length+1,n.length),e("#txt-create-prompt").removeClass("is-danger").next().addClass("is-hidden")}),e("#txt-create-prompt").on("keypress",function(t){13===t.which&&e(".btn-create-go").trigger("click")}),e(".btn-create-go").on("click",function(t){varo=makeSafePath(e("#txt-create-prompt").val());_.isEmpty(o)?e("#txt-create-prompt").addClass("is-danger").next().removeClass("is-hidden"):(e("#txt-create-prompt").parent().addClass("is-loading"),window.location.assign("/create/"+o))}),""!==t&&e(".btn-move-prompt").removeClass("is-hidden");vari=_.lastIndexOf(t,"/")+1;e(".btn-move-prompt").on("click",function(o){e("#txt-move-prompt").val(t),e("#modal-move-prompt").toggleClass("is-active"),setInputSelection(e("#txt-move-prompt").get(0),i,t.length),e("#txt-move-prompt").removeClass("is-danger").next().addClass("is-hidden")}),e("#txt-move-prompt").on("keypress",function(t){13===t.which&&e(".btn-move-go").trigger("click")}),e(".btn-move-go").on("click",function(n){vari=makeSafePath(e("#txt-move-prompt").val());_.isEmpty(i)||i===t||"home"===i?e("#txt-move-prompt").addClass("is-danger").next().removeClass("is-hidden"):(e("#txt-move-prompt").parent().addClass("is-loading"),e.ajax(window.location.href,{data:{move:i},dataType:"json",method:"PUT"}).then(function(e,t,n){e.ok?window.location.assign("/"+i):o.pushError("Something went wrong",e.error)},function(e,t,n){o.pushError("Something went wrong","Save operation failed.")}))})}(),e("#page-type-create").length){vara;!function(){vari=e("#page-type-create").data("entrypath");e(".btn-create-discard").on("click",function(t){e("#modal-create-discard").toggleClass("is-active")}),1===e("#mk-editor").length&&!function(){varr=!1;Vue.filter("filesize",function(e){return_.toUpper(filesize(e))});varl=newVue({el:"#modal-editor-image",data:{isLoading:!1,isLoadingText:"",newFolderName:"",newFolderShow:!1,newFolderError:!1,fetchFromUrlURL:"",fetchFromUrlShow:!1,folders:[],currentFolder:"",currentImage:"",currentAlign:"left",images:[],uploadSucceeded:!1,postUploadChecks:0,renameImageShow:!1,renameImageId:"",renameImageFilename:"",deleteImageShow:!1,deleteImageId:"",deleteImaLine truncated
callback:function(e,t){d.deleteFileId=_.toString(t.$trigger[0].dataset.uid),d.deleteFileWarn(!0)}}}})}}});e("#btn-editor-file-upload input").on("change",function(n){vari=d.files.length;e(n.currentTarget).simpleUpload("/uploads/file",{name:"binfile",data:{folder:d.currentFolder},limit:20,expect:"json",maxFileSize:0,init:function(e){d.uploadSucceeded=!1,d.isLoadingText="Preparing to upload...",d.isLoading=!0},progress:function(e){d.isLoadingText="Uploading..."+Math.round(e)+"%"},success:function(e){if(e.ok){vart=_.filter(e.results,["ok",!1]);t.length?(_.forEach(t,function(e){o.pushError("Upload error",e.msg)}),t.length<e.results.length&&(o.push({title:"Some uploads succeeded",message:"Files that are not mentionned in the errors above were uploaded successfully."}),d.uploadSucceeded=!0)):d.uploadSucceeded=!0}elseo.pushError("Upload error",e.msg)},error:function(e){o.pushError(e.message,t.upload.file.name)},finish:function(){d.uploadSucceeded?d.waitChangeComplete(i,!0):d.isLoading=!1}})});vars=ace.require("ace/ext/modelist"),c=null,m=[],u=function(t){returne.ajax({url:"/js/ace/mode-"+t+".js",dataType:"script",cache:!0,beforeSend:function(){if(_.includes(m,t))return!1},success:function(){m.push(t)}})},g=newVue({el:"#modal-editor-codeblock",data:{modes:s.modesByName,modeSelected:"text",initContent:""},watch:{modeSelected:function(e,t){u(e).done(function(){ace.require("ace/mode/"+e),c.getSession().setMode("ace/mode/"+e)})}},methods:{open:function(t){e("#modal-editor-codeblock").addClass("is-active"),_.delay(function(){c=ace.edit("codeblock-editor"),c.setTheme("ace/theme/tomorrow_night"),c.getSession().setMode("ace/mode/"+g.modeSelected),c.setOption("fontSize","14px"),c.setOption("hScrollBarAlwaysVisible",!1),c.setOption("wrap",!0),c.setValue(g.initContent),c.focus(),c.renderer.updateFull()},300)},cancel:function(t){r=!1,e("#modal-editor-codeblock").removeClass("is-active"),g.initContent=""},insertCode:function(e){a.codemirror.doc.somethingSelected()&&a.codemirror.execCommand("singleSelection");vart="\n```"+g.modeSelected+"\n"+c.getValue()+"\n```\n";a.codemirror.doc.replaceSelection(t),g.cancel()}}});a=newSimpleMDE({autofocus:!0,autoDownloadFontAwesome:!1,element:e("#mk-editor").get(0),placeholder:"Enter Markdown formatted content here...",spellChecker:!1,status:!1,toolbar:[{name:"bold",action:SimpleMDE.toggleBold,className:"fa fa-bold",title:"Bold"},{name:"italic",action:SimpleMDE.toggleItalic,className:"fa fa-italic",title:"Italic"},{name:"strikethrough",action:SimpleMDE.toggleStrikethrough,className:"fa fa-strikethrough",title:"Strikethrough"},"|",{name:"heading-1",action:SimpleMDE.toggleHeading1,className:"fa fa-header fa-header-x fa-header-1",title:"Big Heading"},{name:"heading-2",action:SimpleMDE.toggleHeading2,className:"fa fa-header fa-header-x fa-header-2",title:"Medium Heading"},{name:"heading-3",action:SimpleMDE.toggleHeading3,className:"fa fa-header fa-header-x fa-header-3",title:"Small Heading"},{name:"quote",action:SimpleMDE.toggleBlockquote,className:"fa fa-quote-left",title:"Quote"},"|",{name:"unordered-list",action:SimpleMDE.toggleUnorderedList,className:"fa fa-list-ul",title:"Bullet List"},{name:"ordered-list",action:SimpleMDE.toggleOrderedList,className:"fa fa-list-ol",title:"Numbered List"},"|",{name:"link",action:function(e){},className:"fa fa-link",title:"Insert Link"},{name:"image",action:function(e){r||l.open()},className:"fa fa-image",title:"Insert Image"},{name:"file",action:function(e){r||d.open()},className:"fa fa-file-text-o",title:"Insert File"},"|",{name:"inline-code",action:function(e){if(!e.codemirror.doc.somethingSelected())returno.pushError("Invalid selection","You must select at least 1 character first.");vart=e.codemirror.doc.getSelections();t=_.map(t,function(e){return"`"+e+"`"}),e.codemirror.doc.replaceSelections(t)},className:"fa fa-terminal",title:"Inline Code"},{name:"code-block",action:function(e){r||(r=!0,a.codemirror.doc.somethingSelected()&&(g.initContent=a.codemirror.doc.getSelection()),g.open())},className:"fa fa-code",title:"Code Block"},"|",{name:"table",action:function(e){},className:"fa fa-table",title:"Insert Table"},{name:"horizontal-rule",action:SimpleMDE.drawHorizontalRule,className:"fa fa-minus",title:"Horizontal Rule"}],shortcuts:{toggleBlockquote:null,toggleFullScreen:null}}),e(".btn-edit-save, .btn-create-save").on("click",function(e){f(e)}),e(window).bind("keydown",function(e){if(e.ctrlKey||e.metaKey)switch(String.fromCharCode(e.which).toLowerCase()){case"s":e.preventDefault(),f(e)}});varf=function(t){e.ajax(window.location.href,{data:{markdown:a.value()},dataType:"json",method:"PUT"}).then(function(e,t,n){e.ok?window.location.assign("/"+i):o.pushError("Something went wrong",e.error)},function(e,t,n){o.pushError("Something went wrong","Save operation failed.")})}}()}()}if(e("#page-type-source").length){varr;!function(){r=ace.edit("source-display"),r.setTheme("ace/theme/tomorrow_night"),r.getSession().setMode("ace/mode/markdown"),r.setOption("Line truncated
functionsimpleUpload(e,l,n){functiont(){if("object"==typeofn&&null!==n){if("boolean"==typeofn.forceIframe&&(U=n.forceIframe),"function"==typeofn.init&&(I=n.init),"function"==typeofn.start&&(L=n.start),"function"==typeofn.progress&&(q=n.progress),"function"==typeofn.success&&(W=n.success),"function"==typeofn.error&&(_=n.error),"function"==typeofn.cancel&&(M=n.cancel),"function"==typeofn.complete&&(D=n.complete),"function"==typeofn.finish&&(N=n.finish),"string"==typeofn.hashWorker&&""!=n.hashWorker&&(S=n.hashWorker),"function"==typeofn.hashComplete&&(z=n.hashComplete),"object"==typeofn.data&&null!==n.data)for(vareinn.data)F[e]=n.data[e];if("number"==typeofn.limit&&y(n.limit)&&n.limit>0&&(w=n.limit),"number"==typeofn.maxFileSize&&y(n.maxFileSize)&&n.maxFileSize>0&&(x=n.maxFileSize),"object"==typeofn.allowedExts&&null!==n.allowedExts)for(vareinn.allowedExts)j.push(n.allowedExts[e]);if("object"==typeofn.allowedTypes&&null!==n.allowedTypes)for(vareinn.allowedTypes)k.push(n.allowedTypes[e]);if("string"==typeofn.expect&&""!=n.expect){vart=n.expect.toLowerCase(),o=["auto","json","xml","html","script","text"];for(vareino)if(o[e]==t){E=t;break}}if("object"==typeofn.xhrFields&&null!==n.xhrFields)for(vareinn.xhrFields)T[e]=n.xhrFields[e]}if("object"==typeofl&&null!==l&&linstanceofjQuery){if(!(l.length>0))return!1;l=l.get(0)}if(!U&&window.File&&window.FileReader&&window.FileList&&window.Blob&&("object"==typeofn&&null!==n&&"object"==typeofn.files&&null!==n.files?b=n.files:"object"==typeofl&&null!==l&&"object"==typeofl.files&&null!==l.files&&(b=l.files)),("object"!=typeofl||null===l)&&null==b)return!1;"object"==typeofn&&null!==n&&"string"==typeofn.name&&""!=n.name?C=n.name.replace(/\[\s*\]/g,"[0]"):"object"==typeofl&&null!==l&&"string"==typeofl.name&&""!=l.name&&(C=l.name.replace(/\[\s*\]/g,"[0]"));varr=0;if(null!=b?b.length>0&&(r=b.length>1&&window.FormData&&$.ajaxSettings.xhr().upload?w>0&&b.length>w?w:b.length:1):""!=l.value&&(r=1),r>0){if("object"==typeofl&&null!==l){vari=$(l);J=$("<form>").hide().attr("enctype","multipart/form-data").attr("method","post").appendTo("body"),i.after(i.clone(!0).val("")).removeAttr("onchange").off().removeAttr("id").attr("name",C).appendTo(J)}for(vars=0;r>s;s++)!function(e){R[e]={state:0,hashWorker:null,xhr:null,iframe:null},A[e]={upload:{index:e,state:"init",file:null!=b?b[e]:{name:l.value.split(/(\\|\/)/g).pop()},cancel:function(){if(0==u(e))d(e,4);else{if(1!=u(e))return!1;d(e,4),null!=R[e].hashWorker&&(R[e].hashWorker.terminate(),R[e].hashWorker=null),null!=R[e].xhr&&(R[e].xhr.abort(),R[e].xhr=null),null!=R[e].iframe&&($("iframe[name=simpleUpload_iframe_"+R[e].iframe+"]").attr("src","javascript:false;"),simpleUpload.dequeueIframe(R[e].iframe),R[e].iframe=null),P(e)}return!0}}}}(s);varp=H(r);if(p!==!1){varf=r;if("number"==typeofp&&y(p)&&p>=0&&r>p){f=p;for(varm=f;r>m;m++)d(m,4)}for(varc=[],v=0;f>v;v++)X(v,A[v].upload.file)!==!1&&(c[c.length]=v);c.length>0?(B=c.length,simpleUpload.queueUpload(c,function(e){a(e)}),simpleUpload.uploadNext()):Z()}else{for(varminA)d(m,4);Z()}}}functiona(e){if(1==u(e)){varn=null;if(null!=b){if(void0==b[e]||null==b[e])returnvoidK(e,{name:"InternalError",message:"There was an error uploading the file"});n=b[e]}elseif(""==l.value)returnvoidK(e,{name:"InternalError",message:"There was an error uploading the file"});returnj.length>0&&!c(j,n)?voidK(e,{name:"InvalidFileExtensionError",message:"That file format is not allowed"}):k.length>0&&!v(k,n)?voidK(e,{name:"InvalidFileTypeError",message:"That file format is not allowed"}):x>0&&!h(x,n)?voidK(e,{name:"MaxFileSizeError",message:"That file is too big"}):void(null!=S&&null!=z?o(e):i(e))}}functiono(e){if(null!=b&&void0!=b[e]&&null!=b[e]&&window.Worker){varl=b[e];if(void0!=l.size&&null!=l.size&&""!=l.size&&y(l.size)&&(l.slice||l.webkitSlice||l.mozSlice))try{varn=newWorker(S);n.addEventListener("error",function(){n.terminate(),R[e].hashWorker=null,i(e)},!1),n.addEventListener("message",function(l){if(l.data.result){vart=l.data.result;n.terminate(),R[e].hashWorker=null,r(e,t)}},!1);vart,a,o,s,p,f;returnf=function(e){n.postMessage({message:e.target.result,block:a})},p=function(){a.end!==l.size&&(a.start+=t,a.end+=t,a.end>l.size&&(a.end=l.size),o=newFileReader,o.onload=f,l.slice?s=l.slice(a.start,a.end):l.webkitSlice?s=l.webkitSlice(a.start,a.end):l.mozSlice&&(s=l.mozSlice(a.start,a.end)),o.readAsArrayBuffer(s))},t=1048576,a={file_size:l.size,start:0},a.end=t>l.size?l.size:t,n.addEventListener("message",p,!1),o=newFileReader,o.onload=f,l.slice?s=l.slice(a.start,a.end):l.webkitSlice?s=l.webkitSlice(a.start,a.end):l.mozSlice&&(s=l.mozSlice(a.start,a.end)),o.readAsArrayBuffer(s),void(R[e].hashWorker=n)}catch(u){}}i(e)}functionr(e,l){if(1==u(e)){varn=!1,t=function(l){return1==u(e)&&(!n&&(n=!0,Y(e,100),G(e,l),!0))},a=function(){return1==u(e)&&(!n&&(n=!0,i(e),!0))},o=function(l){return1==u(e)&&(!n&&(n=!0,K(e,{name:"HashError",message:l}),!0Line truncated
case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!J(e))thrownewTypeError('"list" argument must be an Array of Buffers');if(0===e.length)returna.alloc(0);varn;if(void0===t)for(t=0,n=0;n<e.length;n++)t+=e[n].length;varr=a.allocUnsafe(t),i=0;for(n=0;n<e.length;n++){varo=e[n];if(!a.isBuffer(o))thrownewTypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}returnr},a.byteLength=v,a.prototype._isBuffer=!0,a.prototype.swap16=function(){vare=this.length;if(e%2!==0)thrownewRangeError("Buffer size must be a multiple of 16-bits");for(vart=0;e>t;t+=2)x(this,t,t+1);returnthis},a.prototype.swap32=function(){vare=this.length;if(e%4!==0)thrownewRangeError("Buffer size must be a multiple of 32-bits");for(vart=0;e>t;t+=4)x(this,t,t+3),x(this,t+1,t+2);returnthis},a.prototype.toString=function(){vare=0|this.length;return0===e?"":0===arguments.length?N(this,0,e):y.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))thrownewTypeError("Argument must be a Buffer");returnthis===e||0===a.compare(this,e)},a.prototype.inspect=function(){vare="",t=n.INSPECT_MAX_BYTES;returnthis.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))thrownewTypeError("Argument must be a Buffer");if(void0===t&&(t=0),void0===n&&(n=e?e.length:0),void0===r&&(r=0),void0===i&&(i=this.length),0>t||n>e.length||0>r||i>this.length)thrownewRangeError("out of range index");if(r>=i&&t>=n)return0;if(r>=i)return-1;if(t>=n)return1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return0;for(varo=i-r,l=n-t,s=Math.min(o,l),c=this.slice(r,i),u=e.slice(t,n),f=0;s>f;++f)if(c[f]!==u[f]){o=c[f],l=u[f];break}returnl>o?-1:o>l?1:0},a.prototype.indexOf=function(e,t,n){if("string"==typeoft?(n=t,t=0):t>2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeofe&&(e=a.from(e,n)),a.isBuffer(e))return0===e.length?-1:b(this,e,t,n);if("number"==typeofe)returna.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):b(this,[e],t,n);thrownewTypeError("val must be string, number or Buffer")},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.write=function(e,t,n,r){if(void0===t)r="utf8",n=this.length,t=0;elseif(void0===n&&"string"==typeoft)r=t,n=this.length,t=0;else{if(!isFinite(t))thrownewError("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t,isFinite(n)?(n=0|n,void0===r&&(r="utf8")):(r=n,n=void0)}vari=this.length-t;if((void0===n||n>i)&&(n=i),e.length>0&&(0>n||0>t)||t>this.length)thrownewRangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(varo=!1;;)switch(r){case"hex":returnw(this,e,t,n);case"utf8":case"utf-8":returnk(this,e,t,n);case"ascii":returnS(this,e,t,n);case"binary":returnC(this,e,t,n);case"base64":returnL(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":returnT(this,e,t,n);default:if(o)thrownewTypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};varQ=4096;a.prototype.slice=function(e,t){varn=this.length;e=~~e,t=void0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);varr;if(a.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=a.prototype;else{vari=t-e;r=newa(i,(void0));for(varo=0;i>o;o++)r[o]=this[o+e]}returnr},a.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(varr=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;returnr},a.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(varr=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;returnr},a.prototype.readUInt8=function(e,t){returnt||R(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){returnt||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){returnt||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){returnt||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){returnt||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(varr=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;returni*=128,r>=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(varr=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;returni*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){returnt||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1Line truncated
},getDoc:function(){returnthis.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"]($n(e))},removeKeyMap:function(e){for(vart=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)returnt.splice(n,1),!0},addOverlay:Ot(function(t,n){varr=t.token?t:e.getMode(this.options,t);if(r.startState)thrownewError("Overlays may not be stateful.");this.state.overlays.push({mode:r,modeSpec:t,opaque:n&&n.opaque}),this.state.modeGen++,Dt(this)}),removeOverlay:Ot(function(e){for(vart=this.state.overlays,n=0;n<t.length;++n){varr=t[n].modeSpec;if(r==e||"string"==typeofe&&r.name==e)returnt.splice(n,1),this.state.modeGen++,voidDt(this)}}),indentLine:Ot(function(e,t,n){"string"!=typeoft&&"number"!=typeoft&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),ve(this.doc,e)&&Fn(this,e,t,n)}),indentSelection:Ot(function(e){for(vart=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){vari=t[r];if(i.empty())i.head.line>n&&(Fn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Bn(this));else{varo=i.from(),a=i.to(),l=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(vars=l;n>s;++s)Fn(this,s,e);varc=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&ke(this.doc,r,newfe(o,c[r].to()),Wa)}}}),getTokenAt:function(e,t){returnIr(this,e,t)},getLineTokens:function(e,t){returnIr(this,Bo(e),t,!0)},getTokenTypeAt:function(e){e=me(this.doc,e);vart,n=Dr(this,Zr(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];elsefor(;;){vara=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}varl=t?t.indexOf("cm-overlay "):-1;return0>l?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){varn=this.doc.mode;returnn.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){returnthis.getHelpers(e,t)[0]},getHelpers:function(e,t){varn=[];if(!la.hasOwnProperty(t))returnn;varr=la[t],i=this.getModeAt(e);if("string"==typeofi[t])r[i[t]]&&n.push(r[i[t]]);elseif(i[t])for(varo=0;o<i[t].length;o++){vara=r[i[t][o]];a&&n.push(a)}elsei.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(varo=0;o<r._global.length;o++){varl=r._global[o];l.pred(i,this)&&-1==Pi(n,l.val)&&n.push(l.val)}returnn},getStateAfter:function(e,t){varn=this.doc;returne=pe(n,null==e?n.first+n.size-1:e),je(this,e+1,t)},cursorCoords:function(e,t){varn,r=this.doc.sel.primary();returnn=null==e?r.head:"object"==typeofe?me(this.doc,e):e?r.from():r.to(),dt(this,n,t||"page")},charCoords:function(e,t){returnht(this,me(this.doc,e),t||"page")},coordsChar:function(e,t){returne=ft(this,e,t||"page"),gt(this,e.left,e.top)},lineAtHeight:function(e,t){returne=ft(this,{top:e,left:0},t||"page").top,ni(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){varn,r=!1;if("number"==typeofe){vari=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,r=!0),n=Zr(this.doc,e)}elsen=e;returnut(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-ri(n):0)},defaultTextHeight:function(){returnyt(this.display)},defaultCharWidth:function(){returnxt(this.display)},setGutterMarker:Ot(function(e,t,n){returnzn(this.doc,e,"gutter",function(e){varr=e.gutterMarkers||(e.gutterMarkers={});returnr[t]=n,!n&&Fi(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Ot(function(e){vart=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Ht(t,r,"gutter"),Fi(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeofe){if(!ve(this.doc,e))returnnull;vart=e;if(e=Zr(this.doc,e),!e)returnnull}else{vart=ti(e);if(null==t)returnnull}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){varo=this.display;e=dt(this,me(this.doc,e));vara=e.bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;elseif("above"==r||"near"==r){vars=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&Dn(this,l,a,l+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:Ot(hn),triggerOnKeyPress:Ot(mn),triggerOnKeyUp:pn,execCommand:function(e){returnua.hasOwnProperty(e)?ua[e].call(null,this):void0},triggerElectric:Ot(function(e){Q(this,e)}),findPosH:function(e,t,n,r){vari=1;0>t&&(i=-1,t=-t);for(varo=0,a=me(this.doc,Line truncated
w(this)},B.prototype.drawLink=function(){k(this)},B.prototype.drawImage=function(){S(this)},B.prototype.drawTable=function(){C(this)},B.prototype.drawHorizontalRule=function(){L(this)},B.prototype.undo=function(){T(this)},B.prototype.redo=function(){M(this)},B.prototype.togglePreview=function(){A(this)},B.prototype.toggleSideBySide=function(){N(this)},B.prototype.toggleFullScreen=function(){s(this)},B.prototype.isPreviewActive=function(){vare=this.codemirror,t=e.getWrapperElement(),n=t.lastChild;return/editor-preview-active/.test(n.className)},B.prototype.isSideBySideActive=function(){vare=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling;return/editor-preview-active-side/.test(n.className)},B.prototype.isFullscreenActive=function(){vare=this.codemirror;returne.getOption("fullScreen")},B.prototype.getState=function(){vare=this.codemirror;returnl(e)},B.prototype.toTextArea=function(){vare=this.codemirror,t=e.getWrapperElement();t.parentNode&&(this.gui.toolbar&&t.parentNode.removeChild(this.gui.toolbar),this.gui.statusbar&&t.parentNode.removeChild(this.gui.statusbar),this.gui.sideBySide&&t.parentNode.removeChild(this.gui.sideBySide)),e.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void0,this.clearAutosavedValue())},t.exports=B},{"./codemirror/tablist":19,codemirror:10,"codemirror-spell-checker":4,"codemirror/addon/display/fullscreen.js":5,"codemirror/addon/display/placeholder.js":6,"codemirror/addon/edit/continuelist.js":7,"codemirror/addon/mode/overlay.js":8,"codemirror/addon/selection/mark-selection.js":9,"codemirror/mode/gfm/gfm.js":11,"codemirror/mode/markdown/markdown.js":12,"codemirror/mode/xml/xml.js":14,marked:17}]},{},[20])(20)}),function(){functiono(n){vari=e;n&&(e[n]||(e[n]={}),i=e[n]),i.define&&i.define.packaged||(t.original=i.define,i.define=t,i.define.packaged=!0),i.require&&i.require.packaged||(r.original=i.require,i.require=r,i.require.packaged=!0)}varACE_NAMESPACE="ace",e=function(){returnthis}();if(!e&&"undefined"!=typeofwindow&&(e=window),ACE_NAMESPACE||"undefined"==typeofrequirejs){vart=function(e,n,r){return"string"!=typeofe?void(t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())):(2==arguments.length&&(r=n),void(t.modules[e]||(t.payloads[e]=r,t.modules[e]=null)))};t.modules={},t.payloads={};varn=function(e,t,n){if("string"==typeoft){vari=s(e,t);if(void0!=i)returnn&&n(),i}elseif("[object Array]"===Object.prototype.toString.call(t)){for(varo=[],u=0,a=t.length;u<a;++u){varf=s(e,t[u]);if(void0==f&&r.original)return;o.push(f)}returnn&&n.apply(null,o)||!0}},r=function(e,t){vari=n("",e,t);returnvoid0==i&&r.original?r.original.apply(this,arguments):i},i=function(e,t){if(t.indexOf("!")!==-1){varn=t.split("!");returni(e,n[0])+"!"+i(e,n[1])}if("."==t.charAt(0)){varr=e.split("/").slice(0,-1).join("/");for(t=r+"/"+t;t.indexOf(".")!==-1&&s!=t;){vars=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}returnt},s=function(e,r){r=i(e,r);vars=t.modules[r];if(!s){if(s=t.payloads[r],"function"==typeofs){varo={},u={id:r,uri:"",exports:o,packaged:!0},a=function(e,t){returnn(r,e,t)},f=s(a,o,u);o=f||u.exports,t.modules[r]=o,deletet.payloads[r]}s=t.modules[r]=o||s}returns};o(ACE_NAMESPACE)}}(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){"use strict";functiono(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}functionu(e,t,n){if(Array.prototype.indexOf)returne.indexOf(t,n);for(varr=n||0;r<e.length;r++)if(e[r]===t)returnr;return-1}varr={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},i=void0===r.exec.call(/()??/,"")[1],s=function(){vare=/^/g;returnr.test.call(e,""),!e.lastIndex}();s&&i||(RegExp.prototype.exec=function(e){varn,a,t=r.exec.apply(this,arguments);if("string"==typeofe&&t){if(!i&&t.length>1&&u(t,"")>-1&&(a=RegExp(this.source,r.replace.call(o(this),"g","")),r.replace.call(e.slice(t.index),a,function(){for(vare=1;e<arguments.length-2;e++)void0===arguments[e]&&(t[e]=void0)})),this._xregexp&&this._xregexp.captureNames)for(varf=1;f<t.length;f++)n=this._xregexp.captureNames[f-1],n&&(t[n]=t[f]);!s&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--}returnt},s||(RegExp.prototype.test=function(e){vart=r.exec.call(this,e);returnt&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){functionr(){}functionw(e){try{returnObject.defineProperty(e,"sentinel",{}),"sentinel"ine}catch(t){}}functionH(e){returne=+e,e!==e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(t){varn=this;if("function"!=typeofn)thrownewTypeError("Function.prototype.Line truncated
functionsimpleUpload(e,l,n){functiont(){if("object"==typeofn&&null!==n){if("boolean"==typeofn.forceIframe&&(U=n.forceIframe),"function"==typeofn.init&&(I=n.init),"function"==typeofn.start&&(L=n.start),"function"==typeofn.progress&&(q=n.progress),"function"==typeofn.success&&(W=n.success),"function"==typeofn.error&&(_=n.error),"function"==typeofn.cancel&&(M=n.cancel),"function"==typeofn.complete&&(D=n.complete),"function"==typeofn.finish&&(N=n.finish),"string"==typeofn.hashWorker&&""!=n.hashWorker&&(S=n.hashWorker),"function"==typeofn.hashComplete&&(z=n.hashComplete),"object"==typeofn.data&&null!==n.data)for(vareinn.data)F[e]=n.data[e];if("number"==typeofn.limit&&y(n.limit)&&n.limit>0&&(w=n.limit),"number"==typeofn.maxFileSize&&y(n.maxFileSize)&&n.maxFileSize>0&&(x=n.maxFileSize),"object"==typeofn.allowedExts&&null!==n.allowedExts)for(vareinn.allowedExts)j.push(n.allowedExts[e]);if("object"==typeofn.allowedTypes&&null!==n.allowedTypes)for(vareinn.allowedTypes)k.push(n.allowedTypes[e]);if("string"==typeofn.expect&&""!=n.expect){vart=n.expect.toLowerCase(),o=["auto","json","xml","html","script","text"];for(vareino)if(o[e]==t){E=t;break}}if("object"==typeofn.xhrFields&&null!==n.xhrFields)for(vareinn.xhrFields)T[e]=n.xhrFields[e]}if("object"==typeofl&&null!==l&&linstanceofjQuery){if(!(l.length>0))return!1;l=l.get(0)}if(!U&&window.File&&window.FileReader&&window.FileList&&window.Blob&&("object"==typeofn&&null!==n&&"object"==typeofn.files&&null!==n.files?b=n.files:"object"==typeofl&&null!==l&&"object"==typeofl.files&&null!==l.files&&(b=l.files)),("object"!=typeofl||null===l)&&null==b)return!1;"object"==typeofn&&null!==n&&"string"==typeofn.name&&""!=n.name?C=n.name.replace(/\[\s*\]/g,"[0]"):"object"==typeofl&&null!==l&&"string"==typeofl.name&&""!=l.name&&(C=l.name.replace(/\[\s*\]/g,"[0]"));varr=0;if(null!=b?b.length>0&&(r=b.length>1&&window.FormData&&$.ajaxSettings.xhr().upload?w>0&&b.length>w?w:b.length:1):""!=l.value&&(r=1),r>0){if("object"==typeofl&&null!==l){vari=$(l);J=$("<form>").hide().attr("enctype","multipart/form-data").attr("method","post").appendTo("body"),i.after(i.clone(!0).val("")).removeAttr("onchange").off().removeAttr("id").attr("name",C).appendTo(J)}for(vars=0;r>s;s++)!function(e){R[e]={state:0,hashWorker:null,xhr:null,iframe:null},A[e]={upload:{index:e,state:"init",file:null!=b?b[e]:{name:l.value.split(/(\\|\/)/g).pop()},cancel:function(){if(0==u(e))d(e,4);else{if(1!=u(e))return!1;d(e,4),null!=R[e].hashWorker&&(R[e].hashWorker.terminate(),R[e].hashWorker=null),null!=R[e].xhr&&(R[e].xhr.abort(),R[e].xhr=null),null!=R[e].iframe&&($("iframe[name=simpleUpload_iframe_"+R[e].iframe+"]").attr("src","javascript:false;"),simpleUpload.dequeueIframe(R[e].iframe),R[e].iframe=null),P(e)}return!0}}}}(s);varp=H(r);if(p!==!1){varf=r;if("number"==typeofp&&y(p)&&p>=0&&r>p){f=p;for(varm=f;r>m;m++)d(m,4)}for(varc=[],v=0;f>v;v++)X(v,A[v].upload.file)!==!1&&(c[c.length]=v);c.length>0?(B=c.length,simpleUpload.queueUpload(c,function(e){a(e)}),simpleUpload.uploadNext()):Z()}else{for(varminA)d(m,4);Z()}}}functiona(e){if(1==u(e)){varn=null;if(null!=b){if(void0==b[e]||null==b[e])returnvoidK(e,{name:"InternalError",message:"There was an error uploading the file"});n=b[e]}elseif(""==l.value)returnvoidK(e,{name:"InternalError",message:"There was an error uploading the file"});returnj.length>0&&!c(j,n)?voidK(e,{name:"InvalidFileExtensionError",message:"That file format is not allowed"}):k.length>0&&!v(k,n)?voidK(e,{name:"InvalidFileTypeError",message:"That file format is not allowed"}):x>0&&!h(x,n)?voidK(e,{name:"MaxFileSizeError",message:"That file is too big"}):void(null!=S&&null!=z?o(e):i(e))}}functiono(e){if(null!=b&&void0!=b[e]&&null!=b[e]&&window.Worker){varl=b[e];if(void0!=l.size&&null!=l.size&&""!=l.size&&y(l.size)&&(l.slice||l.webkitSlice||l.mozSlice))try{varn=newWorker(S);n.addEventListener("error",function(){n.terminate(),R[e].hashWorker=null,i(e)},!1),n.addEventListener("message",function(l){if(l.data.result){vart=l.data.result;n.terminate(),R[e].hashWorker=null,r(e,t)}},!1);vart,a,o,s,p,f;returnf=function(e){n.postMessage({message:e.target.result,block:a})},p=function(){a.end!==l.size&&(a.start+=t,a.end+=t,a.end>l.size&&(a.end=l.size),o=newFileReader,o.onload=f,l.slice?s=l.slice(a.start,a.end):l.webkitSlice?s=l.webkitSlice(a.start,a.end):l.mozSlice&&(s=l.mozSlice(a.start,a.end)),o.readAsArrayBuffer(s))},t=1048576,a={file_size:l.size,start:0},a.end=t>l.size?l.size:t,n.addEventListener("message",p,!1),o=newFileReader,o.onload=f,l.slice?s=l.slice(a.start,a.end):l.webkitSlice?s=l.webkitSlice(a.start,a.end):l.mozSlice&&(s=l.mozSlice(a.start,a.end)),o.readAsArrayBuffer(s),void(R[e].hashWorker=n)}catch(u){}}i(e)}functionr(e,l){if(1==u(e)){varn=!1,t=function(l){return1==u(e)&&(!n&&(n=!0,Y(e,100),G(e,l),!0))},a=function(){return1==u(e)&&(!n&&(n=!0,i(e),!0))},o=function(l){return1==u(e)&&(!n&&(n=!0,K(e,{name:"HashError",message:l}),!0Line truncated
returnu(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))thrownewTypeError("Arguments must be Buffers");if(e===t)return0;for(varn=e.length,r=t.length,i=0,o=Math.min(n,r);o>i;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}returnr>n?-1:n>r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!J(e))thrownewTypeError('"list" argument must be an Array of Buffers');if(0===e.length)returna.alloc(0);varn;if(void0===t)for(t=0,n=0;n<e.length;n++)t+=e[n].length;varr=a.allocUnsafe(t),i=0;for(n=0;n<e.length;n++){varo=e[n];if(!a.isBuffer(o))thrownewTypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}returnr},a.byteLength=v,a.prototype._isBuffer=!0,a.prototype.swap16=function(){vare=this.length;if(e%2!==0)thrownewRangeError("Buffer size must be a multiple of 16-bits");for(vart=0;e>t;t+=2)x(this,t,t+1);returnthis},a.prototype.swap32=function(){vare=this.length;if(e%4!==0)thrownewRangeError("Buffer size must be a multiple of 32-bits");for(vart=0;e>t;t+=4)x(this,t,t+3),x(this,t+1,t+2);returnthis},a.prototype.toString=function(){vare=0|this.length;return0===e?"":0===arguments.length?N(this,0,e):y.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))thrownewTypeError("Argument must be a Buffer");returnthis===e||0===a.compare(this,e)},a.prototype.inspect=function(){vare="",t=n.INSPECT_MAX_BYTES;returnthis.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))thrownewTypeError("Argument must be a Buffer");if(void0===t&&(t=0),void0===n&&(n=e?e.length:0),void0===r&&(r=0),void0===i&&(i=this.length),0>t||n>e.length||0>r||i>this.length)thrownewRangeError("out of range index");if(r>=i&&t>=n)return0;if(r>=i)return-1;if(t>=n)return1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return0;for(varo=i-r,l=n-t,s=Math.min(o,l),c=this.slice(r,i),u=e.slice(t,n),f=0;s>f;++f)if(c[f]!==u[f]){o=c[f],l=u[f];break}returnl>o?-1:o>l?1:0},a.prototype.indexOf=function(e,t,n){if("string"==typeoft?(n=t,t=0):t>2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeofe&&(e=a.from(e,n)),a.isBuffer(e))return0===e.length?-1:b(this,e,t,n);if("number"==typeofe)returna.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):b(this,[e],t,n);thrownewTypeError("val must be string, number or Buffer")},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.write=function(e,t,n,r){if(void0===t)r="utf8",n=this.length,t=0;elseif(void0===n&&"string"==typeoft)r=t,n=this.length,t=0;else{if(!isFinite(t))thrownewError("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t,isFinite(n)?(n=0|n,void0===r&&(r="utf8")):(r=n,n=void0)}vari=this.length-t;if((void0===n||n>i)&&(n=i),e.length>0&&(0>n||0>t)||t>this.length)thrownewRangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(varo=!1;;)switch(r){case"hex":returnw(this,e,t,n);case"utf8":case"utf-8":returnk(this,e,t,n);case"ascii":returnS(this,e,t,n);case"binary":returnC(this,e,t,n);case"base64":returnL(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":returnT(this,e,t,n);default:if(o)thrownewTypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};varQ=4096;a.prototype.slice=function(e,t){varn=this.length;e=~~e,t=void0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);varr;if(a.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=a.prototype;else{vari=t-e;r=newa(i,(void0));for(varo=0;i>o;o++)r[o]=this[o+e]}returnr},a.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(varr=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;returnr},a.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(varr=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;returnr},a.prototype.readUInt8=function(e,t){returnt||R(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){returnt||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){returnt||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){returnt||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){returnt||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);fLine truncated
};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){varn=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,ta.hasOwnProperty(e)&&Et(this,ta[e])(this,t,r))},getOption:function(e){returnthis.options[e]},getDoc:function(){returnthis.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"]($n(e))},removeKeyMap:function(e){for(vart=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)returnt.splice(n,1),!0},addOverlay:Ot(function(t,n){varr=t.token?t:e.getMode(this.options,t);if(r.startState)thrownewError("Overlays may not be stateful.");this.state.overlays.push({mode:r,modeSpec:t,opaque:n&&n.opaque}),this.state.modeGen++,Dt(this)}),removeOverlay:Ot(function(e){for(vart=this.state.overlays,n=0;n<t.length;++n){varr=t[n].modeSpec;if(r==e||"string"==typeofe&&r.name==e)returnt.splice(n,1),this.state.modeGen++,voidDt(this)}}),indentLine:Ot(function(e,t,n){"string"!=typeoft&&"number"!=typeoft&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),ve(this.doc,e)&&Fn(this,e,t,n)}),indentSelection:Ot(function(e){for(vart=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){vari=t[r];if(i.empty())i.head.line>n&&(Fn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Bn(this));else{varo=i.from(),a=i.to(),l=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(vars=l;n>s;++s)Fn(this,s,e);varc=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&ke(this.doc,r,newfe(o,c[r].to()),Wa)}}}),getTokenAt:function(e,t){returnIr(this,e,t)},getLineTokens:function(e,t){returnIr(this,Bo(e),t,!0)},getTokenTypeAt:function(e){e=me(this.doc,e);vart,n=Dr(this,Zr(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];elsefor(;;){vara=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}varl=t?t.indexOf("cm-overlay "):-1;return0>l?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){varn=this.doc.mode;returnn.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){returnthis.getHelpers(e,t)[0]},getHelpers:function(e,t){varn=[];if(!la.hasOwnProperty(t))returnn;varr=la[t],i=this.getModeAt(e);if("string"==typeofi[t])r[i[t]]&&n.push(r[i[t]]);elseif(i[t])for(varo=0;o<i[t].length;o++){vara=r[i[t][o]];a&&n.push(a)}elsei.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(varo=0;o<r._global.length;o++){varl=r._global[o];l.pred(i,this)&&-1==Pi(n,l.val)&&n.push(l.val)}returnn},getStateAfter:function(e,t){varn=this.doc;returne=pe(n,null==e?n.first+n.size-1:e),je(this,e+1,t)},cursorCoords:function(e,t){varn,r=this.doc.sel.primary();returnn=null==e?r.head:"object"==typeofe?me(this.doc,e):e?r.from():r.to(),dt(this,n,t||"page")},charCoords:function(e,t){returnht(this,me(this.doc,e),t||"page")},coordsChar:function(e,t){returne=ft(this,e,t||"page"),gt(this,e.left,e.top)},lineAtHeight:function(e,t){returne=ft(this,{top:e,left:0},t||"page").top,ni(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){varn,r=!1;if("number"==typeofe){vari=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,r=!0),n=Zr(this.doc,e)}elsen=e;returnut(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-ri(n):0)},defaultTextHeight:function(){returnyt(this.display)},defaultCharWidth:function(){returnxt(this.display)},setGutterMarker:Ot(function(e,t,n){returnzn(this.doc,e,"gutter",function(e){varr=e.gutterMarkers||(e.gutterMarkers={});returnr[t]=n,!n&&Fi(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Ot(function(e){vart=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Ht(t,r,"gutter"),Fi(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeofe){if(!ve(this.doc,e))returnnull;vart=e;if(e=Zr(this.doc,e),!e)returnnull}else{vart=ti(e);if(null==t)returnnull}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){varo=this.display;e=dt(this,me(this.doc,e));vara=e.bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;elseif("above"==r||"near"==r){vars=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&Dn(this,l,a,l+t.offsetWidth,a+t.offsetHeight)},triggerOnKLine truncated
returni.open("GET",t,!1),i.overrideMimeType&&i.overrideMimeType("text/plain; charset="+r),i.send(null),i.responseText}if("undefined"!=typeofe){varo=e("fs");try{if(o.existsSync(t)){vara=o.statSync(t),l=o.openSync(t,"r"),s=newn(a.size);returno.readSync(l,s,0,s.length,null),s.toString(r,0,s.length)}console.log("Path "+t+" does not exist.")}catch(c){returnconsole.log(c),""}}},_parseAFF:function(e){vart={};e=this._removeAffixComments(e);for(varn=e.split("\n"),r=0,i=n.length;i>r;r++){varo=n[r],a=o.split(/\s+/),l=a[0];if("PFX"==l||"SFX"==l){for(vars=a[1],c=a[2],u=parseInt(a[3],10),f=[],h=r+1,d=r+1+u;d>h;h++){varo=n[h],p=o.split(/\s+/),m=p[2],g=p[3].split("/"),v=g[0];"0"===v&&(v="");vary=this.parseRuleCodes(g[1]),x=p[4],b={};b.add=v,y.length>0&&(b.continuationClasses=y),"."!==x&&("SFX"===l?b.match=newRegExp(x+"$"):b.match=newRegExp("^"+x)),"0"!=m&&("SFX"===l?b.remove=newRegExp(m+"$"):b.remove=m),f.push(b)}t[s]={type:l,combineable:"Y"==c,entries:f},r+=u}elseif("COMPOUNDRULE"===l){for(varu=parseInt(a[1],10),h=r+1,d=r+1+u;d>h;h++){varo=n[h],p=o.split(/\s+/);this.compoundRules.push(p[1])}r+=u}elseif("REP"===l){varp=o.split(/\s+/);3===p.length&&this.replacementTable.push([p[1],p[2]])}elsethis.flags[l]=a[1]}returnt},_removeAffixComments:function(e){returne=e.replace(/#.*$/gm,""),e=e.replace(/^\s\s*/m,"").replace(/\s\s*$/m,""),e=e.replace(/\n{2,}/g,"\n"),e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},_parseDIC:function(e){functiont(e,t){einr&&"object"==typeofr[e]||(r[e]=[]),r[e].push(t)}e=this._removeDicComments(e);for(varn=e.split("\n"),r={},i=1,o=n.length;o>i;i++){vara=n[i],l=a.split("/",2),s=l[0];if(l.length>1){varc=this.parseRuleCodes(l[1]);"NEEDAFFIX"inthis.flags&&-1!=c.indexOf(this.flags.NEEDAFFIX)||t(s,c);for(varu=0,f=c.length;f>u;u++){varh=c[u],d=this.rules[h];if(d)for(varp=this._applyRule(s,d),m=0,g=p.length;g>m;m++){varv=p[m];if(t(v,[]),d.combineable)for(vary=u+1;f>y;y++){varx=c[y],b=this.rules[x];if(b&&b.combineable&&d.type!=b.type)for(varw=this._applyRule(v,b),k=0,S=w.length;S>k;k++){varC=w[k];t(C,[])}}}hinthis.compoundRuleCodes&&this.compoundRuleCodes[h].push(s)}}elset(s.trim(),[])}returnr},_removeDicComments:function(e){returne=e.replace(/^\t.*$/gm,"")},parseRuleCodes:function(e){if(!e)return[];if(!("FLAG"inthis.flags))returne.split("");if("long"===this.flags.FLAG){for(vart=[],n=0,r=e.length;r>n;n+=2)t.push(e.substr(n,2));returnt}return"num"===this.flags.FLAG?textCode.split(","):void0},_applyRule:function(e,t){for(varn=t.entries,r=[],i=0,o=n.length;o>i;i++){vara=n[i];if(!a.match||e.match(a.match)){varl=e;if(a.remove&&(l=l.replace(a.remove,"")),"SFX"===t.type?l+=a.add:l=a.add+l,r.push(l),"continuationClasses"ina)for(vars=0,c=a.continuationClasses.length;c>s;s++){varu=this.rules[a.continuationClasses[s]];u&&(r=r.concat(this._applyRule(l,u)))}}}returnr},check:function(e){vart=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(t))return!0;if(t.toUpperCase()===t){varn=t[0]+t.substring(1).toLowerCase();if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}varr=t.toLowerCase();if(r!==t){if(this.hasFlag(r,"KEEPCASE"))return!1;if(this.checkExact(r))return!0}return!1},checkExact:function(e){vart=this.dictionaryTable[e];if("undefined"==typeoft){if("COMPOUNDMIN"inthis.flags&&e.length>=this.flags.COMPOUNDMIN)for(varn=0,r=this.compoundRules.length;r>n;n++)if(e.match(this.compoundRules[n]))return!0;return!1}if("object"==typeoft){for(varn=0,r=t.length;r>n;n++)if(!this.hasFlag(e,"ONLYINCOMPOUND",t[n]))return!0;return!1}},hasFlag:function(e,t,n){if(tinthis.flags){if("undefined"==typeofn)varn=Array.prototype.concat.apply([],this.dictionaryTable[e]);if(n&&-1!==n.indexOf(this.flags[t]))return!0}return!1},alphabet:"",suggest:function(e,t){functionn(e){for(vart=[],n=0,r=e.length;r>n;n++){for(vari=e[n],o=[],a=0,l=i.length+1;l>a;a++)o.push([i.substring(0,a),i.substring(a,i.length)]);for(vars=[],a=0,l=o.length;l>a;a++){varu=o[a];u[1]&&s.push(u[0]+u[1].substring(1))}for(varf=[],a=0,l=o.length;l>a;a++){varu=o[a];u[1].length>1&&f.push(u[0]+u[1][1]+u[1][0]+u[1].substring(2))}for(varh=[],a=0,l=o.length;l>a;a++){varu=o[a];if(u[1])for(vard=0,p=c.alphabet.length;p>d;d++)h.push(u[0]+c.alphabet[d]+u[1].substring(1))}for(varm=[],a=0,l=o.length;l>a;a++){varu=o[a];if(u[1])for(vard=0,p=c.alphabet.length;p>d;d++)h.push(u[0]+c.alphabet[d]+u[1])}t=t.concat(s),t=t.concat(f),t=t.concat(h),t=t.concat(m)}returnt}functionr(e){for(vart=[],n=0;n<e.length;n++)c.check(e[n])&&t.push(e[n]);returnt}functioni(e){functioni(e,t){returne[1]<t[1]?-1:1}for(varo=n([e]),a=n(o),l=r(o).concat(r(a)),s={},u=0,f=l.length;f>u;u++)l[u]ins?s[l[u]]+=1:s[l[u]]=1;varh=[];for(varuins)h.push([u,s[u]]);h.sort(i).reverse();for(vard=[],u=0,f=Math.min(t,h.length);f>u;u++)c.hasFlag(h[u][0],"NOSUGGEST")||d.push(h[u][0]);returnd}if(t||(t=5),this.check(e))return[];for(varo=0,a=this.replacementTable.length;a>o;o++){varl=this.replacementTable[o];if(-1!==e.indexOf(l[Line truncated
},B.prototype.toggleHeadingBigger=function(){m(this)},B.prototype.toggleHeading1=function(){g(this)},B.prototype.toggleHeading2=function(){v(this)},B.prototype.toggleHeading3=function(){y(this)},B.prototype.toggleCodeBlock=function(){h(this)},B.prototype.toggleUnorderedList=function(){x(this)},B.prototype.toggleOrderedList=function(){b(this)},B.prototype.cleanBlock=function(){w(this)},B.prototype.drawLink=function(){k(this)},B.prototype.drawImage=function(){S(this)},B.prototype.drawTable=function(){C(this)},B.prototype.drawHorizontalRule=function(){L(this)},B.prototype.undo=function(){T(this)},B.prototype.redo=function(){M(this)},B.prototype.togglePreview=function(){A(this)},B.prototype.toggleSideBySide=function(){N(this)},B.prototype.toggleFullScreen=function(){s(this)},B.prototype.isPreviewActive=function(){vare=this.codemirror,t=e.getWrapperElement(),n=t.lastChild;return/editor-preview-active/.test(n.className)},B.prototype.isSideBySideActive=function(){vare=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling;return/editor-preview-active-side/.test(n.className)},B.prototype.isFullscreenActive=function(){vare=this.codemirror;returne.getOption("fullScreen")},B.prototype.getState=function(){vare=this.codemirror;returnl(e)},B.prototype.toTextArea=function(){vare=this.codemirror,t=e.getWrapperElement();t.parentNode&&(this.gui.toolbar&&t.parentNode.removeChild(this.gui.toolbar),this.gui.statusbar&&t.parentNode.removeChild(this.gui.statusbar),this.gui.sideBySide&&t.parentNode.removeChild(this.gui.sideBySide)),e.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void0,this.clearAutosavedValue())},t.exports=B},{"./codemirror/tablist":19,codemirror:10,"codemirror-spell-checker":4,"codemirror/addon/display/fullscreen.js":5,"codemirror/addon/display/placeholder.js":6,"codemirror/addon/edit/continuelist.js":7,"codemirror/addon/mode/overlay.js":8,"codemirror/addon/selection/mark-selection.js":9,"codemirror/mode/gfm/gfm.js":11,"codemirror/mode/markdown/markdown.js":12,"codemirror/mode/xml/xml.js":14,marked:17}]},{},[20])(20)}),function(){functiono(n){vari=e;n&&(e[n]||(e[n]={}),i=e[n]),i.define&&i.define.packaged||(t.original=i.define,i.define=t,i.define.packaged=!0),i.require&&i.require.packaged||(r.original=i.require,i.require=r,i.require.packaged=!0)}varACE_NAMESPACE="ace",e=function(){returnthis}();if(!e&&"undefined"!=typeofwindow&&(e=window),ACE_NAMESPACE||"undefined"==typeofrequirejs){vart=function(e,n,r){return"string"!=typeofe?void(t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())):(2==arguments.length&&(r=n),void(t.modules[e]||(t.payloads[e]=r,t.modules[e]=null)))};t.modules={},t.payloads={};varn=function(e,t,n){if("string"==typeoft){vari=s(e,t);if(void0!=i)returnn&&n(),i}elseif("[object Array]"===Object.prototype.toString.call(t)){for(varo=[],u=0,a=t.length;u<a;++u){varf=s(e,t[u]);if(void0==f&&r.original)return;o.push(f)}returnn&&n.apply(null,o)||!0}},r=function(e,t){vari=n("",e,t);returnvoid0==i&&r.original?r.original.apply(this,arguments):i},i=function(e,t){if(t.indexOf("!")!==-1){varn=t.split("!");returni(e,n[0])+"!"+i(e,n[1])}if("."==t.charAt(0)){varr=e.split("/").slice(0,-1).join("/");for(t=r+"/"+t;t.indexOf(".")!==-1&&s!=t;){vars=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}returnt},s=function(e,r){r=i(e,r);vars=t.modules[r];if(!s){if(s=t.payloads[r],"function"==typeofs){varo={},u={id:r,uri:"",exports:o,packaged:!0},a=function(e,t){returnn(r,e,t)},f=s(a,o,u);o=f||u.exports,t.modules[r]=o,deletet.payloads[r]}s=t.modules[r]=o||s}returns};o(ACE_NAMESPACE)}}(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){"use strict";functiono(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}functionu(e,t,n){if(Array.prototype.indexOf)returne.indexOf(t,n);for(varr=n||0;r<e.length;r++)if(e[r]===t)returnr;return-1}varr={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},i=void0===r.exec.call(/()??/,"")[1],s=function(){vare=/^/g;returnr.test.call(e,""),!e.lastIndex}();s&&i||(RegExp.prototype.exec=function(e){varn,a,t=r.exec.apply(this,arguments);if("string"==typeofe&&t){if(!i&&t.length>1&&u(t,"")>-1&&(a=RegExp(this.source,r.replace.call(o(this),"g","")),r.replace.call(e.slice(t.index),a,function(){for(vare=1;e<arguments.length-2;e++)void0===arguments[e]&&(t[e]=void0)})),this._xregexp&&this._xregexp.captureNames)for(varf=1;f<t.length;f++)n=this._xregexp.captureNames[f-1],n&&(t[n]=t[f]);!s&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--}returnt},s||(RegExp.prototype.test=function(e){vart=r.exec.call(this,e);returnt&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require",Line truncated
this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){returnthis.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){returnthis.$lines[e]||""},this.getLines=function(e,t){returnthis.$lines.slice(e,t+1)},this.getAllLines=function(){returnthis.getLines(0,this.getLength())},this.getLength=function(){returnthis.$lines.length},this.getTextRange=function(e){returnthis.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){vart;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);varn=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}returnt},this.insertLines=function(e,t){returnconsole.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){returnconsole.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){returnconsole.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){returnthis.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){varn=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);returnthis.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){varn=this.getLength();void0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void0);varr=this.getLine(e);returnvoid0==t&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){vart=this.getLength();returne.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());varn=0;e<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){varn=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};returnthis.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},this.remove=function(e){vart=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);returnthis.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){varr=this.clippedPos(e,t),i=this.clippedPos(e,n);returnthis.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);varn=t==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,u=r?t+1:t,a=r?0:this.getLine(u).length,f=newo(i,s,u,a),l=this.$lines.slice(e,t+1);returnthis.applyDelta({start:f.start,end:f.end,action:"remove",lines:this.getLinesForRange(f)}),l},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){if(einstanceofo||(e=o.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty())returne.start;if(t==this.getTextRange(e))returne.end;this.remove(e);varn;returnn=t?this.insert(e.start,t):e.start},this.applyDeltas=function(e){for(vart=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(vart=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){varn="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),i(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(varn=e.lines,r=n.length,i=e.start.row,s=e.start.column,o=0,u=0;;){o=u,u+=t-1;vara=n.slice(o,u);if(u>r){e.lines=a,e.start.row=i+o,e.start.column=s;break}a.push(""),this.applyDelta({start:this.pos(i+o,s),end:this.pos(i+u,s=0),action:e.action,lines:a},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(varn=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=t||0,s=n.length;i<s;i++)if(e-=n[i].length+r,e<0)return{row:i,column:e+n[i].length+r};retLine truncated
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.