wikijs-fork/assets/js/bundle.min.js

3 lines
2.2 MiB
JavaScript
Raw Normal View History

2017-04-06 00:33:16 +00:00
!function(e){e.$fuse$=e,function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||ne;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function r(e){var t=!!e&&"length"in e&&e.length,n=he.type(e);return"function"!==n&&!he.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function o(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function i(e,t,n){return he.isFunction(t)?he.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?he.grep(e,function(e){return e===t!==n}):"string"!=typeof t?he.grep(e,function(e){return se.call(t,e)>-1!==n}):Ae.test(t)?he.filter(t,e,n):(t=he.filter(t,e),he.grep(e,function(e){return se.call(t,e)>-1!==n&&1===e.nodeType}))}function a(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return he.each(e.match(Le)||[],function(e,n){t[n]=!0}),t}function l(e){return e}function c(e){throw e}function u(e,t,n,r){var o;try{e&&he.isFunction(o=e.promise)?o.call(e).done(t).fail(n):e&&he.isFunction(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function d(){ne.removeEventListener("DOMContentLoaded",d),e.removeEventListener("load",d),he.ready()}function f(){this.expando=he.expando+f.uid++}function m(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Me.test(e)?JSON.parse(e):e)}function p(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Be,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=m(n)}catch(e){}Ie.set(e,t,n)}else n=void 0;return n}function h(e,t,n,r){var o,i=1,a=20,s=r?function(){return r.cur()}:function(){return he.css(e,t,"")},l=s(),c=n&&n[3]||(he.cssNumber[t]?"":"px"),u=(he.cssNumber[t]||"px"!==c&&+l)&&ze.exec(he.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do{i=i||".5",u/=i,he.style(e,t,u+c)}while(i!==(i=s()/l)&&1!==i&&--a)}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=u,r.end=o)),o}function g(e){var t,n=e.ownerDocument,r=e.nodeName,o=qe[r];return o||(t=n.body.appendChild(n.createElement(r)),o=he.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),qe[r]=o,o)}function b(e,t){for(var n,r,o=[],i=0,a=e.length;i<a;i++)r=e[i],r.style&&(n=r.style.display,t?("none"===n&&(o[i]=Ne.get(r,"display")||null,o[i]||(r.style.display="")),""===r.style.display&&Ue(r)&&(o[i]=g(r))):"none"!==n&&(o[i]="none",Ne.set(r,"display",n)));for(i=0;i<a;i++)null!=o[i]&&(e[i].style.display=o[i]);return e}function v(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&o(e,t)?he.merge([e],n):n}function w(e,t){for(var n=0,r=e.length;n<r;n++)Ne.set(e[n],"globalEval",!t||Ne.get(t[n],"globalEval"))}function y(e,t,n,r,o){for(var i,a,s,l,c,u,d=t.createDocumentFragment(),f=[],m=0,p=e.length;m<p;m++)if((i=e[m])||0===i)if("object"===he.type(i))he.merge(f,i.nodeType?[i]:i);else if(Xe.test(i)){for(a=a||d.appendChild(t.createElement("div")),s=(Ve.exec(i)||["",""])[1].toLowerCase(),l=Ye[s]||Ye._default,a.innerHTML=l[1]+he.htmlPrefilter(i)+l[2],u=l[0];u--;)a=a.lastChild;he.merge(f,a.childNodes),a=d.firstChild,a.textContent=""}else f.push(t.createTextNode(i));for(d.textContent="",m=0;i=f[m++];)if(r&&he.inArray(i,r)>-1)o&&o.push(i);else if(c=he.contains(i.ownerDocument,i),a=v(d.appendChild(i),"script"),c&&w(a),n)for(u=0;i=a[u++];)Ge.test(i.type||"")&&n.push(i);return d}function k(){return!0}function x(){return!1}function E(){try{return ne.activeElement}catch(e){}}function C(e,t,n,r,o,i){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)C(e,s,n,r,t[s],i);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=x;else if(!o)return e;return 1===i&&(a=o,o=function(e){return he().off(e
;if(u[1])for(var m=0,p=c.alphabet.length;p>m;m++)f.push(u[0]+c.alphabet[m]+u[1].substring(1))}for(var h=[],a=0,s=i.length;s>a;a++){var u=i[a];if(u[1])for(var m=0,p=c.alphabet.length;p>m;m++)f.push(u[0]+c.alphabet[m]+u[1])}t=t.concat(l),t=t.concat(d),t=t.concat(f),t=t.concat(h)}return t}function r(e){for(var t=[],n=0;n<e.length;n++)c.check(e[n])&&t.push(e[n]);return t}function o(e){function o(e,t){return e[1]<t[1]?-1:1}for(var i=n([e]),a=n(i),s=r(i).concat(r(a)),l={},u=0,d=s.length;d>u;u++)s[u]in l?l[s[u]]+=1:l[s[u]]=1;var f=[];for(var u in l)f.push([u,l[u]]);f.sort(o).reverse();for(var m=[],u=0,d=Math.min(t,f.length);d>u;u++)c.hasFlag(f[u][0],"NOSUGGEST")||m.push(f[u][0]);return m}if(t||(t=5),this.check(e))return[];for(var i=0,a=this.replacementTable.length;a>i;i++){var s=this.replacementTable[i];if(-1!==e.indexOf(s[0])){var l=e.replace(s[0],s[1]);if(this.check(l))return[l]}}var c=this;return c.alphabet="abcdefghijklmnopqrstuvwxyz",o(e)}},void 0!==t&&(t.exports=o)}).call(this,e("buffer").Buffer,"/node_modules/typo-js")},{buffer:3,fs:2}],19:[function(e,t,n){var r=e("codemirror");r.commands.tabAndIndentMarkdownList=function(e){var t=e.listSelections(),n=t[0].head;if(!1!==e.getStateAfter(n.line).list)return void e.execCommand("indentMore");if(e.options.indentWithTabs)e.execCommand("insertTab");else{var r=Array(e.options.tabSize+1).join(" ");e.replaceSelection(r)}},r.commands.shiftTabAndUnindentMarkdownList=function(e){var t=e.listSelections(),n=t[0].head;if(!1!==e.getStateAfter(n.line).list)return void e.execCommand("indentLess");if(e.options.indentWithTabs)e.execCommand("insertTab");else{var r=Array(e.options.tabSize+1).join(" ");e.replaceSelection(r)}}},{codemirror:10}],20:[function(e,t,n){"use strict";function r(e){return e=W?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}function o(e,t,n){e=e||{};var r=document.createElement("a");return t=void 0==t||t,e.title&&t&&(r.title=a(e.title,e.action,n),W&&(r.title=r.title.replace("Ctrl","⌘"),r.title=r.title.replace("Alt","⌥"))),r.tabIndex=-1,r.className=e.className,r}function i(){var e=document.createElement("i");return e.className="separator",e.innerHTML="|",e}function a(e,t,n){var o,i=e;return t&&(o=V(t),n[o]&&(i+=" ("+r(n[o])+")")),i}function s(e,t){t=t||e.getCursor("start");var n=e.getTokenAt(t);if(!n.type)return{};for(var r,o,i=n.type.split(" "),a={},s=0;s<i.length;s++)r=i[s],"strong"===r?a.bold=!0:"variable-2"===r?(o=e.getLine(t.line),/^\s*\d+\.\s/.test(o)?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);return a}function l(e){var t=e.codemirror;t.setOption("fullScreen",!t.getOption("fullScreen")),t.getOption("fullScreen")?(Y=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=Y;var n=t.getWrapperElement();/fullscreen/.test(n.previousSibling.className)?n.previousSibling.className=n.previousSibling.className.replace(/\s*fullscreen\b/,""):n.previousSibling.className+=" fullscreen";var r=e.toolbarElements.fullscreen;/active/.test(r.className)?r.className=r.className.replace(/\s*active\s*/g,""):r.className+=" active";var o=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(o.className)&&T(e)}function c(e){O(e,"bold",e.options.blockStyles.bold)}function u(e){O(e,"italic",e.options.blockStyles.italic)}function d(e){O(e,"strikethrough","~~")}function f(e){function t(e){if("object"!=typeof e)throw"fencing_line() takes a 'line' object (not a line number, or line text). Got: "+typeof e+": "+e;return e.styles&&e.styles[2]&&-1!==e.styles[2].indexOf("formatting-code-block")}function n(e){return e.state.base.base||e.state.base}function r(e,r,o,i,a){o=o||e.getLineHandle(r),i=i||e.getTokenAt({line:r,ch:1}),a=a||!!o.text&&e.getTokenAt({line:r,ch:o.text.length-1});var s=i.type?i.type.split(" "):[];return a&&n(a).indentedCode?"indented":-1!==s.indexOf("comment")&&(n(i).fencedChars||n(a).fence
n.exports.src='"no use strict";(function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}})(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict