mermaid/dist/mermaid.slim.min.js

1 line
22 KiB
JavaScript
Raw Normal View History

!function t(e,n,r){function s(a,o){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!o&&c)return c(a,!0);if(i)return i(a,!0);throw new Error("Cannot find module '"+a+"'")}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return s(n?n:t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)s(r[a]);return s}({1:[function(){},{}],2:[function(t,e,n){(function(t){function e(t,e){for(var n=0,r=t.length-1;r>=0;r--){var s=t[r];"."===s?t.splice(r,1):".."===s?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var s=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(t){return s.exec(t).slice(1)};n.resolve=function(){for(var n="",s=!1,i=arguments.length-1;i>=-1&&!s;i--){var a=i>=0?arguments[i]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,s="/"===a.charAt(0))}return n=e(r(n.split("/"),function(t){return!!t}),!s).join("/"),(s?"/":"")+n||"."},n.normalize=function(t){var s=n.isAbsolute(t),i="/"===a(t,-1);return t=e(r(t.split("/"),function(t){return!!t}),!s).join("/"),t||s||(t="."),t&&i&&(t+="/"),(s?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(r(t,function(t){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var s=r(t.split("/")),i=r(e.split("/")),a=Math.min(s.length,i.length),o=a,c=0;a>c;c++)if(s[c]!==i[c]){o=c;break}for(var l=[],c=o;c<s.length;c++)l.push("..");return l=l.concat(i.slice(o)),l.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(t){var e=i(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(t,e){var n=i(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},n.extname=function(t){return i(t)[3]};var a="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return 0>e&&(e=t.length+e),t.substr(e,n)}}).call(this,t("1YiZ5S"))},{"1YiZ5S":3}],3:[function(t,e){function n(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],4:[function(t,e,n){(function(e){var r=t("./graphDb"),s=t("./parser/flow"),a=function(t,e){var n=Object.keys(t),s=function(t,e){var n;for(n=0;n<e.length;n++)"undefined"!=typeof e[n]&&(t=t+e[n]+";");return t};n.forEach(function(n){var i,a,o=t[n],c="",l=r.getClasses();for(a=0;a<o.classes.length;a++)c=s(c,l[o.classes[a]].styles);c=s(c,o.styles),i=void 0===o.text?o.id:o.text,"round"===o.type?e.setNode(o.id,{label:i,rx:5,ry:5,style:c}):"diamond"===o.type?e.setNode(o.id,{shape:"question",label:i,rx:0,ry:0,style:c}):e.setNode(o.id,{label:i,rx:0,ry:0,style:c})})},o=function(t,e){var n=0;t.forEach(function(t){n++,aHead="arrow_open"===t.type?"none":"vee","undefined"==typeof t.text?"undefined"==typeof t.style?e.setEdge(t.start,t.end,{arrowheadStyle:"fill: #333",arrowhead:aHead},n):e.se