"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();vara=document.selection.createRange();a.collapse(!0),a.moveEnd("character",o),a.moveStart("character",t),a.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++){vara=t[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"ina&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}returnfunction(t,o,a){returno&&e(t.prototype,o),a&&e(t,a),t}}();jQuery(document).ready(function(e){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")});vart=newAlerts;alertsData&&_.forEach(alertsData,function(e){t.push(e)});varo=io(ioHost);if(jQuery(document).ready(function(e){if(e("#search-input").length){e("#search-input").focus(),Vue.transition("slide",{enterClass:"slideInDown",leaveClass:"fadeOutUp"}),e(".searchresults").css("display","block");vart=newVue({el:"#header-container",data:{searchq:"",searchres:[],searchsuggest:[],searchload:0,searchactive:!1,searchmoveidx:0,searchmovekey:"",searchmovearr:[]},watch:{searchq:function(e,a){t.searchmoveidx=0,e.length>=3?(t.searchactive=!0,t.searchload++,o.emit("search",{terms:e},function(e){t.searchres=e.match,t.searchsuggest=e.suggest,t.searchmovearr=_.concat([],t.searchres,t.searchsuggest),t.searchload>0&&t.searchload--})):(t.searchactive=!1,t.searchres=[],t.searchsuggest=[],t.searchmovearr=[],t.searchload=0)},searchmoveidx:function(e,o){e>0?t.searchmovekey=t.searchmovearr[e-1].document?"res."+t.searchmovearr[e-1].document.entryPath:"sug."+t.searchmovearr[e-1]:t.searchmovekey=""}},methods:{useSuggestion:function(e){t.searchq=e},closeSearch:function(){t.searchq=""},moveSelectSearch:function(){if(!(t.searchmoveidx<1)){vare=t.searchmoveidx-1;t.searchmovearr[e].document?window.location.assign("/"+t.searchmovearr[e].document.entryPath):t.searchq=t.searchmovearr[e]}},moveDownSearch:function(){t.searchmoveidx<t.searchmovearr.length&&t.searchmoveidx++},moveUpSearch:function(){t.searchmoveidx>0&&t.searchmoveidx--}}});e("main").on("click",t.closeSearch)}}),e("#page-type-view").length&&!function(){varo="home"!==e("#page-type-view").data("entrypath")?e("#page-type-view").data("entrypath"):"",a=o+"/new-page";e(".btn-create-prompt").on("click",function(t){e("#txt-create-prompt").val(a),e("#modal-create-prompt").toggleClass("is-active"),setInputSelection(e("#txt-create-prompt").get(0),o.length+1,a.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))}),""!==o&&e(".btn-move-prompt").removeClass("is-hidden");varn=_.lastIndexOf(o,"/")+1;e(".btn-move-prompt").on("click",function(t){e("#txt-move-prompt").val(o),e("#modal-move-prompt").toggleClass("is-active"),setInputSelection(e("#txt-move-prompt").get(0),n,o.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(a){varn=makeSafePath(e("#txt-move-prompt").val());_.isEmpty(n)||n===o||"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,o,a){e.ok?window.location.assign("/"+n):t.pushError("Something went wrong",e.error)},function(e,o,a){t.pushError("Something went wrong","Save operation failed.")}))})}(),e("#page-type-create").length){vara;!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(){varn=!1;Vue.filter("filesize",function(e){return_.toUpper(filesize(e))});vari=newVue({el:"#modal-editor-image",data:{isLoading:!1,isLoadingText:"",newFolderName:"",newFolderShow:!1,newFolderError:!1,fetchFromUrlURL:"",fetchFromUrlShow:!1,folders:[],currentFolder:"",currentImage:"",currentAlign:"left",images:[],uploadSucLine 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();vara=document.selection.createRange();a.collapse(!0),a.moveEnd("character",o),a.moveStart("character",t),a.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++){vara=t[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"ina&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}returnfunction(t,o,a){returno&&e(t.prototype,o),a&&e(t,a),t}}();jQuery(document).ready(function(e){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")});vart=newAlerts;alertsData&&_.forEach(alertsData,function(e){t.push(e)});varo=io(ioHost);if(jQuery(document).ready(function(e){if(e("#search-input").length){e("#search-input").focus(),e(".searchresults").css("display","block");vart=newVue({el:"#header-container",data:{searchq:"",searchres:[],searchsuggest:[],searchload:0,searchactive:!1,searchmoveidx:0,searchmovekey:"",searchmovearr:[]},watch:{searchq:function(e,a){t.searchmoveidx=0,e.length>=3?(t.searchactive=!0,t.searchload++,o.emit("search",{terms:e},function(e){t.searchres=e.match,t.searchsuggest=e.suggest,t.searchmovearr=_.concat([],t.searchres,t.searchsuggest),t.searchload>0&&t.searchload--})):(t.searchactive=!1,t.searchres=[],t.searchsuggest=[],t.searchmovearr=[],t.searchload=0)},searchmoveidx:function(e,o){e>0?t.searchmovekey=t.searchmovearr[e-1]?"res."+t.searchmovearr[e-1]._id:"sug."+t.searchmovearr[e-1]:t.searchmovekey=""}},methods:{useSuggestion:function(e){t.searchq=e},closeSearch:function(){t.searchq=""},moveSelectSearch:function(){if(!(t.searchmoveidx<1)){vare=t.searchmoveidx-1;t.searchmovearr[e]?window.location.assign("/"+t.searchmovearr[e]._id):t.searchq=t.searchmovearr[e]}},moveDownSearch:function(){t.searchmoveidx<t.searchmovearr.length&&t.searchmoveidx++},moveUpSearch:function(){t.searchmoveidx>0&&t.searchmoveidx--}}});e("main").on("click",t.closeSearch)}}),e("#page-type-view").length&&!function(){varo="home"!==e("#page-type-view").data("entrypath")?e("#page-type-view").data("entrypath"):"",a=o+"/new-page";e(".btn-create-prompt").on("click",function(t){e("#txt-create-prompt").val(a),e("#modal-create-prompt").toggleClass("is-active"),setInputSelection(e("#txt-create-prompt").get(0),o.length+1,a.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))}),""!==o&&e(".btn-move-prompt").removeClass("is-hidden");varn=_.lastIndexOf(o,"/")+1;e(".btn-move-prompt").on("click",function(t){e("#txt-move-prompt").val(o),e("#modal-move-prompt").toggleClass("is-active"),setInputSelection(e("#txt-move-prompt").get(0),n,o.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(a){varn=makeSafePath(e("#txt-move-prompt").val());_.isEmpty(n)||n===o||"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,o,a){e.ok?window.location.assign("/"+n):t.pushError("Something went wrong",e.error)},function(e,o,a){t.pushError("Something went wrong","Save operation failed.")}))})}(),e("#page-type-create").length){vara;!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(){varn=!1;Vue.filter("filesize",function(e){return_.toUpper(filesize(e))});vari=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},methods:{open:function(){n=!0,e("#modal-editor-image").slideDown(),i.refreshFolders()},canceLine 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
functionselectColor(){returnexports.colors[prevColor++%exports.colors.length]}functiondebug(namespace){functiondisabled(){}functionenabled(){varself=enabled,curr=+newDate,ms=curr-(prevTime||curr);self.diff=ms,self.prev=prevTime,self.curr=curr,prevTime=curr,null==self.useColors&&(self.useColors=exports.useColors()),null==self.color&&self.useColors&&(self.color=selectColor());varargs=Array.prototype.slice.call(arguments);args[0]=exports.coerce(args[0]),"string"!=typeofargs[0]&&(args=["%o"].concat(args));varindex=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if("%%"===match)returnmatch;index++;varformatter=exports.formatters[format];if("function"==typeofformatter){varval=args[index];match=formatter.call(self,val),args.splice(index,1),index--}returnmatch}),"function"==typeofexports.formatArgs&&(args=exports.formatArgs.apply(self,args));varlogFn=enabled.log||exports.log||console.log.bind(console);logFn.apply(self,args)}disabled.enabled=!1,enabled.enabled=!0;varfn=exports.enabled(namespace)?enabled:disabled;returnfn.namespace=namespace,fn}functionenable(namespaces){exports.save(namespaces);for(varsplit=(namespaces||"").split(/[\s,]+/),len=split.length,i=0;i<len;i++)split[i]&&(namespaces=split[i].replace(/\*/g,".*?"),"-"===namespaces[0]?exports.skips.push(newRegExp("^"+namespaces.substr(1)+"$")):exports.names.push(newRegExp("^"+namespaces+"$")))}functiondisable(){exports.enable("")}functionenabled(name){vari,len;for(i=0,len=exports.skips.length;i<len;i++)if(exports.skips[i].test(name))return!1;for(i=0,len=exports.names.length;i<len;i++)if(exports.names[i].test(name))return!0;return!1}functioncoerce(val){returnvalinstanceofError?val.stack||val.message:val}exports=module.exports=debug,exports.coerce=coerce,exports.disable=disable,exports.enable=enable,exports.enabled=enabled,exports.humanize=_dereq_("ms"),exports.names=[],exports.skips=[],exports.formatters={};varprevTime,prevColor=0},{ms:35}],16:[function(_dereq_,module,exports){module.exports=_dereq_("./lib/")},{"./lib/":17}],17:[function(_dereq_,module,exports){module.exports=_dereq_("./socket"),module.exports.parser=_dereq_("engine.io-parser")},{"./socket":18,"engine.io-parser":27}],18:[function(_dereq_,module,exports){(function(global){functionSocket(uri,opts){if(!(thisinstanceofSocket))returnnewSocket(uri,opts);opts=opts||{},uri&&"object"==typeofuri&&(opts=uri,uri=null),uri?(uri=parseuri(uri),opts.hostname=uri.host,opts.secure="https"==uri.protocol||"wss"==uri.protocol,opts.port=uri.port,uri.query&&(opts.query=uri.query)):opts.host&&(opts.hostname=parseuri(opts.host).host),this.secure=null!=opts.secure?opts.secure:global.location&&"https:"==location.protocol,opts.hostname&&!opts.port&&(opts.port=this.secure?"443":"80"),this.agent=opts.agent||!1,this.hostname=opts.hostname||(global.location?location.hostname:"localhost"),this.port=opts.port||(global.location&&location.port?location.port:this.secure?443:80),this.query=opts.query||{},"string"==typeofthis.query&&(this.query=parseqs.decode(this.query)),this.upgrade=!1!==opts.upgrade,this.path=(opts.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!opts.forceJSONP,this.jsonp=!1!==opts.jsonp,this.forceBase64=!!opts.forceBase64,this.enablesXDR=!!opts.enablesXDR,this.timestampParam=opts.timestampParam||"t",this.timestampRequests=opts.timestampRequests,this.transports=opts.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.policyPort=opts.policyPort||843,this.rememberUpgrade=opts.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=opts.onlyBinaryUpgrades,this.perMessageDeflate=!1!==opts.perMessageDeflate&&(opts.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=opts.pfx||null,this.key=opts.key||null,this.passphrase=opts.passphrase||null,this.cert=opts.cert||null,this.ca=opts.ca||null,this.ciphers=opts.ciphers||null,this.rejectUnauthorized=void0===opts.rejectUnauthorized||opts.rejectUnauthorized;varfreeGlobal="object"==typeofglobal&&global;freeGlobal.global===freeGlobal&&opts.extraHeaders&&Object.keys(opts.extraHeaders).length>0&&(this.extraHeaders=opts.extraHeaders),this.open()}functionclone(obj){varo={};for(variinobj)obj.hasOwnProperty(i)&&(o[i]=obj[i]);returno}vartransports=_dereq_("./transports"),Emitter=_dereq_("component-emitter"),debug=_dereq_("debug")("engine.io-client:socket"),index=_dereq_("indexof"),parser=_dereq_("engine.io-parser"),parseuri=_dereq_("parseuri"),parsejson=_dereq_("parsejson"),parseqs=_dereq_("parseqs");module.exports=Socket,Socket.priorWebsocketSuccess=!1,Emitter(Socket.prototype),Socket.protocol=parser.protocol,Socket.Socket=Socket,Socket.Transport=_dereq_("./transport"),Socket.transports=_dereq_("./transports"),Socket.parser=_dereq_("engine.io-parser"),Socket.prototype.createTransport=function(name){debug('creating transport "%s"',name);Line truncated
p.attachments=Number(buf)}if("/"==str.charAt(i+1))for(p.nsp="";++i;){varc=str.charAt(i);if(","==c)break;if(p.nsp+=c,i==str.length)break}elsep.nsp="/";varnext=str.charAt(i+1);if(""!==next&&Number(next)==next){for(p.id="";++i;){varc=str.charAt(i);if(null==c||Number(c)!=c){--i;break}if(p.id+=str.charAt(i),i==str.length)break}p.id=Number(p.id)}if(str.charAt(++i))try{p.data=json.parse(str.substr(i))}catch(e){returnerror()}returndebug("decoded %s as %j",str,p),p}functionBinaryReconstructor(packet){this.reconPack=packet,this.buffers=[]}functionerror(data){return{type:exports.ERROR,data:"parser error"}}vardebug=_dereq_("debug")("socket.io-parser"),json=_dereq_("json3"),Emitter=(_dereq_("isarray"),_dereq_("component-emitter")),binary=_dereq_("./binary"),isBuf=_dereq_("./is-buffer");exports.protocol=4,exports.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],exports.CONNECT=0,exports.DISCONNECT=1,exports.EVENT=2,exports.ACK=3,exports.ERROR=4,exports.BINARY_EVENT=5,exports.BINARY_ACK=6,exports.Encoder=Encoder,exports.Decoder=Decoder,Encoder.prototype.encode=function(obj,callback){if(debug("encoding packet %j",obj),exports.BINARY_EVENT==obj.type||exports.BINARY_ACK==obj.type)encodeAsBinary(obj,callback);else{varencoding=encodeAsString(obj);callback([encoding])}},Emitter(Decoder.prototype),Decoder.prototype.add=function(obj){varpacket;if("string"==typeofobj)packet=decodeString(obj),exports.BINARY_EVENT==packet.type||exports.BINARY_ACK==packet.type?(this.reconstructor=newBinaryReconstructor(packet),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",packet)):this.emit("decoded",packet);else{if(!isBuf(obj)&&!obj.base64)thrownewError("Unknown type: "+obj);if(!this.reconstructor)thrownewError("got binary data when not reconstructing a packet");packet=this.reconstructor.takeBinaryData(obj),packet&&(this.reconstructor=null,this.emit("decoded",packet))}},Decoder.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},BinaryReconstructor.prototype.takeBinaryData=function(binData){if(this.buffers.push(binData),this.buffers.length==this.reconPack.attachments){varpacket=binary.reconstructPacket(this.reconPack,this.buffers);returnthis.finishedReconstruction(),packet}returnnull},BinaryReconstructor.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":39,"./is-buffer":41,"component-emitter":42,debug:14,isarray:33,json3:34}],41:[function(_dereq_,module,exports){(function(global){functionisBuf(obj){returnglobal.Buffer&&global.Buffer.isBuffer(obj)||global.ArrayBuffer&&objinstanceofArrayBuffer}module.exports=isBuf}).call(this,"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:{})},{}],42:[function(_dereq_,module,exports){arguments[4][26][0].apply(exports,arguments)},{dup:26}],43:[function(_dereq_,module,exports){functiontoArray(list,index){vararray=[];index=index||0;for(vari=index||0;i<list.length;i++)array[i-index]=list[i];returnarray}module.exports=toArray},{}],44:[function(_dereq_,module,exports){(function(global){!function(root){functionucs2decode(string){for(varvalue,extra,output=[],counter=0,length=string.length;counter<length;)value=string.charCodeAt(counter++),value>=55296&&value<=56319&&counter<length?(extra=string.charCodeAt(counter++),56320==(64512&extra)?output.push(((1023&value)<<10)+(1023&extra)+65536):(output.push(value),counter--)):output.push(value);returnoutput}functionucs2encode(array){for(varvalue,length=array.length,index=-1,output="";++index<length;)value=array[index],value>65535&&(value-=65536,output+=stringFromCharCode(value>>>10&1023|55296),value=56320|1023&value),output+=stringFromCharCode(value);returnoutput}functioncheckScalarValue(codePoint){if(codePoint>=55296&&codePoint<=57343)throwError("Lone surrogate U+"+codePoint.toString(16).toUpperCase()+" is not a scalar value")}functioncreateByte(codePoint,shift){returnstringFromCharCode(codePoint>>shift&63|128)}functionencodeCodePoint(codePoint){if(0==(4294967168&codePoint))returnstringFromCharCode(codePoint);varsymbol="";return0==(4294965248&codePoint)?symbol=stringFromCharCode(codePoint>>6&31|192):0==(4294901760&codePoint)?(checkScalarValue(codePoint),symbol=stringFromCharCode(codePoint>>12&15|224),symbol+=createByte(codePoint,6)):0==(4292870144&codePoint)&&(symbol=stringFromCharCode(codePoint>>18&7|240),symbol+=createByte(codePoint,12),symbol+=createByte(codePoint,6)),symbol+=stringFromCharCode(63&codePoint|128)}functionutf8encode(string){for(varcodePoint,codePoints=ucs2decode(string),length=codePoints.length,index=-1,byteString="";++index<length;)codePoint=codePoints[index],byteString+=encodeCodePoint(codePoint);returnbyteString}functionreadContinuationByte(){if(byteIndex>=byteCount)throwError("Invalid byte index");varcontinuationByte=255&byteArray[byteIndex];if(byteIndex++,128==(192&continuationByte))return63&continuationByte;throwError("InvaLine truncated
t.$trigger=s,t.events.show.call(s,t)===!1)returnvoid(o=null);if(h.update.call(s,t),t.position.call(s,t,n,a),t.zIndex){varc=t.zIndex;"function"==typeoft.zIndex&&(c=t.zIndex.call(s,t)),i.zIndex=p(s)+c}h.layer.call(t.$menu,t,i.zIndex),t.$menu.find("ul").css("zIndex",i.zIndex+1),t.$menu.css(i)[t.animation.show](t.animation.duration,function(){s.trigger("contextmenu:visible")}),s.data("contextMenu",t).addClass("context-menu-active"),e(document).off("keydown.contextMenu").on("keydown.contextMenu",f.key),t.autoHide&&e(document).on("mousemove.contextMenuAutoHide",function(e){varn=s.offset();n.right=n.left+s.outerWidth(),n.bottom=n.top+s.outerHeight(),!t.$layer||t.hovering||e.pageX>=n.left&&e.pageX<=n.right&&e.pageY>=n.top&&e.pageY<=n.bottom||setTimeout(function(){t.hovering||null==t.$menu||t.$menu.trigger("contextmenu:hide")},50)})},hide:function(t,n){vara=e(this);if(t||(t=a.data("contextMenu")||{}),n||!t.events||t.events.hide.call(a,t)!==!1){if(a.removeData("contextMenu").removeClass("context-menu-active"),t.$layer){setTimeout(function(e){returnfunction(){e.remove()}}(t.$layer),10);try{deletet.$layer}catch(s){t.$layer=null}}o=null,t.$menu.find("."+t.classNames.hover).trigger("contextmenu:blur"),t.$selected=null,t.$menu.find("."+t.classNames.visible).removeClass(t.classNames.visible),e(document).off(".contextMenuAutoHide").off("keydown.contextMenu"),t.$menu&&t.$menu[t.animation.hide](t.animation.duration,function(){t.build&&(t.$menu.remove(),e.each(t,function(e){switch(e){case"ns":case"selector":case"build":case"trigger":return!0;default:t[e]=void0;try{deletet[e]}catch(n){}return!0}})),setTimeout(function(){a.trigger("contextmenu:hidden")},10)})}},create:function(n,a){functiono(t){varn=e("<span></span>");if(t._accesskey)t._beforeAccesskey&&n.append(document.createTextNode(t._beforeAccesskey)),e("<span></span>").addClass("context-menu-accesskey").text(t._accesskey).appendTo(n),t._afterAccesskey&&n.append(document.createTextNode(t._afterAccesskey));elseif(t.isHtmlName){if("undefined"!=typeoft.accesskey)thrownewError("accesskeys are not compatible with HTML names and cannot be used together in the same item");n.html(t.name)}elsen.text(t.name);returnn}void0===a&&(a=n),n.$menu=e('<ul class="context-menu-list"></ul>').addClass(n.className||"").data({contextMenu:n,contextMenuRoot:a}),e.each(["callbacks","commands","inputs"],function(e,t){n[t]={},a[t]||(a[t]={})}),a.accesskeys||(a.accesskeys={}),e.each(n.items,function(s,i){varc=e('<li class="context-menu-item"></li>').addClass(i.className||""),r=null,l=null;if(c.on("click",e.noop),"string"!=typeofi&&"cm_separator"!==i.type||(i={type:"cm_seperator"}),i.$node=c.data({contextMenu:n,contextMenuRoot:a,contextMenuKey:s}),"undefined"!=typeofi.accesskey)for(vard,m=t(i.accesskey),p=0;d=m[p];p++)if(!a.accesskeys[d]){a.accesskeys[d]=i;varx=i.name.match(newRegExp("^(.*?)("+d+")(.*)$","i"));x&&(i._beforeAccesskey=x[1],i._accesskey=x[2],i._afterAccesskey=x[3]);break}if(i.type&&u[i.type])u[i.type].call(c,i,n,a),e.each([n,a],function(t,a){a.commands[s]=i,!e.isFunction(i.callback)||void0!==a.callbacks[s]&&void0!==n.type||(a.callbacks[s]=i.callback)});else{switch("cm_seperator"===i.type?c.addClass("context-menu-separator "+a.classNames.notSelectable):"html"===i.type?c.addClass("context-menu-html "+a.classNames.notSelectable):i.type?(r=e("<label></label>").appendTo(c),o(i).appendTo(r),c.addClass("context-menu-input"),n.hasTypes=!0,e.each([n,a],function(e,t){t.commands[s]=i,t.inputs[s]=i})):i.items&&(i.type="sub"),i.type){case"cm_seperator":break;case"text":l=e('<input type="text" value="1" name="" value="">').attr("name","context-menu-input-"+s).val(i.value||"").appendTo(r);break;case"textarea":l=e('<textarea name=""></textarea>').attr("name","context-menu-input-"+s).val(i.value||"").appendTo(r),i.height&&l.height(i.height);break;case"checkbox":l=e('<input type="checkbox" value="1" name="" value="">').attr("name","context-menu-input-"+s).val(i.value||"").prop("checked",!!i.selected).prependTo(r);break;case"radio":l=e('<input type="radio" value="1" name="" value="">').attr("name","context-menu-input-"+i.radio).val(i.value||"").prop("checked",!!i.selected).prependTo(r);break;case"select":l=e('<select name="">').attr("name","context-menu-input-"+s).appendTo(r),i.options&&(e.each(i.options,function(t,n){e("<option></option>").val(t).text(n).appendTo(l)}),l.val(i.selected));break;case"sub":o(i).appendTo(c),i.appendTo=i.$node,h.create(i,a),c.data("contextMenu",i).addClass("context-menu-submenu"),i.callback=null;break;case"html":e(i.html).appendTo(c);break;default:e.each([n,a],function(t,a){a.commands[s]=i,!e.isFunction(i.callback)||void0!==a.callbacks[s]&&void0!==n.type||(a.callbacks[s]=i.callback)}),o(i).appendTo(c)}i.type&&"sub"!==i.type&&"html"!==i.type&&"cm_seperator"!==i.type&&(l.on("focus",f.focusInput).on("blur",f.blurInput),i.events&&l.on(i.events,n)),i.icon&&(e.isFunction(i.icon)?i._icon=i.icon.call(this,this,c,s,i):"string"==typeofi.icon&&"fa-"==i.icon.subsLine truncated
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]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);varn=this[e]|this[e+1]<<8;return32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);varn=this[e+1]|this[e]<<8;return32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){returnt||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){returnt||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){returnt||R(e,4,this.length),Z.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){returnt||R(e,4,this.length),Z.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){returnt||R(e,8,this.length),Z.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){returnt||R(e,8,this.length),Z.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){vari=Math.pow(2,8*n)-1;D(this,e,t,n,i,0)}varo=1,a=0;for(this[t]=255&e;++a<n&&(o*=256);)this[t+a]=e/o&255;returnt+n},a.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){vari=Math.pow(2,8*n)-1;D(this,e,t,n,i,0)}varo=n-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;returnt+n},a.prototype.writeUInt8=function(e,t,n){returne=+e,t=0|t,n||D(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){returne=+e,t=0|t,n||D(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):H(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){returne=+e,t=0|t,n||D(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):H(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){returne=+e,t=0|t,n||D(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):W(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){returne=+e,t=0|t,n||D(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):W(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){vari=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}varo=0,a=1,l=0;for(this[t]=255&e;++o<n&&(a*=256);)0>e&&0===l&&0!==this[t+o-1]&&(l=1),this[t+o]=(e/a>>0)-l&255;returnt+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){vari=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}varo=n-1,a=1,l=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)0>e&&0===l&&0!==this[t+o+1]&&(l=1),this[t+o]=(e/a>>0)-l&255;returnt+n},a.prototype.writeInt8=function(e,t,n){returne=+e,t=0|t,n||D(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){returne=+e,t=0|t,n||D(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):H(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){returne=+e,t=0|t,n||D(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):H(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){returne=+e,t=0|t,n||D(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):W(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){returne=+e,t=0|t,n||D(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):W(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return_(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return_(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){returnF(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){returnF(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&n>r&&(r=n),r===n)return0;if(0===e.length||0===this.length)return0;if(0>t)thrownewRangeError("targetStart out of bounds");if(0>n||n>=this.length)thrownewRangeError("sourceStart out of bounds");if(0>r)thrownewRangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);vari,o=r-n;if(this===e&&t>n&&r>t)for(i=o-1;i>=0;i--)e[i+t]=this[i+n];elseif(1e3>o||!a.TYPED_ARRAY_SUPPORT)for(i=0;o>i;i++)e[i+t]=this[i+n];elseUint8Array.prototype.set.call(e,this.subarray(n,n+o),t);returno},a.prototype.fill=function(e,t,n,r){if("string"==typeofe){if("string"==typeoft?(r=t,t=0,n=this.length):"string"==typeofn&&(r=n,n=this.length),1===e.length){vari=e.charCodeAt(0);256>i&&(e=i)}if(void0!==r&&"string"!=typeofr)thrownewTypeError("encoding must be a string");if("string"==typeofr&&!a.isEncoding(r))thLine truncated
e.remove(l.line+1,p);else{o(u,u.text.slice(0,l.ch)+c[0],i(0)),o(f,h+f.text.slice(s.ch),d);varm=a(1,c.length-1);p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,m)}Ci(e,"change",e,t)}function$r(e){this.lines=e,this.parent=null;for(vart=0,n=0;t<e.length;++t)e[t].parent=this,n+=e[t].height;this.height=n}functionVr(e){this.children=e;for(vart=0,n=0,r=0;r<e.length;++r){vari=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}functionKr(e,t,n){functionr(e,i,o){if(e.linked)for(vara=0;a<e.linked.length;++a){varl=e.linked[a];if(l.doc!=i){vars=o&&l.sharedHist;n&&!s||(t(l.doc,s),r(l.doc,e,s))}}}r(e,null,!0)}functionXr(e,t){if(t.cm)thrownewError("This document is already in use.");e.doc=t,t.cm=e,a(e),n(e),e.options.lineWrapping||h(e),e.options.mode=t.modeOption,Dt(e)}functionZr(e,t){if(t-=e.first,0>t||t>=e.size)thrownewError("There is no line "+(t+e.first)+" in the document.");for(varn=e;!n.lines;)for(varr=0;;++r){vari=n.children[r],o=i.chunkSize();if(o>t){n=i;break}t-=o}returnn.lines[t]}functionJr(e,t,n){varr=[],i=t.line;returne.iter(t.line,n.line+1,function(e){varo=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}functionQr(e,t,n){varr=[];returne.iter(t,n,function(e){r.push(e.text)}),r}functionei(e,t){varn=t-e.height;if(n)for(varr=e;r;r=r.parent)r.height+=n}functionti(e){if(null==e.parent)returnnull;for(vart=e.parent,n=Pi(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(vari=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();returnn+t.first}functionni(e,t){varn=e.first;e:do{for(varr=0;r<e.children.length;++r){vari=e.children[r],o=i.height;if(o>t){e=i;continuee}t-=o,n+=i.chunkSize()}returnn}while(!e.lines);for(varr=0;r<e.lines.length;++r){vara=e.lines[r],l=a.height;if(l>t)break;t-=l}returnn+r}functionri(e){e=yr(e);for(vart=0,n=e.parent,r=0;r<n.lines.length;++r){vari=n.lines[r];if(i==e)break;t+=i.height}for(varo=n.parent;o;n=o,o=n.parent)for(varr=0;r<o.children.length;++r){vara=o.children[r];if(a==n)break;t+=a.height}returnt}functionii(e){vart=e.order;returnnull==t&&(t=e.order=ll(e.text)),t}functionoi(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}functionai(e,t){varn={from:$(t.from),to:Qo(t),text:Jr(e,t.from,t.to)};returndi(e,n,t.from.line,t.to.line+1),Kr(e,function(e){di(e,n,t.from.line,t.to.line+1)},!0),n}functionli(e){for(;e.length;){vart=Ii(e);if(!t.ranges)break;e.pop()}}functionsi(e,t){returnt?(li(e.done),Ii(e.done)):e.done.length&&!Ii(e.done).ranges?Ii(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Ii(e.done)):void0}functionci(e,t,n,r){vari=e.history;i.undone.length=0;varo,a=+newDate;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=si(i,i.lastOp==r))){varl=Ii(o.changes);0==_o(t.from,t.to)&&0==_o(t.from,l.to)?l.to=Qo(t):o.changes.push(ai(e,t))}else{vars=Ii(i.done);for(s&&s.ranges||hi(e.sel,i.done),o={changes:[ai(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,l||Pa(e,"historyAdded")}functionui(e,t,n,r){vari=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&newDate-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}functionfi(e,t,n,r){vari=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ui(e,o,Ii(i.done),t))?i.done[i.done.length-1]=t:hi(t,i.done),i.lastSelTime=+newDate,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&li(i.undone)}functionhi(e,t){varn=Ii(t);n&&n.ranges&&n.equals(e)||t.push(e)}functiondi(e,t,n,r){vari=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}functionpi(e){if(!e)returnnull;for(vart,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);returnt?t.length?t:null:e}functionmi(e,t){varn=t["spans_"+e.id];if(!n)returnnull;for(varr=0,i=[];r<t.text.length;++r)i.push(pi(n[r]));returni}functiongi(e,t,n){for(varr=0,i=[];r<e.length;++r){varo=e[r];if(o.ranges)i.push(n?ue.prototype.deepCopy.call(o):o);else{vara=o.changes,l=[];i.push({changes:l});for(vars=0;s<a.length;++s){varc,u=a[s];if(l.push({from:u.from,to:u.to,text:u.text}),t)for(varfinu)(c=f.match(/^spans_(\d+)$/))&&Pi(t,Number(c[1]))>-1&&(Ii(l)[f]=u[f],deleteu[f])}}}returni}functionvi(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}functionyi(e,t,n,r){for(vari=0;i<e.length;++i){varo=e[i],a=!0;if(o.ranges){o.copLine truncated
if(-1!==e.indexOf(l[0])){vars=e.replace(l[0],l[1]);if(this.check(s))return[s]}}varc=this;returnc.alphabet="abcdefghijklmnopqrstuvwxyz",i(e)}},"undefined"!=typeoft&&(t.exports=i)}).call(this,e("buffer").Buffer,"/node_modules/typo-js")},{buffer:3,fs:2}],19:[function(e,t,n){varr=e("codemirror");r.commands.tabAndIndentMarkdownList=function(e){vart=e.listSelections(),n=t[0].head,r=e.getStateAfter(n.line),i=r.list!==!1;if(i)returnvoide.execCommand("indentMore");if(e.options.indentWithTabs)e.execCommand("insertTab");else{varo=Array(e.options.tabSize+1).join(" ");e.replaceSelection(o)}},r.commands.shiftTabAndUnindentMarkdownList=function(e){vart=e.listSelections(),n=t[0].head,r=e.getStateAfter(n.line),i=r.list!==!1;if(i)returnvoide.execCommand("indentLess");if(e.options.indentWithTabs)e.execCommand("insertTab");else{varo=Array(e.options.tabSize+1).join(" ");e.replaceSelection(o)}}},{codemirror:10}],20:[function(e,t,n){"use strict";functionr(e){returne=U?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}functioni(e,t,n){e=e||{};varr=document.createElement("a");returnt=void0==t||t,e.title&&t&&(r.title=a(e.title,e.action,n),U&&(r.title=r.title.replace("Ctrl","⌘"),r.title=r.title.replace("Alt","⌥"))),r.tabIndex=-1,r.className=e.className,r}functiono(){vare=document.createElement("i");returne.className="separator",e.innerHTML="|",e}functiona(e,t,n){vari,o=e;returnt&&(i=Y(t),n[i]&&(o+=" ("+r(n[i])+")")),o}functionl(e,t){t=t||e.getCursor("start");varn=e.getTokenAt(t);if(!n.type)return{};for(varr,i,o=n.type.split(" "),a={},l=0;l<o.length;l++)r=o[l],"strong"===r?a.bold=!0:"variable-2"===r?(i=e.getLine(t.line),/^\s*\d+\.\s/.test(i)?a["ordered-list"]=!0:a["unordered-list"]=!0):"atom"===r?a.quote=!0:"em"===r?a.italic=!0:"quote"===r?a.quote=!0:"strikethrough"===r?a.strikethrough=!0:"comment"===r?a.code=!0:"link"===r?a.link=!0:"tag"===r?a.image=!0:r.match(/^header(\-[1-6])?$/)&&(a[r.replace("header","heading")]=!0);returna}functions(e){vart=e.codemirror;t.setOption("fullScreen",!t.getOption("fullScreen")),t.getOption("fullScreen")?(V=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=V;varn=t.getWrapperElement();/fullscreen/.test(n.previousSibling.className)?n.previousSibling.className=n.previousSibling.className.replace(/\s*fullscreen\b/,""):n.previousSibling.className+=" fullscreen";varr=e.toolbarElements.fullscreen;/active/.test(r.className)?r.className=r.className.replace(/\s*active\s*/g,""):r.className+=" active";vari=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(i.className)&&N(e)}functionc(e){P(e,"bold",e.options.blockStyles.bold)}functionu(e){P(e,"italic",e.options.blockStyles.italic)}functionf(e){P(e,"strikethrough","~~")}functionh(e){functiont(e){if("object"!=typeofe)throw"fencing_line() takes a 'line' object (not a line number, or line text). Got: "+typeofe+": "+e;returne.styles&&e.styles[2]&&-1!==e.styles[2].indexOf("formatting-code-block")}functionn(e){returne.state.base.base||e.state.base}functionr(e,r,i,o,a){i=i||e.getLineHandle(r),o=o||e.getTokenAt({line:r,ch:1}),a=a||!!i.text&&e.getTokenAt({line:r,ch:i.text.length-1});varl=o.type?o.type.split(" "):[];returna&&n(a).indentedCode?"indented":-1!==l.indexOf("comment")&&(n(o).fencedChars||n(a).fencedChars||t(i)?"fenced":"single")}functioni(e,t,n,r){vari=t.line+1,o=n.line+1,a=t.line!==n.line,l=r+"\n",s="\n"+r;a&&o++,a&&0===n.ch&&(s=r+"\n",o--),E(e,!1,[l,s]),e.setSelection({line:i,ch:0},{line:o,ch:0})}varo,a,l,s=e.options.blockStyles.code,c=e.codemirror,u=c.getCursor("start"),f=c.getCursor("end"),h=c.getTokenAt({line:u.line,ch:u.ch||1}),d=c.getLineHandle(u.line),p=r(c,u.line,d,h);if("single"===p){varm=d.text.slice(0,u.ch).replace("`",""),g=d.text.slice(u.ch).replace("`","");c.replaceRange(m+g,{line:u.line,ch:0},{line:u.line,ch:99999999999999}),u.ch--,u!==f&&f.ch--,c.setSelection(u,f),c.focus()}elseif("fenced"===p)if(u.line!==f.line||u.ch!==f.ch){for(o=u.line;o>=0&&(d=c.getLineHandle(o),!t(d));o--);varv,y,x,b,w=c.getTokenAt({line:o,ch:1}),k=n(w).fencedChars;t(c.getLineHandle(u.line))?(v="",y=u.line):t(c.getLineHandle(u.line-1))?(v="",y=u.line-1):(v=k+"\n",y=u.line),t(c.getLineHandle(f.line))?(x="",b=f.line,0===f.ch&&(b+=1)):0!==f.ch&&t(c.getLineHandle(f.line+1))?(x="",b=f.line+1):(x=k+"\n",b=f.line+1),0===f.ch&&(b-=1),c.operation(function(){c.replaceRange(x,{line:b,ch:0},{line:b+(x?0:1),ch:0}),c.replaceRange(v,{line:y,ch:0},{line:y+(v?0:1),ch:0})}),c.setSelection({line:y+(v?1:0),ch:0},{line:b+(v?1:-1),ch:0}),c.focus()}else{varS=u.line;if(t(c.getLineHandle(u.line))&&("fenced"===r(c,u.line+1)?(o=u.line,S=u.line+1):(a=u.line,S=u.line-1)),void0===o)for(o=S;o>=0&&(d=c.getLineHandle(o),!t(d));o--);if(void0===a)for(l=c.lineCount(),a=S;l>a&&(d=c.getLineHandle(a),!t(d));a++);c.operation(function(){c.replaceRange("",{line:o,ch:0},{line:o+1,ch:0}),c.replaceRange("",{line:a-1,ch:0},{line:a,ch:0})}),c.focus()}elseif("indented"===p){if(u.line!==f.line||u.ch!Line truncated
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.bind called on incompatible "+n);vari=u.call(arguments,1),s=function(){if(thisinstanceofs){vare=n.apply(this,i.concat(u.call(arguments)));returnObject(e)===e?e:this}returnn.apply(t,i.concat(u.call(arguments)))};returnn.prototype&&(r.prototype=n.prototype,s.prototype=newr,r.prototype=null),s});varl,c,h,p,d,i=Function.prototype.call,s=Array.prototype,o=Object.prototype,u=s.slice,a=i.bind(o.toString),f=i.bind(o.hasOwnProperty);if((d=f(o,"__defineGetter__"))&&(l=i.bind(o.__defineGetter__),c=i.bind(o.__defineSetter__),h=i.bind(o.__lookupGetter__),p=i.bind(o.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){functione(e){vart=newArray(e+2);returnt[0]=t[1]=0,t}varn,t=[];if(t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length,n+1==t.length)return!0}()){varv=Array.prototype.splice;Array.prototype.splice=function(e,t){returnarguments.length?v.apply(this,[void0===e?0:e,void0===t?this.length-e:t].concat(u.call(arguments,2))):[]}}elseArray.prototype.splice=function(e,t){varn=this.length;e>0?e>n&&(e=n):void0==e?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);varr=this.slice(e,e+t),i=u.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{varo=Math.min(t,n-e),a=e+o,f=a+s-o,l=n-a,c=n-o;if(f<a)for(varh=0;h<l;++h)this[f+h]=this[a+h];elseif(f>a)for(h=l;h--;)this[f+h]=this[a+h];if(s&&e===c)this.length=c,this.push.apply(this,i);elsefor(this.length=c+s,h=0;h<s;++h)this[e+h]=i[h]}returnr};Array.isArray||(Array.isArray=function(t){return"[object Array]"==a(t)});varm=Object("a"),g="a"!=m[0]||!(0inm);if(Array.prototype.forEach||(Array.prototype.forEach=function(t){varn=F(this),r=g&&"[object String]"==a(this)?this.split(""):n,i=arguments[1],s=-1,o=r.length>>>0;if("[object Function]"!=a(t))thrownewTypeError;for(;++s<o;)sinr&&t.call(i,r[s],s,n)}),Array.prototype.map||(Array.prototype.map=function(t){varn=F(this),r=g&&"[object String]"==a(this)?this.split(""):n,i=r.length>>>0,s=Array(i),o=arguments[1];if("[object Function]"!=a(t))thrownewTypeError(t+" is not a function");for(varu=0;u<i;u++)uinr&&(s[u]=t.call(o,r[u],u,n));returns}),Array.prototype.filter||(Array.prototype.filter=function(t){varo,n=F(this),r=g&&"[object String]"==a(this)?this.split(""):n,i=r.length>>>0,s=[],u=arguments[1];if("[object Function]"!=a(t))thrownewTypeError(t+" is not a function");for(varf=0;f<i;f++)finr&&(o=r[f],t.call(u,o,f,n)&&s.push(o));returns}),Array.prototype.every||(Array.prototype.every=function(t){varn=F(this),r=g&&"[object String]"==a(this)?this.split(""):n,i=r.length>>>0,s=arguments[1];if("[object Function]"!=a(t))thrownewTypeError(t+" is not a function");for(varo=0;o<i;o++)if(oinr&&!t.call(s,r[o],o,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){varn=F(this),r=g&&"[object String]"==a(this)?this.split(""):n,i=r.length>>>0,s=arguments[1];if("[object Function]"!=a(t))thrownewTypeError(t+" is not a function");for(varo=0;o<i;o++)if(oinr&&t.call(s,r[o],o,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){varn=F(this),r=g&&"[object String]"==a(this)?this.split(""):n,i=r.length>>>0;if("[object Function]"!=a(t))thrownewTypeError(t+" is not a function");if(!i&&1==arguments.length)thrownewTypeError("reduce of empty array with no initial value");varo,s=0;if(arguments.length>=2)o=arguments[1];elsefor(;;){if(sinr){o=r[s++];break}if(++s>=i)thrownewTypeError("reduce of empty array with no initial value")}for(;s<i;s++)sinr&&(o=t.call(void0,o,r[s],s,n));returno}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){varn=F(this),r=g&&"[object String]"==a(this)?this.split(""):n,i=r.length>>>0;if("[object Function]"!=a(t))thrownewTypeError(t+" is not a function");if(!i&&1==arguments.length)thrownewTypeError("reduceRight of empty array with no initial value");vars,o=i-1;if(arguments.length>=2)s=arguments[1];elsefor(;;){if(oinr){s=r[o--];break}if(--o<0)thrownewTypeError("reduceRight of empty array with no initial value")}doointhis&&(s=t.call(void0,s,r[o],o,n));while(o--);returns}),Array.prototype.indexOf&&[0,1].indexOf(1,2)==-1||(Array.prototype.indexOf=function(t){varn=g&&"[object String]"==a(this)?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;vari=0;for(arguments.length>1&&(i=H(arguments[1])),i=i>=0?i:Math.max(0,r+i);i<r;i++)if(iinn&&n[i]===t)returni;return-1}),Array.prototype.lastIndexOf&&[0,1].lastIndexOf(0,-3)==-1||(Array.prototype.lastIndexOf=function(t){varn=g&&"[object String]"==a(this)?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;vari=r-1;for(arguments.length>1&&(i=Math.min(iLine truncated
for(varn=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length),o=t||0;o<s;++o)i+=n[o].length+r;returni+e.column}}).call(a.prototype),t.Document=a}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";varr=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;varn=this;this.$worker=function(){if(n.running){for(vare=newDate,t=n.currentLine,r=-1,i=n.doc,s=t;n.lines[t];)t++;varo=i.getLength(),u=0;for(n.running=!1;t<o;){n.$tokenizeRow(t),r=t;dot++;while(n.lines[t]);if(u++,u%5===0&&newDate-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,s<=r&&n.fireUpdateEvent(s,r)}}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){varn={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){vart=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;elseif("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{varr=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){returnthis.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){returnthis.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){vart=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);returnthis.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(s.prototype),t.BackgroundTokenizer=s}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";varr=e("./lib/lang"),s=(e("./lib/oop"),e("./range").Range),o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,i){if(this.regExp)for(varo=i.firstRow,u=i.lastRow,a=o;a<=u;a++){varf=this.cache[a];null==f&&(f=r.getMatchOffsets(n.getLine(a),this.regExp),f.length>this.MAX_RANGES&&(f=f.slice(0,this.MAX_RANGES)),f=f.map(function(e){returnnews(a,e.offset,a,e.offset+e.length)}),this.cache[a]=f.length?f:"");for(varl=f.length;l--;)t.drawSingleLineMarker(e,f[l].toScreenRange(n),this.clazz,i)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";functioni(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];varn=t[t.length-1];this.range=newr(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}varr=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)thrownewError("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}elseif(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)thrownewError("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){returne>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){vars,o,u,r=0,i=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(varf=0;f<i.length;f++){if(s=i[f],o=s.range.compareStart(t,n),o==-1)returnvoide(null,t,n,r,a);if(u=e(null,s.start.row,s.start.column,r,a),u=!u&&e(s.placeholder,s.start.row,s.start.cLine truncated
},this.onReloadTokenizer=function(e){vart=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeofe){if(e.getTokenizer)returnthis.$onChangeMode(e);varn=e,r=n.path}elser=e||"ace/mode/text";returnthis.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=newa),this.$modes[r]&&!n?(this.$onChangeMode(this.$modes[r]),void(t&&t())):(this.$modeId=r,s.loadModule(["mode",r],function(e){returnthis.$modeId!==r?t&&t():(this.$modes[r]&&!n?this.$onChangeMode(this.$modes[r]):e&&e.Mode&&(e=newe.Mode(n),n||(this.$modes[r]=e,e.$id=r),this.$onChangeMode(e)),void(t&&t()))}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0),void0)},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();varn=e.getTokenizer();if(void0!==n.addEventListener){varr=this.onReloadTokenizer.bind(this);n.addEventListener("update",r)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(n);else{this.bgTokenizer=newc(n);vari=this;this.bgTokenizer.addEventListener("update",function(e){i._signal("tokenizerUpdate",e)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){s.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){returnthis.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){returnthis.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){returnthis.$scrollLeft},this.getScreenWidth=function(){returnthis.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)returnthis.lineWidgetsWidth;vare=0;returnthis.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)returnthis.screenWidth=this.$wrapLimit;for(vart=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,s=this.$foldData[i],o=s?s.start.row:1/0,u=t.length,a=0;a<u;a++){if(a>o){if(a=s.end.row+1,a>=u)break;s=this.$foldData[i++],o=s?s.start.row:1/0}null==n[a]&&(n[a]=this.$getStringScreenWidth(t[a])[0]),n[a]>r&&(r=n[a])}this.screenWidth=r}},this.getLine=function(e){returnthis.doc.getLine(e)},this.getLines=function(e,t){returnthis.doc.getLines(e,t)},this.getLength=function(){returnthis.doc.getLength()},this.getTextRange=function(e){returnthis.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){returnthis.doc.insert(e,t)},this.remove=function(e){returnthis.doc.remove(e)},this.removeFullLines=function(e,t){returnthis.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(varn=null,r=e.length-1;r!=-1;r--){vari=e[r];"doc"==i.group?(this.doc.revertDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!0,n)):i.deltas.forEach(function(e){this.addFolds(e.folds)},this)}returnthis.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(varn=null,r=0;r<e.length;r++){vari=e[r];"doc"==i.group&&(this.doc.applyDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!1,n))}returnthis.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,n){functionr(e){returnt?"insert"!==e.action:"insert"===e.action}vars,o,i=e[0],u=!1;r(i)?(s=f.fromPoints(i.start,i.end),u=!0):(s=f.fromPoints(i.start,i.start),u=!1);for(vara=1;a<e.length;a++)i=e[a],r(i)?(o=i.start,s.compare(o.row,o.column)==-1&&s.setStart(o),o=i.end,1==s.compare(o.row,o.column)&&s.setEnd(o),u=!0):(o=i.start,s.compare(o.row,o.column)==-1&&(s=f.fromPoints(i.start,i.start)),u=!1);if(null!=n){0===f.comparePoints(n.start,s.start)&&(n.start.column+=s.end.column-s.start.column,n.end.column+=s.end.column-s.start.column);varl=n.compareRange(s);1==l?s.setStart(n.start):l==-1&&s.setEnd(n.end)}returns},this.replace=function(e,t){returnthis.doc.replace(e,t)},this.moveText=function(e,t,n){varr=this.getTextRange(e),i=this.getFoldsInRange(e),s=f.fromPoints(t,t);if(!n){this.remove(e);varo=e.start.row-e.end.row,u=o?-e.end.column:e.start.column-e.end.column;Line truncated
vare=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";varr={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-bLine truncated
vari={iec:"_Ki_Mi_Gi_Ti_Pi_Ei_Zi_Yi",si:"_K_M_G_T_P_E_Z_Y"};returnfunction(e,_,o){e=Math.abs(e),_||0===_||(_=1);vart="si"==o?1e3:1024,n=0;for(i[o]||(o="si");e>=t;)e/=t,++n;returne.toFixed(_)+" "+i[o].split("_")[n]+"b"}}),function(){functiont(t,n){returnt.set(n[0],n[1]),t}functionn(t,n){returnt.add(n),t}functionr(t,n,r){switch(r.length){case0:returnt.call(n);case1:returnt.call(n,r[0]);case2:returnt.call(n,r[0],r[1]);case3:returnt.call(n,r[0],r[1],r[2])}returnt.apply(n,r)}functione(t,n,r,e){for(varu=-1,i=t?t.length:0;++u<i;){varo=t[u];n(e,o,r(o),t)}returne}functionu(t,n){for(varr=-1,e=t?t.length:0;++r<e&&!1!==n(t[r],r,t););returnt}functioni(t,n){for(varr=t?t.length:0;r--&&!1!==n(t[r],r,t););returnt}functiono(t,n){for(varr=-1,e=t?t.length:0;++r<e;)if(!n(t[r],r,t))return!1;return!0}functionf(t,n){for(varr=-1,e=t?t.length:0,u=0,i=[];++r<e;){varo=t[r];n(o,r,t)&&(i[u++]=o)}returni}functionc(t,n){return!(!t||!t.length)&&-1<d(t,n,0)}functiona(t,n,r){for(vare=-1,u=t?t.length:0;++e<u;)if(r(n,t[e]))return!0;return!1}functionl(t,n){for(varr=-1,e=t?t.length:0,u=Array(e);++r<e;)u[r]=n(t[r],r,t);returnu}functions(t,n){for(varr=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];returnt}functionh(t,n,r,e){varu=-1,i=t?t.length:0;for(e&&i&&(r=t[++u]);++u<i;)r=n(r,t[u],u,t);returnr}functionp(t,n,r,e){varu=t?t.length:0;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);returnr}function_(t,n){for(varr=-1,e=t?t.length:0;++r<e;)if(n(t[r],r,t))return!0;return!1}functionv(t,n,r){vare;returnr(t,function(t,r,u){if(n(t,r,u))returne=r,!1}),e}functiong(t,n,r,e){varu=t.length;for(r+=e?1:-1;e?r--:++r<u;)if(n(t[r],r,t))returnr;return-1}functiond(t,n,r){if(n===n)t:{--r;for(vare=t.length;++r<e;)if(t[r]===n){t=r;breakt}t=-1}elset=g(t,b,r);returnt}functiony(t,n,r,e){--r;for(varu=t.length;++r<u;)if(e(t[r],n))returnr;return-1}functionb(t){returnt!==t}functionx(t,n){varr=t?t.length:0;returnr?k(t,n)/r:P}functionj(t){returnfunction(n){returnnull==n?F:n[t]}}functionw(t){returnfunction(n){returnnull==t?F:t[n]}}functionm(t,n,r,e,u){returnu(t,function(t,u,i){r=e?(e=!1,t):n(r,t,u,i)}),r}functionA(t,n){varr=t.length;for(t.sort(n);r--;)t[r]=t[r].c;returnt}functionk(t,n){for(varr,e=-1,u=t.length;++e<u;){vari=n(t[e]);i!==F&&(r=r===F?i:r+i)}returnr}functionE(t,n){for(varr=-1,e=Array(t);++r<t;)e[r]=n(r);returne}functionO(t,n){returnl(n,function(n){return[n,t[n]]})}functionS(t){returnfunction(n){returnt(n)}}functionI(t,n){returnl(n,function(n){returnt[n]})}functionR(t,n){returnt.has(n)}functionz(t,n){for(varr=-1,e=t.length;++r<e&&-1<d(n,t[r],0););returnr}functionW(t,n){for(varr=t.length;r--&&-1<d(n,t[r],0););returnr}functionB(t){return"\\"+Dt[t]}functionL(t){varn=-1,r=Array(t.size);returnt.forEach(function(t,e){r[++n]=[e,t]}),r}functionU(t,n){returnfunction(r){returnt(n(r))}}functionC(t,n){for(varr=-1,e=t.length,u=0,i=[];++r<e;){varo=t[r];o!==n&&"__lodash_placeholder__"!==o||(t[r]="__lodash_placeholder__",i[u++]=r)}returni}functionM(t){varn=-1,r=Array(t.size);returnt.forEach(function(t){r[++n]=t}),r}functionD(t){varn=-1,r=Array(t.size);returnt.forEach(function(t){r[++n]=[t,t]}),r}functionT(t){if(Wt.test(t)){for(varn=Rt.lastIndex=0;Rt.test(t);)++n;t=n}elset=tn(t);returnt}function$(t){returnWt.test(t)?t.match(Rt)||[]:t.split("")}varF,N=1/0,P=NaN,Z=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],q=/\b__p\+='';/g,V=/\b(__p\+=)''\+/g,K=/(__e\(.*?\)|\b__t\))\+'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,J=/[&<>"']/g,Y=RegExp(G.source),H=RegExp(J.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,nt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rt=/^\w*$/,et=/^\./,ut=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(it.source),ft=/^\s+|\s+$/g,ct=/^\s+/,at=/\s+$/,lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,ht=/,? & /,pt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_t=/\\(\\)?/g,vt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gt=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,xt=/^0o[0-7]+$/i,jt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mt=/($^)/,At=/['\n\r\u2028\u2029\\]/g,kt="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",Et="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+kt,Ot="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",St=RegExp("['’]","g"),It=RegLine truncated
return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!yu(t))||rt.test(t)||!nt.test(t)||null!=n&&tinGu(n)}functionAe(t){varn=le(t),r=Ot[n];return"function"==typeofr&&ninDt.prototype&&(t===r||(n=co(r),!!n&&t===n[0]))}functionke(t){varn=t&&t.constructor;returnt===("function"==typeofn&&n.prototype||Xu)}functionEe(t,n){returnfunction(r){returnnull!=r&&r[t]===n&&(n!==F||tinGu(r))}}functionOe(t,n,r,e,u,i){returnpu(t)&&pu(n)&&(i.set(n,t),tr(t,n,F,Oe,i),i.delete(n)),t}functionSe(t,n,e){returnn=Ri(n===F?t.length-1:n,0),function(){for(varu=arguments,i=-1,o=Ri(u.length-n,0),f=Pu(o);++i<o;)f[i]=u[n+i];for(i=-1,o=Pu(n+1);++i<n;)o[i]=u[i];returno[n]=e(f),r(t,this,o)}}functionIe(t,n){return1==n.length?t:Rn(t,vr(n,0,-1))}functionRe(t,n,r){vare=n+"";n=_o;varu,i=Ue;returnu=(u=e.match(st))?u[1].split(ht):[],r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],r=r.join(2<i?", ":" "),e=e.replace(lt,"{\n/* [wrapped with "+r+"] */\n")),n(t,e)}functionze(t){varn=0,r=0;returnfunction(){vare=Wi(),u=16-(e-r);if(r=e,0<u){if(500<=++n)returnarguments[0]}elsen=0;returnt.apply(F,arguments)}}functionWe(t,n){varr=-1,e=t.length,u=e-1;for(n=n===F?e:dn(n,0,e);++r<n;){vare=cr(r,u),i=t[e];t[e]=t[r],t[r]=i}returnt.length=n,t}functionBe(t){if("string"==typeoft||yu(t))returnt;varn=t+"";return"0"==n&&1/t==-N?"-0":n}functionLe(t){if(null!=t){try{returnri.call(t)}catch(t){}returnt+""}return""}functionUe(t,n){returnu(Z,function(r){vare="_."+r[0];n&r[1]&&!c(t,e)&&t.push(e)}),t.sort()}functionCe(t){if(tinstanceofDt)returnt.clone();varn=newMt(t.__wrapped__,t.__chain__);returnn.__actions__=Ur(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}functionMe(t,n,r){vare=t?t.length:0;returne?(r=null==r?0:ju(r),0>r&&(r=Ri(e+r,0)),g(t,he(n,3),r)):-1}functionDe(t,n,r){vare=t?t.length:0;if(!e)return-1;varu=e-1;returnr!==F&&(u=ju(r),u=0>r?Ri(e+u,0):zi(u,e-1)),g(t,he(n,3),u,!0)}functionTe(t){returnt&&t.length?En(t,1):[]}function$e(t){returnt&&t.length?t[0]:F}functionFe(t){varn=t?t.length:0;returnn?t[n-1]:F}functionNe(t,n){returnt&&t.length&&n&&n.length?or(t,n):t}functionPe(t){returnt?Ui.call(t):t}functionZe(t){if(!t||!t.length)return[];varn=0;returnt=f(t,function(t){if(cu(t))returnn=Ri(t.length,n),!0}),E(n,function(n){returnl(t,j(n))})}functionqe(t,n){if(!t||!t.length)return[];vare=Ze(t);returnnull==n?e:l(e,function(t){returnr(n,F,t)})}functionVe(t){returnt=Ot(t),t.__chain__=!0,t}functionKe(t,n){returnn(t)}functionGe(){returnthis}functionJe(t,n){return(tf(t)?u:to)(t,he(n,3))}functionYe(t,n){return(tf(t)?i:no)(t,he(n,3))}functionHe(t,n){return(tf(t)?l:Hn)(t,he(n,3))}functionQe(t,n,r){returnn=r?F:n,n=t&&null==n?t.length:n,oe(t,128,F,F,F,F,n)}functionXe(t,n){varr;if("function"!=typeofn)thrownewHu("Expected a function");returnt=ju(t),function(){return0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=F),r}}functiontu(t,n,r){returnn=r?F:n,t=oe(t,8,F,F,F,F,F,n),t.placeholder=tu.placeholder,t}functionnu(t,n,r){returnn=r?F:n,t=oe(t,16,F,F,F,F,F,n),t.placeholder=nu.placeholder,t}functionru(t,n,r){functione(n){varr=c,e=a;returnc=a=F,_=n,s=t.apply(e,r)}functionu(t){varr=t-p;returnt-=_,p===F||r>=n||0>r||g&&t>=l}functioni(){vart=Po();if(u(t))returno(t);varr,e=po;r=t-_,t=n-(t-p),r=g?zi(t,l-r):t,h=e(i,r)}functiono(t){returnh=F,d&&c?e(t):(c=a=F,s)}functionf(){vart=Po(),r=u(t);if(c=arguments,a=this,p=t,r){if(h===F)return_=t=p,h=po(i,n),v?e(t):s;if(g)returnh=po(i,n),e(p)}returnh===F&&(h=po(i,n)),s}varc,a,l,s,h,p,_=0,v=!1,g=!1,d=!0;if("function"!=typeoft)thrownewHu("Expected a function");returnn=mu(n)||0,pu(r)&&(v=!!r.leading,l=(g="maxWait"inr)?Ri(mu(r.maxWait)||0,n):l,d="trailing"inr?!!r.trailing:d),f.cancel=function(){h!==F&&oo(h),_=0,c=p=a=h=F},f.flush=function(){returnh===F?s:o(Po())},f}functioneu(t,n){functionr(){vare=arguments,u=n?n.apply(this,e):e[0],i=r.cache;returni.has(u)?i.get(u):(e=t.apply(this,e),r.cache=i.set(u,e)||i,e)}if("function"!=typeoft||n&&"function"!=typeofn)thrownewHu("Expected a function");returnr.cache=new(eu.Cache||Zt),r}functionuu(t){if("function"!=typeoft)thrownewHu("Expected a function");returnfunction(){varn=arguments;switch(n.length){case0:return!t.call(this);case1:return!t.call(this,n[0]);case2:return!t.call(this,n[0],n[1]);case3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}functioniu(t,n){returnt===n||t!==t&&n!==n}functionou(t){returncu(t)&&ei.call(t,"callee")&&(!di.call(t,"callee")||"[object Arguments]"==oi.call(t))}functionfu(t){returnnull!=t&&hu(t.length)&&!lu(t)}functioncu(t){return_u(t)&&fu(t)}functionau(t){return!!_u(t)&&("[object Error]"==oi.call(t)||"string"==typeoft.message&&"string"==typeoft.name)}functionlu(t){returnt=pu(t)?oi.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}functionsu(t){return"number"==typeoft&&t==ju(t)}functionhu(t){return"number"==typeoft&&-1<t&&0==t%1&&9007199254740991>=t}functionpu(t){varn=typeoft;returnnullLine 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
self.onError(xhr.status)},0))},debug("xhr data %s",this.data),xhr.send(this.data)}catch(e){returnvoidsetTimeout(function(){self.onError(e)},0)}global.document&&(this.index=Request.requestsCount++,Request.requests[this.index]=this)},Request.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},Request.prototype.onData=function(data){this.emit("data",data),this.onSuccess()},Request.prototype.onError=function(err){this.emit("error",err),this.cleanup(!0)},Request.prototype.cleanup=function(fromError){if("undefined"!=typeofthis.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=empty:this.xhr.onreadystatechange=empty,fromError)try{this.xhr.abort()}catch(e){}global.document&&deleteRequest.requests[this.index],this.xhr=null}},Request.prototype.onLoad=function(){vardata;try{varcontentType;try{contentType=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(e){}if("application/octet-stream"===contentType)data=this.xhr.response;elseif(this.supportsBinary)try{data=String.fromCharCode.apply(null,newUint8Array(this.xhr.response))}catch(e){for(varui8Arr=newUint8Array(this.xhr.response),dataArray=[],idx=0,length=ui8Arr.length;idx<length;idx++)dataArray.push(ui8Arr[idx]);data=String.fromCharCode.apply(null,dataArray)}elsedata=this.xhr.responseText}catch(e){this.onError(e)}null!=data&&this.onData(data)},Request.prototype.hasXDR=function(){return"undefined"!=typeofglobal.XDomainRequest&&!this.xs&&this.enablesXDR},Request.prototype.abort=function(){this.cleanup()},global.document&&(Request.requestsCount=0,Request.requests={},global.attachEvent?global.attachEvent("onunload",unloadHandler):global.addEventListener&&global.addEventListener("beforeunload",unloadHandler,!1))}).call(exports,function(){returnthis}())},function(module,exports,__webpack_require__){functionPolling(opts){varforceBase64=opts&&opts.forceBase64;hasXHR2&&!forceBase64||(this.supportsBinary=!1),Transport.call(this,opts)}varTransport=__webpack_require__(23),parseqs=__webpack_require__(34),parser=__webpack_require__(24),inherit=__webpack_require__(35),yeast=__webpack_require__(36),debug=__webpack_require__(3)("engine.io-client:polling");module.exports=Polling;varhasXHR2=function(){varXMLHttpRequest=__webpack_require__(19),xhr=newXMLHttpRequest({xdomain:!1});returnnull!=xhr.responseType}();inherit(Polling,Transport),Polling.prototype.name="polling",Polling.prototype.doOpen=function(){this.poll()},Polling.prototype.pause=function(onPause){functionpause(){debug("paused"),self.readyState="paused",onPause()}varself=this;if(this.readyState="pausing",this.polling||!this.writable){vartotal=0;this.polling&&(debug("we are currently polling - waiting to pause"),total++,this.once("pollComplete",function(){debug("pre-pause polling complete"),--total||pause()})),this.writable||(debug("we are currently writing - waiting to pause"),total++,this.once("drain",function(){debug("pre-pause writing complete"),--total||pause()}))}elsepause()},Polling.prototype.poll=function(){debug("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},Polling.prototype.onData=function(data){varself=this;debug("polling got data %s",data);varcallback=function(packet,index,total){return"opening"==self.readyState&&self.onOpen(),"close"==packet.type?(self.onClose(),!1):voidself.onPacket(packet)};parser.decodePayload(data,this.socket.binaryType,callback),"closed"!=this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"==this.readyState?this.poll():debug('ignoring poll - transport state "%s"',this.readyState))},Polling.prototype.doClose=function(){functionclose(){debug("writing close packet"),self.write([{type:"close"}])}varself=this;"open"==this.readyState?(debug("transport open - closing"),close()):(debug("transport not open - deferring close"),this.once("open",close))},Polling.prototype.write=function(packets){varself=this;this.writable=!1;varcallbackfn=function(){self.writable=!0,self.emit("drain")},self=this;parser.encodePayload(packets,this.supportsBinary,function(data){self.doWrite(data,callbackfn)})},Polling.prototype.uri=function(){varquery=this.query||{},schema=this.secure?"https":"http",port="";!1!==this.timestampRequests&&(query[this.timestampParam]=yeast()),this.supportsBinary||query.sid||(query.b64=1),query=parseqs.encode(query),this.port&&("https"==schema&&443!=this.port||"http"==schema&&80!=this.port)&&(port=":"+this.port),query.length&&(query="?"+query);varipv6=this.hostname.indexOf(":")!==-1;returnschema+"://"+(ipv6?"["+this.hostname+"]":this.hostname)+port+this.path+query}},function(module,exports,__webpack_require__){functionTransport(opts){this.path=opts.path,this.hostname=opts.hostname,this.port=opts.port,this.secure=opts.secure,this.query=opts.query,this.timestampParam=opts.timestampParam,this.timestampRequests=opts.timestampRequests,this.readyState="",this.agent=opts.agent||!1,this.socket=opts.socket,this.enablesXDR=opts.enablesXDR,this.pfx=opts.pfx,this.key=opts.key,this.passphrase=opts.Line truncated
global.JSON&&JSON.parse?JSON.parse(data):rvalidchars.test(data.replace(rvalidescape,"@").replace(rvalidtokens,"]").replace(rvalidbraces,""))?newFunction("return "+data)():void0):null}}).call(exports,function(){returnthis}())},function(module,exports,__webpack_require__){"use strict";functionSocket(io,nsp,opts){this.io=io,this.nsp=nsp,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,opts&&opts.query&&(this.query=opts.query),this.io.autoConnect&&this.open()}varparser=__webpack_require__(6),Emitter=__webpack_require__(43),toArray=__webpack_require__(44),on=__webpack_require__(45),bind=__webpack_require__(46),debug=__webpack_require__(3)("socket.io-client:socket"),hasBin=__webpack_require__(47);module.exports=exports=Socket;varevents={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},emit=Emitter.prototype.emit;Emitter(Socket.prototype),Socket.prototype.subEvents=function(){if(!this.subs){vario=this.io;this.subs=[on(io,"open",bind(this,"onopen")),on(io,"packet",bind(this,"onpacket")),on(io,"close",bind(this,"onclose"))]}},Socket.prototype.open=Socket.prototype.connect=function(){returnthis.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},Socket.prototype.send=function(){varargs=toArray(arguments);returnargs.unshift("message"),this.emit.apply(this,args),this},Socket.prototype.emit=function(ev){if(events.hasOwnProperty(ev))returnemit.apply(this,arguments),this;varargs=toArray(arguments),parserType=parser.EVENT;hasBin(args)&&(parserType=parser.BINARY_EVENT);varpacket={type:parserType,data:args};returnpacket.options={},packet.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeofargs[args.length-1]&&(debug("emitting packet with ack id %d",this.ids),this.acks[this.ids]=args.pop(),packet.id=this.ids++),this.connected?this.packet(packet):this.sendBuffer.push(packet),deletethis.flags,this},Socket.prototype.packet=function(packet){packet.nsp=this.nsp,this.io.packet(packet)},Socket.prototype.onopen=function(){debug("transport is open - connecting"),"/"!==this.nsp&&(this.query?this.packet({type:parser.CONNECT,query:this.query}):this.packet({type:parser.CONNECT}))},Socket.prototype.onclose=function(reason){debug("close (%s)",reason),this.connected=!1,this.disconnected=!0,deletethis.id,this.emit("disconnect",reason)},Socket.prototype.onpacket=function(packet){if(packet.nsp===this.nsp)switch(packet.type){caseparser.CONNECT:this.onconnect();break;caseparser.EVENT:this.onevent(packet);break;caseparser.BINARY_EVENT:this.onevent(packet);break;caseparser.ACK:this.onack(packet);break;caseparser.BINARY_ACK:this.onack(packet);break;caseparser.DISCONNECT:this.ondisconnect();break;caseparser.ERROR:this.emit("error",packet.data)}},Socket.prototype.onevent=function(packet){varargs=packet.data||[];debug("emitting event %j",args),null!=packet.id&&(debug("attaching ack callback to event"),args.push(this.ack(packet.id))),this.connected?emit.apply(this,args):this.receiveBuffer.push(args)},Socket.prototype.ack=function(id){varself=this,sent=!1;returnfunction(){if(!sent){sent=!0;varargs=toArray(arguments);debug("sending ack %j",args);vartype=hasBin(args)?parser.BINARY_ACK:parser.ACK;self.packet({type:type,id:id,data:args})}}},Socket.prototype.onack=function(packet){varack=this.acks[packet.id];"function"==typeofack?(debug("calling ack %s with %j",packet.id,packet.data),ack.apply(this,packet.data),deletethis.acks[packet.id]):debug("bad ack %s",packet.id)},Socket.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},Socket.prototype.emitBuffered=function(){vari;for(i=0;i<this.receiveBuffer.length;i++)emit.apply(this,this.receiveBuffer[i]);for(this.receiveBuffer=[],i=0;i<this.sendBuffer.length;i++)this.packet(this.sendBuffer[i]);this.sendBuffer=[]},Socket.prototype.ondisconnect=function(){debug("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},Socket.prototype.destroy=function(){if(this.subs){for(vari=0;i<this.subs.length;i++)this.subs[i].destroy();this.subs=null}this.io.destroy(this)},Socket.prototype.close=Socket.prototype.disconnect=function(){returnthis.connected&&(debug("performing disconnect (%s)",this.nsp),this.packet({type:parser.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},Socket.prototype.compress=function(compress){returnthis.flags=this.flags||{},this.flags.compress=compress,this}},function(module,exports){functionEmitter(obj){if(obj)returnmixin(obj)}functionmixin(obj){for(varkeyinEmitter.prototype)obj[key]=Emitter.prototype[key];returnobj}module.exports=Emitter,Emitter.prototype.on=Emitter.prototype.addEventListener=function(event,fn){returnthis._callbacks=this._callbacksLine truncated
this}}),a.smoothScroll=function(b,d){if("options"===b&&"object"==typeofd)returna.extend(c,d);vare,f,g,h,i,j=0,k="offset",l="scrollTop",m={},n={};"number"==typeofb?(e=a.extend({link:null},a.fn.smoothScroll.defaults,c),g=b):(e=a.extend({link:null},a.fn.smoothScroll.defaults,b||{},c),e.scrollElement&&(k="position","static"===e.scrollElement.css("position")&&e.scrollElement.css("position","relative"))),l="left"===e.direction?"scrollLeft":l,e.scrollElement?(f=e.scrollElement,/^(?:HTML|BODY)$/.test(f[0].nodeName)||(j=f[l]())):f=a("html, body").firstScrollable(e.direction),e.beforeScroll.call(f,e),g="number"==typeofb?b:d||a(e.scrollTarget)[k]()&&a(e.scrollTarget)[k]()[e.direction]||0,m[l]=g+j+e.offset,h=e.speed,"auto"===h&&(i=Math.abs(m[l]-f[l]()),h=i/e.autoCoefficient),n={duration:h,easing:e.easing,complete:function(){e.afterScroll.call(e.link,e)}},e.step&&(n.step=e.step),f.length?f.stop().animate(m,n):e.afterScroll.call(e.link,e)},a.smoothScroll.version=b,a.smoothScroll.filterPath=function(a){returna=a||"",a.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},a.fn.smoothScroll.defaults=d}),simpleUpload.maxUploads=10,simpleUpload.activeUploads=0,simpleUpload.uploads=[],simpleUpload.iframes={},simpleUpload.iframeCount=0,simpleUpload.queueUpload=function(e,l){simpleUpload.uploads[simpleUpload.uploads.length]={uploads:e,callback:l}},simpleUpload.uploadNext=function(){if(simpleUpload.uploads.length>0&&simpleUpload.activeUploads<simpleUpload.maxUploads){vare=simpleUpload.uploads[0],l=e.callback,n=e.uploads.splice(0,1)[0];0==e.uploads.length&&simpleUpload.uploads.splice(0,1),simpleUpload.activeUploads++,l(n),simpleUpload.uploadNext()}},simpleUpload.queueIframe=function(e){for(varl=0;0==l||linsimpleUpload.iframes;)l=Math.floor(999999999*Math.random()+1);returnsimpleUpload.iframes[l]=e,simpleUpload.iframeCount++,$("body").append('<iframe name="simpleUpload_iframe_'+l+'" style="display: none;"></iframe>'),l},simpleUpload.dequeueIframe=function(e){einsimpleUpload.iframes&&($("iframe[name=simpleUpload_iframe_"+e+"]").remove(),deletesimpleUpload.iframes[e],simpleUpload.iframeCount--)},simpleUpload.convertDataType=function(e,l,n){vart="auto";if("auto"==e){if("string"==typeofl&&""!=l){vara=l.toLowerCase(),o=["json","xml","html","script","text"];for(varrino)if(o[r]==a){t=a;break}}}elset=e;if("auto"==t)return"undefined"==typeofn?"":"object"==typeofn?n:String(n);if("json"==t){if("undefined"==typeofn||null===n)returnnull;if("object"==typeofn)returnn;if("string"==typeofn)try{return$.parseJSON(n)}catch(i){return!1}return!1}if("xml"==t){if("undefined"==typeofn||null===n)returnnull;if("string"==typeofn)try{return$.parseXML(n)}catch(i){return!1}return!1}if("script"==t){if("undefined"==typeofn)return"";if("string"==typeofn)try{return$.globalEval(n),n}catch(i){return!1}return!1}return"undefined"==typeofn?"":String(n)},simpleUpload.iframeCallback=function(e){if("object"==typeofe&&null!==e){varl=e.id;if(linsimpleUpload.iframes){varn=simpleUpload.convertDataType(simpleUpload.iframes[l].expect,e.type,e.data);n!==!1?simpleUpload.iframes[l].complete(n):simpleUpload.iframes[l].error("Could not get response from server")}}},simpleUpload.postMessageCallback=function(e){try{varl=e.message?"message":"data",n=e[l];if("string"==typeofn&&""!=n&&(n=$.parseJSON(n),"object"==typeofn&&null!==n&&"string"==typeofn.namespace&&"simpleUpload"==n.namespace)){vart=n.id;if(tinsimpleUpload.iframes&&e.origin===simpleUpload.iframes[t].origin){vara=simpleUpload.convertDataType(simpleUpload.iframes[t].expect,n.type,n.data);a!==!1?simpleUpload.iframes[t].complete(a):simpleUpload.iframes[t].error("Could not get response from server")}}}catch(e){}},window.addEventListener?window.addEventListener("message",simpleUpload.postMessageCallback,!1):window.attachEvent("onmessage",simpleUpload.postMessageCallback),function(e){"function"==typeofdefine&&define.amd?define(["jquery"],e):"object"==typeofexports?module.exports=e(require("jquery")):e(jQuery)}(function(e){e.fn.simpleUpload=function(l,n){return0==e(this).length&&"object"==typeofn&&null!==n&&"object"==typeofn.files&&null!==n.files?(newsimpleUpload(l,null,n),this):this.each(function(){newsimpleUpload(l,this,n)})},e.fn.simpleUpload.maxSimultaneousUploads=function(e){return"undefined"==typeofe?simpleUpload.maxUploads:"number"==typeofe&&e>0?(simpleUpload.maxUploads=e,this):void0}}),!function(e){"function"==typeofdefine&&define.amd?define(["jquery"],e):e("object"==typeofexports?require("jquery"):jQuery)}(function(e){"use strict";functiont(e){for(vart,n=e.split(/\s+/),a=[],o=0;t=n[o];o++)t=t.charAt(0).toUpperCase(),a.push(t);returna}functionn(t){returnt.id&&e('label[for="'+t.id+'"]').val()||t.name}functiona(t,o,s){returns||(s=0),o.each(function(){varo,i,c=e(this),r=this,l=this.nodeName.toLowerCase();switch("label"===l&&c.find("input, textarea, select").length&&(o=c.text(),c=c.children().first(),r=c.get(0),l=r.nodeName.toLowerCaLine truncated
t.prototype.initScrollEvents=function(t){vari=this;t.sticky.scrollListener=function(){returni.onScrollEvents(t)},window.addEventListener("scroll",t.sticky.scrollListener)},t.prototype.onScrollEvents=function(t){this.scrollTop=this.getScrollTopPosition(),t.sticky.active&&this.setPosition(t)},t.prototype.setPosition=function(t){this.removeStyle(t,["position","width","top","left"]),this.vp.height<t.sticky.rect.height||!t.sticky.active||(t.sticky.rect.width||(t.sticky.rect=this.getRectangle(t)),this.scrollTop>t.sticky.rect.top-t.sticky.marginTop?(this.addStyle(t,{position:"fixed",width:t.sticky.rect.width+"px",left:t.sticky.rect.left+"px"}),this.scrollTop+t.sticky.rect.height+t.sticky.marginTop>t.sticky.container.rect.top+t.sticky.container.rect.height?(t.sticky.stickyClass&&t.classList.remove(t.sticky.stickyClass),this.addStyle(t,{top:t.sticky.container.rect.top+t.sticky.container.rect.height-(this.scrollTop+t.sticky.rect.height)+"px"})):(t.sticky.stickyClass&&t.classList.add(t.sticky.stickyClass),this.addStyle(t,{top:t.sticky.marginTop+"px"}))):(t.sticky.stickyClass&&t.classList.remove(t.sticky.stickyClass),this.removeStyle(t,["position","width","top","left"])))},t.prototype.update=function(){vart=this;this.forEach(this.elements,function(i){i.sticky.rect=t.getRectangle(i),i.sticky.container.rect=t.getRectangle(i.sticky.container),t.setPosition(i)})},t.prototype.getStickyContainer=function(t){for(vari=t;!i.hasAttribute("data-sticky-container")&&i!==document.querySelector("body");)i=i.parentNode;returni},t.prototype.getRectangle=function(t){this.removeStyle(t,["position","width","top","left"]);vari=0,e=0,s=0,o=0;s=t.offsetWidth,o=t.offsetHeight;doi+=t.offsetTop||0,e+=t.offsetLeft||0,t=t.offsetParent;while(t);return{top:i,left:e,width:s,height:o}},t.prototype.getViewportSize=function(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}},t.prototype.getScrollTopPosition=function(){return(window.pageYOffset||document.scrollTop)-(document.clientTop||0)||0},t.prototype.forEach=function(t,i){for(vare=0,s=t.length;e<s;e++)i(t[e])},t.prototype.addStyle=function(t,i){for(vareini)i.hasOwnProperty(e)&&(t.style[e]=i[e])},t.prototype.removeStyle=function(t,i){this.forEach(i,function(i){t.style[i]=""})},t}();!function(t,i){"undefined"!=typeofexports?module.exports=i:"function"==typeofdefine&&define.amd?define([],i):t.Sticky=i}(this,Sticky),!function(e){if("object"==typeofexports&&"undefined"!=typeofmodule)module.exports=e();elseif("function"==typeofdefine&&define.amd)define([],e);else{vart;t="undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:this,t.SimpleMDE=e()}}(function(){vare;returnfunctiont(e,n,r){functioni(a,l){if(!n[a]){if(!e[a]){vars="function"==typeofrequire&&require;if(!l&&s)returns(a,!0);if(o)returno(a,!0);varc=newError("Cannot find module '"+a+"'");throwc.code="MODULE_NOT_FOUND",c}varu=n[a]={exports:{}};e[a][0].call(u.exports,function(t){varn=e[a][1][t];returni(n?n:t)},u,u.exports,t,e,n,r)}returnn[a].exports}for(varo="function"==typeofrequire&&require,a=0;a<r.length;a++)i(r[a]);returni}({1:[function(e,t,n){"use strict";functionr(){for(vare="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;n>t;++t)s[t]=e[t],c[e.charCodeAt(t)]=t;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63}functioni(e){vart,n,r,i,o,a,l=e.length;if(l%4>0)thrownewError("Invalid string. Length must be a multiple of 4");o="="===e[l-2]?2:"="===e[l-1]?1:0,a=newu(3*l/4-o),r=o>0?l-4:l;vars=0;for(t=0,n=0;r>t;t+=4,n+=3)i=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)],a[s++]=i>>16&255,a[s++]=i>>8&255,a[s++]=255&i;return2===o?(i=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,a[s++]=255&i):1===o&&(i=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,a[s++]=i>>8&255,a[s++]=255&i),a}functiono(e){returns[e>>18&63]+s[e>>12&63]+s[e>>6&63]+s[63&e]}functiona(e,t,n){for(varr,i=[],a=t;n>a;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],i.push(o(r));returni.join("")}functionl(e){for(vart,n=e.length,r=n%3,i="",o=[],l=16383,c=0,u=n-r;u>c;c+=l)o.push(a(e,c,c+l>u?u:c+l));return1===r?(t=e[n-1],i+=s[t>>2],i+=s[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=s[t>>10],i+=s[t>>4&63],i+=s[t<<2&63],i+="="),o.push(i),o.join("")}n.toByteArray=i,n.fromByteArray=l;vars=[],c=[],u="undefined"!=typeofUint8Array?Uint8Array:Array;r()},{}],2:[function(e,t,n){},{}],3:[function(e,t,n){(function(t){"use strict";functionr(){try{vare=newUint8Array(1);returne.foo=function(){return42},42===e.foo()&&"function"==typeofe.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}functioni(){returna.TYPED_ARRAY_SUPPORT?2147483647:1073741823}functiono(e,t){if(i()<t)thrownewRangeError("Invalid typed array length");returna.TYPED_ARRAY_SUPPORT?(e=newUint8Array(t),e.__proto__=a.prototype):(null===Line truncated
vars=t[e],h=n?n(s):s,s=r||0!==s?s:0;if(o&&h===h){for(varp=l.length;p--;)if(l[p]===h)continuet;n&&l.push(h),f.push(s)}elseu(l,h,r)||(l!==f&&l.push(h),f.push(s))}returnf}functionmr(t,n,r,e){for(varu=t.length,i=e?u:-1;(e?i--:++i<u)&&n(t[i],i,t););returnr?vr(t,e?0:i,e?i+1:u):vr(t,e?i+1:0,e?u:i)}functionAr(t,n){varr=t;returnrinstanceofDt&&(r=r.value()),h(n,function(t,n){returnn.func.apply(n.thisArg,s([t],n.args))},r)}functionkr(t,n,r){for(vare=-1,u=t.length;++e<u;)vari=i?s(wn(i,t[e],n,r),wn(t[e],i,n,r)):t[e];returni&&i.length?wr(i,n,r):[]}functionEr(t,n,r){for(vare=-1,u=t.length,i=n.length,o={};++e<u;)r(o,t[e],e<i?n[e]:F);returno}functionOr(t){returnau(t)?t:[]}functionSr(t){returnnf(t)?t:vo(t)}functionIr(t,n,r){vare=t.length;returnr=r===F?e:r,!n&&r>=e?t:vr(t,n,r)}functionRr(t,n){if(n)returnt.slice();varr=t.length,r=pi?pi(r):newt.constructor(r);returnt.copy(r),r}functionzr(t){varn=newt.constructor(t.byteLength);returnnewhi(n).set(newhi(t)),n}functionWr(t,n){returnnewt.constructor(n?zr(t.buffer):t.buffer,t.byteOffset,t.length)}functionBr(t,n){if(t!==n){varr=t!==F,e=null===t,u=t===t,i=bu(t),o=n!==F,f=null===n,c=n===n,a=bu(n);if(!f&&!a&&!i&&t>n||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return1;if(!e&&!i&&!a&&t<n||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return0}functionLr(t,n,r,e){varu=-1,i=t.length,o=r.length,f=-1,c=n.length,a=zi(i-o,0),l=Zu(c+a);for(e=!e;++f<c;)l[f]=n[f];for(;++u<o;)(e||u<i)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];returnl}functionUr(t,n,r,e){varu=-1,i=t.length,o=-1,f=r.length,c=-1,a=n.length,l=zi(i-f,0),s=Zu(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++o<f;)(e||u<i)&&(s[l+r[o]]=t[u++]);returns}functionCr(t,n){varr=-1,e=t.length;for(n||(n=Zu(e));++r<e;)n[r]=t[r];returnn}functionMr(t,n,r,e){varu=!r;r||(r={});for(vari=-1,o=n.length;++i<o;){varf=n[i],c=e?e(r[f],t[f],f,r,t):F;c===F&&(c=t[f]),u?vn(r,f,c):sn(r,f,c)}returnr}functionDr(t,n){returnMr(t,ao(t),n)}functionTr(t,n){returnfunction(r,u){vari=nf(r)?e:pn,o=n?n():{};returni(r,t,_e(u,2),o)}}function$r(t){returnlr(function(n,r){vare=-1,u=r.length,i=1<u?r[u-1]:F,o=2<u?r[2]:F,i=3<t.length&&"function"==typeofi?(u--,i):F;for(o&&Ae(r[0],r[1],o)&&(i=3>u?F:i,u=1),n=Ju(n);++e<u;)(o=r[e])&&t(n,o,e,i);returnn})}functionFr(t,n){returnfunction(r,e){if(null==r)returnr;if(!cu(r))returnt(r,e);for(varu=r.length,i=n?u:-1,o=Ju(r);(n?i--:++i<u)&&!1!==e(o[i],i,o););returnr}}functionNr(t){returnfunction(n,r,e){varu=-1,i=Ju(n);e=e(n);for(varo=e.length;o--;){varf=e[t?o:++u];if(!1===r(i[f],f,i))break}returnn}}functionPr(t,n,r){functione(){return(this&&this!==Pt&&thisinstanceofe?i:t).apply(u?r:this,arguments)}varu=1&n,i=Vr(t);returne}functionZr(t){returnfunction(n){n=Eu(n);varr=Wt.test(n)?$(n):F,e=r?r[0]:n.charAt(0);returnn=r?Ir(r,1).join(""):n.slice(1),e[t]()+n}}functionqr(t){returnfunction(n){returnh(Uu(Lu(n).replace(St,"")),t,"")}}functionVr(t){returnfunction(){varn=arguments;switch(n.length){case0:returnnewt;case1:returnnewt(n[0]);case2:returnnewt(n[0],n[1]);case3:returnnewt(n[0],n[1],n[2]);case4:returnnewt(n[0],n[1],n[2],n[3]);case5:returnnewt(n[0],n[1],n[2],n[3],n[4]);case6:returnnewt(n[0],n[1],n[2],n[3],n[4],n[5]);case7:returnnewt(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}varr=Xi(t.prototype),n=t.apply(r,n);return_u(n)?n:r}}functionKr(t,n,e){functionu(){for(varo=arguments.length,f=Zu(o),c=o,a=pe(u);c--;)f[c]=arguments[c];returnc=3>o&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,o<e?ue(t,n,Yr,u.placeholder,F,f,c,F,F,e-o):r(this&&this!==Pt&&thisinstanceofu?i:t,this,f)}vari=Vr(t);returnu}functionGr(t){returnfunction(n,r,e){varu=Ju(n);if(!cu(n)){vari=_e(r,3);n=Iu(n),r=function(t){returni(u[t],t,u)}}returnr=t(n,r,e),-1<r?u[i?n[r]:r]:F}}functionJr(t){returnle(function(n){varr=n.length,e=r,u=Mt.prototype.thru;for(t&&n.reverse();e--;){vari=n[e];if("function"!=typeofi)thrownewQu("Expected a function");if(u&&!o&&"wrapper"==he(i))varo=newMt([],(!0))}for(e=o?e:r;++e<r;)vari=n[e],u=he(i),f="wrapper"==u?co(i):F,o=f&&Ee(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[he(f[0])].apply(o,f[3]):1==i.length&&Ee(i)?o[u]():o.thru(i);returnfunction(){vart=arguments,e=t[0];if(o&&1==t.length&&nf(e)&&200<=e.length)returno.plant(e).value();for(varu=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);returnt}})}functionYr(t,n,r,e,u,i,o,f,c,a){functionl(){for(vard=arguments.length,y=Zu(d),b=d;b--;)y[b]=arguments[b];if(_){varx,j=pe(l),b=y.length;for(x=0;b--;)y[b]===j&&++x}if(e&&(y=Lr(y,e,u,_)),i&&(y=Ur(y,i,o,_)),d-=x,_&&d<a)returnj=C(y,j),ue(t,n,Yr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[t]:t,d=y.length,f){x=y.length;for(varw=Wi(f.length,x),m=Cr(y);w--;){varA=f[w];y[w]=me(A,x)?m[A]:F}}elsev&&1<d&&y.reverse();returns&&c<d&&(y.length=c),this&&this!==Pt&&thisinstanceofl&&(b=g||Vr(b)),b.apply(j,y)}vars=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?F:Vr(t);returnl}functionHr(t,n){returnfunction(r,e){returnCn(r,t,n(e))}}functionQLine truncated
vare=-1,u=[],i=t.length;for(n=_e(n,3);++e<i;){varo=t[e];n(o,e,t)&&(r.push(o),u.push(e))}returnfr(t,u),r},Ot.rest=function(t,n){if("function"!=typeoft)thrownewQu("Expected a function");returnn=n===F?n:wu(n),lr(t,n)},Ot.reverse=qe,Ot.sampleSize=function(t,n,r){returnn=(r?Ae(t,n,r):n===F)?1:wu(n),(nf(t)?fn:hr)(t,n)},Ot.set=function(t,n,r){returnnull==t?t:pr(t,n,r)},Ot.setWith=function(t,n,r,e){returne="function"==typeofe?e:F,null==t?t:pr(t,n,r,e)},Ot.shuffle=function(t){return(nf(t)?cn:_r)(t)},Ot.slice=function(t,n,r){vare=t?t.length:0;returne?(r&&"number"!=typeofr&&Ae(t,n,r)?(n=0,r=e):(n=null==n?0:wu(n),r=r===F?e:wu(r)),vr(t,n,r)):[]},Ot.sortBy=No,Ot.sortedUniq=function(t){returnt&&t.length?br(t):[]},Ot.sortedUniqBy=function(t,n){returnt&&t.length?br(t,_e(n,2)):[]},Ot.split=function(t,n,r){returnr&&"number"!=typeofr&&Ae(t,n,r)&&(n=r=F),r=r===F?4294967295:r>>>0,r?(t=Eu(t))&&("string"==typeofn||null!=n&&!ff(n))&&(n=jr(n),!n&&Wt.test(t))?Ir($(t),0,r):t.split(n,r):[]},Ot.spread=function(t,n){if("function"!=typeoft)thrownewQu("Expected a function");returnn=n===F?0:zi(wu(n),0),lr(function(e){varu=e[n];returne=Ir(e,0,n),u&&s(e,u),r(t,this,e)})},Ot.tail=function(t){varn=t?t.length:0;returnn?vr(t,1,n):[]},Ot.take=function(t,n,r){returnt&&t.length?(n=r||n===F?1:wu(n),vr(t,0,0>n?0:n)):[]},Ot.takeRight=function(t,n,r){vare=t?t.length:0;returne?(n=r||n===F?1:wu(n),n=e-n,vr(t,0>n?0:n,e)):[]},Ot.takeRightWhile=function(t,n){returnt&&t.length?mr(t,_e(n,3),!1,!0):[]},Ot.takeWhile=function(t,n){returnt&&t.length?mr(t,_e(n,3)):[]},Ot.tap=function(t,n){returnn(t),t},Ot.throttle=function(t,n,r){vare=!0,u=!0;if("function"!=typeoft)thrownewQu("Expected a function");return_u(r)&&(e="leading"inr?!!r.leading:e,u="trailing"inr?!!r.trailing:u),uu(t,n,{leading:e,maxWait:n,trailing:u})},Ot.thru=Je,Ot.toArray=xu,Ot.toPairs=Ef,Ot.toPairsIn=Of,Ot.toPath=function(t){returnnf(t)?l(t,Ue):bu(t)?[t]:Cr(vo(t))},Ot.toPlainObject=ku,Ot.transform=function(t,n,r){vare=nf(t),i=e||ef(t)||af(t);if(n=_e(n,4),null==r){varo=t&&t.constructor;r=i?e?newo:[]:_u(t)&&su(o)?Xi(_i(t)):{}}return(i?u:On)(t,function(t,e,u){returnn(r,t,e,u)}),r},Ot.unary=function(t){returntu(t,1)},Ot.union=ko,Ot.unionBy=Eo,Ot.unionWith=Oo,Ot.uniq=function(t){returnt&&t.length?wr(t):[]},Ot.uniqBy=function(t,n){returnt&&t.length?wr(t,_e(n,2)):[]},Ot.uniqWith=function(t,n){returnt&&t.length?wr(t,F,n):[]},Ot.unset=function(t,n){varr;if(null==t)r=!0;else{r=t;vare=n,e=ke(e,r)?[e]:Sr(e);r=ze(r,e),e=Ue(Pe(e)),r=!(null!=r&&ui.call(r,e))||deleter[e]}returnr},Ot.unzip=Ve,Ot.unzipWith=Ke,Ot.update=function(t,n,r){returnnull==t?t:pr(t,n,("function"==typeofr?r:Mu)(Rn(t,n)),void0)},Ot.updateWith=function(t,n,r,e){returne="function"==typeofe?e:F,null!=t&&(t=pr(t,n,("function"==typeofr?r:Mu)(Rn(t,n)),e)),t},Ot.values=Wu,Ot.valuesIn=function(t){returnnull==t?[]:I(t,Ru(t))},Ot.without=So,Ot.words=Uu,Ot.wrap=function(t,n){returnn=null==n?Mu:n,Jo(n,t)},Ot.xor=Io,Ot.xorBy=Ro,Ot.xorWith=zo,Ot.zip=Wo,Ot.zipObject=function(t,n){returnEr(t||[],n||[],sn)},Ot.zipObjectDeep=function(t,n){returnEr(t||[],n||[],pr)},Ot.zipWith=Bo,Ot.entries=Ef,Ot.entriesIn=Of,Ot.extend=pf,Ot.extendWith=_f,Tu(Ot,Ot),Ot.add=Kf,Ot.attempt=Cf,Ot.camelCase=Sf,Ot.capitalize=Bu,Ot.ceil=Gf,Ot.clamp=function(t,n,r){returnr===F&&(r=n,n=F),r!==F&&(r=Au(r),r=r===r?r:0),n!==F&&(n=Au(n),n=n===n?n:0),dn(Au(t),n,r)},Ot.clone=function(t){returnyn(t,!1,!0)},Ot.cloneDeep=function(t){returnyn(t,!0,!0)},Ot.cloneDeepWith=function(t,n){returnyn(t,!0,!0,n)},Ot.cloneWith=function(t,n){returnyn(t,!1,!0,n)},Ot.conformsTo=function(t,n){returnnull==n||xn(t,n,Iu(n))},Ot.deburr=Lu,Ot.defaultTo=function(t,n){returnnull==t||t!==t?n:t},Ot.divide=Jf,Ot.endsWith=function(t,n,r){t=Eu(t),n=jr(n);vare=t.length,e=r=r===F?e:dn(wu(r),0,e);returnr-=n.length,0<=r&&t.slice(r,e)==n},Ot.eq=fu,Ot.escape=function(t){return(t=Eu(t))&&H.test(t)?t.replace(J,rn):t},Ot.escapeRegExp=function(t){return(t=Eu(t))&&ot.test(t)?t.replace(it,"\\$&"):t},Ot.every=function(t,n,r){vare=nf(t)?o:mn;returnr&&Ae(t,n,r)&&(n=F),e(t,_e(n,3))},Ot.find=Co,Ot.findIndex=Te,Ot.findKey=function(t,n){returnv(t,_e(n,3),On)},Ot.findLast=Mo,Ot.findLastIndex=$e,Ot.findLastKey=function(t,n){returnv(t,_e(n,3),Sn)},Ot.floor=Yf,Ot.forEach=He,Ot.forEachRight=Qe,Ot.forIn=function(t,n){returnnull==t?t:ro(t,_e(n,3),Ru)},Ot.forInRight=function(t,n){returnnull==t?t:eo(t,_e(n,3),Ru)},Ot.forOwn=function(t,n){returnt&&On(t,_e(n,3))},Ot.forOwnRight=function(t,n){returnt&&Sn(t,_e(n,3))},Ot.get=Ou,Ot.gt=Qo,Ot.gte=Xo,Ot.has=function(t,n){returnnull!=t&&ye(t,n,Bn)},Ot.hasIn=Su,Ot.head=Ne,Ot.identity=Mu,Ot.includes=function(t,n,r,e){returnt=cu(t)?t:Wu(t),r=r&&!e?wu(r):0,e=t.length,0>r&&(r=zi(e+r,0)),yu(t)?r<=e&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r)},Ot.indexOf=function(t,n,r){vare=t?t.length:0;returne?(r=null==r?0:wu(r),0>r&&(r=zi(e+r,0)),d(t,n,r)):-1},Ot.inRange=function(t,n,r){returnn=ju(n),r===F?(r=n,n=0):r=ju(r),t=Au(t),t>=Wi(n,r)&&t<zi(n,r)},Ot.invLine 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.