Files
leanote/public/js/markdown.min.js

17 lines
524 KiB
JavaScript
Raw Normal View History

2015-09-05 23:42:10 +08:00
var requirejs,require,define;!function(ba){function G(e){return"[object Function]"===K.call(e)}function H(e){return"[object Array]"===K.call(e)}function v(e,t){if(e){var i;for(i=0;i<e.length&&(!e[i]||!t(e[i],i,e));i+=1);}}function T(e,t){if(e){var i;for(i=e.length-1;i>-1&&(!e[i]||!t(e[i],i,e));i-=1);}}function t(e,t){return fa.call(e,t)}function m(e,i){return t(e,i)&&e[i]}function B(e,i){for(var n in e)if(t(e,n)&&i(e[n],n))break}function U(e,i,n,r){return i&&B(i,function(i,o){(n||!t(e,o))&&(!r||"object"!=typeof i||!i||H(i)||G(i)||i instanceof RegExp?e[o]=i:(e[o]||(e[o]={}),U(e[o],i,n,r)))}),e}function u(e,t){return function(){return t.apply(e,arguments)}}function ca(e){throw e}function da(e){if(!e)return e;var t=ba;return v(e.split("."),function(e){t=t[e]}),t}function C(e,t,i,n){return t=Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e),t.requireType=e,t.requireModules=n,i&&(t.originalError=i),t}function ga(e){function i(e,t,i){var n,r,o,a,s,u,d,c,t=t&&t.split("/"),f=D.map,p=f&&f["*"];if(e){for(e=e.split("/"),r=e.length-1,D.nodeIdCompat&&Q.test(e[r])&&(e[r]=e[r].replace(Q,"")),"."===e[0].charAt(0)&&t&&(r=t.slice(0,t.length-1),e=r.concat(e)),r=e,o=0;o<r.length;o++)a=r[o],"."===a?(r.splice(o,1),o-=1):".."===a&&0!==o&&(1!=o||".."!==r[2])&&".."!==r[o-1]&&o>0&&(r.splice(o-1,2),o-=2);e=e.join("/")}if(i&&f&&(t||p)){r=e.split("/"),o=r.length;e:for(;o>0;o-=1){if(s=r.slice(0,o).join("/"),t)for(a=t.length;a>0;a-=1)if((i=m(f,t.slice(0,a).join("/")))&&(i=m(i,s))){n=i,u=o;break e}!d&&p&&m(p,s)&&(d=m(p,s),c=o)}!n&&d&&(n=d,u=c),n&&(r.splice(0,u,n),e=r.join("/"))}return(n=m(D.pkgs,e))?n:e}function n(e){z&&v(document.getElementsByTagName("script"),function(t){return t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===k.contextName?(t.parentNode.removeChild(t),!0):void 0})}function r(e){var t=m(D.paths,e);return t&&H(t)&&1<t.length?(t.shift(),k.require.undef(e),k.makeRequire(null,{skipMap:!0})([e]),!0):void 0}function o(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function a(e,t,n,r){var a,s,u=null,d=t?t.name:null,c=e,f=!0,p="";return e||(f=!1,e="_@r"+(J+=1)),e=o(e),u=e[0],e=e[1],u&&(u=i(u,d,r),s=m(F,u)),e&&(u?p=s&&s.normalize?s.normalize(e,function(e){return i(e,d,r)}):-1===e.indexOf("!")?i(e,d,r):e:(p=i(e,d,r),e=o(p),u=e[0],p=e[1],n=!0,a=k.nameToUrl(p))),n=!u||s||n?"":"_unnormalized"+(P+=1),{prefix:u,name:p,parentMap:t,unnormalized:!!n,url:a,originalName:c,isDefine:f,id:(u?u+"!"+p:p)+n}}function s(e){var t=e.id,i=m(w,t);return i||(i=w[t]=new k.Module(e)),i}function d(e,i,n){var r=e.id,o=m(w,r);!t(F,r)||o&&!o.defineEmitComplete?(o=s(e),o.error&&"error"===i?n(o.error):o.on(i,n)):"defined"===i&&n(F[r])}function c(e,t){var i=e.requireModules,n=!1;t?t(e):(v(i,function(t){(t=m(w,t))&&(t.error=e,t.events.error&&(n=!0,t.emit("error",e)))}),n||g.onError(e))}function f(){R.length&&(ha.apply(O,[O.length,0].concat(R)),R=[])}function p(e){delete w[e],delete A[e]}function l(e,t,i){var n=e.map.id;e.error?e.emit("error",e.error):(t[n]=!0,v(e.depMaps,function(n,r){var o=n.id,a=m(w,o);a&&!e.depMatched[r]&&!i[o]&&(m(t,o)?(e.defineDep(r,F[o]),e.check()):l(a,t,i))}),i[n]=!0)}function h(){var e,t,i=(e=1e3*D.waitSeconds)&&k.startTime+e<(new Date).getTime(),o=[],a=[],s=!1,u=!0;if(!y){if(y=!0,B(A,function(e){var d=e.map,c=d.id;if(e.enabled&&(d.isDefine||a.push(e),!e.error))if(!e.inited&&i)r(c)?s=t=!0:(o.push(c),n(c));else if(!e.inited&&e.fetched&&d.isDefine&&(s=!0,!d.prefix))return u=!1}),i&&o.length)return e=C("timeout","Load timeout for modules: "+o,null,o),e.contextName=k.contextName,c(e);u&&v(a,function(e){l(e,{},{})}),i&&!t||!s||!z&&!ea||S||(S=setTimeout(function(){S=0,h()},50)),y=!1}}function x(e){t(F,e[0])||s(a(e[0],null,!0)).init(e[1],e[2])}function b(e){var e=e.currentTarget||e.srcElement,t=k.onScriptLoad;return e.detachEvent&&!Y?e.detachEvent("onreadystatechange",t):e.removeEventListener("load",t,!1),t=k.onScriptError,(!e.detachEvent||Y)&&e.removeEventListener("error",t,!1),{node:e,id:e&&e.getAttribute("data-requiremodule")}}function q(){var e;for(f();O.length;){if
function diff_match_patch(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32}window.rangy=function(){function t(t,e){var n=typeof t[e];return n==h||!(n!=u||!t[e])||"unknown"==n}function e(t,e){return!(typeof t[e]!=u||!t[e])}function n(t,e){return typeof t[e]!=f}function r(t){return function(e,n){for(var r=n.length;r--;)if(!t(e,n[r]))return!1;return!0}}function i(t){return t&&v(t,m)&&x(t,g)}function a(t){window.alert("Rangy not supported in your browser. Reason: "+t),b.initialized=!0,b.supported=!1}function o(t){var e="Rangy warning: "+t;b.config.alertOnWarn?window.alert(e):typeof window.console!=f&&typeof window.console.log!=f&&window.console.log(e)}function s(){if(!b.initialized){var n,r=!1,o=!1;t(document,"createRange")&&(n=document.createRange(),v(n,p)&&x(n,d)&&(r=!0),n.detach());var s=e(document,"body")?document.body:document.getElementsByTagName("body")[0];s&&t(s,"createTextRange")&&(n=s.createTextRange(),i(n)&&(o=!0)),r||o||a("Neither Range nor TextRange are implemented"),b.initialized=!0,b.features={implementsDomRange:r,implementsTextRange:o};for(var l=_.concat(w),c=0,u=l.length;u>c;++c)try{l[c](b)}catch(h){e(window,"console")&&t(window.console,"log")&&window.console.log("Init listener threw an exception. Continuing.",h)}}}function l(t){t=t||window,s();for(var e=0,n=S.length;n>e;++e)S[e](t)}function c(t){this.name=t,this.initialized=!1,this.supported=!1}var u="object",h="function",f="undefined",d=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer","START_TO_START","START_TO_END","END_TO_START","END_TO_END"],p=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],g=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],m=["collapse","compareEndPoints","duplicate","getBookmark","moveToBookmark","moveToElementText","parentElement","pasteHTML","select","setEndPoint","getBoundingClientRect"],v=r(t),y=r(e),x=r(n),b={version:"1.2.3",initialized:!1,supported:!0,util:{isHostMethod:t,isHostObject:e,isHostProperty:n,areHostMethods:v,areHostObjects:y,areHostProperties:x,isTextRange:i},features:{},modules:{},config:{alertOnWarn:!1,preferTextRange:!1}};b.fail=a,b.warn=o,{}.hasOwnProperty?b.util.extend=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}:a("hasOwnProperty not supported");var w=[],_=[];b.init=s,b.addInitListener=function(t){b.initialized?t(b):w.push(t)};var S=[];b.addCreateMissingNativeApiListener=function(t){S.push(t)},b.createMissingNativeApi=l,c.prototype.fail=function(t){throw this.initialized=!0,this.supported=!1,new Error("Module '"+this.name+"' failed to load: "+t)},c.prototype.warn=function(t){b.warn("Module "+this.name+": "+t)},c.prototype.createError=function(t){return new Error("Error in Rangy "+this.name+" module: "+t)},b.createModule=function(t,e){var n=new c(t);b.modules[t]=n,_.push(function(t){e(t,n),n.initialized=!0,n.supported=!0})},b.requireModules=function(t){for(var e,n,r=0,i=t.length;i>r;++r){if(n=t[r],e=b.modules[n],!(e&&e instanceof c))throw new Error("Module '"+n+"' not found");if(!e.supported)throw new Error("Module '"+n+"' not supported")}};var C=!1,E=function(){C||(C=!0,b.initialized||s())};return typeof window==f?void a("No window found"):typeof document==f?void a("No document found"):(t(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",E,!1),t(window,"addEventListener")?window.addEventListener("load",E,!1):t(window,"attachEvent")?window.attachEvent("onload",E):a("Window does not have required addEventListener or attachEvent method"),b)}(),rangy.createModule("DomUtil",function(t,e){function n(t){var e;return typeof t.namespaceURI==E||null===(e=t.namespaceURI)||"http://www.w3.org/1999/xhtml"==e}function r(t){var e=t.parentNode;return 1==e.nodeType?e:null}funct
if(e._ranges.length=0,"None"==e.docSelection.type)o(e);else{var n=e.docSelection.createRange();if(u(n))h(e,n);else{e.rangeCount=n.length;for(var r,a=_.getDocument(n.item(0)),s=0;s<e.rangeCount;++s)r=t.createRange(a),r.selectNode(n.item(s)),e._ranges.push(r);e.isCollapsed=1==e.rangeCount&&e._ranges[0].collapsed,i(e,e._ranges[e.rangeCount-1],!1)}}}function d(t,e){for(var n=t.docSelection.createRange(),r=c(e),i=_.getDocument(n.item(0)),a=_.getBody(i).createControlRange(),o=0,s=n.length;s>o;++o)a.add(n.item(o));try{a.add(r)}catch(l){throw new Error("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}a.select(),f(t)}function p(t,e,n){this.nativeSelection=t,this.docSelection=e,this._ranges=[],this.win=n,this.refresh()}function g(t,e){for(var n,r=_.getDocument(e[0].startContainer),i=_.getBody(r).createControlRange(),a=0;rangeCount>a;++a){n=c(e[a]);try{i.add(n)}catch(o){throw new Error("setRanges(): Element within the one of the specified Ranges could not be added to control selection (does it have layout?)")}}i.select(),f(t)}function m(t,e){if(t.anchorNode&&_.getDocument(t.anchorNode)!==_.getDocument(e))throw new k("WRONG_DOCUMENT_ERR")}function v(t){var e=[],n=new T(t.anchorNode,t.anchorOffset),r=new T(t.focusNode,t.focusOffset),i="function"==typeof t.getName?t.getName():"Selection";if("undefined"!=typeof t.rangeCount)for(var a=0,o=t.rangeCount;o>a;++a)e[a]=C.inspect(t.getRangeAt(a));return"["+i+"(Ranges: "+e.join(", ")+")(anchor: "+n.inspect()+", focus: "+r.inspect()+"]"}t.requireModules(["DomUtil","DomRange","WrappedRange"]),t.config.checkSelectionRanges=!0;var y,x,b="boolean",w="_rangySelection",_=t.dom,S=t.util,C=t.DomRange,E=t.WrappedRange,k=t.DOMException,T=_.DomPosition,I="Control",N=t.util.isHostMethod(window,"getSelection"),R=t.util.isHostObject(document,"selection"),A=R&&(!N||t.config.preferTextRange);A?(y=r,t.isSelectionValid=function(t){var e=(t||window).document,n=e.selection;return"None"!=n.type||_.getDocument(n.createRange().parentElement())==e}):N?(y=n,t.isSelectionValid=function(){return!0}):e.fail("Neither document.selection or window.getSelection() detected."),t.getNativeSelection=y;var M=y(),L=t.createNativeRange(document),O=_.getBody(document),D=S.areHostObjects(M,["anchorNode","focusNode"]&&S.areHostProperties(M,["anchorOffset","focusOffset"]));t.features.selectionHasAnchorAndFocus=D;var F=S.isHostMethod(M,"extend");t.features.selectionHasExtend=F;var P="number"==typeof M.rangeCount;t.features.selectionHasRangeCount=P;var B=!1,j=!0;S.areHostMethods(M,["addRange","getRangeAt","removeAllRanges"])&&"number"==typeof M.rangeCount&&t.features.implementsDomRange&&!function(){var t=document.createElement("iframe");t.frameBorder=0,t.style.position="absolute",t.style.left="-10000px",O.appendChild(t);var e=_.getIframeDocument(t);e.open(),e.write("<html><head></head><body>12</body></html>"),e.close();var n=_.getIframeWindow(t).getSelection(),r=e.documentElement,i=r.lastChild,a=i.firstChild,o=e.createRange();o.setStart(a,1),o.collapse(!0),n.addRange(o),j=1==n.rangeCount,n.removeAllRanges();var s=o.cloneRange();o.setStart(a,0),s.setEnd(a,2),n.addRange(o),n.addRange(s),B=2==n.rangeCount,o.detach(),s.detach(),O.removeChild(t)}(),t.features.selectionSupportsMultipleRanges=B,t.features.collapsedNonEditableSelectionsSupported=j;var $,H=!1;O&&S.isHostMethod(O,"createControlRange")&&($=O.createControlRange(),S.areHostProperties($,["item","add"])&&(H=!0)),t.features.implementsControlRange=H,x=D?function(t){return t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset}:function(t){return t.rangeCount?t.getRangeAt(t.rangeCount-1).collapsed:!1};var U;S.isHostMethod(M,"getRangeAt")?U=function(t,e){try{return t.getRangeAt(e)}catch(n){return null}}:D&&(U=function(e){var n=_.getDocument(e.anchorNode),r=t.createRange(n);return r.setStart(e.anchorNode,e.anchorOffset),r.setEnd(e.focusNode,e.focusOffset),r.collapsed!==this.isCollapsed&&(r.setStart(e.focusNode,e.focusOffset),r.setEnd(e.anchorNode,e.anchorOffset)),r}),t.getSelection=function(t){t=t||window;var e=t[w],n=y(t),
}function r(t,r){if(!m.isRegExp(t))throw new TypeError("Type RegExp expected");var i=b.exec.call(/\/([a-z]*)$/i,String(t))[1];return r=r||{},r.add&&(i=n(i+r.add)),r.remove&&(i=b.replace.call(i,new RegExp("["+r.remove+"]+","g"),"")),t=e(new RegExp(t.source,i),a(t)?t[y].captureNames.slice(0):null,r.addProto)}function i(){return{captureNames:null}}function a(t){return!(!t[y]||!t[y].captureNames)}function o(t,e){if(Array.prototype.indexOf)return t.indexOf(e);var n,r=t.length;for(n=0;r>n;++n)if(t[n]===e)return n;return-1}function s(t,e){return M.call(t)==="[object "+e+"]"}function l(t,e,n){return b.test.call(n.indexOf("x")>-1?/^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,t.slice(e))}function c(t,e){var r;if(n(e)!==e)throw new SyntaxError("Invalid duplicate regex flag "+e);for(t=b.replace.call(t,/^\(\?([\w$]+)\)/,function(t,r){if(b.test.call(/[gy]/,r))throw new SyntaxError("Cannot use flag g or y in mode modifier "+t);return e=n(e+r),""}),r=0;r<e.length;++r)if(!A[e.charAt(r)])throw new SyntaxError("Unknown regex flag "+e.charAt(r));return{pattern:t,flags:e}}function u(t){return t=t||{},s(t,"String")&&(t=m.forEach(t,/[^\s,]+/,function(t){this[t]=!0},{})),t}function h(t){if(!/^[\w$]$/.test(t))throw new Error("Flag must be a single character A-Za-z0-9_$");A[t]=!0}function f(t,e,n,r,i){for(var a,o,s=C.length,l=null;s--;)if(o=C[s],(o.scope===r||"all"===o.scope)&&(!o.flag||e.indexOf(o.flag)>-1)&&(a=m.exec(t,o.regex,n,"sticky"))){l={matchLength:a[0].length,output:o.handler.call(i,a,r,e),reparse:o.reparse};break}return l}function d(t){m.cache.flush("patterns"),x.astral=t}function p(t){RegExp.prototype.exec=(t?w:b).exec,RegExp.prototype.test=(t?w:b).test,String.prototype.match=(t?w:b).match,String.prototype.replace=(t?w:b).replace,String.prototype.split=(t?w:b).split,x.natives=t}function g(t){if(null==t)throw new TypeError("Cannot convert null or undefined to object");return t}var m,v,y="xregexp",x={astral:!1,natives:!1},b={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},w={},_={},S={},C=[],E="default",k="class",T={"default":/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,"class":/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|[\s\S]/},I=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,N=b.exec.call(/()??/,"")[1]===t,R=RegExp.prototype.sticky!==t,A={g:!0,i:!0,m:!0,y:R},M={}.toString;return m=function(n,i){var a,o,s,l={hasNamedCapture:!1,captureNames:[]},u=E,h="",d=0;if(m.isRegExp(n)){if(i!==t)throw new TypeError("Cannot supply flags when copying a RegExp");return r(n,{addProto:!0})}if(n=n===t?"":String(n),i=i===t?"":String(i),s=n+"***"+i,!S[s]){for(a=c(n,i),n=a.pattern,i=a.flags;d<n.length;){do a=f(n,i,d,u,l),a&&a.reparse&&(n=n.slice(0,d)+a.output+n.slice(d+a.matchLength));while(a&&a.reparse);a?(h+=a.output,d+=a.matchLength||1):(o=m.exec(n,T[u],d,"sticky")[0],h+=o,d+=o.length,"["===o&&u===E?u=k:"]"===o&&u===k&&(u=E))}S[s]={pattern:b.replace.call(h,/\(\?:\)(?=\(\?:\))|^\(\?:\)|\(\?:\)$/g,""),flags:b.replace.call(i,/[^gimy]+/g,""),captures:l.hasNamedCapture?l.captureNames:null}}return s=S[s],e(new RegExp(s.pattern,s.flags),s.captures,!0)},m.prototype=new RegExp,m.version="3.0.0-pre",m.addToken=function(t,e,n){n=n||{};var i,a=n.optionalFlags;if(n.flag&&h(n.flag),a)for(a=b.split.call(a,""),i=0;i<a.length;++i)h(a[i]);C.push({regex:r(t,{add:"g"+(R?"y":"")}),handler:e,scope:n.scope||E,flag:n.flag,reparse:n.reparse}),m.cache.flush("patterns")},m.cache=function(t,e){var n=t+"***"+(e||"");return _[n]||(_[n]=m(t,e))},m.cache.flush=function(t){"patterns"===t?S={}:_={}},m.escape=function(t){return b.replace.call(g(t),/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},m.exec=function(t,e,n,a){var o,s,l="g";return R&&(a||e.sticky&&a!==!1)&&(l+="y"),e[y]=e[y]||i(),s=e[y][l]||(e[y][l]=r(e,{add:l,remove:a===!1?"y":""})),s.lastIndex=n=n||0,o=w.exec.call(s,t),a&&o&&o.index!==n&&(o=null),e.global&&(e.lastIndex=o
name:"Nd",alias:"Decimal_Number",bmp:"0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-",astral:"<22>[<5B>-<2D><>-<2D><>-<2D><>-<2D>]|<7C>[<5B>-<2D>]|<7C>[<5B>-<2D>]|<7C>[<5B>-<2D>]"},{name:"Nl",alias:"Letter_Number",bmp:"ᛮ-ᛰⅠ-ↂↅ-ↈ〇〡-〩〸-〺ꛦ-",astral:"<22>[<5B>-<2D><><EFBFBD><EFBFBD>-<2D>]|<7C>[<5B>-<2D>]"},{name:"No",alias:"Other_Number",bmp:"²³¹¼-¾৴-৹୲-୷௰-௲౸-౾൰-൵༪-༳፩-፼៰-៹᧚⁰⁴-⁹₀-₉⅐-⅟↉①-⒛⓪-⓿❶-➓⳽㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꠰-꠵",astral:"<22>[<5B>-<2D><>-<2D><>-<2D><><EFBFBD><EFBFBD>-<2D><>-<2D>]|<7C>[<5B>-<2D>]|<7C>[<5B>-<2D>]|<7C>[<5B>-<2D><>-<2D><><EFBFBD>-<2D>]|<7C>[<5B>-<2D>]|<7C>[<5B>-<2D>]"},{name:"P",alias:"Punctuation",bmp:"!-#%-\\x2A,-/:;\\x3F@\\x5B-\\x5D_\\x7B}¡§«¶·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰૰෴๏๚๛༄-༒༔༺-༽྅࿐-࿔࿙࿚၊-၏჻፠-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰-⸻、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!----]_{}⦅-・",astral:"<22>[<5B>-<2D>]|<7C>[<5B><><EFBFBD><EFBFBD>-<2D><><EFBFBD>-<2D>]|<7C>[<5B>-<2D><><EFBFBD>]|<7C>[<5B>-<2D><><EFBFBD><EFBFBD>-<2D><>-<2D><>-<2D>]"},{name:"Pc",alias:"Connector_Punctuation",bmp:"_‿⁀⁔︳︴-_"},{name:"Pd",alias:"Dash_Punctuation",bmp:"\\x2D֊־-―⸗⸚⸺⸻〜〰゠︱︲﹘﹣-"},{name:"Pe",alias:"Close_Punctuation",bmp:"\\x29\\x5D}༻༽᚜⁆⁾₎〉❩❫❭❯❱❳❵⟆⟧⟩⟫⟭⟯⦄⦆⦈⦊⦌⦎⦐⦒⦔⦖⦘⧙⧛⧽⸣⸥⸧⸩〉》」』】〕〗〙〛〞〟﴿︘︶︸︺︼︾﹀﹂﹄﹈﹚﹜﹞)]}⦆」"},{name:"Pf",alias:"Final_Punctuation",bmp:"»’”›⸃⸅⸊⸍⸝⸡"},{name:"Pi",alias:"Initial_Punctuation",bmp:"«‘‛“‟‹⸂⸄⸉⸌⸜⸠"},{name:"Po",alias:"Other_Punctuation",bmp:"!-#%-'\\x2A,\\x2E/:;\\x3F@\\x5C¡§¶·¿;·՚-՟։׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰૰෴๏๚๛༄-༒༔྅࿐-࿔࿙࿚၊-၏჻፠-፨᙭᙮᛫-᛭᜵᜶។-៖៘-៚᠀-᠅᠇-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‖‗†-‧‰-‸※-‾⁁-⁃⁇-⁑⁓⁕-⁞⳹-⳼⳾⳿⵰⸀⸁⸆-⸈⸋⸎-⸖⸘⸙⸛⸞⸟⸪-⸮⸰-⸹、-〃〽・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫︐-︖︙︰﹅﹆﹉-﹌﹐-﹒﹔-﹗﹟-﹡﹨﹪﹫!--'*,./:;?@\。、・",astral:"<22>[<5B>-<2D>]|<7C>[<5B><><EFBFBD><EFBFBD>-<2D><><EFBFBD>-<2D>]|<7C>[<5B>-<2D><><EFBFBD>]|<7C>[<5B>-<2D><><EFBFBD><EFBFBD>-<2D><>-<2D><>-<2D>]"},{name:"Ps",alias:"Open_Punctuation",bmp:"\\x28\\x5B\\x7B༺༼᚛„⁅⁽₍〈❪❬⟅⟦⟨⟪⟬⟮⦃⦅⦇⦉⦋⦍⦏⦑⦓⦕⦗⧘⧚⧼⸢⸤⸦⸨〈《「『【〖〘〚〝︗︵︷︹︻︽︿﹁﹃﹇﹙﹛﹝⦅「"},{name:"S",alias:"Symbol",bmp:"\\x24\\x2B<->\\x5E`\\x7C~¢-¦¨©¬®-±´¸×÷˂-˅˒-˟˥-˫˭˯-˿͵΄΅϶҂֏؆-؈؋؎؏۞۩۽۾߶৲৳৺৻૱୰௳-௺౿൹฿༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙៛᥀᧞-᧿᭡-᭪᭴-᭼᾽᾿-῁῍-῏῝-῟῭-`´῾⁄⁒⁺-⁼₊-₌₠-₺℀℁℃-℆℈℉℔№-℘℞-℣℥℧℩℮℺℻⅀-⅄⅊-⅍⅏←-⌨⌫-⏳␀-␦⑀-⑊⒜-ⓩ─-⛿✁-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭌⭐-⭙⳥-⳪⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿゛゜㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㋾㌀-㏿䷀-䷿꒐-꓆꜀-꜖꜠꜡꞉꞊꠨-꠫꠶-꠹꩷-꩹﬩﮲-﯁﷼﷽﹢﹤-﹦﹩$+<->^`|~¢-₩│-○<EFBFAE>",astral:"<EFBFBD>[<EFBFBD>-<EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD>-<EFBFBD><EFBFBD>-<EFBFBD><EFBFBD>-<EFBFBD><EFBFBD>-<EFBFBD><EFBFBD>-<EFBFBD><EFBFBD>-<EFBFBD><EFBFBD>-<EFBFBD><EFBFBD>
return utils.crc32=function(t){var e=0,n=-1;return t.split("").forEach(function(t){e=255&(n^t.charCodeAt(0)),n=n>>>8^mHash[e]}),n=-1^n,0>n&&(n=4294967295+n+1),n.toString(16)},window.perfTest=function(t){for(var e=Date.now(),n=0;1e4>n;n++)t();console.log("Run 10,000 times in "+(Date.now()-e)+"ms")},utils}),define("constants",[],function(){var t={};return t.VERSION="4.5.0",t.MAIN_URL="https://stackedit.io/",t.GOOGLE_ANALYTICS_ACCOUNT_ID="UA-39556145-1",t.GOOGLE_API_KEY="AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw",t.GOOGLE_DRIVE_APP_ID="241271498917",t.DROPBOX_APP_KEY="lq6mwopab8wskas",t.DROPBOX_APP_SECRET="851fgnucpezy84t",t.DROPBOX_RESTRICTED_APP_KEY="sw0hlixhr8q1xk0",t.DROPBOX_RESTRICTED_APP_SECRET="1r808p2xygs6lbg",t.BITLY_ACCESS_TOKEN="317e033bfd48cf31155a68a536b1860013b09c4c",t.DEFAULT_FILE_TITLE="Title",t.DEFAULT_FOLDER_NAME="New folder",t.GDRIVE_DEFAULT_FILE_TITLE="New Markdown document",t.EDITOR_DEFAULT_PADDING=35,t.CHECK_ONLINE_PERIOD=12e4,t.AJAX_TIMEOUT=3e4,t.ASYNC_TASK_DEFAULT_TIMEOUT=6e4,t.ASYNC_TASK_LONG_TIMEOUT=18e4,t.USER_IDLE_THRESHOLD=3e5,t.IMPORT_FILE_MAX_CONTENT_SIZE=1e5,t.IMPORT_IMG_MAX_CONTENT_SIZE=1e7,t.COUCHDB_PAGE_SIZE=25,t.TEMPORARY_FILE_INDEX="file.tempIndex",t.WELCOME_DOCUMENT_TITLE="Hello!",t.DOWNLOAD_IMPORT_URL="/downloadImport",t.PICASA_IMPORT_IMG_URL="/picasaImportImg",t.SSH_PUBLISH_URL="/sshPublish",t.PDF_EXPORT_URL="/pdfExport",t.COUCHDB_URL="https://stackedit.couchappy.com/documents",t.BASE_URL="http://localhost/",t.GOOGLE_CLIENT_ID="241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com",t.GITHUB_CLIENT_ID="e47fef6055344579799d",t.GATEKEEPER_URL="https://stackedit-gatekeeper-localhost.herokuapp.com/",t.TUMBLR_PROXY_URL="https://stackedit-tumblr-proxy-local.herokuapp.com/",t.WORDPRESS_CLIENT_ID="23361",t.WORDPRESS_PROXY_URL="https://stackedit-io-wordpress-proxy.herokuapp.com/",0===location.hostname.indexOf("stackedit.io")?(t.BASE_URL=t.MAIN_URL,t.GOOGLE_CLIENT_ID="241271498917-t4t7d07qis7oc0ahaskbif3ft6tk63cd.apps.googleusercontent.com",t.GITHUB_CLIENT_ID="710fc67886ab1ae8fee6",t.GATEKEEPER_URL="https://stackedit-io-gatekeeper.herokuapp.com/",t.TUMBLR_PROXY_URL="https://stackedit-io-tumblr-proxy.herokuapp.com/"):0===location.hostname.indexOf("benweet.github.io")?(t.BASE_URL="http://benweet.github.io/stackedit/",t.GOOGLE_CLIENT_ID="241271498917-jpto9lls9fqnem1e4h6ppds9uob8rpvu.apps.googleusercontent.com",t.GITHUB_CLIENT_ID="fa0d09514da8377ee32e",t.GATEKEEPER_URL="https://stackedit-gatekeeper.herokuapp.com/",t.TUMBLR_PROXY_URL="https://stackedit-tumblr-proxy.herokuapp.com/",t.WORDPRESS_CLIENT_ID="3185",t.WORDPRESS_PROXY_URL="https://stackedit-wordpress-proxy.herokuapp.com/"):0===location.hostname.indexOf("stackedit-beta.herokuapp.com")?(t.BASE_URL="https://stackedit-beta.herokuapp.com/",t.GOOGLE_CLIENT_ID="241271498917-9bbplknkt0ljv5gaudhoiogp13hd18be.apps.googleusercontent.com",t.GITHUB_CLIENT_ID="e9034ae191c3a8a1c5ed",t.GATEKEEPER_URL="https://stackedit-beta-gatekeeper.herokuapp.com/",t.TUMBLR_PROXY_URL="https://stackedit-beta-tumblr-proxy.herokuapp.com/",t.WORDPRESS_CLIENT_ID="34786",t.WORDPRESS_PROXY_URL="https://stackedit-beta-wordpress-proxy.herokuapp.com/"):0===location.hostname.indexOf("benweet.insomnia247.nl")&&(t.BASE_URL="http://benweet.insomnia247.nl/stackedit/",t.GOOGLE_CLIENT_ID="241271498917-52hae7a08hv7ltenv7km8h7lghno9sk3.apps.googleusercontent.com",t.GITHUB_CLIENT_ID="d2943d6074b2d9c4a830",t.GATEKEEPER_URL="https://stackedit-gatekeeper-insomnia.herokuapp.com/",t.TUMBLR_PROXY_URL="https://stackedit-tumblr-proxy-beta.herokuapp.com/"),t.THEME_LIST={blue:"Blue","default":"Default",gray:"Gray",night:"Night",school:"School","solarized-light":"Solarized Light","solarized-dark":"Solarized Dark"},t}),define("settings",["underscore","constants","storage"],function(t,e,n){var r={layoutOrientation:"horizontal",editMode:"ltr",lazyRendering:!0,editorFontClass:"font-rich",fontSizeRatio:1,maxWidthRatio:1,cursorFocusRatio:.5,defaultContent:"\n\n\n> Written with [StackEdit]("+e.MAIN_URL+").",commitMsg:"Published with "+e.MAIN_URL,conflictMode:"merge",markdownMimeType:"text/pl
dump:function(t,e,n){null==e&&(e=0),null==n&&(n=0);var r,a="",o=n?this.strRepeat(" ",n):"";if(this.numSpacesForIndentation||(this.numSpacesForIndentation=2),0>=e||!this.isObject(t)||this.isEmpty(t))r=new i,a+=o+r.dump(t);else{var s,l=!this.arrayEquals(this.getKeys(t),this.range(0,t.length-1));for(var c in t)t.hasOwnProperty(c)&&(s=0>=e-1||!this.isObject(t[c])||this.isEmpty(t[c]),l&&(r=new i),a+=o+""+(l?r.dump(c)+":":"-")+(s?" ":"\n")+this.dump(t[c],e-1,s?0:n+this.numSpacesForIndentation)+(s?"\n":""))}return a},strRepeat:function(t,e){var n,r="";for(n=0;e>n;n++)r+=t;return r},isObject:function(t){return this.isDefined(t)&&"object"==typeof t},isEmpty:function(t){var e=void 0==t||null==t||""==t||0==t||"0"==t||0==t;if(!(e||"object"!=typeof t||t instanceof Array)){var n=0;for(var r in t)t.hasOwnProperty(r)&&n++;e=!n}return e},isDefined:function(t){return void 0!=t&&null!=t},getKeys:function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e},range:function(t,e){if(t>e)return[];for(var n=[],r=t;e>=r;r++)n.push(r);return n},arrayEquals:function(t,e){if(t.length!=e.length)return!1;for(var n=t.length,r=0;n>r;r++)if(t[r]!=e[r])return!1;return!0}}}(),define("yaml-js",function(t){return function(){var e;return e||t.YAML}}(this)),define("extensions/yamlFrontMatterParser",["underscore","classes/Extension","yaml-js"],function(t,e,n){function r(e,r){if(e===o){var i=s.exec(r),a=i[1],l=i[2];if(l){if(!o.frontMatter||o.frontMatter._frontMatter!=a){o.frontMatter=void 0;try{o.frontMatter=n.parse(l),t.isObject(o.frontMatter)||(o.frontMatter=void 0),o.frontMatter._yaml=l,o.frontMatter._frontMatter=a}catch(c){}}}else o.frontMatter=void 0}}var i,a=new e("yamlFrontMatterParser","YAML front matter");a.onEventMgrCreated=function(t){i=t};var o;a.onFileSelected=function(t){o=t};var s=/^(\s*-{3}\s*\n([\w\W]+?)\n\s*-{3}\s*?\n)?([\w\W]*)$/;return a.onFileOpen=r,a.onContentChanged=r,a}),define("text",["module"],function(t){var e,n,r,i,a,o=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],s=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,l=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,c="undefined"!=typeof location&&location.href,u=c&&location.protocol&&location.protocol.replace(/\:/,""),h=c&&location.hostname,f=c&&(location.port||void 0),d={},p=t.config&&t.config()||{};return e={version:"2.0.13",strip:function(t){if(t){t=t.replace(s,"");var e=t.match(l);e&&(t=e[1])}else t="";return t},jsEscape:function(t){return t.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:p.createXhr||function(){var t,e,n;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(e=0;3>e;e+=1){n=o[e];try{t=new ActiveXObject(n)}catch(r){}if(t){o=[n];break}}return t},parseName:function(t){var e,n,r,i=!1,a=t.lastIndexOf("."),o=0===t.indexOf("./")||0===t.indexOf("../");return-1!==a&&(!o||a>1)?(e=t.substring(0,a),n=t.substring(a+1)):e=t,r=n||e,a=r.indexOf("!"),-1!==a&&(i="strip"===r.substring(a+1),r=r.substring(0,a),n?n=r:e=r),{moduleName:e,ext:n,strip:i}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(t,n,r,i){var a,o,s,l=e.xdRegExp.exec(t);return l?(a=l[2],o=l[3],o=o.split(":"),s=o[1],o=o[0],!(a&&a!==n||o&&o.toLowerCase()!==r.toLowerCase()||(s||o)&&s!==i)):!0},finishLoad:function(t,n,r,i){r=n?e.strip(r):r,p.isBuild&&(d[t]=r),i(r)},load:function(t,n,r,i){if(i&&i.isBuild&&!i.inlineText)return void r();p.isBuild=i&&i.isBuild;var a=e.parseName(t),o=a.moduleName+(a.ext?"."+a.ext:""),s=n.toUrl(o),l=p.useXhr||e.useXhr;return 0===s.indexOf("empty:")?void r():void(!c||l(s,u,h,f)?e.get(s,function(n){e.finishLoad(t,a.strip,n,r)},function(t){r.error&&r.error(t)}):n([o],function(t){e.finishLoad(a.moduleName+"."+a.ext,a.strip,t,r)}))},write:function(t,n,r){if(d.hasOwnProperty(n)){var i=e.jsEscape(d[n]);r.asModule(t+"!"+n,"define(function () { return '"+i+"';});\n")}},writeFile:function(t,n,r,i,a){var o=e.parseName(n),s=o.ext?"."+o.ext:"",l=o.moduleName+s
return t=t.replace(/~E(\d+)E/g,function(t,e){var n=parseInt(e);return String.fromCharCode(n)})}function I(t){return t=t.replace(/^(\t|[ ]{1,4})/gm,"~0"),t=t.replace(/~0/g,"")}function N(t){if(!/\t/.test(t))return t;var e,n=[" "," "," "," "],r=0;return t.replace(/[\n\t]/g,function(t,i){return"\n"===t?(r=i+1,t):(e=(i-r)%4,r=i+1,n[e])})}function R(t){return t?(t.length,t.replace(z,function(t){return"~D"==t?"%24":":"==t?":":"%"+t.charCodeAt(0).toString(16)})):""}function A(t,e,n){var r="(["+e.replace(/([\[\]\\])/g,"\\$1")+"])";n&&(r="\\\\"+r);var i=new RegExp(r,"g");return t=t.replace(i,M)}function M(t,e){var n=e.charCodeAt(0);return"~E"+n+"E"}var L={};this.setOptions=function(t){L=t};var O=this.hooks=new n;O.addNoop("plainLinkText"),O.addNoop("preConversion"),O.addNoop("postNormalization"),O.addNoop("preBlockGamut"),O.addNoop("postBlockGamut"),O.addNoop("preSpanGamut"),O.addNoop("postSpanGamut"),O.addNoop("postConversion");var D,F,P,B;this.makeHtml=function(n){if(D)throw new Error("Recursive call to converter.makeHtml");return D=new r,F=new r,P=[],B=0,n=O.preConversion(n),n=n.replace(/~/g,"~T"),n=n.replace(/\$/g,"~D"),n=n.replace(/\r\n/g,"\n"),n=n.replace(/\r/g,"\n"),n="\n\n"+n+"\n\n",n=N(n),n=n.replace(/^[ \t]+$/gm,""),n=O.postNormalization(n),n=e(n),n=t(n),n=a(n),n=T(n),n=n.replace(/~D/g,"$$"),n=n.replace(/~T/g,"~"),n=O.postConversion(n),P=F=D=null,n};var j=function(t){return a(t)},$={ol:"\\d+[.]",ul:"[*+-]"},H="[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]",U="[-A-Z0-9+&@#/%=~_|[\\])]",q=new RegExp('(="|<)?\\b(https?|ftp)(://'+H+"*"+U+")(?=$|\\W)","gi"),G=new RegExp(U,"i"),z=/(?:["'*()[\]:]|~D)/g}}(),define("libs/Markdown.Converter",function(){}),function(){function t(t){return t.replace(/^\s+|\s+$/g,"")}function e(t){return t.replace(/\s+$/g,"")}function n(t){return t.replace(new RegExp("^(\\t|[ ]{1,4})","gm"),"")}function r(t,e){return-1!=t.indexOf(e)}function i(t,e){return t.replace(/<[^>]*>?/gi,function(t){return t.match(e)?t:""})}function a(t,e){for(var n={},r=0;r<t.length;r++)n[t[r]]=t[r];for(r=0;r<e.length;r++)n[e[r]]=e[r];var i=[];for(var a in n)n.hasOwnProperty(a)&&i.push(n[a]);return i}function o(t){return""!=t.charAt(0)&&(t=""+t),""!=t.charAt(t.length-1)&&(t+=""),t}function s(t){return""==t.charAt(0)&&(t=t.substr(1)),""==t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),t}function l(t,e){return i(c(t,e),g)}function c(t,e){var n=e.blockGamutHookCallback(t);return n=f(n),n=n.replace(/~D/g,"$$").replace(/~T/g,"~"),n=e.previousPostConversion(n)}function u(t){return t.replace(/\\\|/g,"~I").replace(/\\:/g,"~i")}function h(t){return t.replace(/~I/g,"|").replace(/~i/g,":")}function f(t){return t=t.replace(/~E(\d+)E/g,function(t,e){var n=parseInt(e);return String.fromCharCode(n)})}function d(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}function p(t,e){var n=e;return n=n.replace(/&\#8220;/g,'"'),n=n.replace(/&\#8221;/g,'"'),n=n.replace(/&\#8216;/g,"'"),n=n.replace(/&\#8217;/g,"'"),n=n.replace(/&\#8212;/g,"---"),n=n.replace(/&\#8211;/g,"--"),n=n.replace(/&\#8230;/g,"...")}var g=new RegExp(["^(<\\/?(a|abbr|acronym|applet|area|b|basefont|","bdo|big|button|cite|code|del|dfn|em|figcaption|","font|i|iframe|img|input|ins|kbd|label|map|","mark|meter|object|param|progress|q|ruby|rp|rt|s|","samp|script|select|small|span|strike|strong|","sub|sup|textarea|time|tt|u|var|wbr)[^>]*>|","<(br)\\s?\\/?>)$"].join(""),"i");Array.indexOf||(Array.prototype.indexOf=function(t){for(var e=0;e<this.length;e++)if(this[e]==t)return e;return-1}),Markdown.Extra=function(){this.converter=null,this.hashBlocks=[],this.footnotes={},this.usedFootnotes=[],this.attributeBlocks=!1,this.googleCodePrettify=!1,this.highlightJs=!1,this.tableClass="",this.tabWidth=4},Markdown.Extra.init=function(t,e){var n=new Markdown.Extra,i=[],a=[],o=[],s=["unHashExtraBlocks"];return e=e||{},e.extensions=e.extensions||["all"],r(e.extensions,"all")&&(e.extensions=["tables","fenced_code_gfm","def_list","attr_list","footnotes","smartypants","strikethrough","newlines"]),a.push("wrapHeaders"),r(e.exte
t(this).data("jGrowl.pause",!0),t(this).animate(i.animateClose,i.closeDuration,i.easing,function(){t.isFunction(i.close)?i.close.apply(e,[e,r,i,n.element])!==!1&&t(this).remove():t(this).remove()})}).trigger("jGrowl.beforeOpen"),""!=i.corners&&void 0!=t.fn.corner&&t(e).corner(i.corners),t("div.jGrowl-notification:parent",n.element).size()>1&&0==t("div.jGrowl-closer",n.element).size()&&this.defaults.closer!==!1&&t(this.defaults.closerTemplate).addClass("jGrowl-closer "+this.defaults.themeState+" ui-corner-all").addClass(this.defaults.theme).appendTo(n.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){t(this).siblings().trigger("jGrowl.beforeClose"),t.isFunction(n.defaults.closer)&&n.defaults.closer.apply(t(this).parent()[0],[t(this).parent()[0]])})},update:function(){t(this.element).find("div.jGrowl-notification:parent").each(function(){void 0!=t(this).data("jGrowl")&&void 0!==t(this).data("jGrowl").created&&t(this).data("jGrowl").created.getTime()+parseInt(t(this).data("jGrowl").life)<(new Date).getTime()&&t(this).data("jGrowl").sticky!==!0&&(void 0==t(this).data("jGrowl.pause")||t(this).data("jGrowl.pause")!==!0)&&t(this).trigger("jGrowl.beforeClose")}),this.notifications.length>0&&(0==this.defaults.pool||t(this.element).find("div.jGrowl-notification:parent").size()<this.defaults.pool)&&this.render(this.notifications.shift()),t(this.element).find("div.jGrowl-notification:parent").size()<2&&t(this.element).find("div.jGrowl-closer").animate(this.defaults.animateClose,this.defaults.speed,this.defaults.easing,function(){t(this).remove()})},startup:function(n){this.element=t(n).addClass("jGrowl").append('<div class="jGrowl-notification"></div>'),this.interval=setInterval(function(){t(n).data("jGrowl.instance").update()},parseInt(this.defaults.check)),e&&t(this.element).addClass("ie6")},shutdown:function(){t(this.element).removeClass("jGrowl").find("div.jGrowl-notification").trigger("jGrowl.close").parent().empty(),clearInterval(this.interval)},close:function(){t(this.element).find("div.jGrowl-notification").each(function(){t(this).trigger("jGrowl.beforeClose")})}}),t.jGrowl.defaults=t.fn.jGrowl.prototype.defaults}(jQuery),define("jgrowl",function(t){return function(){var e;return e||t.jQuery.jGrowl}}(this)),define("text!html/notificationsSettingsBlock.html",[],function(){return'<p>Shows notification messages in the bottom-right corner of the\n screen.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label" for="input-notifications-timeout">Timeout</label>\n <div class="col-sm-7 form-inline">\n <input type="text" id="input-notifications-timeout"\n class="col-sm-5 form-control"> <span class="help-inline">ms</span>\n </div>\n </div>\n</div>'}),define("extensions/notifications",["underscore","utils","logger","classes/Extension","jgrowl","text!html/notificationsSettingsBlock.html"],function(t,e,n,r,i,a){function o(){f===!1&&(i.defaults.life=c.config.timeout,i.defaults.closer=!1,i.defaults.closeTemplate="",i.defaults.position="bottom-right",f=!0)}function s(e,r,a){if(n.info(e),o(),e){var s=e.indexOf("|");(-1===s||(e=e.substring(0,s)))&&(a=a||{},r=r||"icon-info-circled",i("<i class='icon-white "+r+"'></i> "+t.escape(e).replace(/\n/g,"<br/>"),a))}}function l(){d!==!1&&(u.toggleClass("hide",!p),h.toggleClass("hide",p))}var c=new r("notifications","Notifications");c.settingsBlock=a,c.defaultConfig={timeout:8e3},c.onLoadSettings=function(){e.setInputValue("#input-notifications-timeout",c.config.timeout)},c.onSaveSettings=function(t,n){t.timeout=e.getInputIntValue("#input-notifications-timeout",n,1,6e4)};var u,h,f=!1,d=!1;c.onReady=function(){d=!0,u=$(".navbar .offline-status"),h=$(".navbar .extension-buttons"),l()},c.onMessage=function(t){s(t)},c.onError=function(e){n.error(e),t.isString(e)?s(e,"icon-attention"):t.isObject(e)&&s(e.message,"icon-attention")};var p=!1;return c.onOfflineChanged=function(t){p=t,l(),p===!0?s("You are offline.","icon-attention-circled msg-offline"):s("You are back online!","icon-signal")},
j.sin(G/180*i),(t-l)/2),v=(e-c)/2,y=m*m/(n*n)+v*v/(r*r);y>1&&(y=j.sqrt(y),n=y*n,r=y*r);var x=n*n,b=r*r,w=(o==s?-1:1)*j.sqrt(U((x*b-x*v*v-b*m*m)/(x*v*v+b*m*m))),_=w*n*v/r+(t+l)/2,S=w*-r*m/n+(e+c)/2,C=j.asin(((e-S)/r).toFixed(9)),E=j.asin(((c-S)/r).toFixed(9));C=_>t?G-C:C,E=_>l?G-E:E,0>C&&(C=2*G+C),0>E&&(E=2*G+E),s&&C>E&&(C-=2*G),!s&&E>C&&(E-=2*G)}var k=E-C;if(U(k)>f){var T=E,I=l,N=c;E=C+f*(s&&E>C?1:-1),l=_+n*j.cos(E),c=S+r*j.sin(E),p=Lt(l,c,n,r,i,0,s,I,N,[E,T,_,S])}k=E-C;var A=j.cos(C),M=j.sin(C),L=j.cos(E),O=j.sin(E),F=j.tan(k/4),P=4/3*n*F,B=4/3*r*F,$=[t,e],H=[t+P*M,e-B*A],q=[l+P*O,c-B*L],z=[l,c];if(H[0]=2*$[0]-H[0],H[1]=2*$[1]-H[1],u)return[H,q,z][R](p);p=[H,q,z][R](p).join()[D](",");for(var W=[],X=0,V=p.length;V>X;X++)W[X]=X%2?g(p[X-1],p[X],d).y:g(p[X],p[X+1],d).x;return W},Ot=function(t,e,n,r,i,a,o,s,l){var c=1-l;return{x:q(c,3)*t+3*q(c,2)*l*n+3*c*l*l*i+q(l,3)*o,y:q(c,3)*e+3*q(c,2)*l*r+3*c*l*l*a+q(l,3)*s}},Dt=a(function(t,e,n,r,i,a,o,s){var l,c=i-2*n+t-(o-2*i+n),u=2*(n-t)-2*(i-n),h=t-n,f=(-u+j.sqrt(u*u-4*c*h))/2/c,d=(-u-j.sqrt(u*u-4*c*h))/2/c,p=[e,s],g=[t,o];return U(f)>"1e12"&&(f=.5),U(d)>"1e12"&&(d=.5),f>0&&1>f&&(l=Ot(t,e,n,r,i,a,o,s,f),g.push(l.x),p.push(l.y)),d>0&&1>d&&(l=Ot(t,e,n,r,i,a,o,s,d),g.push(l.x),p.push(l.y)),c=a-2*r+e-(s-2*a+r),u=2*(r-e)-2*(a-r),h=e-r,f=(-u+j.sqrt(u*u-4*c*h))/2/c,d=(-u-j.sqrt(u*u-4*c*h))/2/c,U(f)>"1e12"&&(f=.5),U(d)>"1e12"&&(d=.5),f>0&&1>f&&(l=Ot(t,e,n,r,i,a,o,s,f),g.push(l.x),p.push(l.y)),d>0&&1>d&&(l=Ot(t,e,n,r,i,a,o,s,d),g.push(l.x),p.push(l.y)),{min:{x:H[N](0,g),y:H[N](0,p)},max:{x:$[N](0,g),y:$[N](0,p)}}}),Ft=n._path2curve=a(function(t,e){var n=!e&&kt(t);if(!e&&n.curve)return It(n.curve);for(var r=Rt(t),i=e&&Rt(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s=(function(t,e,n){var r,i;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][R](Lt[N](0,[e.x,e.y][R](t.slice(1))));break;case"S":"C"==n||"S"==n?(r=2*e.x-e.bx,i=2*e.y-e.by):(r=e.x,i=e.y),t=["C",r,i][R](t.slice(1));break;case"T":"Q"==n||"T"==n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][R](Mt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][R](Mt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][R](At(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][R](At(e.x,e.y,t[1],e.y));break;case"V":t=["C"][R](At(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][R](At(e.x,e.y,e.X,e.Y))}return t}),l=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)t.splice(e++,0,["C"][R](n.splice(0,6)));t.splice(e,1),h=$(r.length,i&&i.length||0)}},c=function(t,e,n,a,o){t&&e&&"M"==t[o][0]&&"M"!=e[o][0]&&(e.splice(o,0,["M",a.x,a.y]),n.bx=0,n.by=0,n.x=t[o][1],n.y=t[o][2],h=$(r.length,i&&i.length||0))},u=0,h=$(r.length,i&&i.length||0);h>u;u++){r[u]=s(r[u],a),l(r,u),i&&(i[u]=s(i[u],o)),i&&l(i,u),c(r,i,a,o,u),c(i,r,o,a,u);var f=r[u],d=i&&i[u],p=f.length,g=i&&d.length;a.x=f[p-2],a.y=f[p-1],a.bx=Z(f[p-4])||a.x,a.by=Z(f[p-3])||a.y,o.bx=i&&(Z(d[g-4])||o.x),o.by=i&&(Z(d[g-3])||o.y),o.x=i&&d[g-2],o.y=i&&d[g-1]}return i||(n.curve=It(r)),i?[r,i]:r},null,It),Pt=(n._parseDots=a(function(t){for(var e=[],r=0,i=t.length;i>r;r++){var a={},o=t[r].match(/^([^:]*):?([\d\.]*)/);if(a.color=n.getRGB(o[1]),a.color.error)return null;a.color=a.color.hex,o[2]&&(a.offset=o[2]+"%"),e.push(a)}for(r=1,i=e.length-1;i>r;r++)if(!e[r].offset){for(var s=Z(e[r-1].offset||0),l=0,c=r+1;i>c;c++)if(e[c].offset){l=e[c].offset;break}l||(l=100,c=i),l=Z(l);for(var u=(l-s)/(c-r+1);c>r;r++)s+=u,e[r].offset=s+"%"}return e}),n._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),Bt=(n._tofront=function(t,e){e.top!==t&&(Pt(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},n._toback=function(t,e){e.bottom!==t&&(Pt(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},n._insertafter=function(t,e,n){Pt(t,n),e==n.top&&(n.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},n._insertbefore=function(t,e,n){Pt(t,n),e==n.bottom&&(n.bo
"stroke-linecap":"round",d:p[_],id:k})),g[k]=1);var I,N=n._g.doc.getElementById(T);N?(g[T]++,I=N.getElementsByTagName("use")[0]):(N=m(m("marker"),{id:T,markerHeight:C,markerWidth:S,orient:"auto",refX:c,refY:C/2}),I=m(m("use"),{"xlink:href":"#"+k,transform:(a?"rotate(180 "+S/2+" "+C/2+") ":h)+"scale("+S/E+","+C/E+")","stroke-width":(1/((S/E+C/E)/2)).toFixed(4)}),N.appendChild(I),d.defs.appendChild(N),g[T]=1),m(I,u);var R=l*("diamond"!=_&&"oval"!=_);a?(o=r._.arrows.startdx*b||0,s=n.getTotalLength(x.path)-R*b):(o=R*b,s=n.getTotalLength(x.path)-(r._.arrows.enddx*b||0)),u={},u["marker-"+v]="url(#"+T+")",(s||o)&&(u.d=n.getSubpath(x.path,o,s)),m(y,u),r._.arrows[v+"Path"]=k,r._.arrows[v+"Marker"]=T,r._.arrows[v+"dx"]=R,r._.arrows[v+"Type"]=_,r._.arrows[v+"String"]=i}else a?(o=r._.arrows.startdx*b||0,s=n.getTotalLength(x.path)-o):(o=0,s=n.getTotalLength(x.path)-(r._.arrows.enddx*b||0)),r._.arrows[v+"Path"]&&m(y,{d:n.getSubpath(x.path,o,s)}),delete r._.arrows[v+"Path"],delete r._.arrows[v+"Marker"],delete r._.arrows[v+"dx"],delete r._.arrows[v+"Type"],delete r._.arrows[v+"String"];for(u in g)if(g[t](u)&&!g[u]){var A=n._g.doc.getElementById(u);A&&A.parentNode.removeChild(A)}}},b={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},w=function(t,n,r){if(n=b[e(n).toLowerCase()]){for(var i=t.attrs["stroke-width"]||"1",a={round:i,square:i,butt:0}[t.attrs["stroke-linecap"]||r["stroke-linecap"]]||0,o=[],s=n.length;s--;)o[s]=n[s]*i+(s%2?1:-1)*a;m(t.node,{"stroke-dasharray":o.join(",")})}},_=function(r,a){var l=r.node,u=r.attrs,f=l.style.visibility;l.style.visibility="hidden";for(var p in a)if(a[t](p)){if(!n._availableAttrs[t](p))continue;var g=a[p];switch(u[p]=g,p){case"blur":r.blur(g);break;case"href":case"title":var b=m("title"),_=n._g.doc.createTextNode(g);b.appendChild(_),l.appendChild(b);break;case"target":var S=l.parentNode;if("a"!=S.tagName.toLowerCase()){var b=m("a");S.insertBefore(b,l),b.appendChild(l),S=b}"target"==p?S.setAttributeNS(d,"show","blank"==g?"new":g):S.setAttributeNS(d,p,g);break;case"cursor":l.style.cursor=g;break;case"transform":r.transform(g);break;case"arrow-start":x(r,g);break;case"arrow-end":x(r,g,1);break;case"clip-rect":var E=e(g).split(c);if(4==E.length){r.clip&&r.clip.parentNode.parentNode.removeChild(r.clip.parentNode);var k=m("clipPath"),T=m("rect");k.id=n.createUUID(),m(T,{x:E[0],y:E[1],width:E[2],height:E[3]}),k.appendChild(T),r.paper.defs.appendChild(k),m(l,{"clip-path":"url(#"+k.id+")"}),r.clip=T}if(!g){var I=l.getAttribute("clip-path");if(I){var N=n._g.doc.getElementById(I.replace(/(^url\(#|\)$)/g,h));N&&N.parentNode.removeChild(N),m(l,{"clip-path":h}),delete r.clip}}break;case"path":"path"==r.type&&(m(l,{d:g?u.path=n._pathToAbsolute(g):"M0,0"}),r._.dirty=1,r._.arrows&&("startString"in r._.arrows&&x(r,r._.arrows.startString),"endString"in r._.arrows&&x(r,r._.arrows.endString,1)));break;case"width":if(l.setAttribute(p,g),r._.dirty=1,!u.fx)break;p="x",g=u.x;case"x":u.fx&&(g=-u.x-(u.width||0));case"rx":if("rx"==p&&"rect"==r.type)break;case"cx":l.setAttribute(p,g),r.pattern&&y(r),r._.dirty=1;break;case"height":if(l.setAttribute(p,g),r._.dirty=1,!u.fy)break;p="y",g=u.y;case"y":u.fy&&(g=-u.y-(u.height||0));case"ry":if("ry"==p&&"rect"==r.type)break;case"cy":l.setAttribute(p,g),r.pattern&&y(r),r._.dirty=1;break;case"r":"rect"==r.type?m(l,{rx:g,ry:g}):l.setAttribute(p,g),r._.dirty=1;break;case"src":"image"==r.type&&l.setAttributeNS(d,"href",g);break;case"stroke-width":(1!=r._.sx||1!=r._.sy)&&(g/=o(s(r._.sx),s(r._.sy))||1),r.paper._vbSize&&(g*=r.paper._vbSize),l.setAttribute(p,g),u["stroke-dasharray"]&&w(r,u["stroke-dasharray"],a),r._.arrows&&("startString"in r._.arrows&&x(r,r._.arrows.startString),"endString"in r._.arrows&&x(r,r._.arrows.endString,1));break;case"stroke-dasharray":w(r,g,a);break;case"fill":var R=e(g).match(n._ISURL);if(R){k=m("pattern");var A=m("image");k.id=n.createUUID(),m(k,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),m(A,{x:0,y:0,"xlink:href":R[1]}),k.appendChild(A),functi
n[t].apply(n,e)})}}(L))}}(),T.was?k.win.Raphael=n:Raphael=n,n}),function(){function t(){this.title=void 0,this.actors=[],this.signals=[]}function e(t,e){_.extend(this,e),this.name="ParseError",this.message=t||""}t.prototype.getActor=function(e){var n=/^(.+) as (\S+)$/i.exec(e.trim());n?(name=n[1].trim(),e=n[2].trim()):name=e.trim(),name=name.replace(/\\n/gm,"\n");var r,i=this.actors;for(r in i)if(i[r].alias==e)return i[r];return r=i.push(new t.Actor(e,name,i.length)),i[r-1]},t.prototype.setTitle=function(t){this.title=t},t.prototype.addSignal=function(t){this.signals.push(t)},t.Actor=function(t,e,n){this.alias=t,this.name=e,this.index=n},t.Signal=function(t,e,n,r){this.type="Signal",this.actorA=t,this.actorB=n,this.linetype=3&e,this.arrowtype=e>>2&3,this.message=r},t.Signal.prototype.isSelf=function(){return this.actorA.index==this.actorB.index},t.Note=function(t,e,n){if(this.type="Note",this.actor=t,this.placement=e,this.message=n,this.hasManyActors()&&t[0]==t[1])throw new Error("Note should be over two different actors")},t.Note.prototype.hasManyActors=function(){return _.isArray(this.actor)},t.LINETYPE={SOLID:0,DOTTED:1},t.ARROWTYPE={FILLED:0,OPEN:1},t.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2};var n=function(){function e(){this.yy={}}var n={trace:function(){},yy:{},symbols_:{error:2,start:3,document:4,EOF:5,line:6,statement:7,NL:8,participant:9,actor:10,signal:11,note_statement:12,title:13,message:14,note:15,placement:16,over:17,actor_pair:18,",":19,left_of:20,right_of:21,signaltype:22,ACTOR:23,linetype:24,arrowtype:25,LINE:26,DOTLINE:27,ARROW:28,OPENARROW:29,MESSAGE:30,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"NL",9:"participant",13:"title",15:"note",17:"over",19:",",20:"left_of",21:"right_of",23:"ACTOR",26:"LINE",27:"DOTLINE",28:"ARROW",29:"OPENARROW",30:"MESSAGE"},productions_:[0,[3,2],[4,0],[4,2],[6,1],[6,1],[7,2],[7,1],[7,1],[7,2],[12,4],[12,4],[18,1],[18,3],[16,1],[16,1],[11,4],[10,1],[22,2],[22,1],[24,1],[24,1],[25,1],[25,1],[14,1]],performAction:function(e,n,r,i,a,o){var s=o.length-1;switch(a){case 1:return i;case 4:break;case 6:o[s];break;case 7:i.addSignal(o[s]);break;case 8:i.addSignal(o[s]);break;case 9:i.setTitle(o[s]);break;case 10:this.$=new t.Note(o[s-1],o[s-2],o[s]);break;case 11:this.$=new t.Note(o[s-1],t.PLACEMENT.OVER,o[s]);break;case 12:this.$=o[s];break;case 13:this.$=[o[s-2],o[s]];break;case 14:this.$=t.PLACEMENT.LEFTOF;break;case 15:this.$=t.PLACEMENT.RIGHTOF;break;case 16:this.$=new t.Signal(o[s-3],o[s-2],o[s-1],o[s]);break;case 17:this.$=i.getActor(o[s]);break;case 18:this.$=o[s-1]|o[s]<<2;break;case 19:this.$=o[s];break;case 20:this.$=t.LINETYPE.SOLID;break;case 21:this.$=t.LINETYPE.DOTTED;break;case 22:this.$=t.ARROWTYPE.FILLED;break;case 23:this.$=t.ARROWTYPE.OPEN;break;case 24:this.$=o[s].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:2,5:[2,2],8:[2,2],9:[2,2],13:[2,2],15:[2,2],23:[2,2]},{1:[3]},{5:[1,3],6:4,7:5,8:[1,6],9:[1,7],10:11,11:8,12:9,13:[1,10],15:[1,12],23:[1,13]},{1:[2,1]},{5:[2,3],8:[2,3],9:[2,3],13:[2,3],15:[2,3],23:[2,3]},{5:[2,4],8:[2,4],9:[2,4],13:[2,4],15:[2,4],23:[2,4]},{5:[2,5],8:[2,5],9:[2,5],13:[2,5],15:[2,5],23:[2,5]},{10:14,23:[1,13]},{5:[2,7],8:[2,7],9:[2,7],13:[2,7],15:[2,7],23:[2,7]},{5:[2,8],8:[2,8],9:[2,8],13:[2,8],15:[2,8],23:[2,8]},{14:15,30:[1,16]},{22:17,24:18,26:[1,19],27:[1,20]},{16:21,17:[1,22],20:[1,23],21:[1,24]},{5:[2,17],8:[2,17],9:[2,17],13:[2,17],15:[2,17],19:[2,17],23:[2,17],26:[2,17],27:[2,17],30:[2,17]},{5:[2,6],8:[2,6],9:[2,6],13:[2,6],15:[2,6],23:[2,6]},{5:[2,9],8:[2,9],9:[2,9],13:[2,9],15:[2,9],23:[2,9]},{5:[2,24],8:[2,24],9:[2,24],13:[2,24],15:[2,24],23:[2,24]},{10:25,23:[1,13]},{23:[2,19],25:26,28:[1,27],29:[1,28]},{23:[2,20],28:[2,20],29:[2,20]},{23:[2,21],28:[2,21],29:[2,21]},{10:29,23:[1,13]},{10:31,18:30,23:[1,13]},{23:[2,14]},{23:[2,15]},{14:32,30:[1,16]},{23:[2,18]},{23:[2,22]},{23:[2,23]},{14:33,30:[1,16]},{14:34,30:[1,16]},{19:[1,35],30:[2,12]},{5:[2,16],8:[2,16],9:[2,16],13:[2,16],15:[2,16],23:[2,16]},{5:[2,10],8:[2,10],9:[2,10],13:[2,10],15:[2,10],23:[2,10]},{5:[2,11],8:[2,11],9:[2,11],13:[2,11],15:[2,11],23:[2,11
r=0,i=this.symbols.length;i>r;r++){t=this.symbols[r];var s=t.getX()+t.width,l=t.getY()+t.height;s>a&&(a=s),l>o&&(o=l)}this.paper.setSize(a+this.options["line-width"],o+this.options["line-width"])},a.prototype.clean=function(){if(this.paper){var t=this.paper.canvas;t.parentNode.removeChild(t)}},o.prototype.getAttr=function(t){if(!this.chart)return void 0;var e,n=this.chart.options?this.chart.options[t]:void 0,r=this.chart.options.symbols?this.chart.options.symbols[this.symbolType][t]:void 0;return this.chart.options.flowstate&&this.chart.options.flowstate[this.flowstate]&&(e=this.chart.options.flowstate[this.flowstate][t]),e||r||n},o.prototype.initialize=function(){this.group.transform("t"+this.getAttr("line-width")+","+this.getAttr("line-width")),this.width=this.group.getBBox().width,this.height=this.group.getBBox().height},o.prototype.getCenter=function(){return{x:this.getX()+this.width/2,y:this.getY()+this.height/2}},o.prototype.getX=function(){return this.group.getBBox().x},o.prototype.getY=function(){return this.group.getBBox().y},o.prototype.shiftX=function(t){this.group.transform("t"+(this.getX()+t)+","+this.getY())},o.prototype.setX=function(t){this.group.transform("t"+t+","+this.getY())},o.prototype.shiftY=function(t){this.group.transform("t"+this.getX()+","+(this.getY()+t))},o.prototype.setY=function(t){this.group.transform("t"+this.getX()+","+t)},o.prototype.getTop=function(){var t=this.getY(),e=this.getX()+this.width/2;return{x:e,y:t}},o.prototype.getBottom=function(){var t=this.getY()+this.height,e=this.getX()+this.width/2;return{x:e,y:t}},o.prototype.getLeft=function(){var t=this.getY()+this.group.getBBox().height/2,e=this.getX();return{x:e,y:t}},o.prototype.getRight=function(){var t=this.getY()+this.group.getBBox().height/2,e=this.getX()+this.group.getBBox().width;return{x:e,y:t}},o.prototype.render=function(){if(this.next){var t=this.getAttr("line-length");if("right"===this.next_direction){var e=this.getRight();if(this.next.getLeft(),!this.next.isPositioned){this.next.setY(e.y-this.next.height/2),this.next.shiftX(this.group.getBBox().x+this.width+t);var n=this;!function i(){for(var e,r=!1,a=0,o=n.chart.symbols.length;o>a;a++){e=n.chart.symbols[a];var s=Math.abs(e.getCenter().x-n.next.getCenter().x);if(e.getCenter().y>n.next.getCenter().y&&s<=n.next.width/2){r=!0;break}}r&&(n.next.setX(e.getX()+e.width+t),i())}(),this.next.isPositioned=!0,this.next.render()}}else{var r=this.getBottom();this.next.getTop(),this.next.isPositioned||(this.next.shiftY(this.getY()+this.height+t),this.next.setX(r.x-this.next.width/2),this.next.isPositioned=!0,this.next.render())}}},o.prototype.renderLines=function(){this.next&&(this.next_direction?this.drawLineTo(this.next,"",this.next_direction):this.drawLineTo(this.next))},o.prototype.drawLineTo=function(t,e,n){this.connectedTo.indexOf(t)<0&&this.connectedTo.push(t);var a,o=this.getCenter().x,s=this.getCenter().y,l=(this.getTop(),this.getRight()),c=this.getBottom(),u=this.getLeft(),h=t.getCenter().x,f=t.getCenter().y,d=t.getTop(),p=t.getRight(),g=(t.getBottom(),t.getLeft()),m=o===h,v=s===f,y=f>s,x=s>f,b=o>h,w=h>o,_=0,S=this.getAttr("line-length"),C=this.getAttr("line-width");if(n&&"bottom"!==n||!m||!y)if(n&&"right"!==n||!v||!w)if(n&&"left"!==n||!v||!b)if(n&&"right"!==n||!m||!x)if(n&&"right"!==n||!m||!y)if(n&&"bottom"!==n||!b)if(n&&"bottom"!==n||!w)if(n&&"right"===n&&b)a=r(this.chart,l,[{x:l.x+S/2,y:l.y},{x:l.x+S/2,y:d.y-S/2},{x:d.x,y:d.y-S/2},{x:d.x,y:d.y}],e),this.rightStart=!0,t.topEnd=!0,_=l.x+S/2;else if(n&&"right"===n&&w)a=r(this.chart,l,[{x:d.x,y:l.y},{x:d.x,y:d.y}],e),this.rightStart=!0,t.topEnd=!0,_=l.x+S/2;else if(n&&"bottom"===n&&m&&x)a=r(this.chart,c,[{x:c.x,y:c.y+S/2},{x:l.x+S/2,y:c.y+S/2},{x:l.x+S/2,y:d.y-S/2},{x:d.x,y:d.y-S/2},{x:d.x,y:d.y}],e),this.bottomStart=!0,t.topEnd=!0,_=c.x+S/2;else if("left"===n&&m&&x){var E=u.x-S/2;g.x<u.x&&(E=g.x-S/2),a=r(this.chart,u,[{x:E,y:u.y},{x:E,y:d.y-S/2},{x:d.x,y:d.y-S/2},{x:d.x,y:d.y}],e),this.leftStart=!0,t.topEnd=!0,_=u.x}else"left"===n&&(a=r(this.chart,u,[{x:d.x+(u.x-d.x)/2,y:u.y},{x:d.x+(u.x-d.x)/2,y:d.y-S/2},{x:d.x,y:d.y-S
}catch(n){console.error("No event listener called "+t)}},l("onInit")(),u.onLoadSettings=function(){i.log("onLoadSettings"),t.each(h,function(t){var e=!t.isOptional||void 0===t.config.enabled||t.config.enabled===!0;r.setInputChecked("#input-enable-extension-"+t.extensionId,e),"markdownExtra"==t.extensionId?r.setInputChecked("#input-settings-markdown-extra",e):"mathJax"==t.extensionId&&r.setInputChecked("#input-settings-mathjax",e);var n=t.onLoadSettings;n&&n()})},u.onSaveSettings=function(e,n){i.log("onSaveSettings"),t.each(h,function(i){var a=t.extend({},i.defaultConfig);a.enabled=r.getInputChecked("#input-enable-extension-"+i.extensionId);var o;"markdownExtra"==i.extensionId?(o=r.getInputChecked("#input-settings-markdown-extra"),o!=i.enabled&&(a.enabled=o)):"mathJax"==i.extensionId&&(o=r.getInputChecked("#input-settings-mathjax"),o!=i.enabled&&(a.enabled=o));var s=i.onSaveSettings;s&&s(a,n),e[i.extensionId]=a})},c("onMessage"),c("onError"),c("onOfflineChanged"),c("onUserActive"),c("onAsyncRunning"),c("onPeriodicRun"),c("onEditorCreated"),c("onFileMgrCreated"),c("onSynchronizerCreated"),c("onPublisherCreated"),c("onSharingCreated"),c("onEventMgrCreated"),c("onFileCreated"),c("onFileDeleted"),c("onFileSelected"),c("onFileOpen"),c("onFileClosed"),c("onContentChanged"),c("onTitleChanged"),c("onFoldersChanged"),c("onSyncRunning"),c("onSyncSuccess"),c("onSyncImportSuccess"),c("onSyncExportSuccess"),c("onSyncRemoved"),c("onPublishRunning"),c("onPublishSuccess"),c("onNewPublishSuccess"),c("onPublishRemoved"),c("onLayoutCreated"),c("onLayoutResize"),c("onExtensionButtonResize"),c("onPagedownConfigure"),c("onSectionsCreated"),c("onCursorCoordinates"),c("onEditorPopover"),c("onDiscussionCreated"),c("onDiscussionRemoved"),c("onCommentsChanged"),c("onTweet");var p,g,m=l("onPreviewFinished"),v=s("onAsyncPreview");u.onAsyncPreview=function(){function e(n){var i=n.length?n.shift():function(){setTimeout(function(){var e="";t.each(p.children,function(t){e+=t.innerHTML});var n=r.trim(e),i=n.replace(/ <span class="comment label label-danger">.*?<\/span> /g,"");m(n,i)},10)};i(function(){e(n)})}i.log("onAsyncPreview"),e(v.concat([function(t){g.waitForImages(t)}]))};var y=l("onReady");return u.onReady=function(){p=document.getElementById("preview-contents"),g=$(p);var r=function(n){var r=e("div",{"class":"btn-group"}),i=n();return t.isString(i)?r.innerHTML=i:t.isElement(i)&&r.appendChild(i),r};window.viewerMode===!1,i.log("onCreatePreviewButton");var a=s("onCreatePreviewButton"),o=document.createDocumentFragment();t.each(a,function(t){o.appendChild(r(t))});var l=document.querySelector(".extension-preview-buttons");l&&l.appendChild(o),n.bind("escape",function(){u.onEditorPopover()}),y()},u.onEventMgrCreated(u),u}),function(){var t=/\blang(?:uage)?-(?!\*)(\w+)\b/i,e=self.Prism={util:{type:function(t){return Object.prototype.toString.call(t).match(/\[object (\w+)\]/)[1]},clone:function(t){var n=e.util.type(t);switch(n){case"Object":var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=e.util.clone(t[i]));return r;case"Array":return t.slice()}return t}},languages:{extend:function(t,n){var r=e.util.clone(e.languages[t]);for(var i in n)r[i]=n[i];return r},insertBefore:function(t,n,r,i){i=i||e.languages;var a=i[t],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==n)for(var l in r)r.hasOwnProperty(l)&&(o[l]=r[l]);o[s]=a[s]}return i[t]=o},DFS:function(t,n){for(var r in t)n.call(t,r,t[r]),"Object"===e.util.type(t)&&e.languages.DFS(t[r],n)}},highlightAll:function(t,n){for(var r,i=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),a=0;r=i[a++];)e.highlightElement(r,t===!0,n)},highlightElement:function(r,i,a){for(var o,s,l=r;l&&!t.test(l.className);)l=l.parentNode;if(l&&(o=(l.className.match(t)||[,""])[1],s=e.languages[o]),s){r.className=r.className.replace(t,"").replace(/\s+/g," ")+" language-"+o,l=r.parentNode,/pre/i.test(l.nodeName)&&(l.className=l.className.replace(t,"").replace(/\s+/g," ")+" language-"+o);var c=r.textContent;if(c){c=c.replace(/&/g,"&amp;").replace(/</g,"&lt;").r
}],9:[function(t,e,n){var r=t("../contexts/diff").DiffContext,i=t("../contexts/patch").PatchContext,a=t("../contexts/reverse").ReverseContext,o=t("./lcs"),s=3,l="function"==typeof Array.isArray?Array.isArray:function(t){return t instanceof Array},c="function"==typeof Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var n=t.length,r=0;n>r;r++)if(t[r]===e)return r;return-1},u=function(t){if(t.leftIsArray){for(var e,n,i,a,l=t.options&&t.options.objectHash,u=function(t,e,n,r,i){var a=t[n],o=e[r];if(a===o)return!0;if("object"!=typeof a||"object"!=typeof o)return!1;if(!l)return!1;var s,c;return"number"==typeof n?(i.hashCache1=i.hashCache1||[],s=i.hashCache1[n],"undefined"==typeof s&&(i.hashCache1[n]=s=l(a,n))):s=l(a),"undefined"==typeof s?!1:("number"==typeof r?(i.hashCache2=i.hashCache2||[],c=i.hashCache2[r],"undefined"==typeof c&&(i.hashCache2[r]=c=l(o,r))):c=l(o),"undefined"==typeof c?!1:s===c)},h={},f=0,d=0,p=t.left,g=t.right,m=p.length,v=g.length;m>f&&v>f&&u(p,g,f,f,h);)e=f,a=new r(t.left[e],t.right[e]),t.push(a,e),f++;for(;m>d+f&&v>d+f&&u(p,g,m-1-d,v-1-d,h);)n=m-1-d,i=v-1-d,a=new r(t.left[n],t.right[i]),t.push(a,i),d++;var y;if(f+d===m){if(m===v)return void t.setResult(void 0).exit();for(y=y||{_t:"a"},e=f;v-d>e;e++)y[e]=[g[e]];return void t.setResult(y).exit()}if(f+d===v){for(y=y||{_t:"a"},e=f;m-d>e;e++)y["_"+e]=[p[e],0,0];return void t.setResult(y).exit()}h={};var x=p.slice(f,m-d),b=g.slice(f,v-d),w=o.get(x,b,u,h),_=[];for(y=y||{_t:"a"},e=f;m-d>e;e++)c(w.indices1,e-f)<0&&(y["_"+e]=[p[e],0,0],_.push(e));var S=!0;t.options&&t.options.arrays&&t.options.arrays.detectMove===!1&&(S=!1);var C=!1;t.options&&t.options.arrays&&t.options.arrays.includeValueOnMove&&(C=!0);var E=_.length;for(e=f;v-d>e;e++){var k=c(w.indices2,e-f);if(0>k){var T=!1;if(S&&E>0)for(n=0;E>n;n++)if(u(x,b,_[n]-f,e-f,h)){y["_"+_[n]].splice(1,2,e,s),C||(y["_"+_[n]][0]=""),n=_[n],i=e,a=new r(t.left[n],t.right[i]),t.push(a,i),_.splice(n,1),T=!0;break}T||(y[e]=[g[e]])}else n=w.indices1[k]+f,i=w.indices2[k]+f,a=new r(t.left[n],t.right[i]),t.push(a,i)}t.setResult(y).exit()}};u.filterName="arrays";var h={numerically:function(t,e){return t-e},numericallyBy:function(t){return function(e,n){return e[t]-n[t]}}},f=function(t){if(t.nested&&"a"===t.delta._t){var e,n,r=t.delta,a=t.left,o=[],l=[],c=[];for(e in r)if("_t"!==e)if("_"===e[0]){if(0!==r[e][2]&&r[e][2]!==s)throw new Error("only removal or move can be applied at original array indices, invalid diff type: "+r[e][2]);o.push(parseInt(e.slice(1),10))}else 1===r[e].length?l.push({index:parseInt(e,10),value:r[e][0]}):c.push({index:parseInt(e,10),delta:r[e]});for(o=o.sort(h.numerically),e=o.length-1;e>=0;e--){n=o[e];var u=r["_"+n],f=a.splice(n,1)[0];u[2]===s&&l.push({index:u[1],value:f})}l=l.sort(h.numericallyBy("index"));var d=l.length;for(e=0;d>e;e++){var p=l[e];a.splice(p.index,0,p.value)}var g,m=c.length;if(m>0)for(e=0;m>e;e++){var v=c[e];g=new i(t.left[v.index],v.delta),t.push(g,v.index)}return t.children?void t.exit():void t.setResult(t.left).exit()}};f.filterName="arrays";var d=function(t){if(t&&t.children&&"a"===t.delta._t){for(var e,n=t.children.length,r=0;n>r;r++)e=t.children[r],t.left[e.childName]=e.result;t.setResult(t.left).exit()}};d.filterName="arraysCollectChildren";var p=function(t){if(!t.nested)return void(t.delta[2]===s&&(t.newName="_"+t.delta[1],t.setResult([t.delta[0],parseInt(t.childName.substr(1),10),s]).exit()));if("a"===t.delta._t){var e,n;for(e in t.delta)"_t"!==e&&(n=new a(t.delta[e]),t.push(n,e));t.exit()}};p.filterName="arrays";var g=function(t,e,n){var r=e;if("string"==typeof e&&"_"===e[0])r=parseInt(e.substr(1),10);else{var i="_"+e;if(l(n)&&0===n[2])r=i;else for(var a in t){var o=t[a];l(o)&&o[2]===s&&o[1].toString()===e&&(r=a.substr(1))}}return r},m=function(t){if(t&&t.children&&"a"===t.delta._t){for(var e,n=t.children.length,r={_t:"a"},i=0;n>i;i++){e=t.children[i];var a=e.newName;"undefined"==typeof a&&(a=g(t.delta,e.childName,e.result)),r[a]!==e.result&&(r[a]=e.result)}t.setResult(r).exit()}};m.filterName="arraysCollectChildren",n.diffFilter=u,n.patchFilter=f,n
var i=_(X,e,n);X=e,i===!0&&(H.discussionList=H.discussionList),H.content=X,W.saveSelectionState(),r.onContentChanged(H,X),i&&r.onCommentsChanged(H),Y.saveState(),J()}else X=e,H.content=X,W.setSelectionStartEnd(H.editorStart,H.editorEnd),W.updateSelectionRange(),W.updateCursorCoordinates(),Y.saveSelectionState(),r.onFileOpen(H,X),L.scrollTop=H.previewScrollTop,P=H.editorScrollTop,T.scrollTop=P,U=!1}function _(t,e,n){if(n.length){var r=G.diff_main(t,e),i=!1,a=0;return r.forEach(function(t){var e=t[0],r=t[1];if(0===e)return void(a+=r.length);var o=a,s=r.length;-1===e&&(o+=s,s=-s),n.forEach(function(t){t.selectionEnd>o?(t.selectionEnd+=s,t.discussionIndex&&(i=!0)):t.selectionEnd>a&&(t.selectionEnd=a,t.discussionIndex&&(i=!0)),t.selectionStart>=o?(t.selectionStart+=s,t.discussionIndex&&(i=!0)):t.selectionStart>a&&(t.selectionStart=a,t.discussionIndex&&(i=!0))}),1===e&&(a+=r.length)}),i}}function S(e){if(tt=[],Z=[],Q=void 0,U===!0)return Z=K,K=e,void(tt=e);var n=K.length;t.some(K,function(t,r){var i=e[r];return r>=e.length||t.textWithFrontMatter!=i.textWithFrontMatter||t.elt.parentNode!==N||t.elt.textContent!=i.textWithFrontMatter?(n=r,!0):void 0});var r=-K.length;t.some(K.slice().reverse(),function(t,n){var i=e[e.length-n-1];return n>=e.length||t.textWithFrontMatter!=i.textWithFrontMatter||t.elt.parentNode!==N||t.elt.textContent!=i.textWithFrontMatter?(r=-n,!0):void 0}),n-r>K.length&&(r=n-K.length);var i=K.slice(0,n);tt=e.slice(n,e.length+r);var a=K.slice(K.length+r,K.length);Q=t.first(a),Z=K.slice(n,K.length+r),K=i.concat(tt).concat(a)}function C(){var t=document.createDocumentFragment();tt.forEach(function(e){k(e),t.appendChild(e.elt)}),q.noWatch(function(){if(U===!0)N.innerHTML="",N.appendChild(t);else{Z.forEach(function(t){t.elt.parentNode===N&&N.removeChild(t.elt),t.elt.generated=!1}),void 0!==Q?N.insertBefore(t,Q.elt):N.appendChild(t);for(var e=N.firstChild;e;){var n=e.nextSibling;e.generated||N.removeChild(e),e=n}}E(),W.updateSelectionRange(),W.updateCursorCoordinates()})}function E(){D=s("span",{"class":"token lf"}),D.textContent="\n",N.appendChild(D)}function k(t){var e=et(t.text);window.viewerMode||(e=i.highlight(e,i.languages.md));var n=t.textWithFrontMatter.substring(0,t.textWithFrontMatter.length-t.text.length);n.length&&(n=et(n),n=n.replace(/\n/g,'<span class="token lf">\n</span>'),e='<span class="token md">'+n+"</span>"+e);var r=s("span",{id:"wmd-input-section-"+t.id,"class":"wmd-input-section"});r.generated=!0,r.innerHTML=e,t.elt=r}var T,I,N,R,A,M,L,O,D,F={},P=0,B=function(){var e,r=0,i=function(){var t=Date.now();O.refreshPreview(),r=Date.now()-t};return n.lazyRendering===!0?t.debounce(i,500):function(){clearTimeout(e),e=setTimeout(i,2e3>r?r:2e3)}}();r.addListener("onPagedownConfigure",function(t){O=t});var j=0;r.addListener("onSectionsCreated",function(t){j||(S(t),C()),U===!0?O.refreshPreview():B()});var H,U=!0;r.addListener("onFileSelected",function(t){U=!0,H=t});var q=new c;F.watcher=q;var G=new a,z=o.create({objectHash:function(t){return JSON.stringify(t)},arrays:{detectMove:!1},textDiff:{minLength:9999999}}),W=new u;F.selectionMgr=W,$(document).on("selectionchange",".editor-content",t.bind(W.saveSelectionState,W,!0,!1)),F.adjustCursorPosition=h;var X;F.setValue=f,F.onResize=function(){r.onLayoutResize()};var V=!1;F.setContent=function(t){H||(H={content:t}),N?(H={content:t},N.textContent=t,r.onFileSelected(H),w(),V=!1):V=t},window.we=F,F.replace=d,F.replaceAll=p,F.replacePreviousText=g,F.setValueNoWatch=m,F.getValue=v,F.getContent=v,F.focus=y;var Y=new x;F.undoMgr=Y,r.addListener("onDiscussionCreated",b),r.addListener("onDiscussionRemoved",b),r.addListener("onCommentsChanged",b);var J=t.debounce(function(){var t=window.getSelection();W.hasFocus&&!j&&W.selectionStart===W.selectionEnd&&t.modify&&(W.selectionStart?(t.modify("move","backward","character"),t.modify("move","forward","character")):(t.modify("move","forward","character"),t.modify("move","backward","character")))},10);F.adjustCommentOffsets=_,F.init=function(){if(T=document.getElementById("wmd-input"),I=$(T),N=T.querySelector(".editor-content"),R
$("#wmd-quote-button").append($('<i class="fa fa-quote-left">')).appendTo(r),$("#wmd-code-button").append($('<i class="fa fa-code">')).appendTo(r),$("#wmd-image-button").append($('<i class="fa fa-picture-o">')).appendTo(r),r=$(".wmd-button-group3"),$("#wmd-olist-button").append($('<i class="fa fa-list-ol">')).appendTo(r),$("#wmd-ulist-button").append($('<i class="fa fa-list-ul">')).appendTo(r),$("#wmd-heading-button").append($('<i class="fa fa-header">')).appendTo(r),$("#wmd-hr-button").append($('<i class="fa fa-ellipsis-h">')).appendTo(r),r=$(".wmd-button-group5"),$("#wmd-undo-button").append($('<i class="fa fa-undo">')).appendTo(r),$("#wmd-redo-button").append($('<i class="fa fa-repeat">')).appendTo(r),$("#wmd-help-button").show()},c.initEditor=function(t){return void 0!==h&&s.onFileClosed(h),h=t,void 0!==u?(n.undoMgr.init(),u.uiManager.setUndoRedoButtonStates()):(c.initEditorFirst(),void n.undoMgr.init())},c.onReady=function(){document.body.className+=" "+o.editMode,i.init(),$(document).mousemove(l).keypress(l),s.onReady(),c.initEditorFirst(),n.init()},s.addListener("onReady",function(){$(document.body).on("shown.bs.modal",".modal",function(){var t=$(this);setTimeout(function(){t.find(".btn:first").focus(),t.find("button:first").focus(),t.find("input:enabled:visible:first").focus()},50)}).on("hidden.bs.modal",".modal",function(){n.focus()}).on("keypress",".modal",function(t){13!=t.which||$(t.target).is("textarea")||$(this).find(".modal-footer a:last").click()}),$(".action-insert-link").click(function(t){var e=i.getInputTextValue($("#input-insert-link"),t);void 0!==e&&(c.insertLinkCallback(e),c.insertLinkCallback=void 0)}),$(".action-insert-image").click(function(){var t=document.mdImageManager.mdGetImgSrc();t&&(c.insertLinkCallback(t),c.insertLinkCallback=void 0)}),$(".modal-insert-link, .modal-insert-image").on("hidden.bs.modal",function(){void 0!==c.insertLinkCallback&&(c.insertLinkCallback(null),c.insertLinkCallback=void 0)}),$("div.dropdown-menu").click(function(t){t.stopPropagation()}),$("#wmd-help-button").click(function(){window.open("http://leanote.com/blog/view/531b263bdfeb2c0ea9000002")}),t.each(document.querySelectorAll("img"),function(t){var e=$(t),n=e.data("stackeditSrc");n&&e.attr("src",window.baseDir+"/img/"+n)})}),c}),define("css/css",[],function(){if("undefined"==typeof window)return{load:function(t,e,n){n()}};var t=document.getElementsByTagName("head")[0],e=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)/)||0,n=!1,r=!0;e[1]||e[7]?n=parseInt(e[1])<6||parseInt(e[7])<=9:e[2]?r=!1:e[4]&&(n=parseInt(e[4])<18);var i={};i.pluginBuilder="./css-builder";var a,o,s,l=function(){a=document.createElement("style"),t.appendChild(a),o=a.styleSheet||a.sheet},c=0,u=[],h=function(t){c++,32==c&&(l(),c=0),o.addImport(t),a.onload=function(){f()}},f=function(){s();var t=u.shift();return t?(s=t[1],void h(t[0])):void(s=null)},d=function(t,e){if(o&&o.addImport||l(),o&&o.addImport)s?u.push([t,e]):(h(t),s=e);else{a.textContent='@import "'+t+'";';var n=setInterval(function(){try{a.sheet.cssRules,clearInterval(n),e()}catch(t){}},10)}},p=function(e,n){var i=document.createElement("link");if(i.type="text/css",i.rel="stylesheet",r)i.onload=function(){i.onload=function(){},setTimeout(n,7)};else var a=setInterval(function(){for(var t=0;t<document.styleSheets.length;t++){var e=document.styleSheets[t];if(e.href==i.href)return clearInterval(a),n()}},10);i.href=e,t.appendChild(i)};return i.normalize=function(t,e){return".css"==t.substr(t.length-4,4)&&(t=t.substr(0,t.length-4)),e(t)},i.load=function(t,e,r){(n?d:p)(e.toUrl(t+".css"),r)},i}),define("css",["css/css"],function(t){return t}),rangy.createModule("CssClassApplier",function(t,e){function n(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function r(t,e){return t.className&&new RegExp("(?:^|\\s)"+e+"(?:\\s|$)").test(t.className)}function i(t,e){t.className?r(t,e)||(t.className+=" "+e):t.className=e}function a(t){return t.split(/\s+/).sort().join(" ")}function o(t){return a(t.className)}fu