From c530e84843444a40804e0c2b038c2ec53fe411b2 Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Tue, 8 Nov 2016 12:39:57 +0100 Subject: webdocs-agl: added developer website template Change-Id: I4a45ee0ad5dd0c29a6d6876a0e02cd5550c010e9 Signed-off-by: Stephane Desneux --- site/static/fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20127 bytes site/static/fonts/glyphicons-halflings-regular.svg | 288 + site/static/fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 45404 bytes .../static/fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23424 bytes .../fonts/glyphicons-halflings-regular.woff2 | Bin 0 -> 18028 bytes site/static/img/arrow.png | Bin 0 -> 6285 bytes .../img/branding/agl-logo-newbrand-textonly.svg | 68 + site/static/img/branding/agl-logo-newbrand.svg | 328 + site/static/img/branding/agl_128.png | Bin 0 -> 14061 bytes site/static/img/branding/agl_128_512.png | Bin 0 -> 99819 bytes site/static/img/branding/agl_16.png | Bin 0 -> 803 bytes site/static/img/branding/agl_24.png | Bin 0 -> 1231 bytes site/static/img/branding/agl_256.png | Bin 0 -> 41037 bytes site/static/img/branding/agl_32.png | Bin 0 -> 1747 bytes site/static/img/branding/agl_48.png | Bin 0 -> 3233 bytes site/static/img/branding/agl_64.png | Bin 0 -> 4860 bytes site/static/img/branding/agl_bot.png | Bin 0 -> 26852 bytes site/static/img/bug_icon.svg | 24 + site/static/img/copy-clipboard-icon.svg | 15 + site/static/img/follow_twitter_rectangle.png | Bin 0 -> 3961 bytes site/static/img/line.png | Bin 0 -> 2795 bytes site/static/img/platform-logos-all-sprite.svg | 282 + site/static/img/post-next.png | Bin 0 -> 3589 bytes site/static/img/post-prev.png | Bin 0 -> 3221 bytes site/static/img/search_icon.svg | 12 + site/static/img/search_icon_hover.svg | 12 + site/static/img/shadow.png | Bin 0 -> 942 bytes site/static/img/slack_rgb_300_141.png | Bin 0 -> 6913 bytes site/static/img/sprite.png | Bin 0 -> 13155 bytes site/static/img/subscribe.png | Bin 0 -> 3243 bytes site/static/img/valid-rss-rogers.png | Bin 0 -> 3712 bytes site/static/img/value-prop-sprite.svg | 52 + site/static/img/wisplight.jpg | Bin 0 -> 46455 bytes site/static/js/404.js | 122 + site/static/js/docs.js | 142 + site/static/js/lib/bootstrap.min.js | 7 + site/static/js/lib/flowchart-latest.js | 990 +++ site/static/js/lib/flowchart.js.map | 790 +++ site/static/js/lib/jquery-2.1.1.min.js | 4 + site/static/js/lib/process-uml.js | 70 + site/static/js/lib/raphael-min.js | 11 + site/static/js/lib/sequence-diagram-min.js | 8 + site/static/js/lib/sequence-diagram-min.js.map | 1 + site/static/js/lib/toc.min.js | 8 + site/static/js/lib/underscore-min.js | 1 + site/static/js/process-uml.js | 72 + site/static/js/twitter.js | 1 + site/static/styles/fonts/fontawesome-webfont.eot | Bin 0 -> 68875 bytes site/static/styles/fonts/fontawesome-webfont.svg | 640 ++ site/static/styles/fonts/fontawesome-webfont.ttf | Bin 0 -> 138204 bytes site/static/styles/fonts/fontawesome-webfont.woff | Bin 0 -> 81284 bytes site/static/styles/fonts/fontawesome-webfont.woff2 | Bin 0 -> 64464 bytes site/static/styles/main.scss | 8 + site/static/styles/scss/_artwork.scss | 44 + site/static/styles/scss/_blog.scss | 290 + site/static/styles/scss/_contact.scss | 59 + site/static/styles/scss/_contribute.scss | 154 + site/static/styles/scss/_docs.scss | 407 ++ site/static/styles/scss/_font-awesome.scss | 25 + site/static/styles/scss/_gridism.scss | 124 + site/static/styles/scss/_home.scss | 362 ++ site/static/styles/scss/_mixins.scss | 38 + site/static/styles/scss/_normalize.scss | 2 + site/static/styles/scss/_plugins.scss | 203 + site/static/styles/scss/_pygments.scss | 78 + site/static/styles/scss/_style.scss | 1002 +++ site/static/styles/scss/bootstrap.scss | 6772 ++++++++++++++++++++ site/static/styles/scss/webdocs.scss | 239 + site/static/styles/syntax.css | 71 + 69 files changed, 13826 insertions(+) create mode 100644 site/static/fonts/glyphicons-halflings-regular.eot create mode 100644 site/static/fonts/glyphicons-halflings-regular.svg create mode 100644 site/static/fonts/glyphicons-halflings-regular.ttf create mode 100644 site/static/fonts/glyphicons-halflings-regular.woff create mode 100644 site/static/fonts/glyphicons-halflings-regular.woff2 create mode 100644 site/static/img/arrow.png create mode 100644 site/static/img/branding/agl-logo-newbrand-textonly.svg create mode 100644 site/static/img/branding/agl-logo-newbrand.svg create mode 100644 site/static/img/branding/agl_128.png create mode 100644 site/static/img/branding/agl_128_512.png create mode 100644 site/static/img/branding/agl_16.png create mode 100644 site/static/img/branding/agl_24.png create mode 100644 site/static/img/branding/agl_256.png create mode 100644 site/static/img/branding/agl_32.png create mode 100644 site/static/img/branding/agl_48.png create mode 100644 site/static/img/branding/agl_64.png create mode 100644 site/static/img/branding/agl_bot.png create mode 100644 site/static/img/bug_icon.svg create mode 100644 site/static/img/copy-clipboard-icon.svg create mode 100644 site/static/img/follow_twitter_rectangle.png create mode 100644 site/static/img/line.png create mode 100644 site/static/img/platform-logos-all-sprite.svg create mode 100644 site/static/img/post-next.png create mode 100644 site/static/img/post-prev.png create mode 100644 site/static/img/search_icon.svg create mode 100644 site/static/img/search_icon_hover.svg create mode 100644 site/static/img/shadow.png create mode 100644 site/static/img/slack_rgb_300_141.png create mode 100644 site/static/img/sprite.png create mode 100644 site/static/img/subscribe.png create mode 100644 site/static/img/valid-rss-rogers.png create mode 100644 site/static/img/value-prop-sprite.svg create mode 100644 site/static/img/wisplight.jpg create mode 100644 site/static/js/404.js create mode 100644 site/static/js/docs.js create mode 100644 site/static/js/lib/bootstrap.min.js create mode 100644 site/static/js/lib/flowchart-latest.js create mode 100644 site/static/js/lib/flowchart.js.map create mode 100644 site/static/js/lib/jquery-2.1.1.min.js create mode 100644 site/static/js/lib/process-uml.js create mode 100644 site/static/js/lib/raphael-min.js create mode 100644 site/static/js/lib/sequence-diagram-min.js create mode 100644 site/static/js/lib/sequence-diagram-min.js.map create mode 100644 site/static/js/lib/toc.min.js create mode 100644 site/static/js/lib/underscore-min.js create mode 100644 site/static/js/process-uml.js create mode 100644 site/static/js/twitter.js create mode 100755 site/static/styles/fonts/fontawesome-webfont.eot create mode 100755 site/static/styles/fonts/fontawesome-webfont.svg create mode 100755 site/static/styles/fonts/fontawesome-webfont.ttf create mode 100755 site/static/styles/fonts/fontawesome-webfont.woff create mode 100644 site/static/styles/fonts/fontawesome-webfont.woff2 create mode 100644 site/static/styles/main.scss create mode 100644 site/static/styles/scss/_artwork.scss create mode 100644 site/static/styles/scss/_blog.scss create mode 100644 site/static/styles/scss/_contact.scss create mode 100644 site/static/styles/scss/_contribute.scss create mode 100644 site/static/styles/scss/_docs.scss create mode 100644 site/static/styles/scss/_font-awesome.scss create mode 100644 site/static/styles/scss/_gridism.scss create mode 100644 site/static/styles/scss/_home.scss create mode 100644 site/static/styles/scss/_mixins.scss create mode 100644 site/static/styles/scss/_normalize.scss create mode 100644 site/static/styles/scss/_plugins.scss create mode 100644 site/static/styles/scss/_pygments.scss create mode 100644 site/static/styles/scss/_style.scss create mode 100644 site/static/styles/scss/bootstrap.scss create mode 100644 site/static/styles/scss/webdocs.scss create mode 100644 site/static/styles/syntax.css (limited to 'site/static') diff --git a/site/static/fonts/glyphicons-halflings-regular.eot b/site/static/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000..b93a495 Binary files /dev/null and b/site/static/fonts/glyphicons-halflings-regular.eot differ diff --git a/site/static/fonts/glyphicons-halflings-regular.svg b/site/static/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..94fb549 --- /dev/null +++ b/site/static/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/site/static/fonts/glyphicons-halflings-regular.ttf b/site/static/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000..1413fc6 Binary files /dev/null and b/site/static/fonts/glyphicons-halflings-regular.ttf differ diff --git a/site/static/fonts/glyphicons-halflings-regular.woff b/site/static/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000..9e61285 Binary files /dev/null and b/site/static/fonts/glyphicons-halflings-regular.woff differ diff --git a/site/static/fonts/glyphicons-halflings-regular.woff2 b/site/static/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000..64539b5 Binary files /dev/null and b/site/static/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/site/static/img/arrow.png b/site/static/img/arrow.png new file mode 100644 index 0000000..0968c62 Binary files /dev/null and b/site/static/img/arrow.png differ diff --git a/site/static/img/branding/agl-logo-newbrand-textonly.svg b/site/static/img/branding/agl-logo-newbrand-textonly.svg new file mode 100644 index 0000000..0999b02 --- /dev/null +++ b/site/static/img/branding/agl-logo-newbrand-textonly.svg @@ -0,0 +1,68 @@ + +image/svg+xmlAutomotive Grade Linux +Linux Software Foundation +TM + \ No newline at end of file diff --git a/site/static/img/branding/agl-logo-newbrand.svg b/site/static/img/branding/agl-logo-newbrand.svg new file mode 100644 index 0000000..5dd572c --- /dev/null +++ b/site/static/img/branding/agl-logo-newbrand.svg @@ -0,0 +1,328 @@ + +image/svg+xmlAutomotive Grade Linux +Linux Software Foundation +TM + \ No newline at end of file diff --git a/site/static/img/branding/agl_128.png b/site/static/img/branding/agl_128.png new file mode 100644 index 0000000..839c5cc Binary files /dev/null and b/site/static/img/branding/agl_128.png differ diff --git a/site/static/img/branding/agl_128_512.png b/site/static/img/branding/agl_128_512.png new file mode 100644 index 0000000..879b6de Binary files /dev/null and b/site/static/img/branding/agl_128_512.png differ diff --git a/site/static/img/branding/agl_16.png b/site/static/img/branding/agl_16.png new file mode 100644 index 0000000..5054fe3 Binary files /dev/null and b/site/static/img/branding/agl_16.png differ diff --git a/site/static/img/branding/agl_24.png b/site/static/img/branding/agl_24.png new file mode 100644 index 0000000..0ba2170 Binary files /dev/null and b/site/static/img/branding/agl_24.png differ diff --git a/site/static/img/branding/agl_256.png b/site/static/img/branding/agl_256.png new file mode 100644 index 0000000..11a7f3d Binary files /dev/null and b/site/static/img/branding/agl_256.png differ diff --git a/site/static/img/branding/agl_32.png b/site/static/img/branding/agl_32.png new file mode 100644 index 0000000..591cf3f Binary files /dev/null and b/site/static/img/branding/agl_32.png differ diff --git a/site/static/img/branding/agl_48.png b/site/static/img/branding/agl_48.png new file mode 100644 index 0000000..e9895b4 Binary files /dev/null and b/site/static/img/branding/agl_48.png differ diff --git a/site/static/img/branding/agl_64.png b/site/static/img/branding/agl_64.png new file mode 100644 index 0000000..8f5ac30 Binary files /dev/null and b/site/static/img/branding/agl_64.png differ diff --git a/site/static/img/branding/agl_bot.png b/site/static/img/branding/agl_bot.png new file mode 100644 index 0000000..39fbd6d Binary files /dev/null and b/site/static/img/branding/agl_bot.png differ diff --git a/site/static/img/bug_icon.svg b/site/static/img/bug_icon.svg new file mode 100644 index 0000000..cd28dcb --- /dev/null +++ b/site/static/img/bug_icon.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + diff --git a/site/static/img/copy-clipboard-icon.svg b/site/static/img/copy-clipboard-icon.svg new file mode 100644 index 0000000..dce4a0d --- /dev/null +++ b/site/static/img/copy-clipboard-icon.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff --git a/site/static/img/follow_twitter_rectangle.png b/site/static/img/follow_twitter_rectangle.png new file mode 100644 index 0000000..f2d0274 Binary files /dev/null and b/site/static/img/follow_twitter_rectangle.png differ diff --git a/site/static/img/line.png b/site/static/img/line.png new file mode 100644 index 0000000..7ee528f Binary files /dev/null and b/site/static/img/line.png differ diff --git a/site/static/img/platform-logos-all-sprite.svg b/site/static/img/platform-logos-all-sprite.svg new file mode 100644 index 0000000..7cea57d --- /dev/null +++ b/site/static/img/platform-logos-all-sprite.svg @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/site/static/img/post-next.png b/site/static/img/post-next.png new file mode 100644 index 0000000..3eb420d Binary files /dev/null and b/site/static/img/post-next.png differ diff --git a/site/static/img/post-prev.png b/site/static/img/post-prev.png new file mode 100644 index 0000000..4f267af Binary files /dev/null and b/site/static/img/post-prev.png differ diff --git a/site/static/img/search_icon.svg b/site/static/img/search_icon.svg new file mode 100644 index 0000000..c83cb12 --- /dev/null +++ b/site/static/img/search_icon.svg @@ -0,0 +1,12 @@ + + + + + + diff --git a/site/static/img/search_icon_hover.svg b/site/static/img/search_icon_hover.svg new file mode 100644 index 0000000..cbd6a16 --- /dev/null +++ b/site/static/img/search_icon_hover.svg @@ -0,0 +1,12 @@ + + + + + + diff --git a/site/static/img/shadow.png b/site/static/img/shadow.png new file mode 100644 index 0000000..8c5ba5f Binary files /dev/null and b/site/static/img/shadow.png differ diff --git a/site/static/img/slack_rgb_300_141.png b/site/static/img/slack_rgb_300_141.png new file mode 100644 index 0000000..e8fb5fd Binary files /dev/null and b/site/static/img/slack_rgb_300_141.png differ diff --git a/site/static/img/sprite.png b/site/static/img/sprite.png new file mode 100644 index 0000000..b92fc6d Binary files /dev/null and b/site/static/img/sprite.png differ diff --git a/site/static/img/subscribe.png b/site/static/img/subscribe.png new file mode 100644 index 0000000..93c3b49 Binary files /dev/null and b/site/static/img/subscribe.png differ diff --git a/site/static/img/valid-rss-rogers.png b/site/static/img/valid-rss-rogers.png new file mode 100644 index 0000000..8ce6d12 Binary files /dev/null and b/site/static/img/valid-rss-rogers.png differ diff --git a/site/static/img/value-prop-sprite.svg b/site/static/img/value-prop-sprite.svg new file mode 100644 index 0000000..94dacad --- /dev/null +++ b/site/static/img/value-prop-sprite.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/site/static/img/wisplight.jpg b/site/static/img/wisplight.jpg new file mode 100644 index 0000000..285225b Binary files /dev/null and b/site/static/img/wisplight.jpg differ diff --git a/site/static/js/404.js b/site/static/js/404.js new file mode 100644 index 0000000..cecf83f --- /dev/null +++ b/site/static/js/404.js @@ -0,0 +1,122 @@ +(function () { + + // regexes as strings + // NOTE: + // these patterns should NOT contain capturing groups (parentheses) + // because they might be combined with other regexes + var DOCS_VERSION_PATTERN = "(?:[\\d\\.]+x?|dev|latest)"; + var DOCS_LANGUAGE_PATTERN = "\\w\\w(?:-\\w\\w)?"; + var DOCS_VERSION_PATH_PATTERN = "docs\\/" + DOCS_LANGUAGE_PATTERN + "\\/" + DOCS_VERSION_PATTERN; + + function splitDocsURL(url) { + var splitPattern = new RegExp("(" + DOCS_VERSION_PATH_PATTERN + ")"); + return url.split(splitPattern); + } + + function transformOldURL(oldURL) { + var splitURL = splitDocsURL(oldURL); + + var baseURL = splitURL[0]; + var versionString = splitURL[1]; + var pageExtension = splitURL.slice(2).join(""); + + // get rid of the fragment and replace underscores with slashes + // also remove the ".md" extension + pageExtension = pageExtension.split("#")[0]; + pageExtension = pageExtension.replace(".md", ""); + pageExtension = pageExtension.replace(/_/g, "/"); + + // undo special cases of paths that really do contain underscores + // NOTE: + // this list is complete; in the pre-migration docs, no other + // directories or files contained underscores + pageExtension = pageExtension.replace("config/ref", "config_ref"); + pageExtension = pageExtension.replace("plugin/ref", "plugin_ref"); + pageExtension = pageExtension.replace("display/name", "display_name"); + pageExtension = pageExtension.replace("platform/plugin/versioning/ref", "platform_plugin_versioning_ref"); + + return baseURL + versionString + pageExtension; + } + + function getDevURL(url) { + var replaceWhat = new RegExp("docs\\/(" + DOCS_LANGUAGE_PATTERN + ")\\/" + DOCS_VERSION_PATTERN); + var replaceWith = "docs/$1/dev"; + return url.replace(replaceWhat, replaceWith); + } + + function getRootURL(url) { + var splitURL = splitDocsURL(url); + var baseURL = splitURL[0]; + var versionString = splitURL[1]; + + return baseURL + versionString + "/"; + } + + function isDocsURL(url) { + var testPattern = new RegExp(DOCS_VERSION_PATH_PATTERN); + return testPattern.test(url); + } + + function showNewRedirect(url) { + $("#new-redirect-link").attr("href", url); + $("#not-found-redirect-alert").css("display", "block"); + } + + function showDevRedirect(url) { + $("#dev-redirect-link").attr("href", url); + $("#no-version-redirect-alert").css("display", "block"); + } + + function showRootRedirect(url) { + $("#root-redirect-link").attr("href", url); + $("#no-page-redirect-alert").css("display", "block"); + } + + function main() { + + var url = window.location.href; + + if (!isDocsURL(url)) { + return; + } + + // get related URLs + var rootURL = getRootURL(url); + var devURL = getDevURL(url); + var newURL = transformOldURL(url); + + // try the root URL + $.ajax({ + url: rootURL, + statusCode: { + + // if the root exists, check if the new URL exists + 200: function () { + $.ajax({ + url: newURL, + statusCode: { + + // redirect to the new URL if it exists + 200: function () { + showNewRedirect(newURL) + }, + + // if the new URL doesn't exist, redirect to root + 404: function() { + showRootRedirect(rootURL) + } + } + }); + }, + + // if root doesn't exist, assume that the version + // is invalid and redirect to dev + 404: function () { + showDevRedirect(devURL) + } + } + }); + } + + main(); +}()); diff --git a/site/static/js/docs.js b/site/static/js/docs.js new file mode 100644 index 0000000..1309525 --- /dev/null +++ b/site/static/js/docs.js @@ -0,0 +1,142 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// Platforms we have logos for and their formatted titles. Used for +// converting "mark" elements to logos +var platforms = { + 'android': 'Android', + 'ios': 'iOS', + 'windows': 'Windows', + 'ubuntu': 'Ubuntu', + 'blackberry': 'Blackberry', + 'fireos': 'FireOS', + 'firefoxos': 'FirefoxOS', + 'webos': 'webOS', + 'osx': 'OS X', + 'browser': 'Browser' +}; + +$(document).ready(function () { + + var HEADER_OFFSET = 56; // in pixels + var TOC_TOP_OFFSET = HEADER_OFFSET + 55; + + // if this page's ToC entry can be found, scroll the ToC to it + var thisPageEntry = $(".this-page"); + if (thisPageEntry.length > 0) { + $(".site-toc-container").scrollTop(thisPageEntry.first().offset().top - TOC_TOP_OFFSET); + } + + function slugifyLikeGitHub(originalText) { + + var text = originalText; + + // convert to lowercase + text = text.toLowerCase(); + + // replace spaces with dashes + text = text.replace(/ /g, '-'); + + // remove unaccepted characters + // NOTE: + // a better regex would have been /[^\d\s\w-_]/ug, but the 'u' flag + // (Unicode) is not supported in some browsers, and we support + // many languages that use Unicode characters + text = text.replace(/[\[\]\(\)\;\:\=\+\?\!\.\,\{\}\\\/\>\<]/g, ''); + + // trim remaining whitespace + text = text.trim(); + + return text; + } + + function getIdForHeading(heading) { + if (heading.id) { + return heading.id; + } else if (heading.name) { + return heading.name; + } else { + return slugifyLikeGitHub(heading.innerText); + } + } + + function permalinkTo(id) { + var anchor = document.createElement("a"); + anchor.className = "header-link"; + anchor.href = "#" + id; + anchor.innerHTML = ""; + return anchor; + } + + function anchorFor(id) { + var anchor = document.createElement("a"); + anchor.className = "fragment-anchor"; + anchor.id = id; + return anchor; + } + + // go through all headings in the content and add some links + $('#page-toc-source h1, #page-toc-source h2, #page-toc-source h3, #page-toc-source h4, #page-toc-source h5, #page-toc-source h6') + .each(function (i, heading) { + + headingId = getIdForHeading(heading); + + // add an anchor for linking to the heading + // NOTE: + // we could have set the ID on the heading itself but we didn't + // because the has some extra CSS that floats it above the + // heading and makes it easier to see when linked + $(heading).before(anchorFor(headingId)) + + // add a permalink to all but the first heading + if (i > 0) { + $(heading).append(permalinkTo(headingId)); + } + }); + + // Table of Contents + $('#page-toc').toc({ + 'selectors': 'h1,h2', // elements to use as headings + 'container': '#page-toc-source', // element to find all selectors in + 'prefix': '', // prefix for anchor tags and class names + 'onHighlight': function(el) {}, // called when a new section is highlighted + 'highlightOnScroll': true, // add class to heading that is currently in focus + 'highlightOffset': 100, // offset to trigger the next headline + 'anchorName': function(i, heading, prefix) { // custom function for anchor name + return getIdForHeading(heading); + }, + 'headerText': function(i, heading, $heading) { // custom function building the header-item text + return $heading.text(); + }, + 'itemClass': function(i, heading, $heading, prefix) { // custom function for item class + + // don't assign any special classes to the toc entry itself + return ''; + } + }); + + $('mark').each(function(index, element) { + var platform = element.innerText.toLowerCase(); + platform = platform.replace(/ /g, ''); + if (platforms[platform]) { + $(element).addClass('logo'); + $(element).addClass(platform); + $(element).attr('title', platforms[platform]); + element.innerText = ''; + } + }); +}); diff --git a/site/static/js/lib/bootstrap.min.js b/site/static/js/lib/bootstrap.min.js new file mode 100644 index 0000000..133aeec --- /dev/null +++ b/site/static/js/lib/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under the MIT license + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/site/static/js/lib/flowchart-latest.js b/site/static/js/lib/flowchart-latest.js new file mode 100644 index 0000000..ca620cc --- /dev/null +++ b/site/static/js/lib/flowchart-latest.js @@ -0,0 +1,990 @@ +// flowchart.js, v1.6.3 +// Copyright (c)yyyy Adriano Raiano (adrai). +// Distributed under MIT license +// http://adrai.github.io/flowchart.js + +!function(root, factory) { + if ("object" == typeof exports && "object" == typeof module) module.exports = factory(require("Raphael")); else if ("function" == typeof define && define.amd) define([ "Raphael" ], factory); else { + var a = factory("object" == typeof exports ? require("Raphael") : root.Raphael); + for (var i in a) ("object" == typeof exports ? exports : root)[i] = a[i]; + } +}(this, function(__WEBPACK_EXTERNAL_MODULE_15__) { + /******/ + return function(modules) { + /******/ + /******/ + // The require function + /******/ + function __webpack_require__(moduleId) { + /******/ + /******/ + // Check if module is in cache + /******/ + if (installedModules[moduleId]) /******/ + return installedModules[moduleId].exports; + /******/ + /******/ + // Create a new module (and put it into the cache) + /******/ + var module = installedModules[moduleId] = { + /******/ + exports: {}, + /******/ + id: moduleId, + /******/ + loaded: !1 + }; + /******/ + /******/ + // Return the exports of the module + /******/ + /******/ + /******/ + // Execute the module function + /******/ + /******/ + /******/ + // Flag the module as loaded + /******/ + return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), + module.loaded = !0, module.exports; + } + // webpackBootstrap + /******/ + // The module cache + /******/ + var installedModules = {}; + /******/ + /******/ + // Load entry module and return exports + /******/ + /******/ + /******/ + /******/ + // expose the modules object (__webpack_modules__) + /******/ + /******/ + /******/ + // expose the module cache + /******/ + /******/ + /******/ + // __webpack_public_path__ + /******/ + return __webpack_require__.m = modules, __webpack_require__.c = installedModules, + __webpack_require__.p = "", __webpack_require__(0); + }([ /* 0 */ + /*!******************!*\ + !*** ./index.js ***! + \******************/ + /***/ + function(module, exports, __webpack_require__) { + __webpack_require__(/*! ./src/flowchart.shim */ 8); + var parse = __webpack_require__(/*! ./src/flowchart.parse */ 4); + __webpack_require__(/*! ./src/jquery-plugin */ 14); + var FlowChart = { + parse: parse + }; + "undefined" != typeof window && (window.flowchart = FlowChart), module.exports = FlowChart; + }, /* 1 */ + /*!**********************************!*\ + !*** ./src/flowchart.helpers.js ***! + \**********************************/ + /***/ + function(module, exports) { + function _defaults(options, defaultOptions) { + if (!options || "function" == typeof options) return defaultOptions; + var merged = {}; + for (var attrname in defaultOptions) merged[attrname] = defaultOptions[attrname]; + for (attrname in options) options[attrname] && ("object" == typeof merged[attrname] ? merged[attrname] = _defaults(merged[attrname], options[attrname]) : merged[attrname] = options[attrname]); + return merged; + } + function _inherits(ctor, superCtor) { + if ("function" == typeof Object.create) // implementation from standard node.js 'util' module + ctor.super_ = superCtor, ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: !1, + writable: !0, + configurable: !0 + } + }); else { + // old school shim for old browsers + ctor.super_ = superCtor; + var TempCtor = function() {}; + TempCtor.prototype = superCtor.prototype, ctor.prototype = new TempCtor(), ctor.prototype.constructor = ctor; + } + } + // move dependent functions to a container so that + // they can be overriden easier in no jquery environment (node.js) + module.exports = { + defaults: _defaults, + inherits: _inherits + }; + }, /* 2 */ + /*!*********************************!*\ + !*** ./src/flowchart.symbol.js ***! + \*********************************/ + /***/ + function(module, exports, __webpack_require__) { + function Symbol(chart, options, symbol) { + this.chart = chart, this.group = this.chart.paper.set(), this.symbol = symbol, this.connectedTo = [], + this.symbolType = options.symbolType, this.flowstate = options.flowstate || "future", + this.next_direction = options.next && options.direction_next ? options.direction_next : void 0, + this.text = this.chart.paper.text(0, 0, options.text), //Raphael does not support the svg group tag so setting the text node id to the symbol node id plus t + options.key && (this.text.node.id = options.key + "t"), this.text.node.setAttribute("class", this.getAttr("class") + "t"), + this.text.attr({ + "text-anchor": "start", + x: this.getAttr("text-margin"), + fill: this.getAttr("font-color"), + "font-size": this.getAttr("font-size") + }); + var font = this.getAttr("font"), fontF = this.getAttr("font-family"), fontW = this.getAttr("font-weight"); + font && this.text.attr({ + font: font + }), fontF && this.text.attr({ + "font-family": fontF + }), fontW && this.text.attr({ + "font-weight": fontW + }), options.link && this.text.attr("href", options.link), options.target && this.text.attr("target", options.target); + var maxWidth = this.getAttr("maxWidth"); + if (maxWidth) { + for (var words = options.text.split(" "), tempText = "", i = 0, ii = words.length; ii > i; i++) { + var word = words[i]; + this.text.attr("text", tempText + " " + word), tempText += this.text.getBBox().width > maxWidth ? "\n" + word : " " + word; + } + this.text.attr("text", tempText.substring(1)); + } + if (this.group.push(this.text), symbol) { + var tmpMargin = this.getAttr("text-margin"); + symbol.attr({ + fill: this.getAttr("fill"), + stroke: this.getAttr("element-color"), + "stroke-width": this.getAttr("line-width"), + width: this.text.getBBox().width + 2 * tmpMargin, + height: this.text.getBBox().height + 2 * tmpMargin + }), symbol.node.setAttribute("class", this.getAttr("class")), options.link && symbol.attr("href", options.link), + options.target && symbol.attr("target", options.target), options.key && (symbol.node.id = options.key), + this.group.push(symbol), symbol.insertBefore(this.text), this.text.attr({ + y: symbol.getBBox().height / 2 + }), this.initialize(); + } + } + var drawAPI = __webpack_require__(/*! ./flowchart.functions */ 3), drawLine = drawAPI.drawLine, checkLineIntersection = drawAPI.checkLineIntersection; + /* Gets the attribute based on Flowstate, Symbol-Name and default, first found wins */ + Symbol.prototype.getAttr = function(attName) { + if (this.chart) { + var opt1, opt3 = this.chart.options ? this.chart.options[attName] : void 0, opt2 = this.chart.options.symbols ? this.chart.options.symbols[this.symbolType][attName] : void 0; + return this.chart.options.flowstate && this.chart.options.flowstate[this.flowstate] && (opt1 = this.chart.options.flowstate[this.flowstate][attName]), + opt1 || opt2 || opt3; + } + }, Symbol.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; + }, Symbol.prototype.getCenter = function() { + return { + x: this.getX() + this.width / 2, + y: this.getY() + this.height / 2 + }; + }, Symbol.prototype.getX = function() { + return this.group.getBBox().x; + }, Symbol.prototype.getY = function() { + return this.group.getBBox().y; + }, Symbol.prototype.shiftX = function(x) { + this.group.transform("t" + (this.getX() + x) + "," + this.getY()); + }, Symbol.prototype.setX = function(x) { + this.group.transform("t" + x + "," + this.getY()); + }, Symbol.prototype.shiftY = function(y) { + this.group.transform("t" + this.getX() + "," + (this.getY() + y)); + }, Symbol.prototype.setY = function(y) { + this.group.transform("t" + this.getX() + "," + y); + }, Symbol.prototype.getTop = function() { + var y = this.getY(), x = this.getX() + this.width / 2; + return { + x: x, + y: y + }; + }, Symbol.prototype.getBottom = function() { + var y = this.getY() + this.height, x = this.getX() + this.width / 2; + return { + x: x, + y: y + }; + }, Symbol.prototype.getLeft = function() { + var y = this.getY() + this.group.getBBox().height / 2, x = this.getX(); + return { + x: x, + y: y + }; + }, Symbol.prototype.getRight = function() { + var y = this.getY() + this.group.getBBox().height / 2, x = this.getX() + this.group.getBBox().width; + return { + x: x, + y: y + }; + }, Symbol.prototype.render = function() { + if (this.next) { + var lineLength = this.getAttr("line-length"); + if ("right" === this.next_direction) { + var rightPoint = this.getRight(); + if (!this.next.isPositioned) { + this.next.setY(rightPoint.y - this.next.height / 2), this.next.shiftX(this.group.getBBox().x + this.width + lineLength); + var self = this; + !function shift() { + for (var symb, hasSymbolUnder = !1, i = 0, len = self.chart.symbols.length; len > i; i++) { + symb = self.chart.symbols[i]; + var diff = Math.abs(symb.getCenter().x - self.next.getCenter().x); + if (symb.getCenter().y > self.next.getCenter().y && diff <= self.next.width / 2) { + hasSymbolUnder = !0; + break; + } + } + hasSymbolUnder && (self.next.setX(symb.getX() + symb.width + lineLength), shift()); + }(), this.next.isPositioned = !0, this.next.render(); + } + } else { + var bottomPoint = this.getBottom(); + this.next.isPositioned || (this.next.shiftY(this.getY() + this.height + lineLength), + this.next.setX(bottomPoint.x - this.next.width / 2), this.next.isPositioned = !0, + this.next.render()); + } + } + }, Symbol.prototype.renderLines = function() { + this.next && (this.next_direction ? this.drawLineTo(this.next, "", this.next_direction) : this.drawLineTo(this.next)); + }, Symbol.prototype.drawLineTo = function(symbol, text, origin) { + this.connectedTo.indexOf(symbol) < 0 && this.connectedTo.push(symbol); + var line, x = this.getCenter().x, y = this.getCenter().y, right = this.getRight(), bottom = this.getBottom(), left = this.getLeft(), symbolX = symbol.getCenter().x, symbolY = symbol.getCenter().y, symbolTop = symbol.getTop(), symbolRight = symbol.getRight(), symbolLeft = symbol.getLeft(), isOnSameColumn = x === symbolX, isOnSameLine = y === symbolY, isUnder = symbolY > y, isUpper = y > symbolY || this === symbol, isLeft = x > symbolX, isRight = symbolX > x, maxX = 0, lineLength = this.getAttr("line-length"), lineWith = this.getAttr("line-width"); + if (origin && "bottom" !== origin || !isOnSameColumn || !isUnder) if (origin && "right" !== origin || !isOnSameLine || !isRight) if (origin && "left" !== origin || !isOnSameLine || !isLeft) if (origin && "right" !== origin || !isOnSameColumn || !isUpper) if (origin && "right" !== origin || !isOnSameColumn || !isUnder) if (origin && "bottom" !== origin || !isLeft) if (origin && "bottom" !== origin || !isRight) if (origin && "right" === origin && isLeft) line = drawLine(this.chart, right, [ { + x: right.x + lineLength / 2, + y: right.y + }, { + x: right.x + lineLength / 2, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y + } ], text), this.rightStart = !0, symbol.topEnd = !0, maxX = right.x + lineLength / 2; else if (origin && "right" === origin && isRight) line = drawLine(this.chart, right, [ { + x: symbolTop.x, + y: right.y + }, { + x: symbolTop.x, + y: symbolTop.y + } ], text), this.rightStart = !0, symbol.topEnd = !0, maxX = right.x + lineLength / 2; else if (origin && "bottom" === origin && isOnSameColumn && isUpper) line = drawLine(this.chart, bottom, [ { + x: bottom.x, + y: bottom.y + lineLength / 2 + }, { + x: right.x + lineLength / 2, + y: bottom.y + lineLength / 2 + }, { + x: right.x + lineLength / 2, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y + } ], text), this.bottomStart = !0, symbol.topEnd = !0, maxX = bottom.x + lineLength / 2; else if ("left" === origin && isOnSameColumn && isUpper) { + var diffX = left.x - lineLength / 2; + symbolLeft.x < left.x && (diffX = symbolLeft.x - lineLength / 2), line = drawLine(this.chart, left, [ { + x: diffX, + y: left.y + }, { + x: diffX, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y + } ], text), this.leftStart = !0, symbol.topEnd = !0, maxX = left.x; + } else "left" === origin && (line = drawLine(this.chart, left, [ { + x: symbolTop.x + (left.x - symbolTop.x) / 2, + y: left.y + }, { + x: symbolTop.x + (left.x - symbolTop.x) / 2, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y + } ], text), this.leftStart = !0, symbol.topEnd = !0, maxX = left.x); else line = drawLine(this.chart, bottom, [ { + x: bottom.x, + y: bottom.y + lineLength / 2 + }, { + x: bottom.x + (bottom.x - symbolTop.x) / 2, + y: bottom.y + lineLength / 2 + }, { + x: bottom.x + (bottom.x - symbolTop.x) / 2, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y + } ], text), this.bottomStart = !0, symbol.topEnd = !0, maxX = bottom.x + (bottom.x - symbolTop.x) / 2; else line = this.leftEnd && isUpper ? drawLine(this.chart, bottom, [ { + x: bottom.x, + y: bottom.y + lineLength / 2 + }, { + x: bottom.x + (bottom.x - symbolTop.x) / 2, + y: bottom.y + lineLength / 2 + }, { + x: bottom.x + (bottom.x - symbolTop.x) / 2, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y + } ], text) : drawLine(this.chart, bottom, [ { + x: bottom.x, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y + } ], text), this.bottomStart = !0, symbol.topEnd = !0, maxX = bottom.x + (bottom.x - symbolTop.x) / 2; else line = drawLine(this.chart, right, [ { + x: right.x + lineLength / 2, + y: right.y + }, { + x: right.x + lineLength / 2, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y + } ], text), this.rightStart = !0, symbol.topEnd = !0, maxX = right.x + lineLength / 2; else line = drawLine(this.chart, right, [ { + x: right.x + lineLength / 2, + y: right.y + }, { + x: right.x + lineLength / 2, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y - lineLength / 2 + }, { + x: symbolTop.x, + y: symbolTop.y + } ], text), this.rightStart = !0, symbol.topEnd = !0, maxX = right.x + lineLength / 2; else line = drawLine(this.chart, left, symbolRight, text), + this.leftStart = !0, symbol.rightEnd = !0, maxX = symbolRight.x; else line = drawLine(this.chart, right, symbolLeft, text), + this.rightStart = !0, symbol.leftEnd = !0, maxX = symbolLeft.x; else line = drawLine(this.chart, bottom, symbolTop, text), + this.bottomStart = !0, symbol.topEnd = !0, maxX = bottom.x; + if (line) { + for (var l = 0, llen = this.chart.lines.length; llen > l; l++) for (var len, otherLine = this.chart.lines[l], ePath = otherLine.attr("path"), lPath = line.attr("path"), iP = 0, lenP = ePath.length - 1; lenP > iP; iP++) { + var newPath = []; + newPath.push([ "M", ePath[iP][1], ePath[iP][2] ]), newPath.push([ "L", ePath[iP + 1][1], ePath[iP + 1][2] ]); + for (var line1_from_x = newPath[0][1], line1_from_y = newPath[0][2], line1_to_x = newPath[1][1], line1_to_y = newPath[1][2], lP = 0, lenlP = lPath.length - 1; lenlP > lP; lP++) { + var newLinePath = []; + newLinePath.push([ "M", lPath[lP][1], lPath[lP][2] ]), newLinePath.push([ "L", lPath[lP + 1][1], lPath[lP + 1][2] ]); + var line2_from_x = newLinePath[0][1], line2_from_y = newLinePath[0][2], line2_to_x = newLinePath[1][1], line2_to_y = newLinePath[1][2], res = checkLineIntersection(line1_from_x, line1_from_y, line1_to_x, line1_to_y, line2_from_x, line2_from_y, line2_to_x, line2_to_y); + if (res.onLine1 && res.onLine2) { + var newSegment; + line2_from_y === line2_to_y ? line2_from_x > line2_to_x ? (newSegment = [ "L", res.x + 2 * lineWith, line2_from_y ], + lPath.splice(lP + 1, 0, newSegment), newSegment = [ "C", res.x + 2 * lineWith, line2_from_y, res.x, line2_from_y - 4 * lineWith, res.x - 2 * lineWith, line2_from_y ], + lPath.splice(lP + 2, 0, newSegment), line.attr("path", lPath)) : (newSegment = [ "L", res.x - 2 * lineWith, line2_from_y ], + lPath.splice(lP + 1, 0, newSegment), newSegment = [ "C", res.x - 2 * lineWith, line2_from_y, res.x, line2_from_y - 4 * lineWith, res.x + 2 * lineWith, line2_from_y ], + lPath.splice(lP + 2, 0, newSegment), line.attr("path", lPath)) : line2_from_y > line2_to_y ? (newSegment = [ "L", line2_from_x, res.y + 2 * lineWith ], + lPath.splice(lP + 1, 0, newSegment), newSegment = [ "C", line2_from_x, res.y + 2 * lineWith, line2_from_x + 4 * lineWith, res.y, line2_from_x, res.y - 2 * lineWith ], + lPath.splice(lP + 2, 0, newSegment), line.attr("path", lPath)) : (newSegment = [ "L", line2_from_x, res.y - 2 * lineWith ], + lPath.splice(lP + 1, 0, newSegment), newSegment = [ "C", line2_from_x, res.y - 2 * lineWith, line2_from_x + 4 * lineWith, res.y, line2_from_x, res.y + 2 * lineWith ], + lPath.splice(lP + 2, 0, newSegment), line.attr("path", lPath)), lP += 2, len += 2; + } + } + } + this.chart.lines.push(line); + } + (!this.chart.maxXFromLine || this.chart.maxXFromLine && maxX > this.chart.maxXFromLine) && (this.chart.maxXFromLine = maxX); + }, module.exports = Symbol; + }, /* 3 */ + /*!************************************!*\ + !*** ./src/flowchart.functions.js ***! + \************************************/ + /***/ + function(module, exports) { + function drawPath(chart, location, points) { + var i, len, path = "M{0},{1}"; + for (i = 2, len = 2 * points.length + 2; len > i; i += 2) path += " L{" + i + "},{" + (i + 1) + "}"; + var pathValues = [ location.x, location.y ]; + for (i = 0, len = points.length; len > i; i++) pathValues.push(points[i].x), pathValues.push(points[i].y); + var symbol = chart.paper.path(path, pathValues); + symbol.attr("stroke", chart.options["element-color"]), symbol.attr("stroke-width", chart.options["line-width"]); + var font = chart.options.font, fontF = chart.options["font-family"], fontW = chart.options["font-weight"]; + return font && symbol.attr({ + font: font + }), fontF && symbol.attr({ + "font-family": fontF + }), fontW && symbol.attr({ + "font-weight": fontW + }), symbol; + } + function drawLine(chart, from, to, text) { + var i, len; + "[object Array]" !== Object.prototype.toString.call(to) && (to = [ to ]); + var path = "M{0},{1}"; + for (i = 2, len = 2 * to.length + 2; len > i; i += 2) path += " L{" + i + "},{" + (i + 1) + "}"; + var pathValues = [ from.x, from.y ]; + for (i = 0, len = to.length; len > i; i++) pathValues.push(to[i].x), pathValues.push(to[i].y); + var line = chart.paper.path(path, pathValues); + line.attr({ + stroke: chart.options["line-color"], + "stroke-width": chart.options["line-width"], + "arrow-end": chart.options["arrow-end"] + }); + var font = chart.options.font, fontF = chart.options["font-family"], fontW = chart.options["font-weight"]; + if (font && line.attr({ + font: font + }), fontF && line.attr({ + "font-family": fontF + }), fontW && line.attr({ + "font-weight": fontW + }), text) { + var centerText = !1, textPath = chart.paper.text(0, 0, text), isHorizontal = !1, firstTo = to[0]; + from.y === firstTo.y && (isHorizontal = !0); + var x = 0, y = 0; + centerText ? (x = from.x > firstTo.x ? from.x - (from.x - firstTo.x) / 2 : firstTo.x - (firstTo.x - from.x) / 2, + y = from.y > firstTo.y ? from.y - (from.y - firstTo.y) / 2 : firstTo.y - (firstTo.y - from.y) / 2, + isHorizontal ? (x -= textPath.getBBox().width / 2, y -= chart.options["text-margin"]) : (x += chart.options["text-margin"], + y -= textPath.getBBox().height / 2)) : (x = from.x, y = from.y, isHorizontal ? (x += chart.options["text-margin"] / 2, + y -= chart.options["text-margin"]) : (x += chart.options["text-margin"] / 2, y += chart.options["text-margin"])), + textPath.attr({ + "text-anchor": "start", + "font-size": chart.options["font-size"], + fill: chart.options["font-color"], + x: x, + y: y + }), font && textPath.attr({ + font: font + }), fontF && textPath.attr({ + "font-family": fontF + }), fontW && textPath.attr({ + "font-weight": fontW + }); + } + return line; + } + function checkLineIntersection(line1StartX, line1StartY, line1EndX, line1EndY, line2StartX, line2StartY, line2EndX, line2EndY) { + // if the lines intersect, the result contains the x and y of the intersection (treating the lines as infinite) and booleans for whether line segment 1 or line segment 2 contain the point + var denominator, a, b, numerator1, numerator2, result = { + x: null, + y: null, + onLine1: !1, + onLine2: !1 + }; + // if we cast these lines infinitely in both directions, they intersect here: + /* + // it is worth noting that this should be the same as: + x = line2StartX + (b * (line2EndX - line2StartX)); + y = line2StartX + (b * (line2EndY - line2StartY)); + */ + // if line1 is a segment and line2 is infinite, they intersect if: + // if line2 is a segment and line1 is infinite, they intersect if: + return denominator = (line2EndY - line2StartY) * (line1EndX - line1StartX) - (line2EndX - line2StartX) * (line1EndY - line1StartY), + 0 === denominator ? result : (a = line1StartY - line2StartY, b = line1StartX - line2StartX, + numerator1 = (line2EndX - line2StartX) * a - (line2EndY - line2StartY) * b, numerator2 = (line1EndX - line1StartX) * a - (line1EndY - line1StartY) * b, + a = numerator1 / denominator, b = numerator2 / denominator, result.x = line1StartX + a * (line1EndX - line1StartX), + result.y = line1StartY + a * (line1EndY - line1StartY), a > 0 && 1 > a && (result.onLine1 = !0), + b > 0 && 1 > b && (result.onLine2 = !0), result); + } + module.exports = { + drawPath: drawPath, + drawLine: drawLine, + checkLineIntersection: checkLineIntersection + }; + }, /* 4 */ + /*!********************************!*\ + !*** ./src/flowchart.parse.js ***! + \********************************/ + /***/ + function(module, exports, __webpack_require__) { + function parse(input) { + function getSymbol(s) { + var startIndex = s.indexOf("(") + 1, endIndex = s.indexOf(")"); + return startIndex >= 0 && endIndex >= 0 ? chart.symbols[s.substring(0, startIndex - 1)] : chart.symbols[s]; + } + function getNextPath(s) { + var next = "next", startIndex = s.indexOf("(") + 1, endIndex = s.indexOf(")"); + return startIndex >= 0 && endIndex >= 0 && (next = flowSymb.substring(startIndex, endIndex), + next.indexOf(",") < 0 && "yes" !== next && "no" !== next && (next = "next, " + next)), + next; + } + input = input || "", input = input.trim(); + for (var chart = { + symbols: {}, + start: null, + drawSVG: function(container, options) { + function getDisplaySymbol(s) { + if (dispSymbols[s.key]) return dispSymbols[s.key]; + switch (s.symbolType) { + case "start": + dispSymbols[s.key] = new Start(diagram, s); + break; + + case "end": + dispSymbols[s.key] = new End(diagram, s); + break; + + case "operation": + dispSymbols[s.key] = new Operation(diagram, s); + break; + + case "inputoutput": + dispSymbols[s.key] = new InputOutput(diagram, s); + break; + + case "subroutine": + dispSymbols[s.key] = new Subroutine(diagram, s); + break; + + case "condition": + dispSymbols[s.key] = new Condition(diagram, s); + break; + + default: + return new Error("Wrong symbol type!"); + } + return dispSymbols[s.key]; + } + var self = this; + this.diagram && this.diagram.clean(); + var diagram = new FlowChart(container, options); + this.diagram = diagram; + var dispSymbols = {}; + !function constructChart(s, prevDisp, prev) { + var dispSymb = getDisplaySymbol(s); + return self.start === s ? diagram.startWith(dispSymb) : prevDisp && prev && !prevDisp.pathOk && (prevDisp instanceof Condition ? (prev.yes === s && prevDisp.yes(dispSymb), + prev.no === s && prevDisp.no(dispSymb)) : prevDisp.then(dispSymb)), dispSymb.pathOk ? dispSymb : (dispSymb instanceof Condition ? (s.yes && constructChart(s.yes, dispSymb, s), + s.no && constructChart(s.no, dispSymb, s)) : s.next && constructChart(s.next, dispSymb, s), + dispSymb); + }(this.start), diagram.render(); + }, + clean: function() { + this.diagram.clean(); + } + }, lines = [], prevBreak = 0, i0 = 1, i0len = input.length; i0len > i0; i0++) if ("\n" === input[i0] && "\\" !== input[i0 - 1]) { + var line0 = input.substring(prevBreak, i0); + prevBreak = i0 + 1, lines.push(line0.replace(/\\\n/g, "\n")); + } + prevBreak < input.length && lines.push(input.substr(prevBreak)); + for (var l = 1, len = lines.length; len > l; ) { + var currentLine = lines[l]; + currentLine.indexOf("->") < 0 && currentLine.indexOf("=>") < 0 ? (lines[l - 1] += "\n" + currentLine, + lines.splice(l, 1), len--) : l++; + } + for (;lines.length > 0; ) { + var line = lines.splice(0, 1)[0]; + if (line.indexOf("=>") >= 0) { + // definition + var sub, parts = line.split("=>"), symbol = { + key: parts[0], + symbolType: parts[1], + text: null, + link: null, + target: null, + flowstate: null + }; + /* adding support for links */ + if (symbol.symbolType.indexOf(": ") >= 0 && (sub = symbol.symbolType.split(": "), + symbol.symbolType = sub.shift(), symbol.text = sub.join(": ")), symbol.text && symbol.text.indexOf(":>") >= 0 ? (sub = symbol.text.split(":>"), + symbol.text = sub.shift(), symbol.link = sub.join(":>")) : symbol.symbolType.indexOf(":>") >= 0 && (sub = symbol.symbolType.split(":>"), + symbol.symbolType = sub.shift(), symbol.link = sub.join(":>")), symbol.symbolType.indexOf("\n") >= 0 && (symbol.symbolType = symbol.symbolType.split("\n")[0]), + symbol.link) { + var startIndex = symbol.link.indexOf("[") + 1, endIndex = symbol.link.indexOf("]"); + startIndex >= 0 && endIndex >= 0 && (symbol.target = symbol.link.substring(startIndex, endIndex), + symbol.link = symbol.link.substring(0, startIndex - 1)); + } + /* end of link support */ + /* adding support for flowstates */ + if (symbol.text && symbol.text.indexOf("|") >= 0) { + var txtAndState = symbol.text.split("|"); + symbol.flowstate = txtAndState.pop().trim(), symbol.text = txtAndState.join("|"); + } + /* end of flowstate support */ + chart.symbols[symbol.key] = symbol; + } else if (line.indexOf("->") >= 0) for (var flowSymbols = line.split("->"), i = 0, lenS = flowSymbols.length; lenS > i; i++) { + var flowSymb = flowSymbols[i], realSymb = getSymbol(flowSymb), next = getNextPath(flowSymb), direction = null; + if (next.indexOf(",") >= 0) { + var condOpt = next.split(","); + next = condOpt[0], direction = condOpt[1].trim(); + } + if (chart.start || (chart.start = realSymb), lenS > i + 1) { + var nextSymb = flowSymbols[i + 1]; + realSymb[next] = getSymbol(nextSymb), realSymb["direction_" + next] = direction, + direction = null; + } + } + } + return chart; + } + var FlowChart = __webpack_require__(/*! ./flowchart.chart */ 6), Start = __webpack_require__(/*! ./flowchart.symbol.start */ 12), End = __webpack_require__(/*! ./flowchart.symbol.end */ 9), Operation = __webpack_require__(/*! ./flowchart.symbol.operation */ 11), InputOutput = __webpack_require__(/*! ./flowchart.symbol.inputoutput */ 10), Subroutine = __webpack_require__(/*! ./flowchart.symbol.subroutine */ 13), Condition = __webpack_require__(/*! ./flowchart.symbol.condition */ 5); + module.exports = parse; + }, /* 5 */ + /*!*******************************************!*\ + !*** ./src/flowchart.symbol.condition.js ***! + \*******************************************/ + /***/ + function(module, exports, __webpack_require__) { + function Condition(chart, options) { + options = options || {}, Symbol.call(this, chart, options), this.textMargin = this.getAttr("text-margin"), + this.yes_direction = "bottom", this.no_direction = "right", options.yes && options.direction_yes && options.no && !options.direction_no ? "right" === options.direction_yes ? (this.no_direction = "bottom", + this.yes_direction = "right") : (this.no_direction = "right", this.yes_direction = "bottom") : options.yes && !options.direction_yes && options.no && options.direction_no ? "right" === options.direction_no ? (this.yes_direction = "bottom", + this.no_direction = "right") : (this.yes_direction = "right", this.no_direction = "bottom") : (this.yes_direction = "bottom", + this.no_direction = "right"), this.yes_direction = this.yes_direction || "bottom", + this.no_direction = this.no_direction || "right", this.text.attr({ + x: 2 * this.textMargin + }); + var width = this.text.getBBox().width + 3 * this.textMargin; + width += width / 2; + var height = this.text.getBBox().height + 2 * this.textMargin; + height += height / 2, height = Math.max(.5 * width, height); + var startX = width / 4, startY = height / 4; + this.text.attr({ + x: startX + this.textMargin / 2 + }); + var start = { + x: startX, + y: startY + }, points = [ { + x: startX - width / 4, + y: startY + height / 4 + }, { + x: startX - width / 4 + width / 2, + y: startY + height / 4 + height / 2 + }, { + x: startX - width / 4 + width, + y: startY + height / 4 + }, { + x: startX - width / 4 + width / 2, + y: startY + height / 4 - height / 2 + }, { + x: startX - width / 4, + y: startY + height / 4 + } ], symbol = drawPath(chart, start, points); + symbol.attr({ + stroke: this.getAttr("element-color"), + "stroke-width": this.getAttr("line-width"), + fill: this.getAttr("fill") + }), options.link && symbol.attr("href", options.link), options.target && symbol.attr("target", options.target), + options.key && (symbol.node.id = options.key), symbol.node.setAttribute("class", this.getAttr("class")), + this.text.attr({ + y: symbol.getBBox().height / 2 + }), this.group.push(symbol), symbol.insertBefore(this.text), this.initialize(); + } + var Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2), inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits, drawAPI = __webpack_require__(/*! ./flowchart.functions */ 3), drawPath = drawAPI.drawPath; + inherits(Condition, Symbol), Condition.prototype.render = function() { + this.yes_direction && (this[this.yes_direction + "_symbol"] = this.yes_symbol), + this.no_direction && (this[this.no_direction + "_symbol"] = this.no_symbol); + var lineLength = this.getAttr("line-length"); + if (this.bottom_symbol) { + var bottomPoint = this.getBottom(); + this.bottom_symbol.isPositioned || (this.bottom_symbol.shiftY(this.getY() + this.height + lineLength), + this.bottom_symbol.setX(bottomPoint.x - this.bottom_symbol.width / 2), this.bottom_symbol.isPositioned = !0, + this.bottom_symbol.render()); + } + if (this.right_symbol) { + var rightPoint = this.getRight(); + if (!this.right_symbol.isPositioned) { + this.right_symbol.setY(rightPoint.y - this.right_symbol.height / 2), this.right_symbol.shiftX(this.group.getBBox().x + this.width + lineLength); + var self = this; + !function shift() { + for (var symb, hasSymbolUnder = !1, i = 0, len = self.chart.symbols.length; len > i; i++) { + symb = self.chart.symbols[i]; + var diff = Math.abs(symb.getCenter().x - self.right_symbol.getCenter().x); + if (symb.getCenter().y > self.right_symbol.getCenter().y && diff <= self.right_symbol.width / 2) { + hasSymbolUnder = !0; + break; + } + } + hasSymbolUnder && (self.right_symbol.setX(symb.getX() + symb.width + lineLength), + shift()); + }(), this.right_symbol.isPositioned = !0, this.right_symbol.render(); + } + } + }, Condition.prototype.renderLines = function() { + this.yes_symbol && this.drawLineTo(this.yes_symbol, this.getAttr("yes-text"), this.yes_direction), + this.no_symbol && this.drawLineTo(this.no_symbol, this.getAttr("no-text"), this.no_direction); + }, module.exports = Condition; + }, /* 6 */ + /*!********************************!*\ + !*** ./src/flowchart.chart.js ***! + \********************************/ + /***/ + function(module, exports, __webpack_require__) { + function FlowChart(container, options) { + options = options || {}, this.paper = new Raphael(container), this.options = defaults(options, defaultOptions), + this.symbols = [], this.lines = [], this.start = null; + } + var Raphael = __webpack_require__(/*! raphael */ 15), defaults = __webpack_require__(/*! ./flowchart.helpers */ 1).defaults, defaultOptions = __webpack_require__(/*! ./flowchart.defaults */ 7), Condition = __webpack_require__(/*! ./flowchart.symbol.condition */ 5); + FlowChart.prototype.handle = function(symbol) { + this.symbols.indexOf(symbol) <= -1 && this.symbols.push(symbol); + var flowChart = this; + return symbol instanceof Condition ? (symbol.yes = function(nextSymbol) { + return symbol.yes_symbol = nextSymbol, symbol.no_symbol && (symbol.pathOk = !0), + flowChart.handle(nextSymbol); + }, symbol.no = function(nextSymbol) { + return symbol.no_symbol = nextSymbol, symbol.yes_symbol && (symbol.pathOk = !0), + flowChart.handle(nextSymbol); + }) : symbol.then = function(nextSymbol) { + return symbol.next = nextSymbol, symbol.pathOk = !0, flowChart.handle(nextSymbol); + }, symbol; + }, FlowChart.prototype.startWith = function(symbol) { + return this.start = symbol, this.handle(symbol); + }, FlowChart.prototype.render = function() { + var symbol, line, maxWidth = 0, maxHeight = 0, i = 0, len = 0, maxX = 0, maxY = 0, minX = 0, minY = 0; + for (i = 0, len = this.symbols.length; len > i; i++) symbol = this.symbols[i], symbol.width > maxWidth && (maxWidth = symbol.width), + symbol.height > maxHeight && (maxHeight = symbol.height); + for (i = 0, len = this.symbols.length; len > i; i++) symbol = this.symbols[i], symbol.shiftX(this.options.x + (maxWidth - symbol.width) / 2 + this.options["line-width"]), + symbol.shiftY(this.options.y + (maxHeight - symbol.height) / 2 + this.options["line-width"]); + // for (i = 0, len = this.symbols.length; i < len; i++) { + // symbol = this.symbols[i]; + // symbol.render(); + // } + for (this.start.render(), i = 0, len = this.symbols.length; len > i; i++) symbol = this.symbols[i], + symbol.renderLines(); + for (maxX = this.maxXFromLine, i = 0, len = this.symbols.length; len > i; i++) { + symbol = this.symbols[i]; + var x = symbol.getX() + symbol.width, y = symbol.getY() + symbol.height; + x > maxX && (maxX = x), y > maxY && (maxY = y); + } + for (i = 0, len = this.lines.length; len > i; i++) { + line = this.lines[i].getBBox(); + var x = line.x, y = line.y, x2 = line.x2, y2 = line.y2; + minX > x && (minX = x), minY > y && (minY = y), x2 > maxX && (maxX = x2), y2 > maxY && (maxY = y2); + } + var scale = this.options.scale, lineWidth = this.options["line-width"]; + 0 > minX && (minX -= lineWidth), 0 > minY && (minY -= lineWidth); + var width = maxX + lineWidth - minX, height = maxY + lineWidth - minY; + this.paper.setSize(width * scale, height * scale), this.paper.setViewBox(minX, minY, width, height, !0); + }, FlowChart.prototype.clean = function() { + if (this.paper) { + var paperDom = this.paper.canvas; + paperDom.parentNode.removeChild(paperDom); + } + }, module.exports = FlowChart; + }, /* 7 */ + /*!***********************************!*\ + !*** ./src/flowchart.defaults.js ***! + \***********************************/ + /***/ + function(module, exports) { + // defaults + module.exports = { + x: 0, + y: 0, + "line-width": 3, + "line-length": 50, + "text-margin": 10, + "font-size": 14, + "font-color": "black", + // 'font': 'normal', + // 'font-family': 'calibri', + // 'font-weight': 'normal', + "line-color": "black", + "element-color": "black", + fill: "white", + "yes-text": "yes", + "no-text": "no", + "arrow-end": "block", + "class": "flowchart", + scale: 1, + symbols: { + start: {}, + end: {}, + condition: {}, + inputoutput: {}, + operation: {}, + subroutine: {} + } + }; + }, /* 8 */ + /*!*******************************!*\ + !*** ./src/flowchart.shim.js ***! + \*******************************/ + /***/ + function(module, exports) { + // add indexOf to non ECMA-262 standard compliant browsers + Array.prototype.indexOf || (Array.prototype.indexOf = function(searchElement) { + "use strict"; + if (null === this) throw new TypeError(); + var t = Object(this), len = t.length >>> 0; + if (0 === len) return -1; + var n = 0; + if (arguments.length > 0 && (n = Number(arguments[1]), n != n ? n = 0 : 0 !== n && n != 1 / 0 && n != -(1 / 0) && (n = (n > 0 || -1) * Math.floor(Math.abs(n)))), + n >= len) return -1; + for (var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0); len > k; k++) if (k in t && t[k] === searchElement) return k; + return -1; + }), // add lastIndexOf to non ECMA-262 standard compliant browsers + Array.prototype.lastIndexOf || (Array.prototype.lastIndexOf = function(searchElement) { + "use strict"; + if (null === this) throw new TypeError(); + var t = Object(this), len = t.length >>> 0; + if (0 === len) return -1; + var n = len; + arguments.length > 1 && (n = Number(arguments[1]), n != n ? n = 0 : 0 !== n && n != 1 / 0 && n != -(1 / 0) && (n = (n > 0 || -1) * Math.floor(Math.abs(n)))); + for (var k = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n); k >= 0; k--) if (k in t && t[k] === searchElement) return k; + return -1; + }), String.prototype.trim || (String.prototype.trim = function() { + return this.replace(/^\s+|\s+$/g, ""); + }); + }, /* 9 */ + /*!*************************************!*\ + !*** ./src/flowchart.symbol.end.js ***! + \*************************************/ + /***/ + function(module, exports, __webpack_require__) { + function End(chart, options) { + var symbol = chart.paper.rect(0, 0, 0, 0, 20); + options = options || {}, options.text = options.text || "End", Symbol.call(this, chart, options, symbol); + } + var Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2), inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits; + inherits(End, Symbol), module.exports = End; + }, /* 10 */ + /*!*********************************************!*\ + !*** ./src/flowchart.symbol.inputoutput.js ***! + \*********************************************/ + /***/ + function(module, exports, __webpack_require__) { + function InputOutput(chart, options) { + options = options || {}, Symbol.call(this, chart, options), this.textMargin = this.getAttr("text-margin"), + this.text.attr({ + x: 3 * this.textMargin + }); + var width = this.text.getBBox().width + 4 * this.textMargin, height = this.text.getBBox().height + 2 * this.textMargin, startX = this.textMargin, startY = height / 2, start = { + x: startX, + y: startY + }, points = [ { + x: startX - this.textMargin, + y: height + }, { + x: startX - this.textMargin + width, + y: height + }, { + x: startX - this.textMargin + width + 2 * this.textMargin, + y: 0 + }, { + x: startX - this.textMargin + 2 * this.textMargin, + y: 0 + }, { + x: startX, + y: startY + } ], symbol = drawPath(chart, start, points); + symbol.attr({ + stroke: this.getAttr("element-color"), + "stroke-width": this.getAttr("line-width"), + fill: this.getAttr("fill") + }), options.link && symbol.attr("href", options.link), options.target && symbol.attr("target", options.target), + options.key && (symbol.node.id = options.key), symbol.node.setAttribute("class", this.getAttr("class")), + this.text.attr({ + y: symbol.getBBox().height / 2 + }), this.group.push(symbol), symbol.insertBefore(this.text), this.initialize(); + } + var Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2), inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits, drawAPI = __webpack_require__(/*! ./flowchart.functions */ 3), drawPath = drawAPI.drawPath; + inherits(InputOutput, Symbol), InputOutput.prototype.getLeft = function() { + var y = this.getY() + this.group.getBBox().height / 2, x = this.getX() + this.textMargin; + return { + x: x, + y: y + }; + }, InputOutput.prototype.getRight = function() { + var y = this.getY() + this.group.getBBox().height / 2, x = this.getX() + this.group.getBBox().width - this.textMargin; + return { + x: x, + y: y + }; + }, module.exports = InputOutput; + }, /* 11 */ + /*!*******************************************!*\ + !*** ./src/flowchart.symbol.operation.js ***! + \*******************************************/ + /***/ + function(module, exports, __webpack_require__) { + function Operation(chart, options) { + var symbol = chart.paper.rect(0, 0, 0, 0); + options = options || {}, Symbol.call(this, chart, options, symbol); + } + var Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2), inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits; + inherits(Operation, Symbol), module.exports = Operation; + }, /* 12 */ + /*!***************************************!*\ + !*** ./src/flowchart.symbol.start.js ***! + \***************************************/ + /***/ + function(module, exports, __webpack_require__) { + function Start(chart, options) { + var symbol = chart.paper.rect(0, 0, 0, 0, 20); + options = options || {}, options.text = options.text || "Start", Symbol.call(this, chart, options, symbol); + } + var Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2), inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits; + inherits(Start, Symbol), module.exports = Start; + }, /* 13 */ + /*!********************************************!*\ + !*** ./src/flowchart.symbol.subroutine.js ***! + \********************************************/ + /***/ + function(module, exports, __webpack_require__) { + function Subroutine(chart, options) { + var symbol = chart.paper.rect(0, 0, 0, 0); + options = options || {}, Symbol.call(this, chart, options, symbol), symbol.attr({ + width: this.text.getBBox().width + 4 * this.getAttr("text-margin") + }), this.text.attr({ + x: 2 * this.getAttr("text-margin") + }); + var innerWrap = chart.paper.rect(0, 0, 0, 0); + innerWrap.attr({ + x: this.getAttr("text-margin"), + stroke: this.getAttr("element-color"), + "stroke-width": this.getAttr("line-width"), + width: this.text.getBBox().width + 2 * this.getAttr("text-margin"), + height: this.text.getBBox().height + 2 * this.getAttr("text-margin"), + fill: this.getAttr("fill") + }), options.key && (innerWrap.node.id = options.key + "i"); + var font = this.getAttr("font"), fontF = this.getAttr("font-family"), fontW = this.getAttr("font-weight"); + font && innerWrap.attr({ + font: font + }), fontF && innerWrap.attr({ + "font-family": fontF + }), fontW && innerWrap.attr({ + "font-weight": fontW + }), options.link && innerWrap.attr("href", options.link), options.target && innerWrap.attr("target", options.target), + this.group.push(innerWrap), innerWrap.insertBefore(this.text), this.initialize(); + } + var Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2), inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits; + inherits(Subroutine, Symbol), module.exports = Subroutine; + }, /* 14 */ + /*!******************************!*\ + !*** ./src/jquery-plugin.js ***! + \******************************/ + /***/ + function(module, exports, __webpack_require__) { + if ("undefined" != typeof jQuery) { + var parse = __webpack_require__(/*! ./flowchart.parse */ 4); + !function($) { + $.fn.flowChart = function(options) { + return this.each(function() { + var $this = $(this), chart = parse($this.text()); + $this.html(""), chart.drawSVG(this, options); + }); + }; + }(jQuery); + } + }, /* 15 */ + /*!**************************!*\ + !*** external "Raphael" ***! + \**************************/ + /***/ + function(module, exports) { + module.exports = __WEBPACK_EXTERNAL_MODULE_15__; + } ]); +}); +//# sourceMappingURL=flowchart.js.map \ No newline at end of file diff --git a/site/static/js/lib/flowchart.js.map b/site/static/js/lib/flowchart.js.map new file mode 100644 index 0000000..d9d3531 --- /dev/null +++ b/site/static/js/lib/flowchart.js.map @@ -0,0 +1,790 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + flowchart.js/flowchart.js.map at master · adrai/flowchart.js · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Skip to content + + + + + + + + + + + +
+ +
+
+ + +
+
+
+ + + +
+
+ + + + + + + + + + +
+ Fetching contributors… +
+ +
+ + Cannot retrieve contributors at this time +
+
+
+
+
+ +
+ Raw + Blame + History +
+ + + + +
+ +
+ 1 lines (1 sloc) + + 135 KB +
+
+ + + +
+ + + + + +
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///flowchart.js","webpack:///webpack/bootstrap 41178340126627f4fc47","webpack:///./index.js","webpack:///./src/flowchart.helpers.js","webpack:///./src/flowchart.symbol.js","webpack:///./src/flowchart.functions.js","webpack:///./src/flowchart.parse.js","webpack:///./src/flowchart.symbol.condition.js","webpack:///./src/flowchart.chart.js","webpack:///./src/flowchart.defaults.js","webpack:///./src/flowchart.shim.js","webpack:///./src/flowchart.symbol.end.js","webpack:///./src/flowchart.symbol.inputoutput.js","webpack:///./src/flowchart.symbol.operation.js","webpack:///./src/flowchart.symbol.start.js","webpack:///./src/flowchart.symbol.subroutine.js","webpack:///./src/jquery-plugin.js","webpack:///external \"Raphael\""],"names":["root","factory","exports","module","require","define","amd","a","i","this","__WEBPACK_EXTERNAL_MODULE_15__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","parse","FlowChart","window","flowchart","_defaults","options","defaultOptions","merged","attrname","_inherits","ctor","superCtor","Object","super_","prototype","create","constructor","value","enumerable","writable","configurable","TempCtor","defaults","inherits","Symbol","chart","symbol","group","paper","set","connectedTo","symbolType","flowstate","next_direction","next","undefined","text","key","node","setAttribute","getAttr","attr","text-anchor","x","fill","font-size","font","fontF","fontW","font-family","font-weight","link","target","maxWidth","words","split","tempText","ii","length","word","getBBox","width","substring","push","tmpMargin","stroke","stroke-width","height","insertBefore","y","initialize","drawAPI","drawLine","checkLineIntersection","attName","opt1","opt3","opt2","symbols","transform","getCenter","getX","getY","shiftX","setX","shiftY","setY","getTop","getBottom","getLeft","getRight","render","lineLength","rightPoint","isPositioned","self","shift","symb","hasSymbolUnder","len","diff","Math","abs","bottomPoint","renderLines","drawLineTo","origin","indexOf","line","right","bottom","left","symbolX","symbolY","symbolTop","symbolRight","symbolLeft","isOnSameColumn","isOnSameLine","isUnder","isUpper","isLeft","isRight","maxX","lineWith","rightStart","topEnd","bottomStart","diffX","leftStart","leftEnd","rightEnd","l","llen","lines","otherLine","ePath","lPath","iP","lenP","newPath","line1_from_x","line1_from_y","line1_to_x","line1_to_y","lP","lenlP","newLinePath","line2_from_x","line2_from_y","line2_to_x","line2_to_y","res","onLine1","onLine2","newSegment","splice","maxXFromLine","drawPath","location","points","path","pathValues","from","to","toString","arrow-end","centerText","textPath","isHorizontal","firstTo","line1StartX","line1StartY","line1EndX","line1EndY","line2StartX","line2StartY","line2EndX","line2EndY","denominator","b","numerator1","numerator2","result","input","getSymbol","s","startIndex","endIndex","getNextPath","flowSymb","trim","start","drawSVG","container","getDisplaySymbol","dispSymbols","Start","diagram","End","Operation","InputOutput","Subroutine","Condition","Error","clean","constructChart","prevDisp","prev","dispSymb","startWith","pathOk","yes","no","then","prevBreak","i0","i0len","line0","replace","substr","currentLine","sub","parts","join","txtAndState","pop","flowSymbols","lenS","realSymb","direction","condOpt","nextSymb","textMargin","yes_direction","no_direction","direction_yes","direction_no","max","startX","startY","yes_symbol","no_symbol","bottom_symbol","right_symbol","Raphael","handle","flowChart","nextSymbol","maxHeight","maxY","minX","minY","x2","y2","scale","lineWidth","setSize","setViewBox","paperDom","canvas","parentNode","removeChild","line-width","line-length","text-margin","font-color","line-color","element-color","yes-text","no-text","class","end","condition","inputoutput","operation","subroutine","Array","searchElement","TypeError","t","n","arguments","Number","Infinity","floor","k","lastIndexOf","min","String","rect","innerWrap","jQuery","$","fn","each","$this","html"],"mappings":";;;;;CAAA,SAAAA,MAAAC;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AAwS,MAAApQ;wBACAoQ,MAAAC,KAAA,KACAhR,MAAAwK,QAAA7M,MAAAiB;;;cAGA+R;;;;;;;IhBypDM,SAAStT,QAAQD;QiBpqDvBC,OAAAD,UAAAQ","file":"flowchart.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"Raphael\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"Raphael\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"Raphael\")) : factory(root[\"Raphael\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function(__WEBPACK_EXTERNAL_MODULE_15__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"Raphael\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"Raphael\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"Raphael\")) : factory(root[\"Raphael\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function(__WEBPACK_EXTERNAL_MODULE_15__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/*!******************!*\\\n !*** ./index.js ***!\n \\******************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(/*! ./src/flowchart.shim */ 8);\n\tvar parse = __webpack_require__(/*! ./src/flowchart.parse */ 4);\n\t__webpack_require__(/*! ./src/jquery-plugin */ 14);\n\t\n\tvar FlowChart = {\n\t\tparse: parse\n\t};\n\t\n\tif (typeof window !== 'undefined') {\n\t\twindow.flowchart = FlowChart;\n\t}\n\t\n\tmodule.exports = FlowChart;\n\n\n/***/ },\n/* 1 */\n/*!**********************************!*\\\n !*** ./src/flowchart.helpers.js ***!\n \\**********************************/\n/***/ function(module, exports) {\n\n\tfunction _defaults(options, defaultOptions) {\n\t if (!options || typeof options === 'function') {\n\t return defaultOptions;\n\t }\n\t\n\t var merged = {};\n\t for (var attrname in defaultOptions) {\n\t merged[attrname] = defaultOptions[attrname];\n\t }\n\t\n\t for (attrname in options) {\n\t if (options[attrname]) {\n\t if (typeof merged[attrname] === 'object') {\n\t merged[attrname] = _defaults(merged[attrname], options[attrname]);\n\t } else {\n\t merged[attrname] = options[attrname];\n\t }\n\t }\n\t }\n\t return merged;\n\t}\n\t\n\tfunction _inherits(ctor, superCtor) {\n\t if (typeof(Object.create) === 'function') {\n\t // implementation from standard node.js 'util' module\n\t ctor.super_ = superCtor;\n\t ctor.prototype = Object.create(superCtor.prototype, {\n\t constructor: {\n\t value: ctor,\n\t enumerable: false,\n\t writable: true,\n\t configurable: true\n\t }\n\t });\n\t } else {\n\t // old school shim for old browsers\n\t ctor.super_ = superCtor;\n\t var TempCtor = function () {};\n\t TempCtor.prototype = superCtor.prototype;\n\t ctor.prototype = new TempCtor();\n\t ctor.prototype.constructor = ctor;\n\t }\n\t}\n\t\n\t// move dependent functions to a container so that\n\t// they can be overriden easier in no jquery environment (node.js)\n\tmodule.exports = {\n\t defaults: _defaults,\n\t inherits: _inherits\n\t};\n\n\n/***/ },\n/* 2 */\n/*!*********************************!*\\\n !*** ./src/flowchart.symbol.js ***!\n \\*********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar drawAPI = __webpack_require__(/*! ./flowchart.functions */ 3);\n\tvar drawLine = drawAPI.drawLine;\n\tvar checkLineIntersection = drawAPI.checkLineIntersection;\n\t\n\tfunction Symbol(chart, options, symbol) {\n\t this.chart = chart;\n\t this.group = this.chart.paper.set();\n\t this.symbol = symbol;\n\t this.connectedTo = [];\n\t this.symbolType = options.symbolType;\n\t this.flowstate = (options.flowstate || 'future');\n\t\n\t this.next_direction = options.next && options['direction_next'] ? options['direction_next'] : undefined;\n\t\n\t this.text = this.chart.paper.text(0, 0, options.text);\n\t //Raphael does not support the svg group tag so setting the text node id to the symbol node id plus t\n\t if (options.key) { this.text.node.id = options.key + 't'; }\n\t this.text.node.setAttribute('class', this.getAttr('class') + 't');\n\t\n\t this.text.attr({\n\t 'text-anchor': 'start',\n\t 'x' : this.getAttr('text-margin'),\n\t 'fill' : this.getAttr('font-color'),\n\t 'font-size' : this.getAttr('font-size')\n\t });\n\t\n\t var font = this.getAttr('font');\n\t var fontF = this.getAttr('font-family');\n\t var fontW = this.getAttr('font-weight');\n\t\n\t if (font) this.text.attr({ 'font': font });\n\t if (fontF) this.text.attr({ 'font-family': fontF });\n\t if (fontW) this.text.attr({ 'font-weight': fontW });\n\t\n\t if (options.link) { this.text.attr('href', options.link); }\n\t if (options.target) { this.text.attr('target', options.target); }\n\t\n\t var maxWidth = this.getAttr('maxWidth');\n\t if (maxWidth) {\n\t // using this approach: http://stackoverflow.com/a/3153457/22466\n\t var words = options.text.split(' ');\n\t var tempText = \"\";\n\t for (var i=0, ii=words.length; i<ii; i++) {\n\t var word = words[i];\n\t this.text.attr(\"text\", tempText + \" \" + word);\n\t if (this.text.getBBox().width > maxWidth) {\n\t tempText += \"\\n\" + word;\n\t } else {\n\t tempText += \" \" + word;\n\t }\n\t }\n\t this.text.attr(\"text\", tempText.substring(1));\n\t }\n\t\n\t this.group.push(this.text);\n\t\n\t if (symbol) {\n\t var tmpMargin = this.getAttr('text-margin');\n\t\n\t symbol.attr({\n\t 'fill' : this.getAttr('fill'),\n\t 'stroke' : this.getAttr('element-color'),\n\t 'stroke-width' : this.getAttr('line-width'),\n\t 'width' : this.text.getBBox().width + 2 * tmpMargin,\n\t 'height' : this.text.getBBox().height + 2 * tmpMargin\n\t });\n\t\n\t symbol.node.setAttribute('class', this.getAttr('class'));\n\t\n\t if (options.link) { symbol.attr('href', options.link); }\n\t if (options.target) { symbol.attr('target', options.target); }\n\t if (options.key) { symbol.node.id = options.key; }\n\t\n\t this.group.push(symbol);\n\t symbol.insertBefore(this.text);\n\t\n\t this.text.attr({\n\t 'y': symbol.getBBox().height/2\n\t });\n\t\n\t this.initialize();\n\t }\n\t\n\t}\n\t\n\t/* Gets the attribute based on Flowstate, Symbol-Name and default, first found wins */\n\tSymbol.prototype.getAttr = function(attName) {\n\t if (!this.chart) {\n\t return undefined;\n\t }\n\t var opt3 = (this.chart.options) ? this.chart.options[attName] : undefined;\n\t var opt2 = (this.chart.options.symbols) ? this.chart.options.symbols[this.symbolType][attName] : undefined;\n\t var opt1;\n\t if (this.chart.options.flowstate && this.chart.options.flowstate[this.flowstate]) {\n\t opt1 = this.chart.options.flowstate[this.flowstate][attName];\n\t }\n\t return (opt1 || opt2 || opt3);\n\t};\n\t\n\tSymbol.prototype.initialize = function() {\n\t this.group.transform('t' + this.getAttr('line-width') + ',' + this.getAttr('line-width'));\n\t\n\t this.width = this.group.getBBox().width;\n\t this.height = this.group.getBBox().height;\n\t};\n\t\n\tSymbol.prototype.getCenter = function() {\n\t return {x: this.getX() + this.width/2,\n\t y: this.getY() + this.height/2};\n\t};\n\t\n\tSymbol.prototype.getX = function() {\n\t return this.group.getBBox().x;\n\t};\n\t\n\tSymbol.prototype.getY = function() {\n\t return this.group.getBBox().y;\n\t};\n\t\n\tSymbol.prototype.shiftX = function(x) {\n\t this.group.transform('t' + (this.getX() + x) + ',' + this.getY());\n\t};\n\t\n\tSymbol.prototype.setX = function(x) {\n\t this.group.transform('t' + x + ',' + this.getY());\n\t};\n\t\n\tSymbol.prototype.shiftY = function(y) {\n\t this.group.transform('t' + this.getX() + ',' + (this.getY() + y));\n\t};\n\t\n\tSymbol.prototype.setY = function(y) {\n\t this.group.transform('t' + this.getX() + ',' + y);\n\t};\n\t\n\tSymbol.prototype.getTop = function() {\n\t var y = this.getY();\n\t var x = this.getX() + this.width/2;\n\t return {x: x, y: y};\n\t};\n\t\n\tSymbol.prototype.getBottom = function() {\n\t var y = this.getY() + this.height;\n\t var x = this.getX() + this.width/2;\n\t return {x: x, y: y};\n\t};\n\t\n\tSymbol.prototype.getLeft = function() {\n\t var y = this.getY() + this.group.getBBox().height/2;\n\t var x = this.getX();\n\t return {x: x, y: y};\n\t};\n\t\n\tSymbol.prototype.getRight = function() {\n\t var y = this.getY() + this.group.getBBox().height/2;\n\t var x = this.getX() + this.group.getBBox().width;\n\t return {x: x, y: y};\n\t};\n\t\n\tSymbol.prototype.render = function() {\n\t if (this.next) {\n\t\n\t var lineLength = this.getAttr('line-length');\n\t\n\t if (this.next_direction === 'right') {\n\t\n\t var rightPoint = this.getRight();\n\t\n\t if (!this.next.isPositioned) {\n\t\n\t this.next.setY(rightPoint.y - this.next.height/2);\n\t this.next.shiftX(this.group.getBBox().x + this.width + lineLength);\n\t\n\t var self = this;\n\t (function shift() {\n\t var hasSymbolUnder = false;\n\t var symb;\n\t for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n\t symb = self.chart.symbols[i];\n\t\n\t var diff = Math.abs(symb.getCenter().x - self.next.getCenter().x);\n\t if (symb.getCenter().y > self.next.getCenter().y && diff <= self.next.width/2) {\n\t hasSymbolUnder = true;\n\t break;\n\t }\n\t }\n\t\n\t if (hasSymbolUnder) {\n\t self.next.setX(symb.getX() + symb.width + lineLength);\n\t shift();\n\t }\n\t })();\n\t\n\t this.next.isPositioned = true;\n\t\n\t this.next.render();\n\t }\n\t } else {\n\t var bottomPoint = this.getBottom();\n\t\n\t if (!this.next.isPositioned) {\n\t this.next.shiftY(this.getY() + this.height + lineLength);\n\t this.next.setX(bottomPoint.x - this.next.width/2);\n\t this.next.isPositioned = true;\n\t\n\t this.next.render();\n\t }\n\t }\n\t }\n\t};\n\t\n\tSymbol.prototype.renderLines = function() {\n\t if (this.next) {\n\t if (this.next_direction) {\n\t this.drawLineTo(this.next, '', this.next_direction);\n\t } else {\n\t this.drawLineTo(this.next);\n\t }\n\t }\n\t};\n\t\n\tSymbol.prototype.drawLineTo = function(symbol, text, origin) {\n\t if (this.connectedTo.indexOf(symbol) < 0) {\n\t this.connectedTo.push(symbol);\n\t }\n\t\n\t var x = this.getCenter().x,\n\t y = this.getCenter().y,\n\t right = this.getRight(),\n\t bottom = this.getBottom(),\n\t left = this.getLeft();\n\t\n\t var symbolX = symbol.getCenter().x,\n\t symbolY = symbol.getCenter().y,\n\t symbolTop = symbol.getTop(),\n\t symbolRight = symbol.getRight(),\n\t symbolLeft = symbol.getLeft();\n\t\n\t var isOnSameColumn = x === symbolX,\n\t isOnSameLine = y === symbolY,\n\t isUnder = y < symbolY,\n\t isUpper = y > symbolY || this === symbol,\n\t isLeft = x > symbolX,\n\t isRight = x < symbolX;\n\t\n\t var maxX = 0,\n\t line,\n\t lineLength = this.getAttr('line-length'),\n\t lineWith = this.getAttr('line-width');\n\t\n\t if ((!origin || origin === 'bottom') && isOnSameColumn && isUnder) {\n\t line = drawLine(this.chart, bottom, symbolTop, text);\n\t this.bottomStart = true;\n\t symbol.topEnd = true;\n\t maxX = bottom.x;\n\t } else if ((!origin || origin === 'right') && isOnSameLine && isRight) {\n\t line = drawLine(this.chart, right, symbolLeft, text);\n\t this.rightStart = true;\n\t symbol.leftEnd = true;\n\t maxX = symbolLeft.x;\n\t } else if ((!origin || origin === 'left') && isOnSameLine && isLeft) {\n\t line = drawLine(this.chart, left, symbolRight, text);\n\t this.leftStart = true;\n\t symbol.rightEnd = true;\n\t maxX = symbolRight.x;\n\t } else if ((!origin || origin === 'right') && isOnSameColumn && isUpper) {\n\t line = drawLine(this.chart, right, [\n\t {x: right.x + lineLength/2, y: right.y},\n\t {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.rightStart = true;\n\t symbol.topEnd = true;\n\t maxX = right.x + lineLength/2;\n\t } else if ((!origin || origin === 'right') && isOnSameColumn && isUnder) {\n\t line = drawLine(this.chart, right, [\n\t {x: right.x + lineLength/2, y: right.y},\n\t {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.rightStart = true;\n\t symbol.topEnd = true;\n\t maxX = right.x + lineLength/2;\n\t } else if ((!origin || origin === 'bottom') && isLeft) {\n\t if (this.leftEnd && isUpper) {\n\t line = drawLine(this.chart, bottom, [\n\t {x: bottom.x, y: bottom.y + lineLength/2},\n\t {x: bottom.x + (bottom.x - symbolTop.x)/2, y: bottom.y + lineLength/2},\n\t {x: bottom.x + (bottom.x - symbolTop.x)/2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t } else {\n\t line = drawLine(this.chart, bottom, [\n\t {x: bottom.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t }\n\t this.bottomStart = true;\n\t symbol.topEnd = true;\n\t maxX = bottom.x + (bottom.x - symbolTop.x)/2;\n\t } else if ((!origin || origin === 'bottom') && isRight) {\n\t line = drawLine(this.chart, bottom, [\n\t {x: bottom.x, y: bottom.y + lineLength/2},\n\t {x: bottom.x + (bottom.x - symbolTop.x)/2, y: bottom.y + lineLength/2},\n\t {x: bottom.x + (bottom.x - symbolTop.x)/2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.bottomStart = true;\n\t symbol.topEnd = true;\n\t maxX = bottom.x + (bottom.x - symbolTop.x)/2;\n\t } else if ((origin && origin === 'right') && isLeft) {\n\t line = drawLine(this.chart, right, [\n\t {x: right.x + lineLength/2, y: right.y},\n\t {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.rightStart = true;\n\t symbol.topEnd = true;\n\t maxX = right.x + lineLength/2;\n\t } else if ((origin && origin === 'right') && isRight) {\n\t line = drawLine(this.chart, right, [\n\t {x: symbolTop.x, y: right.y},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.rightStart = true;\n\t symbol.topEnd = true;\n\t maxX = right.x + lineLength/2;\n\t } else if ((origin && origin === 'bottom') && isOnSameColumn && isUpper) {\n\t line = drawLine(this.chart, bottom, [\n\t {x: bottom.x, y: bottom.y + lineLength/2},\n\t {x: right.x + lineLength/2, y: bottom.y + lineLength/2},\n\t {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.bottomStart = true;\n\t symbol.topEnd = true;\n\t maxX = bottom.x + lineLength/2;\n\t } else if ((origin === 'left') && isOnSameColumn && isUpper) {\n\t var diffX = left.x - lineLength/2;\n\t if (symbolLeft.x < left.x) {\n\t diffX = symbolLeft.x - lineLength/2;\n\t }\n\t line = drawLine(this.chart, left, [\n\t {x: diffX, y: left.y},\n\t {x: diffX, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.leftStart = true;\n\t symbol.topEnd = true;\n\t maxX = left.x;\n\t } else if ((origin === 'left')) {\n\t line = drawLine(this.chart, left, [\n\t {x: symbolTop.x + (left.x - symbolTop.x)/ 2, y: left.y},\n\t {x: symbolTop.x + (left.x - symbolTop.x)/ 2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.leftStart = true;\n\t symbol.topEnd = true;\n\t maxX = left.x;\n\t }\n\t\n\t if (line) {\n\t for (var l = 0, llen = this.chart.lines.length; l < llen; l++) {\n\t var otherLine = this.chart.lines[l];\n\t var len;\n\t\n\t var ePath = otherLine.attr('path'),\n\t lPath = line.attr('path');\n\t\n\t for (var iP = 0, lenP = ePath.length - 1; iP < lenP; iP++) {\n\t var newPath = [];\n\t newPath.push(['M', ePath[iP][1], ePath[iP][2]]);\n\t newPath.push(['L', ePath[iP + 1][1], ePath[iP + 1][2]]);\n\t\n\t var line1_from_x = newPath[0][1];\n\t var line1_from_y = newPath[0][2];\n\t var line1_to_x = newPath[1][1];\n\t var line1_to_y = newPath[1][2];\n\t\n\t for (var lP = 0, lenlP = lPath.length - 1; lP < lenlP; lP++) {\n\t var newLinePath = [];\n\t newLinePath.push(['M', lPath[lP][1], lPath[lP][2]]);\n\t newLinePath.push(['L', lPath[lP + 1][1], lPath[lP + 1][2]]);\n\t\n\t var line2_from_x = newLinePath[0][1];\n\t var line2_from_y = newLinePath[0][2];\n\t var line2_to_x = newLinePath[1][1];\n\t var line2_to_y = newLinePath[1][2];\n\t\n\t var res = checkLineIntersection(line1_from_x, line1_from_y, line1_to_x, line1_to_y, line2_from_x, line2_from_y, line2_to_x, line2_to_y);\n\t if (res.onLine1 && res.onLine2) {\n\t\n\t var newSegment;\n\t if (line2_from_y === line2_to_y) {\n\t if (line2_from_x > line2_to_x) {\n\t newSegment = ['L', res.x + lineWith * 2, line2_from_y];\n\t lPath.splice(lP + 1, 0, newSegment);\n\t newSegment = ['C', res.x + lineWith * 2, line2_from_y, res.x, line2_from_y - lineWith * 4, res.x - lineWith * 2, line2_from_y];\n\t lPath.splice(lP + 2, 0, newSegment);\n\t line.attr('path', lPath);\n\t } else {\n\t newSegment = ['L', res.x - lineWith * 2, line2_from_y];\n\t lPath.splice(lP + 1, 0, newSegment);\n\t newSegment = ['C', res.x - lineWith * 2, line2_from_y, res.x, line2_from_y - lineWith * 4, res.x + lineWith * 2, line2_from_y];\n\t lPath.splice(lP + 2, 0, newSegment);\n\t line.attr('path', lPath);\n\t }\n\t } else {\n\t if (line2_from_y > line2_to_y) {\n\t newSegment = ['L', line2_from_x, res.y + lineWith * 2];\n\t lPath.splice(lP + 1, 0, newSegment);\n\t newSegment = ['C', line2_from_x, res.y + lineWith * 2, line2_from_x + lineWith * 4, res.y, line2_from_x, res.y - lineWith * 2];\n\t lPath.splice(lP + 2, 0, newSegment);\n\t line.attr('path', lPath);\n\t } else {\n\t newSegment = ['L', line2_from_x, res.y - lineWith * 2];\n\t lPath.splice(lP + 1, 0, newSegment);\n\t newSegment = ['C', line2_from_x, res.y - lineWith * 2, line2_from_x + lineWith * 4, res.y, line2_from_x, res.y + lineWith * 2];\n\t lPath.splice(lP + 2, 0, newSegment);\n\t line.attr('path', lPath);\n\t }\n\t }\n\t\n\t lP += 2;\n\t len += 2;\n\t }\n\t }\n\t }\n\t }\n\t\n\t this.chart.lines.push(line);\n\t }\n\t\n\t if (!this.chart.maxXFromLine || (this.chart.maxXFromLine && maxX > this.chart.maxXFromLine)) {\n\t this.chart.maxXFromLine = maxX;\n\t }\n\t};\n\t\n\tmodule.exports = Symbol;\n\n\n/***/ },\n/* 3 */\n/*!************************************!*\\\n !*** ./src/flowchart.functions.js ***!\n \\************************************/\n/***/ function(module, exports) {\n\n\tfunction drawPath(chart, location, points) {\n\t var i, len;\n\t var path = 'M{0},{1}';\n\t for (i = 2, len = 2 * points.length + 2; i < len; i+=2) {\n\t path += ' L{' + i + '},{' + (i + 1) + '}';\n\t }\n\t var pathValues = [location.x, location.y];\n\t for (i = 0, len = points.length; i < len; i++) {\n\t pathValues.push(points[i].x);\n\t pathValues.push(points[i].y);\n\t }\n\t var symbol = chart.paper.path(path, pathValues);\n\t symbol.attr('stroke', chart.options['element-color']);\n\t symbol.attr('stroke-width', chart.options['line-width']);\n\t\n\t var font = chart.options.font;\n\t var fontF = chart.options['font-family'];\n\t var fontW = chart.options['font-weight'];\n\t\n\t if (font) symbol.attr({ 'font': font });\n\t if (fontF) symbol.attr({ 'font-family': fontF });\n\t if (fontW) symbol.attr({ 'font-weight': fontW });\n\t\n\t return symbol;\n\t}\n\t\n\tfunction drawLine(chart, from, to, text) {\n\t var i, len;\n\t\n\t if (Object.prototype.toString.call(to) !== '[object Array]') {\n\t to = [to];\n\t }\n\t\n\t var path = 'M{0},{1}';\n\t for (i = 2, len = 2 * to.length + 2; i < len; i+=2) {\n\t path += ' L{' + i + '},{' + (i + 1) + '}';\n\t }\n\t var pathValues = [from.x, from.y];\n\t for (i = 0, len = to.length; i < len; i++) {\n\t pathValues.push(to[i].x);\n\t pathValues.push(to[i].y);\n\t }\n\t\n\t var line = chart.paper.path(path, pathValues);\n\t line.attr({\n\t stroke: chart.options['line-color'],\n\t 'stroke-width': chart.options['line-width'],\n\t 'arrow-end': chart.options['arrow-end']\n\t });\n\t\n\t var font = chart.options.font;\n\t var fontF = chart.options['font-family'];\n\t var fontW = chart.options['font-weight'];\n\t\n\t if (font) line.attr({ 'font': font });\n\t if (fontF) line.attr({ 'font-family': fontF });\n\t if (fontW) line.attr({ 'font-weight': fontW });\n\t\n\t if (text) {\n\t\n\t var centerText = false;\n\t\n\t var textPath = chart.paper.text(0, 0, text);\n\t\n\t var isHorizontal = false;\n\t var firstTo = to[0];\n\t\n\t if (from.y === firstTo.y) {\n\t isHorizontal = true;\n\t }\n\t\n\t var x = 0,\n\t y = 0;\n\t\n\t if (centerText) {\n\t if (from.x > firstTo.x) {\n\t x = from.x - (from.x - firstTo.x)/2;\n\t } else {\n\t x = firstTo.x - (firstTo.x - from.x)/2;\n\t }\n\t\n\t if (from.y > firstTo.y) {\n\t y = from.y - (from.y - firstTo.y)/2;\n\t } else {\n\t y = firstTo.y - (firstTo.y - from.y)/2;\n\t }\n\t\n\t if (isHorizontal) {\n\t x -= textPath.getBBox().width/2;\n\t y -= chart.options['text-margin'];\n\t } else {\n\t x += chart.options['text-margin'];\n\t y -= textPath.getBBox().height/2;\n\t }\n\t } else {\n\t x = from.x;\n\t y = from.y;\n\t\n\t if (isHorizontal) {\n\t x += chart.options['text-margin']/2;\n\t y -= chart.options['text-margin'];\n\t } else {\n\t x += chart.options['text-margin']/2;\n\t y += chart.options['text-margin'];\n\t }\n\t }\n\t\n\t textPath.attr({\n\t 'text-anchor': 'start',\n\t 'font-size': chart.options['font-size'],\n\t 'fill': chart.options['font-color'],\n\t x: x,\n\t y: y\n\t });\n\t\n\t if (font) textPath.attr({ 'font': font });\n\t if (fontF) textPath.attr({ 'font-family': fontF });\n\t if (fontW) textPath.attr({ 'font-weight': fontW });\n\t }\n\t\n\t return line;\n\t}\n\t\n\tfunction checkLineIntersection(line1StartX, line1StartY, line1EndX, line1EndY, line2StartX, line2StartY, line2EndX, line2EndY) {\n\t // if the lines intersect, the result contains the x and y of the intersection (treating the lines as infinite) and booleans for whether line segment 1 or line segment 2 contain the point\n\t var denominator, a, b, numerator1, numerator2, result = {\n\t x: null,\n\t y: null,\n\t onLine1: false,\n\t onLine2: false\n\t };\n\t denominator = ((line2EndY - line2StartY) * (line1EndX - line1StartX)) - ((line2EndX - line2StartX) * (line1EndY - line1StartY));\n\t if (denominator === 0) {\n\t return result;\n\t }\n\t a = line1StartY - line2StartY;\n\t b = line1StartX - line2StartX;\n\t numerator1 = ((line2EndX - line2StartX) * a) - ((line2EndY - line2StartY) * b);\n\t numerator2 = ((line1EndX - line1StartX) * a) - ((line1EndY - line1StartY) * b);\n\t a = numerator1 / denominator;\n\t b = numerator2 / denominator;\n\t\n\t // if we cast these lines infinitely in both directions, they intersect here:\n\t result.x = line1StartX + (a * (line1EndX - line1StartX));\n\t result.y = line1StartY + (a * (line1EndY - line1StartY));\n\t /*\n\t // it is worth noting that this should be the same as:\n\t x = line2StartX + (b * (line2EndX - line2StartX));\n\t y = line2StartX + (b * (line2EndY - line2StartY));\n\t */\n\t // if line1 is a segment and line2 is infinite, they intersect if:\n\t if (a > 0 && a < 1) {\n\t result.onLine1 = true;\n\t }\n\t // if line2 is a segment and line1 is infinite, they intersect if:\n\t if (b > 0 && b < 1) {\n\t result.onLine2 = true;\n\t }\n\t // if line1 and line2 are segments, they intersect if both of the above are true\n\t return result;\n\t}\n\t\n\tmodule.exports = {\n\t\tdrawPath: drawPath,\n\t\tdrawLine: drawLine,\n\t\tcheckLineIntersection: checkLineIntersection\n\t};\n\n\n/***/ },\n/* 4 */\n/*!********************************!*\\\n !*** ./src/flowchart.parse.js ***!\n \\********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar FlowChart = __webpack_require__(/*! ./flowchart.chart */ 6);\n\tvar Start = __webpack_require__(/*! ./flowchart.symbol.start */ 12);\n\tvar End = __webpack_require__(/*! ./flowchart.symbol.end */ 9);\n\tvar Operation = __webpack_require__(/*! ./flowchart.symbol.operation */ 11);\n\tvar InputOutput = __webpack_require__(/*! ./flowchart.symbol.inputoutput */ 10);\n\tvar Subroutine = __webpack_require__(/*! ./flowchart.symbol.subroutine */ 13);\n\tvar Condition = __webpack_require__(/*! ./flowchart.symbol.condition */ 5);\n\t\n\tfunction parse(input) {\n\t input = input || '';\n\t input = input.trim();\n\t\n\t var chart = {\n\t symbols: {},\n\t start: null,\n\t drawSVG: function(container, options) {\n\t var self = this;\n\t\n\t if (this.diagram) {\n\t this.diagram.clean();\n\t }\n\t\n\t var diagram = new FlowChart(container, options);\n\t this.diagram = diagram;\n\t var dispSymbols = {};\n\t\n\t function getDisplaySymbol(s) {\n\t if (dispSymbols[s.key]) {\n\t return dispSymbols[s.key];\n\t }\n\t\n\t switch (s.symbolType) {\n\t case 'start':\n\t dispSymbols[s.key] = new Start(diagram, s);\n\t break;\n\t case 'end':\n\t dispSymbols[s.key] = new End(diagram, s);\n\t break;\n\t case 'operation':\n\t dispSymbols[s.key] = new Operation(diagram, s);\n\t break;\n\t case 'inputoutput':\n\t dispSymbols[s.key] = new InputOutput(diagram, s);\n\t break;\n\t case 'subroutine':\n\t dispSymbols[s.key] = new Subroutine(diagram, s);\n\t break;\n\t case 'condition':\n\t dispSymbols[s.key] = new Condition(diagram, s);\n\t break;\n\t default:\n\t return new Error('Wrong symbol type!');\n\t }\n\t\n\t return dispSymbols[s.key];\n\t }\n\t\n\t (function constructChart(s, prevDisp, prev) {\n\t var dispSymb = getDisplaySymbol(s);\n\t\n\t if (self.start === s) {\n\t diagram.startWith(dispSymb);\n\t } else if (prevDisp && prev && !prevDisp.pathOk) {\n\t if (prevDisp instanceof(Condition)) {\n\t if (prev.yes === s) {\n\t prevDisp.yes(dispSymb);\n\t }\n\t if (prev.no === s) {\n\t prevDisp.no(dispSymb);\n\t }\n\t } else {\n\t prevDisp.then(dispSymb);\n\t }\n\t }\n\t\n\t if (dispSymb.pathOk) {\n\t return dispSymb;\n\t }\n\t\n\t if (dispSymb instanceof(Condition)) {\n\t if (s.yes) {\n\t constructChart(s.yes, dispSymb, s);\n\t }\n\t if (s.no) {\n\t constructChart(s.no, dispSymb, s);\n\t }\n\t } else if (s.next) {\n\t constructChart(s.next, dispSymb, s);\n\t }\n\t\n\t return dispSymb;\n\t })(this.start);\n\t\n\t diagram.render();\n\t },\n\t clean: function() {\n\t this.diagram.clean();\n\t }\n\t };\n\t\n\t var lines = [];\n\t var prevBreak = 0;\n\t for (var i0 = 1, i0len = input.length; i0 < i0len; i0++) {\n\t if(input[i0] === '\\n' && input[i0 - 1] !== '\\\\') {\n\t var line0 = input.substring(prevBreak, i0);\n\t prevBreak = i0 + 1;\n\t lines.push(line0.replace(/\\\\\\n/g, '\\n'));\n\t }\n\t }\n\t\n\t if(prevBreak < input.length) {\n\t lines.push(input.substr(prevBreak));\n\t }\n\t\n\t for (var l = 1, len = lines.length; l < len;) {\n\t var currentLine = lines[l];\n\t\n\t if (currentLine.indexOf('->') < 0 && currentLine.indexOf('=>') < 0) {\n\t lines[l - 1] += '\\n' + currentLine;\n\t lines.splice(l, 1);\n\t len--;\n\t } else {\n\t l++;\n\t }\n\t }\n\t\n\t function getSymbol(s) {\n\t var startIndex = s.indexOf('(') + 1;\n\t var endIndex = s.indexOf(')');\n\t if (startIndex >= 0 && endIndex >= 0) {\n\t return chart.symbols[s.substring(0, startIndex - 1)];\n\t }\n\t return chart.symbols[s];\n\t }\n\t\n\t function getNextPath(s) {\n\t var next = 'next';\n\t var startIndex = s.indexOf('(') + 1;\n\t var endIndex = s.indexOf(')');\n\t if (startIndex >= 0 && endIndex >= 0) {\n\t next = flowSymb.substring(startIndex, endIndex);\n\t if (next.indexOf(',') < 0) {\n\t if (next !== 'yes' && next !== 'no') {\n\t next = 'next, ' + next;\n\t }\n\t }\n\t }\n\t return next;\n\t }\n\t\n\t while (lines.length > 0) {\n\t var line = lines.splice(0, 1)[0];\n\t\n\t if (line.indexOf('=>') >= 0) {\n\t // definition\n\t var parts = line.split('=>');\n\t var symbol = {\n\t key: parts[0],\n\t symbolType: parts[1],\n\t text: null,\n\t link: null,\n\t target: null,\n\t flowstate: null\n\t };\n\t\n\t var sub;\n\t\n\t if (symbol.symbolType.indexOf(': ') >= 0) {\n\t sub = symbol.symbolType.split(': ');\n\t symbol.symbolType = sub.shift();\n\t symbol.text = sub.join(': ');\n\t }\n\t\n\t if (symbol.text && symbol.text.indexOf(':>') >= 0) {\n\t sub = symbol.text.split(':>');\n\t symbol.text = sub.shift();\n\t symbol.link = sub.join(':>');\n\t } else if (symbol.symbolType.indexOf(':>') >= 0) {\n\t sub = symbol.symbolType.split(':>');\n\t symbol.symbolType = sub.shift();\n\t symbol.link = sub.join(':>');\n\t }\n\t\n\t if (symbol.symbolType.indexOf('\\n') >= 0) {\n\t symbol.symbolType = symbol.symbolType.split('\\n')[0];\n\t }\n\t\n\t /* adding support for links */\n\t if (symbol.link) {\n\t var startIndex = symbol.link.indexOf('[') + 1;\n\t var endIndex = symbol.link.indexOf(']');\n\t if (startIndex >= 0 && endIndex >= 0) {\n\t symbol.target = symbol.link.substring(startIndex, endIndex);\n\t symbol.link = symbol.link.substring(0, startIndex - 1);\n\t }\n\t }\n\t /* end of link support */\n\t\n\t /* adding support for flowstates */\n\t if (symbol.text) {\n\t if (symbol.text.indexOf('|') >= 0) {\n\t var txtAndState = symbol.text.split('|');\n\t symbol.flowstate = txtAndState.pop().trim();\n\t symbol.text = txtAndState.join('|');\n\t }\n\t }\n\t /* end of flowstate support */\n\t\n\t chart.symbols[symbol.key] = symbol;\n\t\n\t } else if (line.indexOf('->') >= 0) {\n\t // flow\n\t var flowSymbols = line.split('->');\n\t for (var i = 0, lenS = flowSymbols.length; i < lenS; i++) {\n\t var flowSymb = flowSymbols[i];\n\t\n\t var realSymb = getSymbol(flowSymb);\n\t var next = getNextPath(flowSymb);\n\t\n\t var direction = null;\n\t if (next.indexOf(',') >= 0) {\n\t var condOpt = next.split(',');\n\t next = condOpt[0];\n\t direction = condOpt[1].trim();\n\t }\n\t\n\t if (!chart.start) {\n\t chart.start = realSymb;\n\t }\n\t\n\t if (i + 1 < lenS) {\n\t var nextSymb = flowSymbols[i + 1];\n\t realSymb[next] = getSymbol(nextSymb);\n\t realSymb['direction_' + next] = direction;\n\t direction = null;\n\t }\n\t }\n\t }\n\t\n\t }\n\t return chart;\n\t}\n\t\n\tmodule.exports = parse;\n\n\n/***/ },\n/* 5 */\n/*!*******************************************!*\\\n !*** ./src/flowchart.symbol.condition.js ***!\n \\*******************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2);\n\tvar inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits;\n\tvar drawAPI = __webpack_require__(/*! ./flowchart.functions */ 3);\n\tvar drawPath = drawAPI.drawPath;\n\t\n\tfunction Condition(chart, options) {\n\t options = options || {};\n\t Symbol.call(this, chart, options);\n\t this.textMargin = this.getAttr('text-margin');\n\t this.yes_direction = 'bottom';\n\t this.no_direction = 'right';\n\t if (options.yes && options.direction_yes && options.no && !options.direction_no) {\n\t if (options.direction_yes === 'right') {\n\t this.no_direction = 'bottom';\n\t this.yes_direction = 'right';\n\t } else {\n\t this.no_direction = 'right';\n\t this.yes_direction = 'bottom';\n\t }\n\t } else if (options.yes && !options.direction_yes && options.no && options.direction_no) {\n\t if (options.direction_no === 'right') {\n\t this.yes_direction = 'bottom';\n\t this.no_direction = 'right';\n\t } else {\n\t this.yes_direction = 'right';\n\t this.no_direction = 'bottom';\n\t }\n\t } else {\n\t this.yes_direction = 'bottom';\n\t this.no_direction = 'right';\n\t }\n\t\n\t this.yes_direction = this.yes_direction || 'bottom';\n\t this.no_direction = this.no_direction || 'right';\n\t\n\t this.text.attr({\n\t x: this.textMargin * 2\n\t });\n\t\n\t var width = this.text.getBBox().width + 3 * this.textMargin;\n\t width += width/2;\n\t var height = this.text.getBBox().height + 2 * this.textMargin;\n\t height += height/2;\n\t height = Math.max(width * 0.5, height);\n\t var startX = width/4;\n\t var startY = height/4;\n\t\n\t this.text.attr({\n\t x: startX + this.textMargin/2\n\t });\n\t\n\t var start = {x: startX, y: startY};\n\t var points = [\n\t {x: startX - width/4, y: startY + height/4},\n\t {x: startX - width/4 + width/2, y: startY + height/4 + height/2},\n\t {x: startX - width/4 + width, y: startY + height/4},\n\t {x: startX - width/4 + width/2, y: startY + height/4 - height/2},\n\t {x: startX - width/4, y: startY + height/4}\n\t ];\n\t\n\t var symbol = drawPath(chart, start, points);\n\t\n\t symbol.attr({\n\t stroke: this.getAttr('element-color'),\n\t 'stroke-width': this.getAttr('line-width'),\n\t fill: this.getAttr('fill')\n\t });\n\t if (options.link) { symbol.attr('href', options.link); }\n\t if (options.target) { symbol.attr('target', options.target); }\n\t if (options.key) { symbol.node.id = options.key; }\n\t symbol.node.setAttribute('class', this.getAttr('class'));\n\t\n\t this.text.attr({\n\t y: symbol.getBBox().height/2\n\t });\n\t\n\t this.group.push(symbol);\n\t symbol.insertBefore(this.text);\n\t\n\t this.initialize();\n\t}\n\tinherits(Condition, Symbol);\n\t\n\tCondition.prototype.render = function() {\n\t\n\t if (this.yes_direction) {\n\t this[this.yes_direction + '_symbol'] = this.yes_symbol;\n\t }\n\t\n\t if (this.no_direction) {\n\t this[this.no_direction + '_symbol'] = this.no_symbol;\n\t }\n\t\n\t var lineLength = this.getAttr('line-length');\n\t\n\t if (this.bottom_symbol) {\n\t var bottomPoint = this.getBottom();\n\t\n\t if (!this.bottom_symbol.isPositioned) {\n\t this.bottom_symbol.shiftY(this.getY() + this.height + lineLength);\n\t this.bottom_symbol.setX(bottomPoint.x - this.bottom_symbol.width/2);\n\t this.bottom_symbol.isPositioned = true;\n\t\n\t this.bottom_symbol.render();\n\t }\n\t }\n\t\n\t if (this.right_symbol) {\n\t var rightPoint = this.getRight();\n\t\n\t if (!this.right_symbol.isPositioned) {\n\t\n\t this.right_symbol.setY(rightPoint.y - this.right_symbol.height/2);\n\t this.right_symbol.shiftX(this.group.getBBox().x + this.width + lineLength);\n\t\n\t var self = this;\n\t (function shift() {\n\t var hasSymbolUnder = false;\n\t var symb;\n\t for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n\t symb = self.chart.symbols[i];\n\t\n\t var diff = Math.abs(symb.getCenter().x - self.right_symbol.getCenter().x);\n\t if (symb.getCenter().y > self.right_symbol.getCenter().y && diff <= self.right_symbol.width/2) {\n\t hasSymbolUnder = true;\n\t break;\n\t }\n\t }\n\t\n\t if (hasSymbolUnder) {\n\t self.right_symbol.setX(symb.getX() + symb.width + lineLength);\n\t shift();\n\t }\n\t })();\n\t\n\t this.right_symbol.isPositioned = true;\n\t\n\t this.right_symbol.render();\n\t }\n\t }\n\t};\n\t\n\tCondition.prototype.renderLines = function() {\n\t if (this.yes_symbol) {\n\t this.drawLineTo(this.yes_symbol, this.getAttr('yes-text'), this.yes_direction);\n\t }\n\t\n\t if (this.no_symbol) {\n\t this.drawLineTo(this.no_symbol, this.getAttr('no-text'), this.no_direction);\n\t }\n\t};\n\t\n\tmodule.exports = Condition;\n\n\n/***/ },\n/* 6 */\n/*!********************************!*\\\n !*** ./src/flowchart.chart.js ***!\n \\********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Raphael = __webpack_require__(/*! raphael */ 15);\n\tvar defaults = __webpack_require__(/*! ./flowchart.helpers */ 1).defaults;\n\tvar defaultOptions = __webpack_require__(/*! ./flowchart.defaults */ 7);\n\tvar Condition = __webpack_require__(/*! ./flowchart.symbol.condition */ 5);\n\t\n\tfunction FlowChart(container, options) {\n\t options = options || {};\n\t\n\t this.paper = new Raphael(container);\n\t\n\t this.options = defaults(options, defaultOptions);\n\t\n\t this.symbols = [];\n\t this.lines = [];\n\t this.start = null;\n\t}\n\t\n\tFlowChart.prototype.handle = function(symbol) {\n\t if (this.symbols.indexOf(symbol) <= -1) {\n\t this.symbols.push(symbol);\n\t }\n\t\n\t var flowChart = this;\n\t\n\t if (symbol instanceof(Condition)) {\n\t symbol.yes = function(nextSymbol) {\n\t symbol.yes_symbol = nextSymbol;\n\t if(symbol.no_symbol) {\n\t symbol.pathOk = true;\n\t }\n\t return flowChart.handle(nextSymbol);\n\t };\n\t symbol.no = function(nextSymbol) {\n\t symbol.no_symbol = nextSymbol;\n\t if(symbol.yes_symbol) {\n\t symbol.pathOk = true;\n\t }\n\t return flowChart.handle(nextSymbol);\n\t };\n\t } else {\n\t symbol.then = function(nextSymbol) {\n\t symbol.next = nextSymbol;\n\t symbol.pathOk = true;\n\t return flowChart.handle(nextSymbol);\n\t };\n\t }\n\t\n\t return symbol;\n\t};\n\t\n\tFlowChart.prototype.startWith = function(symbol) {\n\t this.start = symbol;\n\t return this.handle(symbol);\n\t};\n\t\n\tFlowChart.prototype.render = function() {\n\t var maxWidth = 0,\n\t maxHeight = 0,\n\t i = 0,\n\t len = 0,\n\t maxX = 0,\n\t maxY = 0,\n\t minX = 0,\n\t minY = 0,\n\t symbol,\n\t line;\n\t\n\t for (i = 0, len = this.symbols.length; i < len; i++) {\n\t symbol = this.symbols[i];\n\t if (symbol.width > maxWidth) {\n\t maxWidth = symbol.width;\n\t }\n\t if (symbol.height > maxHeight) {\n\t maxHeight = symbol.height;\n\t }\n\t }\n\t\n\t for (i = 0, len = this.symbols.length; i < len; i++) {\n\t symbol = this.symbols[i];\n\t symbol.shiftX(this.options.x + (maxWidth - symbol.width)/2 + this.options['line-width']);\n\t symbol.shiftY(this.options.y + (maxHeight - symbol.height)/2 + this.options['line-width']);\n\t }\n\t\n\t this.start.render();\n\t // for (i = 0, len = this.symbols.length; i < len; i++) {\n\t // symbol = this.symbols[i];\n\t // symbol.render();\n\t // }\n\t\n\t for (i = 0, len = this.symbols.length; i < len; i++) {\n\t symbol = this.symbols[i];\n\t symbol.renderLines();\n\t }\n\t\n\t maxX = this.maxXFromLine;\n\t\n\t for (i = 0, len = this.symbols.length; i < len; i++) {\n\t symbol = this.symbols[i];\n\t var x = symbol.getX() + symbol.width;\n\t var y = symbol.getY() + symbol.height;\n\t if (x > maxX) {\n\t maxX = x;\n\t }\n\t if (y > maxY) {\n\t maxY = y;\n\t }\n\t }\n\t\n\t for (i = 0, len = this.lines.length; i < len; i++) {\n\t line = this.lines[i].getBBox();\n\t var x = line.x;\n\t var y = line.y;\n\t var x2 = line.x2;\n\t var y2 = line.y2;\n\t if (x < minX) {\n\t minX = x;\n\t }\n\t if (y < minY) {\n\t minY = y;\n\t }\n\t if (x2 > maxX) {\n\t maxX = x2;\n\t }\n\t if (y2 > maxY) {\n\t maxY = y2;\n\t }\n\t }\n\t\n\t var scale = this.options['scale'];\n\t var lineWidth = this.options['line-width'];\n\t\n\t if (minX < 0) minX -= lineWidth;\n\t if (minY < 0) minY -= lineWidth;\n\t\n\t var width = maxX + lineWidth - minX;\n\t var height = maxY + lineWidth - minY;\n\t\n\t this.paper.setSize(width * scale, height * scale);\n\t this.paper.setViewBox(minX, minY, width, height, true);\n\t};\n\t\n\tFlowChart.prototype.clean = function() {\n\t if (this.paper) {\n\t var paperDom = this.paper.canvas;\n\t paperDom.parentNode.removeChild(paperDom);\n\t }\n\t};\n\t\n\tmodule.exports = FlowChart;\n\n\n/***/ },\n/* 7 */\n/*!***********************************!*\\\n !*** ./src/flowchart.defaults.js ***!\n \\***********************************/\n/***/ function(module, exports) {\n\n\t// defaults\n\tmodule.exports = {\n\t 'x': 0,\n\t 'y': 0,\n\t 'line-width': 3,\n\t 'line-length': 50,\n\t 'text-margin': 10,\n\t 'font-size': 14,\n\t 'font-color': 'black',\n\t // 'font': 'normal',\n\t // 'font-family': 'calibri',\n\t // 'font-weight': 'normal',\n\t 'line-color': 'black',\n\t 'element-color': 'black',\n\t 'fill': 'white',\n\t 'yes-text': 'yes',\n\t 'no-text': 'no',\n\t 'arrow-end': 'block',\n\t 'class': 'flowchart',\n\t 'scale': 1,\n\t 'symbols': {\n\t 'start': {},\n\t 'end': {},\n\t 'condition': {},\n\t 'inputoutput': {},\n\t 'operation': {},\n\t 'subroutine': {}\n\t }//,\n\t // 'flowstate' : {\n\t // 'past' : { 'fill': '#CCCCCC', 'font-size': 12},\n\t // 'current' : {'fill': 'yellow', 'font-color': 'red', 'font-weight': 'bold'},\n\t // 'future' : { 'fill': '#FFFF99'},\n\t // 'invalid': {'fill': '#444444'}\n\t // }\n\t};\n\n\n/***/ },\n/* 8 */\n/*!*******************************!*\\\n !*** ./src/flowchart.shim.js ***!\n \\*******************************/\n/***/ function(module, exports) {\n\n\t// add indexOf to non ECMA-262 standard compliant browsers\n\tif (!Array.prototype.indexOf) {\n\t Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {\n\t \"use strict\";\n\t if (this === null) {\n\t throw new TypeError();\n\t }\n\t var t = Object(this);\n\t var len = t.length >>> 0;\n\t if (len === 0) {\n\t return -1;\n\t }\n\t var n = 0;\n\t if (arguments.length > 0) {\n\t n = Number(arguments[1]);\n\t if (n != n) { // shortcut for verifying if it's NaN\n\t n = 0;\n\t } else if (n !== 0 && n != Infinity && n != -Infinity) {\n\t n = (n > 0 || -1) * Math.floor(Math.abs(n));\n\t }\n\t }\n\t if (n >= len) {\n\t return -1;\n\t }\n\t var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);\n\t for (; k < len; k++) {\n\t if (k in t && t[k] === searchElement) {\n\t return k;\n\t }\n\t }\n\t return -1;\n\t };\n\t}\n\t\n\t// add lastIndexOf to non ECMA-262 standard compliant browsers\n\tif (!Array.prototype.lastIndexOf) {\n\t Array.prototype.lastIndexOf = function(searchElement /*, fromIndex*/) {\n\t \"use strict\";\n\t if (this === null) {\n\t throw new TypeError();\n\t }\n\t var t = Object(this);\n\t var len = t.length >>> 0;\n\t if (len === 0) {\n\t return -1;\n\t }\n\t var n = len;\n\t if (arguments.length > 1) {\n\t n = Number(arguments[1]);\n\t if (n != n) {\n\t n = 0;\n\t } else if (n !== 0 && n != (1 / 0) && n != -(1 / 0)) {\n\t n = (n > 0 || -1) * Math.floor(Math.abs(n));\n\t }\n\t }\n\t var k = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n);\n\t for (; k >= 0; k--) {\n\t if (k in t && t[k] === searchElement) {\n\t return k;\n\t }\n\t }\n\t return -1;\n\t };\n\t}\n\t\n\tif (!String.prototype.trim) {\n\t String.prototype.trim = function() {\n\t return this.replace(/^\\s+|\\s+$/g, '');\n\t };\n\t}\n\n/***/ },\n/* 9 */\n/*!*************************************!*\\\n !*** ./src/flowchart.symbol.end.js ***!\n \\*************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2);\n\tvar inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits;\n\t\n\tfunction End(chart, options) {\n\t var symbol = chart.paper.rect(0, 0, 0, 0, 20);\n\t options = options || {};\n\t options.text = options.text || 'End';\n\t Symbol.call(this, chart, options, symbol);\n\t}\n\tinherits(End, Symbol);\n\t\n\tmodule.exports = End;\n\n\n/***/ },\n/* 10 */\n/*!*********************************************!*\\\n !*** ./src/flowchart.symbol.inputoutput.js ***!\n \\*********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2);\n\tvar inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits;\n\tvar drawAPI = __webpack_require__(/*! ./flowchart.functions */ 3);\n\tvar drawPath = drawAPI.drawPath;\n\t\n\tfunction InputOutput(chart, options) {\n\t options = options || {};\n\t Symbol.call(this, chart, options);\n\t this.textMargin = this.getAttr('text-margin');\n\t\n\t this.text.attr({\n\t x: this.textMargin * 3\n\t });\n\t\n\t var width = this.text.getBBox().width + 4 * this.textMargin;\n\t var height = this.text.getBBox().height + 2 * this.textMargin;\n\t var startX = this.textMargin;\n\t var startY = height/2;\n\t\n\t var start = {x: startX, y: startY};\n\t var points = [\n\t {x: startX - this.textMargin, y: height},\n\t {x: startX - this.textMargin + width, y: height},\n\t {x: startX - this.textMargin + width + 2 * this.textMargin, y: 0},\n\t {x: startX - this.textMargin + 2 * this.textMargin, y: 0},\n\t {x: startX, y: startY}\n\t ];\n\t\n\t var symbol = drawPath(chart, start, points);\n\t\n\t symbol.attr({\n\t stroke: this.getAttr('element-color'),\n\t 'stroke-width': this.getAttr('line-width'),\n\t fill: this.getAttr('fill')\n\t });\n\t if (options.link) { symbol.attr('href', options.link); }\n\t if (options.target) { symbol.attr('target', options.target); }\n\t if (options.key) { symbol.node.id = options.key; }\n\t symbol.node.setAttribute('class', this.getAttr('class'));\n\t\n\t this.text.attr({\n\t y: symbol.getBBox().height/2\n\t });\n\t\n\t this.group.push(symbol);\n\t symbol.insertBefore(this.text);\n\t\n\t this.initialize();\n\t}\n\tinherits(InputOutput, Symbol);\n\t\n\tInputOutput.prototype.getLeft = function() {\n\t var y = this.getY() + this.group.getBBox().height/2;\n\t var x = this.getX() + this.textMargin;\n\t return {x: x, y: y};\n\t};\n\t\n\tInputOutput.prototype.getRight = function() {\n\t var y = this.getY() + this.group.getBBox().height/2;\n\t var x = this.getX() + this.group.getBBox().width - this.textMargin;\n\t return {x: x, y: y};\n\t};\n\t\n\tmodule.exports = InputOutput;\n\n\n/***/ },\n/* 11 */\n/*!*******************************************!*\\\n !*** ./src/flowchart.symbol.operation.js ***!\n \\*******************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2);\n\tvar inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits;\n\t\n\tfunction Operation(chart, options) {\n\t var symbol = chart.paper.rect(0, 0, 0, 0);\n\t options = options || {};\n\t Symbol.call(this, chart, options, symbol);\n\t}\n\tinherits(Operation, Symbol);\n\t\n\tmodule.exports = Operation;\n\n\n/***/ },\n/* 12 */\n/*!***************************************!*\\\n !*** ./src/flowchart.symbol.start.js ***!\n \\***************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2);\n\tvar inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits;\n\t\n\tfunction Start(chart, options) {\n\t var symbol = chart.paper.rect(0, 0, 0, 0, 20);\n\t options = options || {};\n\t options.text = options.text || 'Start';\n\t Symbol.call(this, chart, options, symbol);\n\t}\n\tinherits(Start, Symbol);\n\t\n\tmodule.exports = Start;\n\t\n\t// Start.prototype.render = function() {\n\t// if (this.next) {\n\t// var lineLength = this.chart.options.symbols[this.symbolType]['line-length'] || this.chart.options['line-length'];\n\t\n\t// var bottomPoint = this.getBottom();\n\t// var topPoint = this.next.getTop();\n\t\n\t// if (!this.next.isPositioned) {\n\t// this.next.shiftY(this.getY() + this.height + lineLength);\n\t// this.next.setX(bottomPoint.x - this.next.width/2);\n\t// this.next.isPositioned = true;\n\t\n\t// this.next.render();\n\t// }\n\t// }\n\t// };\n\t\n\t// Start.prototype.renderLines = function() {\n\t// if (this.next) {\n\t// this.drawLineTo(this.next);\n\t// }\n\t// };\n\n\n/***/ },\n/* 13 */\n/*!********************************************!*\\\n !*** ./src/flowchart.symbol.subroutine.js ***!\n \\********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2);\n\tvar inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits;\n\t\n\tfunction Subroutine(chart, options) {\n\t var symbol = chart.paper.rect(0, 0, 0, 0);\n\t options = options || {};\n\t Symbol.call(this, chart, options, symbol);\n\t\n\t symbol.attr({\n\t width: this.text.getBBox().width + 4 * this.getAttr('text-margin')\n\t });\n\t\n\t this.text.attr({\n\t 'x': 2 * this.getAttr('text-margin')\n\t });\n\t\n\t var innerWrap = chart.paper.rect(0, 0, 0, 0);\n\t innerWrap.attr({\n\t x: this.getAttr('text-margin'),\n\t stroke: this.getAttr('element-color'),\n\t 'stroke-width': this.getAttr('line-width'),\n\t width: this.text.getBBox().width + 2 * this.getAttr('text-margin'),\n\t height: this.text.getBBox().height + 2 * this.getAttr('text-margin'),\n\t fill: this.getAttr('fill')\n\t });\n\t if (options.key) { innerWrap.node.id = options.key + 'i'; }\n\t\n\t var font = this.getAttr('font');\n\t var fontF = this.getAttr('font-family');\n\t var fontW = this.getAttr('font-weight');\n\t\n\t if (font) innerWrap.attr({ 'font': font });\n\t if (fontF) innerWrap.attr({ 'font-family': fontF });\n\t if (fontW) innerWrap.attr({ 'font-weight': fontW });\n\t\n\t if (options.link) { innerWrap.attr('href', options.link); }\n\t if (options.target) { innerWrap.attr('target', options.target); }\n\t this.group.push(innerWrap);\n\t innerWrap.insertBefore(this.text);\n\t\n\t this.initialize();\n\t}\n\tinherits(Subroutine, Symbol);\n\t\n\tmodule.exports = Subroutine;\n\n\n/***/ },\n/* 14 */\n/*!******************************!*\\\n !*** ./src/jquery-plugin.js ***!\n \\******************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tif (typeof jQuery != 'undefined') {\n\t\tvar parse = __webpack_require__(/*! ./flowchart.parse */ 4);\n\t\t(function( $ ) {\n\t\t\t$.fn.flowChart = function( options ) {\n\t\t\t\treturn this.each(function() {\n\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\tvar chart = parse($this.text());\n\t\t\t\t\t$this.html('');\n\t\t\t\t\tchart.drawSVG(this, options);\n\t\t\t\t});\n\t\t\t};\n\t\t})(jQuery); // eslint-disable-line\n\t}\n\n\n/***/ },\n/* 15 */\n/*!**************************!*\\\n !*** external \"Raphael\" ***!\n \\**************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_15__;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** flowchart.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 41178340126627f4fc47\n **/","require('./src/flowchart.shim');\nvar parse = require('./src/flowchart.parse');\nrequire('./src/jquery-plugin');\n\nvar FlowChart = {\n\tparse: parse\n};\n\nif (typeof window !== 'undefined') {\n\twindow.flowchart = FlowChart;\n}\n\nmodule.exports = FlowChart;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","function _defaults(options, defaultOptions) {\n if (!options || typeof options === 'function') {\n return defaultOptions;\n }\n\n var merged = {};\n for (var attrname in defaultOptions) {\n merged[attrname] = defaultOptions[attrname];\n }\n\n for (attrname in options) {\n if (options[attrname]) {\n if (typeof merged[attrname] === 'object') {\n merged[attrname] = _defaults(merged[attrname], options[attrname]);\n } else {\n merged[attrname] = options[attrname];\n }\n }\n }\n return merged;\n}\n\nfunction _inherits(ctor, superCtor) {\n if (typeof(Object.create) === 'function') {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n } else {\n // old school shim for old browsers\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n}\n\n// move dependent functions to a container so that\n// they can be overriden easier in no jquery environment (node.js)\nmodule.exports = {\n defaults: _defaults,\n inherits: _inherits\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.helpers.js\n ** module id = 1\n ** module chunks = 0\n **/","var drawAPI = require('./flowchart.functions');\nvar drawLine = drawAPI.drawLine;\nvar checkLineIntersection = drawAPI.checkLineIntersection;\n\nfunction Symbol(chart, options, symbol) {\n this.chart = chart;\n this.group = this.chart.paper.set();\n this.symbol = symbol;\n this.connectedTo = [];\n this.symbolType = options.symbolType;\n this.flowstate = (options.flowstate || 'future');\n\n this.next_direction = options.next && options['direction_next'] ? options['direction_next'] : undefined;\n\n this.text = this.chart.paper.text(0, 0, options.text);\n //Raphael does not support the svg group tag so setting the text node id to the symbol node id plus t\n if (options.key) { this.text.node.id = options.key + 't'; }\n this.text.node.setAttribute('class', this.getAttr('class') + 't');\n\n this.text.attr({\n 'text-anchor': 'start',\n 'x' : this.getAttr('text-margin'),\n 'fill' : this.getAttr('font-color'),\n 'font-size' : this.getAttr('font-size')\n });\n\n var font = this.getAttr('font');\n var fontF = this.getAttr('font-family');\n var fontW = this.getAttr('font-weight');\n\n if (font) this.text.attr({ 'font': font });\n if (fontF) this.text.attr({ 'font-family': fontF });\n if (fontW) this.text.attr({ 'font-weight': fontW });\n\n if (options.link) { this.text.attr('href', options.link); }\n if (options.target) { this.text.attr('target', options.target); }\n\n var maxWidth = this.getAttr('maxWidth');\n if (maxWidth) {\n // using this approach: http://stackoverflow.com/a/3153457/22466\n var words = options.text.split(' ');\n var tempText = \"\";\n for (var i=0, ii=words.length; i<ii; i++) {\n var word = words[i];\n this.text.attr(\"text\", tempText + \" \" + word);\n if (this.text.getBBox().width > maxWidth) {\n tempText += \"\\n\" + word;\n } else {\n tempText += \" \" + word;\n }\n }\n this.text.attr(\"text\", tempText.substring(1));\n }\n\n this.group.push(this.text);\n\n if (symbol) {\n var tmpMargin = this.getAttr('text-margin');\n\n symbol.attr({\n 'fill' : this.getAttr('fill'),\n 'stroke' : this.getAttr('element-color'),\n 'stroke-width' : this.getAttr('line-width'),\n 'width' : this.text.getBBox().width + 2 * tmpMargin,\n 'height' : this.text.getBBox().height + 2 * tmpMargin\n });\n\n symbol.node.setAttribute('class', this.getAttr('class'));\n\n if (options.link) { symbol.attr('href', options.link); }\n if (options.target) { symbol.attr('target', options.target); }\n if (options.key) { symbol.node.id = options.key; }\n\n this.group.push(symbol);\n symbol.insertBefore(this.text);\n\n this.text.attr({\n 'y': symbol.getBBox().height/2\n });\n\n this.initialize();\n }\n\n}\n\n/* Gets the attribute based on Flowstate, Symbol-Name and default, first found wins */\nSymbol.prototype.getAttr = function(attName) {\n if (!this.chart) {\n return undefined;\n }\n var opt3 = (this.chart.options) ? this.chart.options[attName] : undefined;\n var opt2 = (this.chart.options.symbols) ? this.chart.options.symbols[this.symbolType][attName] : undefined;\n var opt1;\n if (this.chart.options.flowstate && this.chart.options.flowstate[this.flowstate]) {\n opt1 = this.chart.options.flowstate[this.flowstate][attName];\n }\n return (opt1 || opt2 || opt3);\n};\n\nSymbol.prototype.initialize = function() {\n this.group.transform('t' + this.getAttr('line-width') + ',' + this.getAttr('line-width'));\n\n this.width = this.group.getBBox().width;\n this.height = this.group.getBBox().height;\n};\n\nSymbol.prototype.getCenter = function() {\n return {x: this.getX() + this.width/2,\n y: this.getY() + this.height/2};\n};\n\nSymbol.prototype.getX = function() {\n return this.group.getBBox().x;\n};\n\nSymbol.prototype.getY = function() {\n return this.group.getBBox().y;\n};\n\nSymbol.prototype.shiftX = function(x) {\n this.group.transform('t' + (this.getX() + x) + ',' + this.getY());\n};\n\nSymbol.prototype.setX = function(x) {\n this.group.transform('t' + x + ',' + this.getY());\n};\n\nSymbol.prototype.shiftY = function(y) {\n this.group.transform('t' + this.getX() + ',' + (this.getY() + y));\n};\n\nSymbol.prototype.setY = function(y) {\n this.group.transform('t' + this.getX() + ',' + y);\n};\n\nSymbol.prototype.getTop = function() {\n var y = this.getY();\n var x = this.getX() + this.width/2;\n return {x: x, y: y};\n};\n\nSymbol.prototype.getBottom = function() {\n var y = this.getY() + this.height;\n var x = this.getX() + this.width/2;\n return {x: x, y: y};\n};\n\nSymbol.prototype.getLeft = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX();\n return {x: x, y: y};\n};\n\nSymbol.prototype.getRight = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX() + this.group.getBBox().width;\n return {x: x, y: y};\n};\n\nSymbol.prototype.render = function() {\n if (this.next) {\n\n var lineLength = this.getAttr('line-length');\n\n if (this.next_direction === 'right') {\n\n var rightPoint = this.getRight();\n\n if (!this.next.isPositioned) {\n\n this.next.setY(rightPoint.y - this.next.height/2);\n this.next.shiftX(this.group.getBBox().x + this.width + lineLength);\n\n var self = this;\n (function shift() {\n var hasSymbolUnder = false;\n var symb;\n for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n symb = self.chart.symbols[i];\n\n var diff = Math.abs(symb.getCenter().x - self.next.getCenter().x);\n if (symb.getCenter().y > self.next.getCenter().y && diff <= self.next.width/2) {\n hasSymbolUnder = true;\n break;\n }\n }\n\n if (hasSymbolUnder) {\n self.next.setX(symb.getX() + symb.width + lineLength);\n shift();\n }\n })();\n\n this.next.isPositioned = true;\n\n this.next.render();\n }\n } else {\n var bottomPoint = this.getBottom();\n\n if (!this.next.isPositioned) {\n this.next.shiftY(this.getY() + this.height + lineLength);\n this.next.setX(bottomPoint.x - this.next.width/2);\n this.next.isPositioned = true;\n\n this.next.render();\n }\n }\n }\n};\n\nSymbol.prototype.renderLines = function() {\n if (this.next) {\n if (this.next_direction) {\n this.drawLineTo(this.next, '', this.next_direction);\n } else {\n this.drawLineTo(this.next);\n }\n }\n};\n\nSymbol.prototype.drawLineTo = function(symbol, text, origin) {\n if (this.connectedTo.indexOf(symbol) < 0) {\n this.connectedTo.push(symbol);\n }\n\n var x = this.getCenter().x,\n y = this.getCenter().y,\n right = this.getRight(),\n bottom = this.getBottom(),\n left = this.getLeft();\n\n var symbolX = symbol.getCenter().x,\n symbolY = symbol.getCenter().y,\n symbolTop = symbol.getTop(),\n symbolRight = symbol.getRight(),\n symbolLeft = symbol.getLeft();\n\n var isOnSameColumn = x === symbolX,\n isOnSameLine = y === symbolY,\n isUnder = y < symbolY,\n isUpper = y > symbolY || this === symbol,\n isLeft = x > symbolX,\n isRight = x < symbolX;\n\n var maxX = 0,\n line,\n lineLength = this.getAttr('line-length'),\n lineWith = this.getAttr('line-width');\n\n if ((!origin || origin === 'bottom') && isOnSameColumn && isUnder) {\n line = drawLine(this.chart, bottom, symbolTop, text);\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x;\n } else if ((!origin || origin === 'right') && isOnSameLine && isRight) {\n line = drawLine(this.chart, right, symbolLeft, text);\n this.rightStart = true;\n symbol.leftEnd = true;\n maxX = symbolLeft.x;\n } else if ((!origin || origin === 'left') && isOnSameLine && isLeft) {\n line = drawLine(this.chart, left, symbolRight, text);\n this.leftStart = true;\n symbol.rightEnd = true;\n maxX = symbolRight.x;\n } else if ((!origin || origin === 'right') && isOnSameColumn && isUpper) {\n line = drawLine(this.chart, right, [\n {x: right.x + lineLength/2, y: right.y},\n {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.rightStart = true;\n symbol.topEnd = true;\n maxX = right.x + lineLength/2;\n } else if ((!origin || origin === 'right') && isOnSameColumn && isUnder) {\n line = drawLine(this.chart, right, [\n {x: right.x + lineLength/2, y: right.y},\n {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.rightStart = true;\n symbol.topEnd = true;\n maxX = right.x + lineLength/2;\n } else if ((!origin || origin === 'bottom') && isLeft) {\n if (this.leftEnd && isUpper) {\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: bottom.y + lineLength/2},\n {x: bottom.x + (bottom.x - symbolTop.x)/2, y: bottom.y + lineLength/2},\n {x: bottom.x + (bottom.x - symbolTop.x)/2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n } else {\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n }\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x + (bottom.x - symbolTop.x)/2;\n } else if ((!origin || origin === 'bottom') && isRight) {\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: bottom.y + lineLength/2},\n {x: bottom.x + (bottom.x - symbolTop.x)/2, y: bottom.y + lineLength/2},\n {x: bottom.x + (bottom.x - symbolTop.x)/2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x + (bottom.x - symbolTop.x)/2;\n } else if ((origin && origin === 'right') && isLeft) {\n line = drawLine(this.chart, right, [\n {x: right.x + lineLength/2, y: right.y},\n {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.rightStart = true;\n symbol.topEnd = true;\n maxX = right.x + lineLength/2;\n } else if ((origin && origin === 'right') && isRight) {\n line = drawLine(this.chart, right, [\n {x: symbolTop.x, y: right.y},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.rightStart = true;\n symbol.topEnd = true;\n maxX = right.x + lineLength/2;\n } else if ((origin && origin === 'bottom') && isOnSameColumn && isUpper) {\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: bottom.y + lineLength/2},\n {x: right.x + lineLength/2, y: bottom.y + lineLength/2},\n {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x + lineLength/2;\n } else if ((origin === 'left') && isOnSameColumn && isUpper) {\n var diffX = left.x - lineLength/2;\n if (symbolLeft.x < left.x) {\n diffX = symbolLeft.x - lineLength/2;\n }\n line = drawLine(this.chart, left, [\n {x: diffX, y: left.y},\n {x: diffX, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.leftStart = true;\n symbol.topEnd = true;\n maxX = left.x;\n } else if ((origin === 'left')) {\n line = drawLine(this.chart, left, [\n {x: symbolTop.x + (left.x - symbolTop.x)/ 2, y: left.y},\n {x: symbolTop.x + (left.x - symbolTop.x)/ 2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.leftStart = true;\n symbol.topEnd = true;\n maxX = left.x;\n }\n\n if (line) {\n for (var l = 0, llen = this.chart.lines.length; l < llen; l++) {\n var otherLine = this.chart.lines[l];\n var len;\n\n var ePath = otherLine.attr('path'),\n lPath = line.attr('path');\n\n for (var iP = 0, lenP = ePath.length - 1; iP < lenP; iP++) {\n var newPath = [];\n newPath.push(['M', ePath[iP][1], ePath[iP][2]]);\n newPath.push(['L', ePath[iP + 1][1], ePath[iP + 1][2]]);\n\n var line1_from_x = newPath[0][1];\n var line1_from_y = newPath[0][2];\n var line1_to_x = newPath[1][1];\n var line1_to_y = newPath[1][2];\n\n for (var lP = 0, lenlP = lPath.length - 1; lP < lenlP; lP++) {\n var newLinePath = [];\n newLinePath.push(['M', lPath[lP][1], lPath[lP][2]]);\n newLinePath.push(['L', lPath[lP + 1][1], lPath[lP + 1][2]]);\n\n var line2_from_x = newLinePath[0][1];\n var line2_from_y = newLinePath[0][2];\n var line2_to_x = newLinePath[1][1];\n var line2_to_y = newLinePath[1][2];\n\n var res = checkLineIntersection(line1_from_x, line1_from_y, line1_to_x, line1_to_y, line2_from_x, line2_from_y, line2_to_x, line2_to_y);\n if (res.onLine1 && res.onLine2) {\n\n var newSegment;\n if (line2_from_y === line2_to_y) {\n if (line2_from_x > line2_to_x) {\n newSegment = ['L', res.x + lineWith * 2, line2_from_y];\n lPath.splice(lP + 1, 0, newSegment);\n newSegment = ['C', res.x + lineWith * 2, line2_from_y, res.x, line2_from_y - lineWith * 4, res.x - lineWith * 2, line2_from_y];\n lPath.splice(lP + 2, 0, newSegment);\n line.attr('path', lPath);\n } else {\n newSegment = ['L', res.x - lineWith * 2, line2_from_y];\n lPath.splice(lP + 1, 0, newSegment);\n newSegment = ['C', res.x - lineWith * 2, line2_from_y, res.x, line2_from_y - lineWith * 4, res.x + lineWith * 2, line2_from_y];\n lPath.splice(lP + 2, 0, newSegment);\n line.attr('path', lPath);\n }\n } else {\n if (line2_from_y > line2_to_y) {\n newSegment = ['L', line2_from_x, res.y + lineWith * 2];\n lPath.splice(lP + 1, 0, newSegment);\n newSegment = ['C', line2_from_x, res.y + lineWith * 2, line2_from_x + lineWith * 4, res.y, line2_from_x, res.y - lineWith * 2];\n lPath.splice(lP + 2, 0, newSegment);\n line.attr('path', lPath);\n } else {\n newSegment = ['L', line2_from_x, res.y - lineWith * 2];\n lPath.splice(lP + 1, 0, newSegment);\n newSegment = ['C', line2_from_x, res.y - lineWith * 2, line2_from_x + lineWith * 4, res.y, line2_from_x, res.y + lineWith * 2];\n lPath.splice(lP + 2, 0, newSegment);\n line.attr('path', lPath);\n }\n }\n\n lP += 2;\n len += 2;\n }\n }\n }\n }\n\n this.chart.lines.push(line);\n }\n\n if (!this.chart.maxXFromLine || (this.chart.maxXFromLine && maxX > this.chart.maxXFromLine)) {\n this.chart.maxXFromLine = maxX;\n }\n};\n\nmodule.exports = Symbol;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.js\n ** module id = 2\n ** module chunks = 0\n **/","function drawPath(chart, location, points) {\n var i, len;\n var path = 'M{0},{1}';\n for (i = 2, len = 2 * points.length + 2; i < len; i+=2) {\n path += ' L{' + i + '},{' + (i + 1) + '}';\n }\n var pathValues = [location.x, location.y];\n for (i = 0, len = points.length; i < len; i++) {\n pathValues.push(points[i].x);\n pathValues.push(points[i].y);\n }\n var symbol = chart.paper.path(path, pathValues);\n symbol.attr('stroke', chart.options['element-color']);\n symbol.attr('stroke-width', chart.options['line-width']);\n\n var font = chart.options.font;\n var fontF = chart.options['font-family'];\n var fontW = chart.options['font-weight'];\n\n if (font) symbol.attr({ 'font': font });\n if (fontF) symbol.attr({ 'font-family': fontF });\n if (fontW) symbol.attr({ 'font-weight': fontW });\n\n return symbol;\n}\n\nfunction drawLine(chart, from, to, text) {\n var i, len;\n\n if (Object.prototype.toString.call(to) !== '[object Array]') {\n to = [to];\n }\n\n var path = 'M{0},{1}';\n for (i = 2, len = 2 * to.length + 2; i < len; i+=2) {\n path += ' L{' + i + '},{' + (i + 1) + '}';\n }\n var pathValues = [from.x, from.y];\n for (i = 0, len = to.length; i < len; i++) {\n pathValues.push(to[i].x);\n pathValues.push(to[i].y);\n }\n\n var line = chart.paper.path(path, pathValues);\n line.attr({\n stroke: chart.options['line-color'],\n 'stroke-width': chart.options['line-width'],\n 'arrow-end': chart.options['arrow-end']\n });\n\n var font = chart.options.font;\n var fontF = chart.options['font-family'];\n var fontW = chart.options['font-weight'];\n\n if (font) line.attr({ 'font': font });\n if (fontF) line.attr({ 'font-family': fontF });\n if (fontW) line.attr({ 'font-weight': fontW });\n\n if (text) {\n\n var centerText = false;\n\n var textPath = chart.paper.text(0, 0, text);\n\n var isHorizontal = false;\n var firstTo = to[0];\n\n if (from.y === firstTo.y) {\n isHorizontal = true;\n }\n\n var x = 0,\n y = 0;\n\n if (centerText) {\n if (from.x > firstTo.x) {\n x = from.x - (from.x - firstTo.x)/2;\n } else {\n x = firstTo.x - (firstTo.x - from.x)/2;\n }\n\n if (from.y > firstTo.y) {\n y = from.y - (from.y - firstTo.y)/2;\n } else {\n y = firstTo.y - (firstTo.y - from.y)/2;\n }\n\n if (isHorizontal) {\n x -= textPath.getBBox().width/2;\n y -= chart.options['text-margin'];\n } else {\n x += chart.options['text-margin'];\n y -= textPath.getBBox().height/2;\n }\n } else {\n x = from.x;\n y = from.y;\n\n if (isHorizontal) {\n x += chart.options['text-margin']/2;\n y -= chart.options['text-margin'];\n } else {\n x += chart.options['text-margin']/2;\n y += chart.options['text-margin'];\n }\n }\n\n textPath.attr({\n 'text-anchor': 'start',\n 'font-size': chart.options['font-size'],\n 'fill': chart.options['font-color'],\n x: x,\n y: y\n });\n\n if (font) textPath.attr({ 'font': font });\n if (fontF) textPath.attr({ 'font-family': fontF });\n if (fontW) textPath.attr({ 'font-weight': fontW });\n }\n\n return line;\n}\n\nfunction checkLineIntersection(line1StartX, line1StartY, line1EndX, line1EndY, line2StartX, line2StartY, line2EndX, line2EndY) {\n // if the lines intersect, the result contains the x and y of the intersection (treating the lines as infinite) and booleans for whether line segment 1 or line segment 2 contain the point\n var denominator, a, b, numerator1, numerator2, result = {\n x: null,\n y: null,\n onLine1: false,\n onLine2: false\n };\n denominator = ((line2EndY - line2StartY) * (line1EndX - line1StartX)) - ((line2EndX - line2StartX) * (line1EndY - line1StartY));\n if (denominator === 0) {\n return result;\n }\n a = line1StartY - line2StartY;\n b = line1StartX - line2StartX;\n numerator1 = ((line2EndX - line2StartX) * a) - ((line2EndY - line2StartY) * b);\n numerator2 = ((line1EndX - line1StartX) * a) - ((line1EndY - line1StartY) * b);\n a = numerator1 / denominator;\n b = numerator2 / denominator;\n\n // if we cast these lines infinitely in both directions, they intersect here:\n result.x = line1StartX + (a * (line1EndX - line1StartX));\n result.y = line1StartY + (a * (line1EndY - line1StartY));\n /*\n // it is worth noting that this should be the same as:\n x = line2StartX + (b * (line2EndX - line2StartX));\n y = line2StartX + (b * (line2EndY - line2StartY));\n */\n // if line1 is a segment and line2 is infinite, they intersect if:\n if (a > 0 && a < 1) {\n result.onLine1 = true;\n }\n // if line2 is a segment and line1 is infinite, they intersect if:\n if (b > 0 && b < 1) {\n result.onLine2 = true;\n }\n // if line1 and line2 are segments, they intersect if both of the above are true\n return result;\n}\n\nmodule.exports = {\n\tdrawPath: drawPath,\n\tdrawLine: drawLine,\n\tcheckLineIntersection: checkLineIntersection\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.functions.js\n ** module id = 3\n ** module chunks = 0\n **/","var FlowChart = require('./flowchart.chart');\nvar Start = require('./flowchart.symbol.start');\nvar End = require('./flowchart.symbol.end');\nvar Operation = require('./flowchart.symbol.operation');\nvar InputOutput = require('./flowchart.symbol.inputoutput');\nvar Subroutine = require('./flowchart.symbol.subroutine');\nvar Condition = require('./flowchart.symbol.condition');\n\nfunction parse(input) {\n input = input || '';\n input = input.trim();\n\n var chart = {\n symbols: {},\n start: null,\n drawSVG: function(container, options) {\n var self = this;\n\n if (this.diagram) {\n this.diagram.clean();\n }\n\n var diagram = new FlowChart(container, options);\n this.diagram = diagram;\n var dispSymbols = {};\n\n function getDisplaySymbol(s) {\n if (dispSymbols[s.key]) {\n return dispSymbols[s.key];\n }\n\n switch (s.symbolType) {\n case 'start':\n dispSymbols[s.key] = new Start(diagram, s);\n break;\n case 'end':\n dispSymbols[s.key] = new End(diagram, s);\n break;\n case 'operation':\n dispSymbols[s.key] = new Operation(diagram, s);\n break;\n case 'inputoutput':\n dispSymbols[s.key] = new InputOutput(diagram, s);\n break;\n case 'subroutine':\n dispSymbols[s.key] = new Subroutine(diagram, s);\n break;\n case 'condition':\n dispSymbols[s.key] = new Condition(diagram, s);\n break;\n default:\n return new Error('Wrong symbol type!');\n }\n\n return dispSymbols[s.key];\n }\n\n (function constructChart(s, prevDisp, prev) {\n var dispSymb = getDisplaySymbol(s);\n\n if (self.start === s) {\n diagram.startWith(dispSymb);\n } else if (prevDisp && prev && !prevDisp.pathOk) {\n if (prevDisp instanceof(Condition)) {\n if (prev.yes === s) {\n prevDisp.yes(dispSymb);\n }\n if (prev.no === s) {\n prevDisp.no(dispSymb);\n }\n } else {\n prevDisp.then(dispSymb);\n }\n }\n\n if (dispSymb.pathOk) {\n return dispSymb;\n }\n\n if (dispSymb instanceof(Condition)) {\n if (s.yes) {\n constructChart(s.yes, dispSymb, s);\n }\n if (s.no) {\n constructChart(s.no, dispSymb, s);\n }\n } else if (s.next) {\n constructChart(s.next, dispSymb, s);\n }\n\n return dispSymb;\n })(this.start);\n\n diagram.render();\n },\n clean: function() {\n this.diagram.clean();\n }\n };\n\n var lines = [];\n var prevBreak = 0;\n for (var i0 = 1, i0len = input.length; i0 < i0len; i0++) {\n if(input[i0] === '\\n' && input[i0 - 1] !== '\\\\') {\n var line0 = input.substring(prevBreak, i0);\n prevBreak = i0 + 1;\n lines.push(line0.replace(/\\\\\\n/g, '\\n'));\n }\n }\n\n if(prevBreak < input.length) {\n lines.push(input.substr(prevBreak));\n }\n\n for (var l = 1, len = lines.length; l < len;) {\n var currentLine = lines[l];\n\n if (currentLine.indexOf('->') < 0 && currentLine.indexOf('=>') < 0) {\n lines[l - 1] += '\\n' + currentLine;\n lines.splice(l, 1);\n len--;\n } else {\n l++;\n }\n }\n\n function getSymbol(s) {\n var startIndex = s.indexOf('(') + 1;\n var endIndex = s.indexOf(')');\n if (startIndex >= 0 && endIndex >= 0) {\n return chart.symbols[s.substring(0, startIndex - 1)];\n }\n return chart.symbols[s];\n }\n\n function getNextPath(s) {\n var next = 'next';\n var startIndex = s.indexOf('(') + 1;\n var endIndex = s.indexOf(')');\n if (startIndex >= 0 && endIndex >= 0) {\n next = flowSymb.substring(startIndex, endIndex);\n if (next.indexOf(',') < 0) {\n if (next !== 'yes' && next !== 'no') {\n next = 'next, ' + next;\n }\n }\n }\n return next;\n }\n\n while (lines.length > 0) {\n var line = lines.splice(0, 1)[0];\n\n if (line.indexOf('=>') >= 0) {\n // definition\n var parts = line.split('=>');\n var symbol = {\n key: parts[0],\n symbolType: parts[1],\n text: null,\n link: null,\n target: null,\n flowstate: null\n };\n\n var sub;\n\n if (symbol.symbolType.indexOf(': ') >= 0) {\n sub = symbol.symbolType.split(': ');\n symbol.symbolType = sub.shift();\n symbol.text = sub.join(': ');\n }\n\n if (symbol.text && symbol.text.indexOf(':>') >= 0) {\n sub = symbol.text.split(':>');\n symbol.text = sub.shift();\n symbol.link = sub.join(':>');\n } else if (symbol.symbolType.indexOf(':>') >= 0) {\n sub = symbol.symbolType.split(':>');\n symbol.symbolType = sub.shift();\n symbol.link = sub.join(':>');\n }\n\n if (symbol.symbolType.indexOf('\\n') >= 0) {\n symbol.symbolType = symbol.symbolType.split('\\n')[0];\n }\n\n /* adding support for links */\n if (symbol.link) {\n var startIndex = symbol.link.indexOf('[') + 1;\n var endIndex = symbol.link.indexOf(']');\n if (startIndex >= 0 && endIndex >= 0) {\n symbol.target = symbol.link.substring(startIndex, endIndex);\n symbol.link = symbol.link.substring(0, startIndex - 1);\n }\n }\n /* end of link support */\n\n /* adding support for flowstates */\n if (symbol.text) {\n if (symbol.text.indexOf('|') >= 0) {\n var txtAndState = symbol.text.split('|');\n symbol.flowstate = txtAndState.pop().trim();\n symbol.text = txtAndState.join('|');\n }\n }\n /* end of flowstate support */\n\n chart.symbols[symbol.key] = symbol;\n\n } else if (line.indexOf('->') >= 0) {\n // flow\n var flowSymbols = line.split('->');\n for (var i = 0, lenS = flowSymbols.length; i < lenS; i++) {\n var flowSymb = flowSymbols[i];\n\n var realSymb = getSymbol(flowSymb);\n var next = getNextPath(flowSymb);\n\n var direction = null;\n if (next.indexOf(',') >= 0) {\n var condOpt = next.split(',');\n next = condOpt[0];\n direction = condOpt[1].trim();\n }\n\n if (!chart.start) {\n chart.start = realSymb;\n }\n\n if (i + 1 < lenS) {\n var nextSymb = flowSymbols[i + 1];\n realSymb[next] = getSymbol(nextSymb);\n realSymb['direction_' + next] = direction;\n direction = null;\n }\n }\n }\n\n }\n return chart;\n}\n\nmodule.exports = parse;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.parse.js\n ** module id = 4\n ** module chunks = 0\n **/","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\nvar drawAPI = require('./flowchart.functions');\nvar drawPath = drawAPI.drawPath;\n\nfunction Condition(chart, options) {\n options = options || {};\n Symbol.call(this, chart, options);\n this.textMargin = this.getAttr('text-margin');\n this.yes_direction = 'bottom';\n this.no_direction = 'right';\n if (options.yes && options.direction_yes && options.no && !options.direction_no) {\n if (options.direction_yes === 'right') {\n this.no_direction = 'bottom';\n this.yes_direction = 'right';\n } else {\n this.no_direction = 'right';\n this.yes_direction = 'bottom';\n }\n } else if (options.yes && !options.direction_yes && options.no && options.direction_no) {\n if (options.direction_no === 'right') {\n this.yes_direction = 'bottom';\n this.no_direction = 'right';\n } else {\n this.yes_direction = 'right';\n this.no_direction = 'bottom';\n }\n } else {\n this.yes_direction = 'bottom';\n this.no_direction = 'right';\n }\n\n this.yes_direction = this.yes_direction || 'bottom';\n this.no_direction = this.no_direction || 'right';\n\n this.text.attr({\n x: this.textMargin * 2\n });\n\n var width = this.text.getBBox().width + 3 * this.textMargin;\n width += width/2;\n var height = this.text.getBBox().height + 2 * this.textMargin;\n height += height/2;\n height = Math.max(width * 0.5, height);\n var startX = width/4;\n var startY = height/4;\n\n this.text.attr({\n x: startX + this.textMargin/2\n });\n\n var start = {x: startX, y: startY};\n var points = [\n {x: startX - width/4, y: startY + height/4},\n {x: startX - width/4 + width/2, y: startY + height/4 + height/2},\n {x: startX - width/4 + width, y: startY + height/4},\n {x: startX - width/4 + width/2, y: startY + height/4 - height/2},\n {x: startX - width/4, y: startY + height/4}\n ];\n\n var symbol = drawPath(chart, start, points);\n\n symbol.attr({\n stroke: this.getAttr('element-color'),\n 'stroke-width': this.getAttr('line-width'),\n fill: this.getAttr('fill')\n });\n if (options.link) { symbol.attr('href', options.link); }\n if (options.target) { symbol.attr('target', options.target); }\n if (options.key) { symbol.node.id = options.key; }\n symbol.node.setAttribute('class', this.getAttr('class'));\n\n this.text.attr({\n y: symbol.getBBox().height/2\n });\n\n this.group.push(symbol);\n symbol.insertBefore(this.text);\n\n this.initialize();\n}\ninherits(Condition, Symbol);\n\nCondition.prototype.render = function() {\n\n if (this.yes_direction) {\n this[this.yes_direction + '_symbol'] = this.yes_symbol;\n }\n\n if (this.no_direction) {\n this[this.no_direction + '_symbol'] = this.no_symbol;\n }\n\n var lineLength = this.getAttr('line-length');\n\n if (this.bottom_symbol) {\n var bottomPoint = this.getBottom();\n\n if (!this.bottom_symbol.isPositioned) {\n this.bottom_symbol.shiftY(this.getY() + this.height + lineLength);\n this.bottom_symbol.setX(bottomPoint.x - this.bottom_symbol.width/2);\n this.bottom_symbol.isPositioned = true;\n\n this.bottom_symbol.render();\n }\n }\n\n if (this.right_symbol) {\n var rightPoint = this.getRight();\n\n if (!this.right_symbol.isPositioned) {\n\n this.right_symbol.setY(rightPoint.y - this.right_symbol.height/2);\n this.right_symbol.shiftX(this.group.getBBox().x + this.width + lineLength);\n\n var self = this;\n (function shift() {\n var hasSymbolUnder = false;\n var symb;\n for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n symb = self.chart.symbols[i];\n\n var diff = Math.abs(symb.getCenter().x - self.right_symbol.getCenter().x);\n if (symb.getCenter().y > self.right_symbol.getCenter().y && diff <= self.right_symbol.width/2) {\n hasSymbolUnder = true;\n break;\n }\n }\n\n if (hasSymbolUnder) {\n self.right_symbol.setX(symb.getX() + symb.width + lineLength);\n shift();\n }\n })();\n\n this.right_symbol.isPositioned = true;\n\n this.right_symbol.render();\n }\n }\n};\n\nCondition.prototype.renderLines = function() {\n if (this.yes_symbol) {\n this.drawLineTo(this.yes_symbol, this.getAttr('yes-text'), this.yes_direction);\n }\n\n if (this.no_symbol) {\n this.drawLineTo(this.no_symbol, this.getAttr('no-text'), this.no_direction);\n }\n};\n\nmodule.exports = Condition;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.condition.js\n ** module id = 5\n ** module chunks = 0\n **/","var Raphael = require('raphael');\nvar defaults = require('./flowchart.helpers').defaults;\nvar defaultOptions = require('./flowchart.defaults');\nvar Condition = require('./flowchart.symbol.condition');\n\nfunction FlowChart(container, options) {\n options = options || {};\n\n this.paper = new Raphael(container);\n\n this.options = defaults(options, defaultOptions);\n\n this.symbols = [];\n this.lines = [];\n this.start = null;\n}\n\nFlowChart.prototype.handle = function(symbol) {\n if (this.symbols.indexOf(symbol) <= -1) {\n this.symbols.push(symbol);\n }\n\n var flowChart = this;\n\n if (symbol instanceof(Condition)) {\n symbol.yes = function(nextSymbol) {\n symbol.yes_symbol = nextSymbol;\n if(symbol.no_symbol) {\n symbol.pathOk = true;\n }\n return flowChart.handle(nextSymbol);\n };\n symbol.no = function(nextSymbol) {\n symbol.no_symbol = nextSymbol;\n if(symbol.yes_symbol) {\n symbol.pathOk = true;\n }\n return flowChart.handle(nextSymbol);\n };\n } else {\n symbol.then = function(nextSymbol) {\n symbol.next = nextSymbol;\n symbol.pathOk = true;\n return flowChart.handle(nextSymbol);\n };\n }\n\n return symbol;\n};\n\nFlowChart.prototype.startWith = function(symbol) {\n this.start = symbol;\n return this.handle(symbol);\n};\n\nFlowChart.prototype.render = function() {\n var maxWidth = 0,\n maxHeight = 0,\n i = 0,\n len = 0,\n maxX = 0,\n maxY = 0,\n minX = 0,\n minY = 0,\n symbol,\n line;\n\n for (i = 0, len = this.symbols.length; i < len; i++) {\n symbol = this.symbols[i];\n if (symbol.width > maxWidth) {\n maxWidth = symbol.width;\n }\n if (symbol.height > maxHeight) {\n maxHeight = symbol.height;\n }\n }\n\n for (i = 0, len = this.symbols.length; i < len; i++) {\n symbol = this.symbols[i];\n symbol.shiftX(this.options.x + (maxWidth - symbol.width)/2 + this.options['line-width']);\n symbol.shiftY(this.options.y + (maxHeight - symbol.height)/2 + this.options['line-width']);\n }\n\n this.start.render();\n // for (i = 0, len = this.symbols.length; i < len; i++) {\n // symbol = this.symbols[i];\n // symbol.render();\n // }\n\n for (i = 0, len = this.symbols.length; i < len; i++) {\n symbol = this.symbols[i];\n symbol.renderLines();\n }\n\n maxX = this.maxXFromLine;\n\n for (i = 0, len = this.symbols.length; i < len; i++) {\n symbol = this.symbols[i];\n var x = symbol.getX() + symbol.width;\n var y = symbol.getY() + symbol.height;\n if (x > maxX) {\n maxX = x;\n }\n if (y > maxY) {\n maxY = y;\n }\n }\n\n for (i = 0, len = this.lines.length; i < len; i++) {\n line = this.lines[i].getBBox();\n var x = line.x;\n var y = line.y;\n var x2 = line.x2;\n var y2 = line.y2;\n if (x < minX) {\n minX = x;\n }\n if (y < minY) {\n minY = y;\n }\n if (x2 > maxX) {\n maxX = x2;\n }\n if (y2 > maxY) {\n maxY = y2;\n }\n }\n\n var scale = this.options['scale'];\n var lineWidth = this.options['line-width'];\n\n if (minX < 0) minX -= lineWidth;\n if (minY < 0) minY -= lineWidth;\n\n var width = maxX + lineWidth - minX;\n var height = maxY + lineWidth - minY;\n\n this.paper.setSize(width * scale, height * scale);\n this.paper.setViewBox(minX, minY, width, height, true);\n};\n\nFlowChart.prototype.clean = function() {\n if (this.paper) {\n var paperDom = this.paper.canvas;\n paperDom.parentNode.removeChild(paperDom);\n }\n};\n\nmodule.exports = FlowChart;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.chart.js\n ** module id = 6\n ** module chunks = 0\n **/","// defaults\nmodule.exports = {\n 'x': 0,\n 'y': 0,\n 'line-width': 3,\n 'line-length': 50,\n 'text-margin': 10,\n 'font-size': 14,\n 'font-color': 'black',\n // 'font': 'normal',\n // 'font-family': 'calibri',\n // 'font-weight': 'normal',\n 'line-color': 'black',\n 'element-color': 'black',\n 'fill': 'white',\n 'yes-text': 'yes',\n 'no-text': 'no',\n 'arrow-end': 'block',\n 'class': 'flowchart',\n 'scale': 1,\n 'symbols': {\n 'start': {},\n 'end': {},\n 'condition': {},\n 'inputoutput': {},\n 'operation': {},\n 'subroutine': {}\n }//,\n // 'flowstate' : {\n // 'past' : { 'fill': '#CCCCCC', 'font-size': 12},\n // 'current' : {'fill': 'yellow', 'font-color': 'red', 'font-weight': 'bold'},\n // 'future' : { 'fill': '#FFFF99'},\n // 'invalid': {'fill': '#444444'}\n // }\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.defaults.js\n ** module id = 7\n ** module chunks = 0\n **/","// add indexOf to non ECMA-262 standard compliant browsers\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {\n \"use strict\";\n if (this === null) {\n throw new TypeError();\n }\n var t = Object(this);\n var len = t.length >>> 0;\n if (len === 0) {\n return -1;\n }\n var n = 0;\n if (arguments.length > 0) {\n n = Number(arguments[1]);\n if (n != n) { // shortcut for verifying if it's NaN\n n = 0;\n } else if (n !== 0 && n != Infinity && n != -Infinity) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n }\n if (n >= len) {\n return -1;\n }\n var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);\n for (; k < len; k++) {\n if (k in t && t[k] === searchElement) {\n return k;\n }\n }\n return -1;\n };\n}\n\n// add lastIndexOf to non ECMA-262 standard compliant browsers\nif (!Array.prototype.lastIndexOf) {\n Array.prototype.lastIndexOf = function(searchElement /*, fromIndex*/) {\n \"use strict\";\n if (this === null) {\n throw new TypeError();\n }\n var t = Object(this);\n var len = t.length >>> 0;\n if (len === 0) {\n return -1;\n }\n var n = len;\n if (arguments.length > 1) {\n n = Number(arguments[1]);\n if (n != n) {\n n = 0;\n } else if (n !== 0 && n != (1 / 0) && n != -(1 / 0)) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n }\n var k = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n);\n for (; k >= 0; k--) {\n if (k in t && t[k] === searchElement) {\n return k;\n }\n }\n return -1;\n };\n}\n\nif (!String.prototype.trim) {\n String.prototype.trim = function() {\n return this.replace(/^\\s+|\\s+$/g, '');\n };\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.shim.js\n ** module id = 8\n ** module chunks = 0\n **/","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction End(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0, 20);\n options = options || {};\n options.text = options.text || 'End';\n Symbol.call(this, chart, options, symbol);\n}\ninherits(End, Symbol);\n\nmodule.exports = End;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.end.js\n ** module id = 9\n ** module chunks = 0\n **/","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\nvar drawAPI = require('./flowchart.functions');\nvar drawPath = drawAPI.drawPath;\n\nfunction InputOutput(chart, options) {\n options = options || {};\n Symbol.call(this, chart, options);\n this.textMargin = this.getAttr('text-margin');\n\n this.text.attr({\n x: this.textMargin * 3\n });\n\n var width = this.text.getBBox().width + 4 * this.textMargin;\n var height = this.text.getBBox().height + 2 * this.textMargin;\n var startX = this.textMargin;\n var startY = height/2;\n\n var start = {x: startX, y: startY};\n var points = [\n {x: startX - this.textMargin, y: height},\n {x: startX - this.textMargin + width, y: height},\n {x: startX - this.textMargin + width + 2 * this.textMargin, y: 0},\n {x: startX - this.textMargin + 2 * this.textMargin, y: 0},\n {x: startX, y: startY}\n ];\n\n var symbol = drawPath(chart, start, points);\n\n symbol.attr({\n stroke: this.getAttr('element-color'),\n 'stroke-width': this.getAttr('line-width'),\n fill: this.getAttr('fill')\n });\n if (options.link) { symbol.attr('href', options.link); }\n if (options.target) { symbol.attr('target', options.target); }\n if (options.key) { symbol.node.id = options.key; }\n symbol.node.setAttribute('class', this.getAttr('class'));\n\n this.text.attr({\n y: symbol.getBBox().height/2\n });\n\n this.group.push(symbol);\n symbol.insertBefore(this.text);\n\n this.initialize();\n}\ninherits(InputOutput, Symbol);\n\nInputOutput.prototype.getLeft = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX() + this.textMargin;\n return {x: x, y: y};\n};\n\nInputOutput.prototype.getRight = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX() + this.group.getBBox().width - this.textMargin;\n return {x: x, y: y};\n};\n\nmodule.exports = InputOutput;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.inputoutput.js\n ** module id = 10\n ** module chunks = 0\n **/","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction Operation(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0);\n options = options || {};\n Symbol.call(this, chart, options, symbol);\n}\ninherits(Operation, Symbol);\n\nmodule.exports = Operation;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.operation.js\n ** module id = 11\n ** module chunks = 0\n **/","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction Start(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0, 20);\n options = options || {};\n options.text = options.text || 'Start';\n Symbol.call(this, chart, options, symbol);\n}\ninherits(Start, Symbol);\n\nmodule.exports = Start;\n\n// Start.prototype.render = function() {\n// if (this.next) {\n// var lineLength = this.chart.options.symbols[this.symbolType]['line-length'] || this.chart.options['line-length'];\n\n// var bottomPoint = this.getBottom();\n// var topPoint = this.next.getTop();\n\n// if (!this.next.isPositioned) {\n// this.next.shiftY(this.getY() + this.height + lineLength);\n// this.next.setX(bottomPoint.x - this.next.width/2);\n// this.next.isPositioned = true;\n\n// this.next.render();\n// }\n// }\n// };\n\n// Start.prototype.renderLines = function() {\n// if (this.next) {\n// this.drawLineTo(this.next);\n// }\n// };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.start.js\n ** module id = 12\n ** module chunks = 0\n **/","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction Subroutine(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0);\n options = options || {};\n Symbol.call(this, chart, options, symbol);\n\n symbol.attr({\n width: this.text.getBBox().width + 4 * this.getAttr('text-margin')\n });\n\n this.text.attr({\n 'x': 2 * this.getAttr('text-margin')\n });\n\n var innerWrap = chart.paper.rect(0, 0, 0, 0);\n innerWrap.attr({\n x: this.getAttr('text-margin'),\n stroke: this.getAttr('element-color'),\n 'stroke-width': this.getAttr('line-width'),\n width: this.text.getBBox().width + 2 * this.getAttr('text-margin'),\n height: this.text.getBBox().height + 2 * this.getAttr('text-margin'),\n fill: this.getAttr('fill')\n });\n if (options.key) { innerWrap.node.id = options.key + 'i'; }\n\n var font = this.getAttr('font');\n var fontF = this.getAttr('font-family');\n var fontW = this.getAttr('font-weight');\n\n if (font) innerWrap.attr({ 'font': font });\n if (fontF) innerWrap.attr({ 'font-family': fontF });\n if (fontW) innerWrap.attr({ 'font-weight': fontW });\n\n if (options.link) { innerWrap.attr('href', options.link); }\n if (options.target) { innerWrap.attr('target', options.target); }\n this.group.push(innerWrap);\n innerWrap.insertBefore(this.text);\n\n this.initialize();\n}\ninherits(Subroutine, Symbol);\n\nmodule.exports = Subroutine;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.subroutine.js\n ** module id = 13\n ** module chunks = 0\n **/","if (typeof jQuery != 'undefined') {\n\tvar parse = require('./flowchart.parse');\n\t(function( $ ) {\n\t\t$.fn.flowChart = function( options ) {\n\t\t\treturn this.each(function() {\n\t\t\t\tvar $this = $(this);\n\t\t\t\tvar chart = parse($this.text());\n\t\t\t\t$this.html('');\n\t\t\t\tchart.drawSVG(this, options);\n\t\t\t});\n\t\t};\n\t})(jQuery); // eslint-disable-line\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/jquery-plugin.js\n ** module id = 14\n ** module chunks = 0\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_15__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"Raphael\"\n ** module id = 15\n ** module chunks = 0\n **/"],"sourceRoot":""}
+ +
+ +
+ + + + +
+ +
+ + +
+
+ +
+ + + + + + + +
+ + + Something went wrong with that request. Please try again. +
+ + + + + + + + + + + + + + + + + diff --git a/site/static/js/lib/jquery-2.1.1.min.js b/site/static/js/lib/jquery-2.1.1.min.js new file mode 100644 index 0000000..e5ace11 --- /dev/null +++ b/site/static/js/lib/jquery-2.1.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b) +},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("