├── .DS_Store ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── codeql-analysis.yml │ └── stale.yml ├── .gitignore ├── LICENSE ├── README.md ├── babel.config.js ├── dist ├── FlowChart.common.js ├── FlowChart.common.js.map ├── FlowChart.umd.js ├── FlowChart.umd.js.map ├── FlowChart.umd.min.js ├── FlowChart.umd.min.js.map └── demo.html ├── package.json ├── public └── index.html ├── src ├── .DS_Store ├── assets │ └── modal.css ├── components │ ├── ConnectionDialog.vue │ ├── NodeDialog.vue │ └── flowchart │ │ ├── Flowchart.vue │ │ ├── index.css │ │ ├── index.js │ │ └── render.js ├── index.js ├── main.js ├── utils │ ├── dom.js │ ├── math.js │ └── svg.js └── views │ └── App.vue ├── vue.config.js └── yarn.lock /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joyceworks/flowchart-vue/87265e615bcd9a1c734915d1ff3141b05105ee85/.DS_Store -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ master ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ master ] 20 | schedule: 21 | - cron: '19 0 * * 6' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | 28 | strategy: 29 | fail-fast: false 30 | matrix: 31 | language: [ 'javascript' ] 32 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 33 | # Learn more: 34 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed 35 | 36 | steps: 37 | - name: Checkout repository 38 | uses: actions/checkout@v2 39 | 40 | # Initializes the CodeQL tools for scanning. 41 | - name: Initialize CodeQL 42 | uses: github/codeql-action/init@v1 43 | with: 44 | languages: ${{ matrix.language }} 45 | # If you wish to specify custom queries, you can do so here or in a config file. 46 | # By default, queries listed here will override any specified in a config file. 47 | # Prefix the list here with "+" to use these queries and those in the config file. 48 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 49 | 50 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 51 | # If this step fails, then you should remove it and run the build manually (see below) 52 | - name: Autobuild 53 | uses: github/codeql-action/autobuild@v1 54 | 55 | # ℹ️ Command-line programs to run using the OS shell. 56 | # 📚 https://git.io/JvXDl 57 | 58 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 59 | # and modify them (or add more) to build your code if your project 60 | # uses a compiled language 61 | 62 | #- run: | 63 | # make bootstrap 64 | # make release 65 | 66 | - name: Perform CodeQL Analysis 67 | uses: github/codeql-action/analyze@v1 68 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Mark stale issues and pull requests 2 | 3 | on: 4 | schedule: 5 | - cron: '29 7 * * *' 6 | 7 | jobs: 8 | stale: 9 | 10 | runs-on: ubuntu-latest 11 | permissions: 12 | issues: write 13 | pull-requests: write 14 | 15 | steps: 16 | - uses: actions/stale@v3 17 | with: 18 | repo-token: ${{ secrets.GITHUB_TOKEN }} 19 | stale-issue-message: 'Stale issue message' 20 | stale-pr-message: 'Stale pull request message' 21 | stale-issue-label: 'no-issue-activity' 22 | stale-pr-label: 'no-pr-activity' 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | .env.test 60 | 61 | # parcel-bundler cache (https://parceljs.org/) 62 | .cache 63 | 64 | # next.js build output 65 | .next 66 | 67 | # nuxt.js build output 68 | .nuxt 69 | 70 | # vuepress build output 71 | .vuepress/dist 72 | 73 | # Serverless directories 74 | .serverless/ 75 | 76 | # FuseBox cache 77 | .fusebox/ 78 | 79 | # DynamoDB Local files 80 | .dynamodb/ 81 | 82 | .idea/ 83 | nohup.out 84 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 JoyceWorks 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flowchart 2 | 3 | Flowchart & Flowchart designer component for Vue.js([flowchart-react](https://github.com/joyceworks/flowchart-react) for React.js). 4 | 5 | [![NPM](https://img.shields.io/npm/v/flowchart-vue.svg)](https://www.npmjs.com/package/flowchart-vue) 6 | 7 | image 8 | 9 | ## Usage 10 | 11 | ```shell script 12 | yarn add flowchart-vue 13 | ``` 14 | 15 | ```vue 16 | 47 | 110 | ``` 111 | 112 | See more at [src/views/App.vue](https://github.com/joyceworks/flowchart-vue/blob/master/src/views/App.vue). 113 | 114 | ## Demo 115 | 116 | - [GitHub Pages](https://joyceworks.github.io/flowchart-vue/) 117 | - [CodeSandbox](https://codesandbox.io/s/funny-shaw-971s84) 118 | - [Flowchart Vue Demo](https://github.com/joyceworks/flowchart-vue-demo) 119 | - Development Environment 120 | 121 | ``` shell 122 | git clone https://github.com/joyceworks/flowchart-vue.git 123 | cd flowchart-vue 124 | yarn install 125 | yarn run serve 126 | ``` 127 | 128 | Then open http://localhost:yourport/ in browser. 129 | 130 | ## API 131 | 132 | ## Props 133 | 134 | Property|Description|Type|Default 135 | -|-|-|- 136 | nodes|Collection of nodes|`Array`|`[{id: 1, x: 140, y: 270, name: 'Start', type: 'start'}, {id: 2, x: 540, y: 270, name: 'End', type: 'end'}]` 137 | connections|Collection of connections|`Array`|`[{source: {id: 1, position: 'right'}, destination: {id: 2, position: 'left'}, id: 1, type: 'pass', }]` 138 | width|Width of canvas|`String` \| `Number`|`800` 139 | height|Height of canvas|`String` \| `Number`|`600` 140 | locale|Display language, available values: `'en'`, `'zh'`|`String`|`'en'` 141 | readonly|Read-only|`Boolean`|false 142 | render|Custom render function|`null` 143 | readOnlyPermissions|Allows to specify more granular read-only mode permissions|`Object`|`{ allowDragNodes: false, allowSave: false, allowAddNodes: false, allowEditNodes: false, allowEditConnections: false, allowDblClick: false, allowRemove: false }` 144 | 145 | ## Events 146 | 147 | Event|Description|Handler 148 | -|-|- 149 | editnode|Node double-click event|`(node) => void` 150 | editconnection|Connection double-click event|`(connection) => void` 151 | save|Save event|`(nodes, connections) => void` 152 | dblclick|Background double-click event|`(position: {x: number, y: number}) => void` 153 | connect|Connect event|`(connection, nodes, connections) => void` 154 | disconnect|Disconnect event|`(connection, nodes, connections) => void` 155 | add|Add node event|`(node, nodes, connections) => void` 156 | delete|Delete node event|`(node, nodes, connections) => void` 157 | select|Select node event|`nodes => void` 158 | selectconnection|Select connection event|`connections => void` 159 | render|Node render event, children is a collection of svg elements |`(node: Node, children: { header, title, body, content }) => vod` 160 | nodesdragged|Notifies which nodes dragging just ended|`(nodes) => void` 161 | removeConfirmationRequired|Notifies that remove confirmation required. Pass nodes and connections selected to remove|`(nodes, connections) => void` 162 | movediff|Notifies about change in chart view position|`(diff: {x: number, y: number}) => void` 163 | 164 | ### Properties.Node 165 | 166 | Property|Description        |Type|Default 167 | -|-|-|- 168 | id|ID|`Number`|`+new Date()` 169 | x|Horizontal position of node|`Number`|- 170 | y|Vertical position of node|`Number`|- 171 | type|Type of node|`String`|`'operation'` 172 | width|Width of node|`Number`|`120` 173 | height|Height of node|`Number`|`60` 174 | approvers|Approvers of node, eg: [{name: 'admin'}]|`Array`|[] 175 | connectors|Defines which connectors should be rendered|`Array`|['top', 'right', 'bottom', 'left'] 176 | theme|Defines colors for specified node elements|`Object`|`{ borderColor: "#bbbbbb", borderColorSelected: "#666666", headerTextColor: "black", headerBackgroundColor: "#f1f3f4", bodyBackgroundColor: "white", bodyTextColor: "black" }` 177 | 178 | ### Properties.Connection 179 | 180 | Property|Description        |Type|Default 181 | -|-|-|- 182 | id|ID|`Number`|`+new Date()` 183 | source|Source of connection|`Object`|- 184 | destination|Destination of connection|`Object`|- 185 | type|Type of connection|`String`|`pass` 186 | 187 | ### Properties.Connection.Source & Properties.Connection.Destination 188 | 189 | Property|Description        |Type|Default 190 | -|-|-|- 191 | id|Node id|`Object`|- 192 | position|Starting/Ending position of node|`Object`|- 193 | 194 | ### Slot 195 | If you want you can pass value as slot. It allows you to add new UI elements to chart playground. 196 | These slot elements aren't selectable - are ignored while selection. Moreover actions on click and on double click are disabled 197 | in area filled by passed elements. 198 | You can use this functionality to e.g. in quite easy way add toolbar inside. 199 | 200 | ```vue 201 | 202 |
205 | 206 | 209 | 210 |
211 |
212 | ``` 213 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/app'], 3 | plugins: [], 4 | }; 5 | -------------------------------------------------------------------------------- /dist/FlowChart.umd.min.js: -------------------------------------------------------------------------------- 1 | (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["FlowChart"]=e():t["FlowChart"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"014b":function(t,e,n){"use strict";var r=n("e53d"),o=n("07e3"),i=n("8e60"),c=n("63b6"),a=n("9138"),u=n("ebfd").KEY,s=n("294c"),f=n("dbdb"),l=n("45f2"),h=n("62a0"),d=n("5168"),p=n("ccb9"),v=n("6718"),y=n("47ee"),g=n("9003"),b=n("e4ae"),m=n("f772"),x=n("241e"),w=n("36c3"),_=n("1bc3"),S=n("aebd"),C=n("a159"),k=n("0395"),O=n("bf0b"),N=n("9aa9"),E=n("d9f6"),T=n("c3a1"),P=O.f,j=E.f,A=k.f,M=r.Symbol,L=r.JSON,I=L&&L.stringify,R="prototype",F=d("_hidden"),D=d("toPrimitive"),Y={}.propertyIsEnumerable,B=f("symbol-registry"),G=f("symbols"),X=f("op-symbols"),$=Object[R],U="function"==typeof M&&!!N.f,V=r.QObject,q=!V||!V[R]||!V[R].findChild,z=i&&s((function(){return 7!=C(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=P($,e);r&&delete $[e],j(t,e,n),r&&t!==$&&j($,e,r)}:j,W=function(t){var e=G[t]=C(M[R]);return e._k=t,e},H=U&&"symbol"==typeof M.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof M},K=function(t,e,n){return t===$&&K(X,e,n),b(t),e=_(e,!0),b(n),o(G,e)?(n.enumerable?(o(t,F)&&t[F][e]&&(t[F][e]=!1),n=C(n,{enumerable:S(0,!1)})):(o(t,F)||j(t,F,S(1,{})),t[F][e]=!0),z(t,e,n)):j(t,e,n)},J=function(t,e){b(t);var n,r=y(e=w(e)),o=0,i=r.length;while(i>o)K(t,n=r[o++],e[n]);return t},Q=function(t,e){return void 0===e?C(t):J(C(t),e)},Z=function(t){var e=Y.call(this,t=_(t,!0));return!(this===$&&o(G,t)&&!o(X,t))&&(!(e||!o(this,t)||!o(G,t)||o(this,F)&&this[F][t])||e)},tt=function(t,e){if(t=w(t),e=_(e,!0),t!==$||!o(G,e)||o(X,e)){var n=P(t,e);return!n||!o(G,e)||o(t,F)&&t[F][e]||(n.enumerable=!0),n}},et=function(t){var e,n=A(w(t)),r=[],i=0;while(n.length>i)o(G,e=n[i++])||e==F||e==u||r.push(e);return r},nt=function(t){var e,n=t===$,r=A(n?X:w(t)),i=[],c=0;while(r.length>c)!o(G,e=r[c++])||n&&!o($,e)||i.push(G[e]);return i};U||(M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===$&&e.call(X,n),o(this,F)&&o(this[F],t)&&(this[F][t]=!1),z(this,t,S(1,n))};return i&&q&&z($,t,{configurable:!0,set:e}),W(t)},a(M[R],"toString",(function(){return this._k})),O.f=tt,E.f=K,n("6abf").f=k.f=et,n("355d").f=Z,N.f=nt,i&&!n("b8e3")&&a($,"propertyIsEnumerable",Z,!0),p.f=function(t){return W(d(t))}),c(c.G+c.W+c.F*!U,{Symbol:M});for(var rt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ot=0;rt.length>ot;)d(rt[ot++]);for(var it=T(d.store),ct=0;it.length>ct;)v(it[ct++]);c(c.S+c.F*!U,"Symbol",{for:function(t){return o(B,t+="")?B[t]:B[t]=M(t)},keyFor:function(t){if(!H(t))throw TypeError(t+" is not a symbol!");for(var e in B)if(B[e]===t)return e},useSetter:function(){q=!0},useSimple:function(){q=!1}}),c(c.S+c.F*!U,"Object",{create:Q,defineProperty:K,defineProperties:J,getOwnPropertyDescriptor:tt,getOwnPropertyNames:et,getOwnPropertySymbols:nt});var at=s((function(){N.f(1)}));c(c.S+c.F*at,"Object",{getOwnPropertySymbols:function(t){return N.f(x(t))}}),L&&c(c.S+c.F*(!U||s((function(){var t=M();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))}))),"JSON",{stringify:function(t){var e,n,r=[t],o=1;while(arguments.length>o)r.push(arguments[o++]);if(n=e=r[1],(m(e)||void 0!==t)&&!H(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!H(e))return e}),r[1]=e,I.apply(L,r)}}),M[R][D]||n("35e8")(M[R],D,M[R].valueOf),l(M,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},"01f9":function(t,e,n){"use strict";var r=n("2d00"),o=n("5ca1"),i=n("2aba"),c=n("32e9"),a=n("84f2"),u=n("41a0"),s=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),h=!([].keys&&"next"in[].keys()),d="@@iterator",p="keys",v="values",y=function(){return this};t.exports=function(t,e,n,g,b,m,x){u(n,e,g);var w,_,S,C=function(t){if(!h&&t in E)return E[t];switch(t){case p:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},k=e+" Iterator",O=b==v,N=!1,E=t.prototype,T=E[l]||E[d]||b&&E[b],P=T||C(b),j=b?O?C("entries"):P:void 0,A="Array"==e&&E.entries||T;if(A&&(S=f(A.call(new t)),S!==Object.prototype&&S.next&&(s(S,k,!0),r||"function"==typeof S[l]||c(S,l,y))),O&&T&&T.name!==v&&(N=!0,P=function(){return T.call(this)}),r&&!x||!h&&!N&&E[l]||c(E,l,P),a[e]=P,a[k]=y,b)if(w={values:O?P:C(v),keys:m?P:C(p),entries:j},x)for(_ in w)_ in E||i(E,_,w[_]);else o(o.P+o.F*(h||N),e,w);return w}},"02f4":function(t,e,n){var r=n("4588"),o=n("be13");t.exports=function(t){return function(e,n){var i,c,a=String(o(e)),u=r(n),s=a.length;return u<0||u>=s?t?"":void 0:(i=a.charCodeAt(u),i<55296||i>56319||u+1===s||(c=a.charCodeAt(u+1))<56320||c>57343?t?a.charAt(u):i:t?a.slice(u,u+2):c-56320+(i-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"0395":function(t,e,n){var r=n("36c3"),o=n("6abf").f,i={}.toString,c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(e){return c.slice()}};t.exports.f=function(t){return c&&"[object Window]"==i.call(t)?a(t):o(r(t))}},"07e3":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"0a49":function(t,e,n){var r=n("9b43"),o=n("626a"),i=n("4bf8"),c=n("9def"),a=n("cd1c");t.exports=function(t,e){var n=1==t,u=2==t,s=3==t,f=4==t,l=6==t,h=5==t||l,d=e||a;return function(e,a,p){for(var v,y,g=i(e),b=o(g),m=r(a,p,3),x=c(b.length),w=0,_=n?d(e,x):u?d(e,0):void 0;x>w;w++)if((h||w in b)&&(v=b[w],y=m(v,w,g),t))if(n)_[w]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:_.push(v)}else if(f)return!1;return l?-1:s||f?f:_}}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},"0fc9":function(t,e,n){var r=n("3a38"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},1169:function(t,e,n){var r=n("2d95");t.exports=Array.isArray||function(t){return"Array"==r(t)}},1173:function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},"11e9":function(t,e,n){var r=n("52a7"),o=n("4630"),i=n("6821"),c=n("6a99"),a=n("69a8"),u=n("c69a"),s=Object.getOwnPropertyDescriptor;e.f=n("9e1e")?s:function(t,e){if(t=i(t),e=c(e,!0),u)try{return s(t,e)}catch(n){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},1495:function(t,e,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){o(t);var n,c=i(e),a=c.length,u=0;while(a>u)r.f(t,n=c[u++],e[n]);return t}},1654:function(t,e,n){"use strict";var r=n("71c1")(!0);n("30f1")(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},1691:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},1991:function(t,e,n){var r,o,i,c=n("9b43"),a=n("31f4"),u=n("fab2"),s=n("230e"),f=n("7726"),l=f.process,h=f.setImmediate,d=f.clearImmediate,p=f.MessageChannel,v=f.Dispatch,y=0,g={},b="onreadystatechange",m=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},x=function(t){m.call(t.data)};h&&d||(h=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return g[++y]=function(){a("function"==typeof t?t:Function(t),e)},r(y),y},d=function(t){delete g[t]},"process"==n("2d95")(l)?r=function(t){l.nextTick(c(m,t,1))}:v&&v.now?r=function(t){v.now(c(m,t,1))}:p?(o=new p,i=o.port2,o.port1.onmessage=x,r=c(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",x,!1)):r=b in s("script")?function(t){u.appendChild(s("script"))[b]=function(){u.removeChild(this),m.call(t)}}:function(t){setTimeout(c(m,t,1),0)}),t.exports={set:h,clear:d}},"1aaf":function(t,e,n){e=t.exports=n("2350")(!1),e.push([t.i,"#svg{background-size:20px 20px,20px 20px,10px 10px,10px 10px;background-image:linear-gradient(90deg,#dfdfdf 1px,transparent 0),linear-gradient(180deg,#dfdfdf 1px,transparent 0),linear-gradient(90deg,#f1f1f1 1px,transparent 0),linear-gradient(180deg,#f1f1f1 1px,transparent 0);background-position:left -1px top -1px,left -1px top -1px,left -1px top -1px,left -1px top -1px;height:100%;width:100%}#chart{position:relative;width:800px;height:600px;border:1px solid #dfdfdf}#position{position:absolute;right:4px}.unselectable{moz-user-select:-moz-none;-moz-user-select:none;-o-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.connector{cursor:crosshair;opacity:0}.connector.active{opacity:1;fill:#fff;stroke:#bbb;stroke-width:1px}.connector:hover{stroke:red}#svg .selection{stroke:#add8e6;fill:#add8e6;fill-opacity:.8;display:none}#svg .selection.active{display:block}",""])},"1af6":function(t,e,n){var r=n("63b6");r(r.S,"Array",{isArray:n("9003")})},"1bc3":function(t,e,n){var r=n("f772");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"1c4c":function(t,e,n){"use strict";var r=n("9b43"),o=n("5ca1"),i=n("4bf8"),c=n("1fa8"),a=n("33a4"),u=n("9def"),s=n("f1ae"),f=n("27ee");o(o.S+o.F*!n("5cc5")((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,o,l,h=i(t),d="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,y=void 0!==v,g=0,b=f(h);if(y&&(v=r(v,p>2?arguments[2]:void 0,2)),void 0==b||d==Array&&a(b))for(e=u(h.length),n=new d(e);e>g;g++)s(n,g,y?v(h[g],g):h[g]);else for(l=b.call(h),n=new d;!(o=l.next()).done;g++)s(n,g,y?c(l,v,[o.value,g],!0):o.value);return n.length=g,n}})},"1ec9":function(t,e,n){var r=n("f772"),o=n("e53d").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"1fa8":function(t,e,n){var r=n("cb7c");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(c){var i=t["return"];throw void 0!==i&&r(i.call(t)),c}}},"20fd":function(t,e,n){"use strict";var r=n("d9f6"),o=n("aebd");t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},"214f":function(t,e,n){"use strict";n("b0c5");var r=n("2aba"),o=n("32e9"),i=n("79e5"),c=n("be13"),a=n("2b4c"),u=n("520a"),s=a("species"),f=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var h=a(t),d=!i((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),p=d?!i((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[s]=function(){return n}),n[h](""),!e})):void 0;if(!d||!p||"replace"===t&&!f||"split"===t&&!l){var v=/./[h],y=n(c,h,""[t],(function(t,e,n,r,o){return e.exec===u?d&&!o?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),g=y[0],b=y[1];r(String.prototype,t,g),o(RegExp.prototype,h,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}}},"230e":function(t,e,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},2350:function(t,e){function n(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"===typeof btoa){var i=r(o),c=o.sources.map((function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"}));return[n].concat(c).concat([i]).join("\n")}return[n].join("\n")}function r(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,"+e;return"/*# "+n+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r})).join("")},e.i=function(t,n){"string"===typeof t&&(t=[[null,t,""]]);for(var r={},o=0;oi)c(n[i++]);t._c=[],t._n=!1,e&&!t._h&&I(t)}))}},I=function(t){g.call(u,(function(){var e,n,r,o=t._v,i=R(t);if(i&&(e=x((function(){T?k.emit("unhandledRejection",o,t):(n=u.onunhandledrejection)?n({promise:t,reason:o}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",o)})),t._h=T||R(t)?2:1),t._a=void 0,i&&e.e)throw e.v}))},R=function(t){return 1!==t._h&&0===(t._a||t._c).length},F=function(t){g.call(u,(function(){var e;T?k.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})}))},D=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),L(e,!0))},Y=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw C("Promise can't be resolved itself");(e=M(t))?b((function(){var r={_w:n,_d:!1};try{e.call(t,s(Y,r,1),s(D,r,1))}catch(o){D.call(r,o)}})):(n._v=t,n._s=1,L(n,!1))}catch(r){D.call({_w:n,_d:!1},r)}}};A||(E=function(t){p(this,E,S,"_h"),d(t),r.call(this);try{t(s(Y,this,1),s(D,this,1))}catch(e){D.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("5c95")(E.prototype,{then:function(t,e){var n=j(y(this,E));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=T?k.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=s(Y,t,1),this.reject=s(D,t,1)},m.f=j=function(t){return t===E||t===c?new i(t):o(t)}),l(l.G+l.W+l.F*!A,{Promise:E}),n("45f2")(E,S),n("4c95")(S),c=n("584a")[S],l(l.S+l.F*!A,S,{reject:function(t){var e=j(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(a||!A),S,{resolve:function(t){return _(a&&this===c?E:this,t)}}),l(l.S+l.F*!(A&&n("4ee1")((function(t){E.all(t)["catch"](P)}))),S,{all:function(t){var e=this,n=j(e),r=n.resolve,o=n.reject,i=x((function(){var n=[],i=0,c=1;v(t,!1,(function(t){var a=i++,u=!1;n.push(void 0),c++,e.resolve(t).then((function(t){u||(u=!0,n[a]=t,--c||r(n))}),o)})),--c||r(n)}));return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=j(e),r=n.reject,o=x((function(){v(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},"25eb":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"27ee":function(t,e,n){var r=n("23c6"),o=n("2b4c")("iterator"),i=n("84f2");t.exports=n("8378").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},"294c":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"2aba":function(t,e,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),c=n("ca5a")("src"),a=n("fa5b"),u="toString",s=(""+a).split(u);n("8378").inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(u&&(i(n,c)||o(n,c,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,u,(function(){return"function"==typeof this&&this[c]||a.call(this)}))},"2aeb":function(t,e,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),c=n("613b")("IE_PROTO"),a=function(){},u="prototype",s=function(){var t,e=n("230e")("iframe"),r=i.length,o="<",c=">";e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+c+"document.F=Object"+o+"/script"+c),t.close(),s=t.F;while(r--)delete s[u][i[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[u]=r(t),n=new a,a[u]=null,n[c]=t):n=s(),void 0===e?n:o(n,e)}},"2b4c":function(t,e,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,c="function"==typeof i,a=t.exports=function(t){return r[t]||(r[t]=c&&i[t]||(c?i:o)("Symbol."+t))};a.store=r},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2fdb":function(t,e,n){"use strict";var r=n("5ca1"),o=n("d2c8"),i="includes";r(r.P+r.F*n("5147")(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},3024:function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},"30f1":function(t,e,n){"use strict";var r=n("b8e3"),o=n("63b6"),i=n("9138"),c=n("35e8"),a=n("481b"),u=n("8f60"),s=n("45f2"),f=n("53e2"),l=n("5168")("iterator"),h=!([].keys&&"next"in[].keys()),d="@@iterator",p="keys",v="values",y=function(){return this};t.exports=function(t,e,n,g,b,m,x){u(n,e,g);var w,_,S,C=function(t){if(!h&&t in E)return E[t];switch(t){case p:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},k=e+" Iterator",O=b==v,N=!1,E=t.prototype,T=E[l]||E[d]||b&&E[b],P=T||C(b),j=b?O?C("entries"):P:void 0,A="Array"==e&&E.entries||T;if(A&&(S=f(A.call(new t)),S!==Object.prototype&&S.next&&(s(S,k,!0),r||"function"==typeof S[l]||c(S,l,y))),O&&T&&T.name!==v&&(N=!0,P=function(){return T.call(this)}),r&&!x||!h&&!N&&E[l]||c(E,l,P),a[e]=P,a[k]=y,b)if(w={values:O?P:C(v),keys:m?P:C(p),entries:j},x)for(_ in w)_ in E||i(E,_,w[_]);else o(o.P+o.F*(h||N),e,w);return w}},"31f4":function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},"32e9":function(t,e,n){var r=n("86cc"),o=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"32fc":function(t,e,n){var r=n("e53d").document;t.exports=r&&r.documentElement},"335c":function(t,e,n){var r=n("6b4c");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"33a4":function(t,e,n){var r=n("84f2"),o=n("2b4c")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},"355d":function(t,e){e.f={}.propertyIsEnumerable},"35e8":function(t,e,n){var r=n("d9f6"),o=n("aebd");t.exports=n("8e60")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"369f":function(t,e,n){"use strict";var r=n("50c4"),o=n.n(r);o.a},"36c3":function(t,e,n){var r=n("335c"),o=n("25eb");t.exports=function(t){return r(o(t))}},3702:function(t,e,n){var r=n("481b"),o=n("5168")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},"37c8":function(t,e,n){e.f=n("2b4c")},"38fd":function(t,e,n){var r=n("69a8"),o=n("4bf8"),i=n("613b")("IE_PROTO"),c=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},"3a38":function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"3a72":function(t,e,n){var r=n("7726"),o=n("8378"),i=n("2d00"),c=n("37c8"),a=n("86cc").f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:c.f(t)})}},"3c11":function(t,e,n){"use strict";var r=n("63b6"),o=n("584a"),i=n("e53d"),c=n("f201"),a=n("cd78");r(r.P+r.R,"Promise",{finally:function(t){var e=c(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return a(e,t()).then((function(){return n}))}:t,n?function(n){return a(e,t()).then((function(){throw n}))}:t)}})},"40c3":function(t,e,n){var r=n("6b4c"),o=n("5168")("toStringTag"),i="Arguments"==r(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=c(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},4178:function(t,e,n){var r,o,i,c=n("d864"),a=n("3024"),u=n("32fc"),s=n("1ec9"),f=n("e53d"),l=f.process,h=f.setImmediate,d=f.clearImmediate,p=f.MessageChannel,v=f.Dispatch,y=0,g={},b="onreadystatechange",m=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},x=function(t){m.call(t.data)};h&&d||(h=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return g[++y]=function(){a("function"==typeof t?t:Function(t),e)},r(y),y},d=function(t){delete g[t]},"process"==n("6b4c")(l)?r=function(t){l.nextTick(c(m,t,1))}:v&&v.now?r=function(t){v.now(c(m,t,1))}:p?(o=new p,i=o.port2,o.port1.onmessage=x,r=c(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",x,!1)):r=b in s("script")?function(t){u.appendChild(s("script"))[b]=function(){u.removeChild(this),m.call(t)}}:function(t){setTimeout(c(m,t,1),0)}),t.exports={set:h,clear:d}},"41a0":function(t,e,n){"use strict";var r=n("2aeb"),o=n("4630"),i=n("7f20"),c={};n("32e9")(c,n("2b4c")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(c,{next:o(1,n)}),i(t,e+" Iterator")}},"43fc":function(t,e,n){"use strict";var r=n("63b6"),o=n("656e"),i=n("4439");r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},4439:function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"45f2":function(t,e,n){var r=n("d9f6").f,o=n("07e3"),i=n("5168")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"47ee":function(t,e,n){var r=n("c3a1"),o=n("9aa9"),i=n("355d");t.exports=function(t){var e=r(t),n=o.f;if(n){var c,a=n(t),u=i.f,s=0;while(a.length>s)u.call(t,c=a[s++])&&e.push(c)}return e}},"481b":function(t,e){t.exports={}},"499e":function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},o=0;on.parts.length&&(r.parts.length=n.parts.length)}else{var c=[];for(o=0;om;m++)if(y=e?b(c(p=t[m])[0],p[1]):b(t[m]),y===s||y===f)return y}else for(v=g.call(t);!(p=v.next()).done;)if(y=o(v,b,p.value,e),y===s||y===f)return y};e.BREAK=s,e.RETURN=f},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},"4c95":function(t,e,n){"use strict";var r=n("e53d"),o=n("584a"),i=n("d9f6"),c=n("8e60"),a=n("5168")("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:r[t];c&&e&&!e[a]&&i.f(e,a,{configurable:!0,get:function(){return this}})}},"4ee1":function(t,e,n){var r=n("5168")("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(c){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(c){}return n}},"50c4":function(t,e,n){var r=n("1aaf");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("499e").default;o("3d8912d2",r,!0,{sourceMap:!1,shadowMode:!1})},"50ed":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},5147:function(t,e,n){var r=n("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(o){}}return!0}},5168:function(t,e,n){var r=n("dbdb")("wks"),o=n("62a0"),i=n("e53d").Symbol,c="function"==typeof i,a=t.exports=function(t){return r[t]||(r[t]=c&&i[t]||(c?i:o)("Symbol."+t))};a.store=r},"520a":function(t,e,n){"use strict";var r=n("0bfb"),o=RegExp.prototype.exec,i=String.prototype.replace,c=o,a="lastIndex",u=function(){var t=/a/,e=/b*/g;return o.call(t,"a"),o.call(e,"a"),0!==t[a]||0!==e[a]}(),s=void 0!==/()??/.exec("")[1],f=u||s;f&&(c=function(t){var e,n,c,f,l=this;return s&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),u&&(e=l[a]),c=o.call(l,t),u&&c&&(l[a]=l.global?c.index+c[0].length:e),s&&c&&c.length>1&&i.call(c[0],n,(function(){for(f=1;f1?arguments[1]:void 0,y=void 0!==v,g=0,b=f(h);if(y&&(v=r(v,p>2?arguments[2]:void 0,2)),void 0==b||d==Array&&a(b))for(e=u(h.length),n=new d(e);e>g;g++)s(n,g,y?v(h[g],g):h[g]);else for(l=b.call(h),n=new d;!(o=l.next()).done;g++)s(n,g,y?c(l,v,[o.value,g],!0):o.value);return n.length=g,n}})},"54a1":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("95d5")},"551c":function(t,e,n){"use strict";var r,o,i,c,a=n("2d00"),u=n("7726"),s=n("9b43"),f=n("23c6"),l=n("5ca1"),h=n("d3f4"),d=n("d8e8"),p=n("f605"),v=n("4a59"),y=n("ebd6"),g=n("1991").set,b=n("8079")(),m=n("a5b8"),x=n("9c80"),w=n("a25f"),_=n("bcaa"),S="Promise",C=u.TypeError,k=u.process,O=k&&k.versions,N=O&&O.v8||"",E=u[S],T="process"==f(k),P=function(){},j=o=m.f,A=!!function(){try{var t=E.resolve(1),e=(t.constructor={})[n("2b4c")("species")]=function(t){t(P,P)};return(T||"function"==typeof PromiseRejectionEvent)&&t.then(P)instanceof e&&0!==N.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(r){}}(),M=function(t){var e;return!(!h(t)||"function"!=typeof(e=t.then))&&e},L=function(t,e){if(!t._n){t._n=!0;var n=t._c;b((function(){var r=t._v,o=1==t._s,i=0,c=function(e){var n,i,c,a=o?e.ok:e.fail,u=e.resolve,s=e.reject,f=e.domain;try{a?(o||(2==t._h&&F(t),t._h=1),!0===a?n=r:(f&&f.enter(),n=a(r),f&&(f.exit(),c=!0)),n===e.promise?s(C("Promise-chain cycle")):(i=M(n))?i.call(n,u,s):u(n)):s(r)}catch(l){f&&!c&&f.exit(),s(l)}};while(n.length>i)c(n[i++]);t._c=[],t._n=!1,e&&!t._h&&I(t)}))}},I=function(t){g.call(u,(function(){var e,n,r,o=t._v,i=R(t);if(i&&(e=x((function(){T?k.emit("unhandledRejection",o,t):(n=u.onunhandledrejection)?n({promise:t,reason:o}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",o)})),t._h=T||R(t)?2:1),t._a=void 0,i&&e.e)throw e.v}))},R=function(t){return 1!==t._h&&0===(t._a||t._c).length},F=function(t){g.call(u,(function(){var e;T?k.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})}))},D=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),L(e,!0))},Y=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw C("Promise can't be resolved itself");(e=M(t))?b((function(){var r={_w:n,_d:!1};try{e.call(t,s(Y,r,1),s(D,r,1))}catch(o){D.call(r,o)}})):(n._v=t,n._s=1,L(n,!1))}catch(r){D.call({_w:n,_d:!1},r)}}};A||(E=function(t){p(this,E,S,"_h"),d(t),r.call(this);try{t(s(Y,this,1),s(D,this,1))}catch(e){D.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("dcbc")(E.prototype,{then:function(t,e){var n=j(y(this,E));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=T?k.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=s(Y,t,1),this.reject=s(D,t,1)},m.f=j=function(t){return t===E||t===c?new i(t):o(t)}),l(l.G+l.W+l.F*!A,{Promise:E}),n("7f20")(E,S),n("7a56")(S),c=n("8378")[S],l(l.S+l.F*!A,S,{reject:function(t){var e=j(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(a||!A),S,{resolve:function(t){return _(a&&this===c?E:this,t)}}),l(l.S+l.F*!(A&&n("5cc5")((function(t){E.all(t)["catch"](P)}))),S,{all:function(t){var e=this,n=j(e),r=n.resolve,o=n.reject,i=x((function(){var n=[],i=0,c=1;v(t,!1,(function(t){var a=i++,u=!1;n.push(void 0),c++,e.resolve(t).then((function(t){u||(u=!0,n[a]=t,--c||r(n))}),o)})),--c||r(n)}));return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=j(e),r=n.reject,o=x((function(){v(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},5537:function(t,e,n){var r=n("8378"),o=n("7726"),i="__core-js_shared__",c=o[i]||(o[i]={});(t.exports=function(t,e){return c[t]||(c[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(t,e,n){var r=n("dbdb")("keys"),o=n("62a0");t.exports=function(t){return r[t]||(r[t]=o(t))}},"584a":function(t,e){var n=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},"5b4e":function(t,e,n){var r=n("36c3"),o=n("b447"),i=n("0fc9");t.exports=function(t){return function(e,n,c){var a,u=r(e),s=o(u.length),f=i(c,s);if(t&&n!=n){while(s>f)if(a=u[f++],a!=a)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},"5c95":function(t,e,n){var r=n("35e8");t.exports=function(t,e,n){for(var o in e)n&&t[o]?t[o]=e[o]:r(t,o,e[o]);return t}},"5ca1":function(t,e,n){var r=n("7726"),o=n("8378"),i=n("32e9"),c=n("2aba"),a=n("9b43"),u="prototype",s=function(t,e,n){var f,l,h,d,p=t&s.F,v=t&s.G,y=t&s.S,g=t&s.P,b=t&s.B,m=v?r:y?r[e]||(r[e]={}):(r[e]||{})[u],x=v?o:o[e]||(o[e]={}),w=x[u]||(x[u]={});for(f in v&&(n=e),n)l=!p&&m&&void 0!==m[f],h=(l?m:n)[f],d=b&&l?a(h,r):g&&"function"==typeof h?a(Function.call,h):h,m&&c(m,f,h,t&s.U),x[f]!=h&&i(x,f,d),g&&w[f]!=h&&(w[f]=h)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},"5cc5":function(t,e,n){var r=n("2b4c")("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(c){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(c){}return n}},"5d58":function(t,e,n){t.exports=n("d8d6")},"5dbc":function(t,e,n){var r=n("d3f4"),o=n("8b97").set;t.exports=function(t,e,n){var i,c=e.constructor;return c!==n&&"function"==typeof c&&(i=c.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},"5df3":function(t,e,n){"use strict";var r=n("02f4")(!0);n("01f9")(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},"5f1b":function(t,e,n){"use strict";var r=n("23c6"),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var i=n.call(t,e);if("object"!==typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},"613b":function(t,e,n){var r=n("5537")("keys"),o=n("ca5a");t.exports=function(t){return r[t]||(r[t]=o(t))}},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"62a0":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},"63b6":function(t,e,n){var r=n("e53d"),o=n("584a"),i=n("d864"),c=n("35e8"),a=n("07e3"),u="prototype",s=function(t,e,n){var f,l,h,d=t&s.F,p=t&s.G,v=t&s.S,y=t&s.P,g=t&s.B,b=t&s.W,m=p?o:o[e]||(o[e]={}),x=m[u],w=p?r:v?r[e]:(r[e]||{})[u];for(f in p&&(n=e),n)l=!d&&w&&void 0!==w[f],l&&a(m,f)||(h=l?w[f]:n[f],m[f]=p&&"function"!=typeof w[f]?n[f]:g&&l?i(h,r):b&&w[f]==h?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[u]=t[u],e}(h):y&&"function"==typeof h?i(Function.call,h):h,y&&((m.virtual||(m.virtual={}))[f]=h,t&s.R&&x&&!x[f]&&c(x,f,h)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},"656e":function(t,e,n){"use strict";var r=n("79aa");function o(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},6718:function(t,e,n){var r=n("e53d"),o=n("584a"),i=n("b8e3"),c=n("ccb9"),a=n("d9f6").f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:c.f(t)})}},6762:function(t,e,n){"use strict";var r=n("5ca1"),o=n("c366")(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},"67ab":function(t,e,n){var r=n("ca5a")("meta"),o=n("d3f4"),i=n("69a8"),c=n("86cc").f,a=0,u=Object.isExtensible||function(){return!0},s=!n("79e5")((function(){return u(Object.preventExtensions({}))})),f=function(t){c(t,r,{value:{i:"O"+ ++a,w:{}}})},l=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!u(t))return"F";if(!e)return"E";f(t)}return t[r].i},h=function(t,e){if(!i(t,r)){if(!u(t))return!0;if(!e)return!1;f(t)}return t[r].w},d=function(t){return s&&p.NEED&&u(t)&&!i(t,r)&&f(t),t},p=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:h,onFreeze:d}},"67bb":function(t,e,n){t.exports=n("f921")},6821:function(t,e,n){var r=n("626a"),o=n("be13");t.exports=function(t){return r(o(t))}},"696e":function(t,e,n){n("c207"),n("1654"),n("6c1c"),n("24c5"),n("3c11"),n("43fc"),t.exports=n("584a").Promise},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"69d3":function(t,e,n){n("6718")("asyncIterator")},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"6abf":function(t,e,n){var r=n("e6f3"),o=n("1691").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},"6b4c":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"6c1c":function(t,e,n){n("c367");for(var r=n("e53d"),o=n("35e8"),i=n("481b"),c=n("5168")("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u=s?t?"":void 0:(i=a.charCodeAt(u),i<55296||i>56319||u+1===s||(c=a.charCodeAt(u+1))<56320||c>57343?t?a.charAt(u):i:t?a.slice(u,u+2):c-56320+(i-55296<<10)+65536)}}},7333:function(t,e,n){"use strict";var r=n("9e1e"),o=n("0d58"),i=n("2621"),c=n("52a7"),a=n("4bf8"),u=n("626a"),s=Object.assign;t.exports=!s||n("79e5")((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r}))?function(t,e){var n=a(t),s=arguments.length,f=1,l=i.f,h=c.f;while(s>f){var d,p=u(arguments[f++]),v=l?o(p).concat(l(p)):o(p),y=v.length,g=0;while(y>g)d=v[g++],r&&!h.call(p,d)||(n[d]=p[d])}return n}:s},7514:function(t,e,n){"use strict";var r=n("5ca1"),o=n("0a49")(5),i="find",c=!0;i in[]&&Array(1)[i]((function(){c=!1})),r(r.P+r.F*c,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")(i)},"765d":function(t,e,n){n("6718")("observable")},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"774e":function(t,e,n){t.exports=n("d2d5")},"77f1":function(t,e,n){var r=n("4588"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},"794b":function(t,e,n){t.exports=!n("8e60")&&!n("294c")((function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a}))},"795b":function(t,e,n){t.exports=n("696e")},"79aa":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7a56":function(t,e,n){"use strict";var r=n("7726"),o=n("86cc"),i=n("9e1e"),c=n("2b4c")("species");t.exports=function(t){var e=r[t];i&&e&&!e[c]&&o.f(e,c,{configurable:!0,get:function(){return this}})}},"7bbc":function(t,e,n){var r=n("6821"),o=n("9093").f,i={}.toString,c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(e){return c.slice()}};t.exports.f=function(t){return c&&"[object Window]"==i.call(t)?a(t):o(r(t))}},"7cd6":function(t,e,n){var r=n("40c3"),o=n("5168")("iterator"),i=n("481b");t.exports=n("584a").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},"7e90":function(t,e,n){var r=n("d9f6"),o=n("e4ae"),i=n("c3a1");t.exports=n("8e60")?Object.defineProperties:function(t,e){o(t);var n,c=i(e),a=c.length,u=0;while(a>u)r.f(t,n=c[u++],e[n]);return t}},"7f20":function(t,e,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},"7f7f":function(t,e,n){var r=n("86cc").f,o=Function.prototype,i=/^\s*function ([^ (]*)/,c="name";c in o||n("9e1e")&&r(o,c,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},8079:function(t,e,n){var r=n("7726"),o=n("1991").set,i=r.MutationObserver||r.WebKitMutationObserver,c=r.process,a=r.Promise,u="process"==n("2d95")(c);t.exports=function(){var t,e,n,s=function(){var r,o;u&&(r=c.domain)&&r.exit();while(t){o=t.fn,t=t.next;try{o()}catch(i){throw t?n():e=void 0,i}}e=void 0,r&&r.enter()};if(u)n=function(){c.nextTick(s)};else if(!i||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var f=a.resolve(void 0);n=function(){f.then(s)}}else n=function(){o.call(r,s)};else{var l=!0,h=document.createTextNode("");new i(s).observe(h,{characterData:!0}),n=function(){h.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},8378:function(t,e){var n=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},8436:function(t,e){t.exports=function(){}},"84b4":function(t,e,n){var r=n("5ca1");r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},"84f2":function(t,e){t.exports={}},"86cc":function(t,e,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),c=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return c(t,e,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"8a81":function(t,e,n){"use strict";var r=n("7726"),o=n("69a8"),i=n("9e1e"),c=n("5ca1"),a=n("2aba"),u=n("67ab").KEY,s=n("79e5"),f=n("5537"),l=n("7f20"),h=n("ca5a"),d=n("2b4c"),p=n("37c8"),v=n("3a72"),y=n("d4c0"),g=n("1169"),b=n("cb7c"),m=n("d3f4"),x=n("4bf8"),w=n("6821"),_=n("6a99"),S=n("4630"),C=n("2aeb"),k=n("7bbc"),O=n("11e9"),N=n("2621"),E=n("86cc"),T=n("0d58"),P=O.f,j=E.f,A=k.f,M=r.Symbol,L=r.JSON,I=L&&L.stringify,R="prototype",F=d("_hidden"),D=d("toPrimitive"),Y={}.propertyIsEnumerable,B=f("symbol-registry"),G=f("symbols"),X=f("op-symbols"),$=Object[R],U="function"==typeof M&&!!N.f,V=r.QObject,q=!V||!V[R]||!V[R].findChild,z=i&&s((function(){return 7!=C(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=P($,e);r&&delete $[e],j(t,e,n),r&&t!==$&&j($,e,r)}:j,W=function(t){var e=G[t]=C(M[R]);return e._k=t,e},H=U&&"symbol"==typeof M.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof M},K=function(t,e,n){return t===$&&K(X,e,n),b(t),e=_(e,!0),b(n),o(G,e)?(n.enumerable?(o(t,F)&&t[F][e]&&(t[F][e]=!1),n=C(n,{enumerable:S(0,!1)})):(o(t,F)||j(t,F,S(1,{})),t[F][e]=!0),z(t,e,n)):j(t,e,n)},J=function(t,e){b(t);var n,r=y(e=w(e)),o=0,i=r.length;while(i>o)K(t,n=r[o++],e[n]);return t},Q=function(t,e){return void 0===e?C(t):J(C(t),e)},Z=function(t){var e=Y.call(this,t=_(t,!0));return!(this===$&&o(G,t)&&!o(X,t))&&(!(e||!o(this,t)||!o(G,t)||o(this,F)&&this[F][t])||e)},tt=function(t,e){if(t=w(t),e=_(e,!0),t!==$||!o(G,e)||o(X,e)){var n=P(t,e);return!n||!o(G,e)||o(t,F)&&t[F][e]||(n.enumerable=!0),n}},et=function(t){var e,n=A(w(t)),r=[],i=0;while(n.length>i)o(G,e=n[i++])||e==F||e==u||r.push(e);return r},nt=function(t){var e,n=t===$,r=A(n?X:w(t)),i=[],c=0;while(r.length>c)!o(G,e=r[c++])||n&&!o($,e)||i.push(G[e]);return i};U||(M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===$&&e.call(X,n),o(this,F)&&o(this[F],t)&&(this[F][t]=!1),z(this,t,S(1,n))};return i&&q&&z($,t,{configurable:!0,set:e}),W(t)},a(M[R],"toString",(function(){return this._k})),O.f=tt,E.f=K,n("9093").f=k.f=et,n("52a7").f=Z,N.f=nt,i&&!n("2d00")&&a($,"propertyIsEnumerable",Z,!0),p.f=function(t){return W(d(t))}),c(c.G+c.W+c.F*!U,{Symbol:M});for(var rt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ot=0;rt.length>ot;)d(rt[ot++]);for(var it=T(d.store),ct=0;it.length>ct;)v(it[ct++]);c(c.S+c.F*!U,"Symbol",{for:function(t){return o(B,t+="")?B[t]:B[t]=M(t)},keyFor:function(t){if(!H(t))throw TypeError(t+" is not a symbol!");for(var e in B)if(B[e]===t)return e},useSetter:function(){q=!0},useSimple:function(){q=!1}}),c(c.S+c.F*!U,"Object",{create:Q,defineProperty:K,defineProperties:J,getOwnPropertyDescriptor:tt,getOwnPropertyNames:et,getOwnPropertySymbols:nt});var at=s((function(){N.f(1)}));c(c.S+c.F*at,"Object",{getOwnPropertySymbols:function(t){return N.f(x(t))}}),L&&c(c.S+c.F*(!U||s((function(){var t=M();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))}))),"JSON",{stringify:function(t){var e,n,r=[t],o=1;while(arguments.length>o)r.push(arguments[o++]);if(n=e=r[1],(m(e)||void 0!==t)&&!H(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!H(e))return e}),r[1]=e,I.apply(L,r)}}),M[R][D]||n("32e9")(M[R],D,M[R].valueOf),l(M,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},"8b97":function(t,e,n){var r=n("d3f4"),o=n("cb7c"),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(o){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},"8e60":function(t,e,n){t.exports=!n("294c")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},"8f60":function(t,e,n){"use strict";var r=n("a159"),o=n("aebd"),i=n("45f2"),c={};n("35e8")(c,n("5168")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(c,{next:o(1,n)}),i(t,e+" Iterator")}},9003:function(t,e,n){var r=n("6b4c");t.exports=Array.isArray||function(t){return"Array"==r(t)}},9093:function(t,e,n){var r=n("ce10"),o=n("e11e").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},9138:function(t,e,n){t.exports=n("35e8")},"95d5":function(t,e,n){var r=n("40c3"),o=n("5168")("iterator"),i=n("481b");t.exports=n("584a").isIterable=function(t){var e=Object(t);return void 0!==e[o]||"@@iterator"in e||i.hasOwnProperty(r(e))}},"96cf":function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(t,e,n,r){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),c=new E(r||[]);return i._invoke=C(t,n,c),i}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(r){return{type:"throw",arg:r}}}t.wrap=u;var f="suspendedStart",l="suspendedYield",h="executing",d="completed",p={};function v(){}function y(){}function g(){}var b={};b[i]=function(){return this};var m=Object.getPrototypeOf,x=m&&m(m(T([])));x&&x!==n&&r.call(x,i)&&(b=x);var w=g.prototype=v.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function S(t){function e(n,o,i,c){var a=s(t[n],t,o);if("throw"!==a.type){var u=a.arg,f=u.value;return f&&"object"===typeof f&&r.call(f,"__await")?Promise.resolve(f.__await).then((function(t){e("next",t,i,c)}),(function(t){e("throw",t,i,c)})):Promise.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return e("throw",t,i,c)}))}c(a.arg)}var n;function o(t,r){function o(){return new Promise((function(n,o){e(t,r,n,o)}))}return n=n?n.then(o,o):o()}this._invoke=o}function C(t,e,n){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return P()}n.method=o,n.arg=i;while(1){var c=n.delegate;if(c){var a=k(c,n);if(a){if(a===p)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=s(t,e,n);if("normal"===u.type){if(r=n.done?d:l,u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}function k(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator["return"]&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=s(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,p;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(t){if(t){var n=t[i];if(n)return n.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,c=function n(){while(++o=0;--i){var c=this.tryEntries[i],a=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var u=r.call(c,"catchLoc"),s=r.call(c,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=r}catch(o){Function("r","regeneratorRuntime = r")(r)}},"9aa9":function(t,e){e.f=Object.getOwnPropertySymbols},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[r]&&n("32e9")(o,r,{}),t.exports=function(t){o[r][t]=!0}},"9c80":function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},"9def":function(t,e,n){var r=n("4588"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a159:function(t,e,n){var r=n("e4ae"),o=n("7e90"),i=n("1691"),c=n("5559")("IE_PROTO"),a=function(){},u="prototype",s=function(){var t,e=n("1ec9")("iframe"),r=i.length,o="<",c=">";e.style.display="none",n("32fc").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+c+"document.F=Object"+o+"/script"+c),t.close(),s=t.F;while(r--)delete s[u][i[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[u]=r(t),n=new a,a[u]=null,n[c]=t):n=s(),void 0===e?n:o(n,e)}},a22a:function(t,e,n){var r=n("d864"),o=n("b0dc"),i=n("3702"),c=n("e4ae"),a=n("b447"),u=n("7cd6"),s={},f={};e=t.exports=function(t,e,n,l,h){var d,p,v,y,g=h?function(){return t}:u(t),b=r(n,l,e?2:1),m=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(d=a(t.length);d>m;m++)if(y=e?b(c(p=t[m])[0],p[1]):b(t[m]),y===s||y===f)return y}else for(v=g.call(t);!(p=v.next()).done;)if(y=o(v,b,p.value,e),y===s||y===f)return y};e.BREAK=s,e.RETURN=f},a25f:function(t,e,n){var r=n("7726"),o=r.navigator;t.exports=o&&o.userAgent||""},a481:function(t,e,n){"use strict";var r=n("cb7c"),o=n("4bf8"),i=n("9def"),c=n("4588"),a=n("0390"),u=n("5f1b"),s=Math.max,f=Math.min,l=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g,p=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,(function(t,e,n,v){return[function(r,o){var i=t(this),c=void 0==r?void 0:r[e];return void 0!==c?c.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=v(n,t,this,e);if(o.done)return o.value;var l=r(t),h=String(this),d="function"===typeof e;d||(e=String(e));var g=l.global;if(g){var b=l.unicode;l.lastIndex=0}var m=[];while(1){var x=u(l,h);if(null===x)break;if(m.push(x),!g)break;var w=String(x[0]);""===w&&(l.lastIndex=a(h,i(l.lastIndex),b))}for(var _="",S=0,C=0;C=S&&(_+=h.slice(S,O)+j,S=O+k.length)}return _+h.slice(S)}];function y(t,e,r,i,c,a){var u=r+t.length,s=i.length,f=d;return void 0!==c&&(c=o(c),f=h),n.call(a,f,(function(n,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(u);case"<":a=c[o.slice(1,-1)];break;default:var f=+o;if(0===f)return n;if(f>s){var h=l(f/10);return 0===h?n:h<=s?void 0===i[h-1]?o.charAt(1):i[h-1]+o.charAt(1):n}a=i[f-1]}return void 0===a?"":a}))}}))},a5b8:function(t,e,n){"use strict";var r=n("d8e8");function o(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},a745:function(t,e,n){t.exports=n("f410")},aa77:function(t,e,n){var r=n("5ca1"),o=n("be13"),i=n("79e5"),c=n("fdef"),a="["+c+"]",u="​…",s=RegExp("^"+a+a+"*"),f=RegExp(a+a+"*$"),l=function(t,e,n){var o={},a=i((function(){return!!c[t]()||u[t]()!=u})),s=o[t]=a?e(h):c[t];n&&(o[n]=s),r(r.P+r.F*a,"String",o)},h=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(s,"")),2&e&&(t=t.replace(f,"")),t};t.exports=l},aae3:function(t,e,n){var r=n("d3f4"),o=n("2d95"),i=n("2b4c")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},aba2:function(t,e,n){var r=n("e53d"),o=n("4178").set,i=r.MutationObserver||r.WebKitMutationObserver,c=r.process,a=r.Promise,u="process"==n("6b4c")(c);t.exports=function(){var t,e,n,s=function(){var r,o;u&&(r=c.domain)&&r.exit();while(t){o=t.fn,t=t.next;try{o()}catch(i){throw t?n():e=void 0,i}}e=void 0,r&&r.enter()};if(u)n=function(){c.nextTick(s)};else if(!i||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var f=a.resolve(void 0);n=function(){f.then(s)}}else n=function(){o.call(r,s)};else{var l=!0,h=document.createTextNode("");new i(s).observe(h,{characterData:!0}),n=function(){h.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},ac4d:function(t,e,n){n("3a72")("asyncIterator")},ac6a:function(t,e,n){for(var r=n("cadf"),o=n("0d58"),i=n("2aba"),c=n("7726"),a=n("32e9"),u=n("84f2"),s=n("2b4c"),f=s("iterator"),l=s("toStringTag"),h=u.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=o(d),v=0;v0?o(r(t),9007199254740991):0}},b8e3:function(t,e){t.exports=!0},bc13:function(t,e,n){var r=n("e53d"),o=r.navigator;t.exports=o&&o.userAgent||""},bcaa:function(t,e,n){var r=n("cb7c"),o=n("d3f4"),i=n("a5b8");t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),c=n.resolve;return c(e),n.promise}},be13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},bf0b:function(t,e,n){var r=n("355d"),o=n("aebd"),i=n("36c3"),c=n("1bc3"),a=n("07e3"),u=n("794b"),s=Object.getOwnPropertyDescriptor;e.f=n("8e60")?s:function(t,e){if(t=i(t),e=c(e,!0),u)try{return s(t,e)}catch(n){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},c207:function(t,e){},c366:function(t,e,n){var r=n("6821"),o=n("9def"),i=n("77f1");t.exports=function(t){return function(e,n,c){var a,u=r(e),s=o(u.length),f=i(c,s);if(t&&n!=n){while(s>f)if(a=u[f++],a!=a)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},c367:function(t,e,n){"use strict";var r=n("8436"),o=n("50ed"),i=n("481b"),c=n("36c3");t.exports=n("30f1")(Array,"Array",(function(t,e){this._t=c(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},c3a1:function(t,e,n){var r=n("e6f3"),o=n("1691");t.exports=Object.keys||function(t){return r(t,o)}},c5f6:function(t,e,n){"use strict";var r=n("7726"),o=n("69a8"),i=n("2d95"),c=n("5dbc"),a=n("6a99"),u=n("79e5"),s=n("9093").f,f=n("11e9").f,l=n("86cc").f,h=n("aa77").trim,d="Number",p=r[d],v=p,y=p.prototype,g=i(n("2aeb")(y))==d,b="trim"in String.prototype,m=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){e=b?e.trim():h(e,3);var n,r,o,i=e.charCodeAt(0);if(43===i||45===i){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var c,u=e.slice(2),s=0,f=u.length;so)return NaN;return parseInt(u,r)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(g?u((function(){y.valueOf.call(n)})):i(n)!=d)?c(new v(m(e)),n,p):m(e)};for(var x,w=n("9e1e")?s(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;w.length>_;_++)o(v,x=w[_])&&!o(p,x)&&l(p,x,f(v,x));p.prototype=y,y.constructor=p,n("2aba")(r,d,p)}},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},c7c6:function(t,e,n){var r=n("5ca1"),o=Math.abs;r(r.S,"Math",{hypot:function(t,e){var n,r,i=0,c=0,a=arguments.length,u=0;while(c0?(r=n/u,i+=r*r):i+=n;return u===1/0?1/0:u*Math.sqrt(i)}})},c8bb:function(t,e,n){t.exports=n("54a1")},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),o=n("d53b"),i=n("84f2"),c=n("6821");t.exports=n("01f9")(Array,"Array",(function(t,e){this._t=c(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ccb9:function(t,e,n){e.f=n("5168")},cd1c:function(t,e,n){var r=n("e853");t.exports=function(t,e){return new(r(t))(e)}},cd78:function(t,e,n){var r=n("e4ae"),o=n("f772"),i=n("656e");t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),c=n.resolve;return c(e),n.promise}},ce10:function(t,e,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),c=n("613b")("IE_PROTO");t.exports=function(t,e){var n,a=o(t),u=0,s=[];for(n in a)n!=c&&r(a,n)&&s.push(n);while(e.length>u)r(a,n=e[u++])&&(~i(s,n)||s.push(n));return s}},d2c8:function(t,e,n){var r=n("aae3"),o=n("be13");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},d2d5:function(t,e,n){n("1654"),n("549b"),t.exports=n("584a").Array.from},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d4c0:function(t,e,n){var r=n("0d58"),o=n("2621"),i=n("52a7");t.exports=function(t){var e=r(t),n=o.f;if(n){var c,a=n(t),u=i.f,s=0;while(a.length>s)u.call(t,c=a[s++])&&e.push(c)}return e}},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d864:function(t,e,n){var r=n("79aa");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},d8d6:function(t,e,n){n("1654"),n("6c1c"),t.exports=n("ccb9").f("iterator")},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},d9f6:function(t,e,n){var r=n("e4ae"),o=n("794b"),i=n("1bc3"),c=Object.defineProperty;e.f=n("8e60")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return c(t,e,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},dbdb:function(t,e,n){var r=n("584a"),o=n("e53d"),i="__core-js_shared__",c=o[i]||(o[i]={});(t.exports=function(t,e){return c[t]||(c[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("b8e3")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},dcbc:function(t,e,n){var r=n("2aba");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e4ae:function(t,e,n){var r=n("f772");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},e53d:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},e6f3:function(t,e,n){var r=n("07e3"),o=n("36c3"),i=n("5b4e")(!1),c=n("5559")("IE_PROTO");t.exports=function(t,e){var n,a=o(t),u=0,s=[];for(n in a)n!=c&&r(a,n)&&s.push(n);while(e.length>u)r(a,n=e[u++])&&(~i(s,n)||s.push(n));return s}},e853:function(t,e,n){var r=n("d3f4"),o=n("1169"),i=n("2b4c")("species");t.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&(e=e[i],null===e&&(e=void 0))),void 0===e?Array:e}},ebd6:function(t,e,n){var r=n("cb7c"),o=n("d8e8"),i=n("2b4c")("species");t.exports=function(t,e){var n,c=r(t).constructor;return void 0===c||void 0==(n=r(c)[i])?e:o(n)}},ebfd:function(t,e,n){var r=n("62a0")("meta"),o=n("f772"),i=n("07e3"),c=n("d9f6").f,a=0,u=Object.isExtensible||function(){return!0},s=!n("294c")((function(){return u(Object.preventExtensions({}))})),f=function(t){c(t,r,{value:{i:"O"+ ++a,w:{}}})},l=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!u(t))return"F";if(!e)return"E";f(t)}return t[r].i},h=function(t,e){if(!i(t,r)){if(!u(t))return!0;if(!e)return!1;f(t)}return t[r].w},d=function(t){return s&&p.NEED&&u(t)&&!i(t,r)&&f(t),t},p=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:h,onFreeze:d}},f1ae:function(t,e,n){"use strict";var r=n("86cc"),o=n("4630");t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},f201:function(t,e,n){var r=n("e4ae"),o=n("79aa"),i=n("5168")("species");t.exports=function(t,e){var n,c=r(t).constructor;return void 0===c||void 0==(n=r(c)[i])?e:o(n)}},f410:function(t,e,n){n("1af6"),t.exports=n("584a").Array.isArray},f605:function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},f6fd:function(t,e){(function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(r){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})})(document)},f751:function(t,e,n){var r=n("5ca1");r(r.S+r.F,"Object",{assign:n("7333")})},f772:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},f921:function(t,e,n){n("014b"),n("c207"),n("69d3"),n("765d"),t.exports=n("584a").Symbol},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fb15:function(t,e,n){"use strict";var r;(n.r(e),"undefined"!==typeof window)&&(n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));n("7f7f");var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{style:{width:isNaN(t.width)?t.width:t.width+"px",height:isNaN(t.height)?t.height:t.height+"px",cursor:t.cursor},attrs:{id:"chart",tabindex:"0"},on:{mousemove:t.handleChartMouseMove,mouseup:function(e){return t.handleChartMouseUp(e)},dblclick:function(e){return t.handleChartDblClick(e)},mousewheel:t.handleChartMouseWheel,mousedown:function(e){return t.handleChartMouseDown(e)}}},[n("span",{staticClass:"unselectable",attrs:{id:"position"}},[t._v("\n "+t._s(t.cursorToChartOffset.x+", "+t.cursorToChartOffset.y)+"\n ")]),n("svg",{attrs:{id:"svg"}},[n("rect",{staticClass:"selection",attrs:{height:"0",width:"0"}})]),n("div",{staticClass:"unselectable",attrs:{id:"chart-slot"}},[t._t("default")],2)])},i=[],c=n("5d58"),a=n.n(c),u=n("67bb"),s=n.n(u);function f(t){return f="function"===typeof s.a&&"symbol"===typeof a.a?function(t){return typeof t}:function(t){return t&&"function"===typeof s.a&&t.constructor===s.a&&t!==s.a.prototype?"symbol":typeof t},f(t)}function l(t){return l="function"===typeof s.a&&"symbol"===f(a.a)?function(t){return f(t)}:function(t){return t&&"function"===typeof s.a&&t.constructor===s.a&&t!==s.a.prototype?"symbol":f(t)},l(t)}n("c7c6"),n("f751");var h=n("a745"),d=n.n(h);function p(t){if(d()(t)){for(var e=0,n=new Array(t.length);et&&ne&&nt?e.x:t}),0),r=t.reduce((function(t,e){return e.yt?e.y:t}),0);return{start:{x:e,y:r},end:{x:n,y:o}}}function P(t,e){return t.x>e.start.x&&t.xe.start.y&&t.yr?"right":"left");var f,l=[],h=[e,n],d=[r,o],p=h[0]+(d[0]-h[0])/2,v=h[1]+(d[1]-h[1])/2,y=function(){var t=[p,f[1]],e=[p,C[1]];l.push(t),l.push(e)},g=function(){var t=[f[0],v],e=[C[0],v];l.push(t),l.push(e)},b=function(){l.push([f[0],h[1]-50]),l.push([C[0],h[1]-50])},m=function(){l.push([f[0],h[1]+50]),l.push([C[0],h[1]+50])},x=function(){l.push([h[0]+80,f[1]]),l.push([h[0]+80,C[1]])},w=function(){l.push([h[0]-80,f[1]]),l.push([h[0]-80,C[1]])},_=function(){l.push([f[0],C[1]])},S=function(){l.push([C[0],f[1]])};switch(i){case"left":f=[h[0]-20,h[1]];break;case"top":f=[h[0],h[1]-20];break;case"bottom":f=[h[0],h[1]+20];break;default:f=[h[0]+20,h[1]];break}var C=null;switch(c){case"right":C=[d[0]+20,d[1]];break;case"top":C=[d[0],d[1]-20];break;case"bottom":C=[d[0],d[1]+20];break;default:C=[d[0]-20,d[1]];break}l.push(h),l.push(f),i=i||"right",c=c||"left";var k=I(e,n,r,o);switch(k.indexOf("r")>-1&&("right"!==i&&"left"!==c||(f[0]>p&&(f[0]=p),C[0]-1&&("bottom"!==i&&"top"!==c||(f[1]>v&&(f[1]=v),C[1]-1&&("left"!==i&&"right"!==c||(f[0]p&&(C[0]=p))),k.indexOf("u")>-1&&("top"!==i&&"bottom"!==c||(f[1]v&&(C[1]=v))),k){case"lu":if("right"===i)switch(c){case"top":case"right":_();break;default:g();break}else if("bottom"===i)switch(c){case"top":y();break;default:S();break}else if("top"===i)switch(c){case"top":case"right":_();break;default:g();break}else switch(c){case"top":case"right":y();break;default:S();break}break;case"u":if("right"===i)switch(c){case"right":break;case"top":_();break;default:g();break}else if("bottom"===i)switch(c){case"left":case"right":S();break;default:x();break}else if("top"===i)switch(c){case"left":S();break;case"right":g();break;case"top":x();break;default:break}else switch(c){case"left":case"right":break;default:l.push([f[0],C[1]]);break}break;case"ru":if("right"===i)switch(c){case"left":y();break;case"top":_();break;default:S();break}else if("bottom"===i)switch(c){case"top":y();break;default:S();break}else if("top"===i)switch(c){case"right":y();break;default:_();break}else switch(c){case"left":case"top":_();break;default:g();break}break;case"l":if("right"===i)switch(c){case"left":case"right":case"top":b();break;default:m();break}else if("bottom"===i)switch(c){case"left":m();break;case"right":_();break;case"top":y();break;default:break}else if("top"===i)switch(c){case"left":b();break;case"right":_();break;case"top":break;default:y();break}else switch(c){case"left":b();break;case"right":break;default:_();break}break;case"r":if("right"===i)switch(c){case"left":break;case"right":b();break;default:_();break}else if("bottom"===i)switch(c){case"left":_();break;case"right":m();break;case"top":y();break;default:break}else if("top"===i)switch(c){case"left":S();break;case"right":b();break;case"top":break;default:y();break}else switch(c){case"left":case"right":case"top":b();break;default:m();break}break;case"ld":if("right"===i)switch(c){case"left":g();break;default:_();break}else if("bottom"===i)switch(c){case"left":S();break;case"top":g();break;default:_();break}else if("top"===i)switch(c){case"left":case"right":case"top":S();break;default:y();break}else switch(c){case"left":case"top":S();break;case"right":y();break;default:_();break}break;case"d":if("right"===i)switch(c){case"left":g();break;case"right":S();break;case"top":_();break;default:x();break}else if("bottom"===i)switch(c){case"left":case"right":S();break;case"top":break;default:x();break}else if("top"===i)switch(c){case"left":w();break;default:x();break}else switch(c){case"left":break;case"right":g();break;case"top":_();break;default:w();break}break;case"rd":"right"===i&&"left"===c?y():"right"===i&&"bottom"===c?_():"right"===i&&"top"===c||"right"===i&&"right"===c?S():"bottom"===i&&"left"===c?_():"bottom"===i&&"right"===c?S():"bottom"===i&&"top"===c?g():"bottom"===i&&"bottom"===c?_():"top"===i&&"left"===c||"top"===i&&"right"===c||"top"===i&&"top"===c?S():"top"===i&&"bottom"===c?y():"left"===i&&"left"===c?_():"left"===i&&"right"===c||"left"===i&&"top"===c?g():"left"===i&&"bottom"===c&&_();break}l.push(C),l.push(d);for(var O=[],N=[],E=0;Et&&E(r,e)?"r":E(n,t)&&re?"d":nt&&re?"ld":"rd"}var R={},F=null;if("undefined"!==typeof document){var D=document.documentElement;"onmouseenter"in D||(R={mouseenter:"mouseover",mouseleave:"mouseout"})}function Y(t,e,n){return t=B(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function B(t,e,n){return function(r){var o=F;F=r;try{t.call(this,this.__data__,e,n)}finally{F=o}}}function G(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function X(t){return function(){var e=this.__on;if(e){for(var n,r=0,o=-1,i=e.length;r=w&&(w=x+1);while(!(m=y[w])&&++w=0;)(r=o[i])&&(c&&4^r.compareDocumentPosition(c)&&c.parentNode.insertBefore(r,c),c=r);return this},ht=function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=dt);for(var n=this._groups,r=n.length,o=new Array(r),i=0;ie?1:t>=e?0:NaN}var pt=function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},vt=function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},yt=function(){for(var t=this._groups,e=0,n=t.length;e=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),wt.hasOwnProperty(e)?{space:wt[e],local:t}:t};function St(t){return function(){this.removeAttribute(t)}}function Ct(t){return function(){this.removeAttributeNS(t.space,t.local)}}function kt(t,e){return function(){this.setAttribute(t,e)}}function Ot(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Nt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Et(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var Tt=function(t,e){var n=_t(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Ct:St:"function"===typeof e?n.local?Et:Nt:n.local?Ot:kt)(n,e))},Pt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function jt(t){return function(){this.style.removeProperty(t)}}function At(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Mt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}var Lt=function(t,e,n){return arguments.length>1?this.each((null==e?jt:"function"===typeof e?Mt:At)(t,e,null==n?"":n)):It(this.node(),t)};function It(t,e){return t.style.getPropertyValue(e)||Pt(t).getComputedStyle(t,null).getPropertyValue(e)}function Rt(t){return function(){delete this[t]}}function Ft(t,e){return function(){this[t]=e}}function Dt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}var Yt=function(t,e){return arguments.length>1?this.each((null==e?Rt:"function"===typeof e?Dt:Ft)(t,e)):this.node()[t]};function Bt(t){return t.trim().split(/^|\s+/)}function Gt(t){return t.classList||new Xt(t)}function Xt(t){this._node=t,this._names=Bt(t.getAttribute("class")||"")}function $t(t,e){var n=Gt(t),r=-1,o=e.length;while(++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Wt=function(t,e){var n=Bt(t+"");if(arguments.length<2){var r=Gt(this.node()),o=-1,i=n.length;while(++o=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function je(t,e){for(var n,r=0,o=t.length;r0)for(var n,r,o=new Array(n),i=0;il}u.mouse("drag")}function v(){Oe(F.view).on("mousemove.drag mouseup.drag",null),Ge(F.view,n),Ye(),u.mouse("end")}function y(){if(o.apply(this,arguments)){var t,e,n=F.changedTouches,r=i.apply(this,arguments),c=n.length;for(t=0;te.width-8&&r.length>0)r=r.slice(0,-1),t.text(r+"..."),n=t.node().getComputedTextLength()})));var l=t.append("rect").attr("class","body");l.style("width",e.width+"px").style("fill",a).style("stroke-width","1px"),"start"!==e.type&&"end"!==e.type?(l.attr("x",e.x).attr("y",e.y+20),l.style("height",j(e.height-20)+"px")):(l.attr("x",e.x).attr("y",e.y).classed(e.type,!0).attr("rx",30),l.style("height",j(e.height)+"px")),l.attr("stroke",f);var h,d="start"===e.type?"Start":"end"===e.type?"End":e.approvers&&0!==e.approvers.length?e.approvers.length>1?"".concat(e.approvers[0].name+"..."):e.approvers[0].name:"No approver";h="start"!==e.type&&"end"!==e.type?e.y+25+j(e.height-20)/2:e.y+5+j(e.height)/2;var p=t.append("text").attr("fill",u).attr("x",e.x+e.width/2).attr("y",h).attr("class","unselectable").attr("text-anchor","middle").text((function(){return d})).each((function(){var t=Oe(this),n=t.node().getComputedTextLength(),r=t.text();while(n>e.width-8&&r.length>0)r=r.slice(0,-1),t.text(r+"..."),n=t.node().getComputedTextLength()}));return{header:r,title:o,body:l,content:p}}var Ke=He;n("5df3"),n("1c4c");function Je(t,e){var n=document.querySelector(t),r=Array.from(n.childNodes);return r.some((function(t){return t.contains(e)}))}var Qe={name:"flowchart",props:{nodes:{type:Array,default:function(){return[{id:1,x:140,y:270,name:"Start",type:"start"},{id:2,x:540,y:270,name:"End",type:"end"}]}},connections:{type:Array,default:function(){return[{source:{id:1,position:"right"},destination:{id:2,position:"left"},id:1,type:"pass"}]}},width:{type:[String,Number],default:800},height:{type:[String,Number],default:600},readonly:{type:Boolean,default:!1},readOnlyPermissions:{type:Object,default:function(){return{allowDragNodes:!1,allowSave:!1,allowAddNodes:!1,allowEditNodes:!1,allowEditConnections:!1,allowDblClick:!1}}},removeRequiresConfirmation:{type:Boolean,default:!1}},data:function(){return{internalNodes:[],internalConnections:[],connectingInfo:{source:null,sourcePosition:null},selectionInfo:null,moveInfo:null,currentNodes:[],currentConnections:[],cursorToChartOffset:{x:0,y:0},clickedOnce:!1,pathClickedOnce:!1,lines:[],invalidConnections:[],moveCoordinates:{startX:0,startY:0,diffX:0,diffY:0}}},methods:{add:function(t){this.readonly&&!this.readOnlyPermissions.allowAddNodes||(this.internalNodes.push(t),this.$emit("add",t,this.internalNodes,this.internalConnections))},editCurrent:function(){1===this.currentNodes.length?this.editNode(this.currentNodes[0]):1===this.currentConnections.length&&this.editConnection(this.currentConnections[0])},editNode:function(t){this.readonly&&!this.readOnlyPermissions.allowEditNodes||this.$emit("editnode",t)},editConnection:function(t){this.readonly&&!this.readOnlyPermissions.allowEditConnections||this.$emit("editconnection",t)},handleChartMouseWheel:function(t){if(t.stopPropagation(),t.preventDefault(),t.ctrlKey){var e=document.getElementById("svg"),n=parseFloat(e.style.zoom||1);if(t.deltaY>0&&.1===n)return;n-=t.deltaY/100/10,e.style.zoom=n}},handleChartMouseUp:function(){var t=k(regeneratorRuntime.mark((function t(e){var n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.connectingInfo.source&&(this.hoveredConnector&&this.isNodesConnectionValid()&&(n=+new Date,r={source:{id:this.connectingInfo.source.id,position:this.connectingInfo.sourcePosition},destination:{id:this.hoveredConnector.node.id,position:this.hoveredConnector.position},id:n,type:"pass",name:"Pass"},this.internalConnections.push(r),this.$emit("connect",r,this.internalNodes,this.internalConnections)),this.connectingInfo.source=null,this.connectingInfo.sourcePosition=null),this.selectionInfo&&(this.selectionInfo=null),this.moveInfo&&(this.moveCoordinates.diffX-=e.pageX-this.moveCoordinates.startX,this.moveCoordinates.diffY+=e.pageY-this.moveCoordinates.startY,this.$emit("movediff",{x:this.moveCoordinates.diffX,y:this.moveCoordinates.diffY}),this.moveInfo=null);case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),isNodesConnectionValid:function(){var t=this,e=this.connectingInfo.source.id===this.hoveredConnector.node.id,n=this.internalConnections.some((function(e){return e.source.id===t.connectingInfo.source.id&&e.source.position===t.connectingInfo.sourcePosition&&e.destination.id===t.hoveredConnector.node.id&&e.destination.position===t.hoveredConnector.position}));return!e&&!n},handleChartMouseMove:function(){var t=k(regeneratorRuntime.mark((function t(e){var n,r,o,i,c,a,u,s,f,l,h;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=e.currentTarget.getBoundingClientRect(),r=e.pageX-n.left-window.scrollX,this.cursorToChartOffset.x=Math.trunc(r),o=e.pageY-n.top-window.scrollY,this.cursorToChartOffset.y=Math.trunc(o),!this.connectingInfo.source){t.next=30;break}return t.next=8,this.renderConnections();case 8:for(i=!0,c=!1,a=void 0,t.prev=11,u=document.querySelectorAll("#svg .connector")[Symbol.iterator]();!(i=(s=u.next()).done);i=!0)f=s.value,f.classList.add("active");t.next=19;break;case 15:t.prev=15,t.t0=t["catch"](11),c=!0,a=t.t0;case 19:t.prev=19,t.prev=20,i||null==u.return||u.return();case 22:if(t.prev=22,!c){t.next=25;break}throw a;case 25:return t.finish(22);case 26:return t.finish(19);case 27:l=this.getNodeConnectorOffset(this.connectingInfo.source.id,this.connectingInfo.sourcePosition),h=this.hoveredConnector?this.hoveredConnector.position:null,this.arrowTo(l.x,l.y,this.cursorToChartOffset.x,this.cursorToChartOffset.y,this.connectingInfo.sourcePosition,h);case 30:case"end":return t.stop()}}),t,this,[[11,15,19,27],[20,,22,26]])})));function e(e){return t.apply(this,arguments)}return e}(),handleChartDblClick:function(t){this.isMouseClickOnSlot(t.target)||this.readonly&&!this.readOnlyPermissions.allowDblClick||this.$emit("dblclick",{x:t.offsetX,y:t.offsetY})},handleChartMouseDown:function(t){this.isMouseClickOnSlot(t.target)||(t.ctrlKey?(this.moveCoordinates.startX=t.pageX,this.moveCoordinates.startY=t.pageY,this.initializeMovingAllElements(t)):this.selectionInfo={x:t.offsetX,y:t.offsetY})},isMouseClickOnSlot:function(t){return Je("#chart-slot",t)},initializeMovingAllElements:function(t){this.isMouseOverAnyNode()||(this.moveInfo={x:t.offsetX,y:t.offsetY})},isMouseOverAnyNode:function(){for(var t={x:this.cursorToChartOffset.x,y:this.cursorToChartOffset.y},e=!1,n=0;n=o.start.x&&t.x<=o.end.x&&t.y>=o.start.y&&t.y<=o.end.y;if(i){e=!0;break}}return e},getConnectorPosition:function(t){var e=t.width/2,n=t.height/2,r={};return this.hasNodeConnector(t,"top")&&(r.top={x:t.x+e,y:t.y}),this.hasNodeConnector(t,"right")&&(r.right={x:t.x+t.width,y:t.y+n}),this.hasNodeConnector(t,"bottom")&&(r.bottom={x:t.x+e,y:t.y+t.height}),this.hasNodeConnector(t,"left")&&(r.left={x:t.x,y:t.y+n}),r},hasNodeConnector:function(t,e){return!t.connectors||t.connectors.includes(e)},moveAllElements:function(){var t=this;if(t.moveInfo){var e=t.moveInfo.x-t.cursorToChartOffset.x,n=t.moveInfo.y-t.cursorToChartOffset.y;this.internalNodes.forEach((function(t){t.x-=e,t.y-=n})),t.moveInfo.x=t.cursorToChartOffset.x,t.moveInfo.y=t.cursorToChartOffset.y}},renderSelection:function(){var t=this;if(t.selectionInfo){t.currentNodes.splice(0,t.currentNodes.length),t.currentConnections.splice(0,t.currentConnections.length);var e=T([{x:t.selectionInfo.x,y:t.selectionInfo.y},{x:t.cursorToChartOffset.x,y:t.cursorToChartOffset.y}]),n=!0,r=!1,o=void 0;try{for(var i,c=document.querySelectorAll("#svg .selection")[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=i.value;a.classList.add("active"),a.setAttribute("x",e.start.x),a.setAttribute("y",e.start.y),a.setAttribute("width",e.end.x-e.start.x),a.setAttribute("height",e.end.y-e.start.y)}}catch(p){r=!0,o=p}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}t.internalNodes.forEach((function(n){var r=[{x:n.x,y:n.y},{x:n.x,y:n.y+n.height},{x:n.x+n.width,y:n.y},{x:n.x+n.width,y:n.y+n.height}];r.some((function(t){return P(t,e)}))&&t.currentNodes.push(n)})),t.lines.forEach((function(n){var r=[{x:n.sourceX,y:n.sourceY},{x:n.destinationX,y:n.destinationY}];if(r.every((function(t){return P(t,e)}))&&t.currentConnections.every((function(t){return t.id!==n.id}))){var o=t.internalConnections.filter((function(t){return t.id===n.id}))[0];t.currentConnections.push(o)}}))}else{var u=!0,s=!1,f=void 0;try{for(var l,h=document.querySelectorAll("#svg > .selection")[Symbol.iterator]();!(u=(l=h.next()).done);u=!0){var d=l.value;d.classList.remove("active")}}catch(p){s=!0,f=p}finally{try{u||null==h.return||h.return()}finally{if(s)throw f}}}},renderConnections:function(){var t=this;return new Promise((function(e){t.$nextTick((function(){var n=!0,r=!1,o=void 0;try{for(var i,c=document.querySelectorAll("#svg > g.connection")[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=i.value;a.remove()}}catch(u){r=!0,o=u}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}t.lines=[],t.invalidConnections=[],t.internalConnections.forEach((function(e){if(t.haveNodesSelectedConnectors(e)){var n=t.getNodeConnectorOffset(e.source.id,e.source.position),r=t.getNodeConnectorOffset(e.destination.id,e.destination.position),o={pass:"#52c41a",reject:"red"};t.currentConnections.filter((function(t){return t===e})).length>0&&(o={pass:"#12640a",reject:"darkred"});var i=t.arrowTo(n.x,n.y,r.x,r.y,e.source.position,e.destination.position,o[e.type]),c=!0,a=!1,s=void 0;try{for(var f,l=i.paths[Symbol.iterator]();!(c=(f=l.next()).done);c=!0){var h=f.value;h.on("mousedown",(function(){if(F.stopPropagation(),t.pathClickedOnce)t.editConnection(e);else{var n=setTimeout((function(){t.pathClickedOnce=!1,clearTimeout(n)}),300);t.pathClickedOnce=!0}t.currentNodes.splice(0,t.currentNodes.length),t.currentConnections.splice(0,t.currentConnections.length),t.currentConnections.push(e)}))}}catch(u){a=!0,s=u}finally{try{c||null==l.return||l.return()}finally{if(a)throw s}}var d=!0,p=!1,v=void 0;try{for(var y,g=i.lines[Symbol.iterator]();!(d=(y=g.next()).done);d=!0){var b=y.value;t.lines.push({sourceX:b.sourceX,sourceY:b.sourceY,destinationX:b.destinationX,destinationY:b.destinationY,id:e.id})}}catch(u){p=!0,v=u}finally{try{d||null==g.return||g.return()}finally{if(p)throw v}}}else t.invalidConnections.push(e)})),e()}))}))},haveNodesSelectedConnectors:function(t){var e=this.nodes.find((function(e){return e.id===t.source.id})),n=this.nodes.find((function(e){return e.id===t.destination.id}));return this.hasNodeConnector(e,t.source.position)&&this.hasNodeConnector(n,t.destination.position)},renderNodes:function(){var t=this;return new Promise((function(e){var n=!0,r=!1,o=void 0;try{for(var i,c=document.querySelectorAll("#svg > g.node")[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=i.value;a.remove()}}catch(u){r=!0,o=u}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}t.internalNodes.forEach((function(e){t.renderNode(e,t.currentNodes.filter((function(t){return t===e})).length>0)})),e()}))},getNodeConnectorOffset:function(t,e){var n=this.internalNodes.filter((function(e){return e.id===t}))[0];return this.getConnectorPosition(n)[e]},append:function(t){var e=Oe("#svg");return e.insert(t,".selection")},guideLineTo:function(t,e,n,r){var o=this.append("g");o.classed("guideline",!0),A(o,t,e,n,r,1,"#a3a3a3",[5,3])},arrowTo:function(t,e,n,r,o,i,c){var a=this.append("g");return a.classed("connection",!0),M(a,t,e,n,r,o,i,1,c||"#a3a3a3",!0),M(a,t,e,n,r,o,i,5,"transparent",!1)},renderNode:function(t,e){var n=this,r=n.append("g").attr("cursor","move").classed("node",!0),o=Ke(r,t,e);n.$emit("render",t,o);var i=We().on("start",(function(){var e=0===n.currentNodes.filter((function(e){return e===t})).length;if(e&&(n.currentConnections.splice(0,n.currentConnections.length),n.currentNodes.splice(0,n.currentNodes.length),n.currentNodes.push(t)),n.clickedOnce)n.currentNodes.splice(0,n.currentNodes.length),n.editNode(t);else{var r=setTimeout((function(){n.clickedOnce=!1,clearTimeout(r)}),300);n.clickedOnce=!0}})).on("drag",k(regeneratorRuntime.mark((function t(){var e,r,o,i,c,a,u,s,f,l,h,d,p,v,y,g,b,m;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!n.readonly||n.readOnlyPermissions.allowDragNodes){t.next=2;break}return t.abrupt("return");case 2:for(e=parseFloat(document.getElementById("svg").style.zoom||1),r=!0,o=!1,i=void 0,t.prev=6,c=n.currentNodes[Symbol.iterator]();!(r=(a=c.next()).done);r=!0)u=a.value,s=F.dx/e,u.x+s<0&&(s=-u.x),u.x+=s,f=F.dy/e,u.y+f<0&&(f=-u.y),u.y+=f;t.next=14;break;case 10:t.prev=10,t.t0=t["catch"](6),o=!0,i=t.t0;case 14:t.prev=14,t.prev=15,r||null==c.return||c.return();case 17:if(t.prev=17,!o){t.next=20;break}throw i;case 20:return t.finish(17);case 21:return t.finish(14);case 22:for(l=!0,h=!1,d=void 0,t.prev=25,p=document.querySelectorAll("#svg > g.guideline")[Symbol.iterator]();!(l=(v=p.next()).done);l=!0)y=v.value,y.remove();t.next=33;break;case 29:t.prev=29,t.t1=t["catch"](25),h=!0,d=t.t1;case 33:t.prev=33,t.prev=34,l||null==p.return||p.return();case 36:if(t.prev=36,!h){t.next=39;break}throw d;case 39:return t.finish(36);case 40:return t.finish(33);case 41:g=n.getCurrentNodesEdge(),b=10*Math.round(Math.round(g.start.x)/10),m=10*Math.round(Math.round(g.start.y)/10),n.internalNodes.forEach((function(t){0===n.currentNodes.filter((function(e){return e===t})).length&&(t.x===b&&(t.y g.guideline")[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var c=o.value;c.remove()}}catch(d){e=!0,r=d}finally{try{t||null==i.return||i.return()}finally{if(e)throw r}}var a=!0,u=!1,s=void 0;try{for(var f,l=n.currentNodes[Symbol.iterator]();!(a=(f=l.next()).done);a=!0){var h=f.value;h.x=10*Math.round(Math.round(h.x)/10),h.y=10*Math.round(Math.round(h.y)/10)}}catch(d){u=!0,s=d}finally{try{a||null==l.return||l.return()}finally{if(u)throw s}}n.$emit("nodesdragged",n.currentNodes)}));r.call(i),r.on("mousedown",(function(){if(F.ctrlKey){var e=0===n.currentNodes.filter((function(e){return e===t})).length;e?n.currentNodes.push(t):n.currentNodes.splice(n.currentNodes.indexOf(t),1)}}));var c=[],a=this.getConnectorPosition(t),u=function(e){var o=a[e],i=r.append("circle").attr("cx",o.x).attr("cy",o.y).attr("r",4).attr("class","connector");i.on("mousedown",(function(){F.stopPropagation(),"end"===t.type||n.readonly||(n.connectingInfo.source=t,n.connectingInfo.sourcePosition=e)})).on("mouseup",(function(){if(F.stopPropagation(),n.connectingInfo.source){if(n.connectingInfo.source.id!==t.id){var r=+new Date,o={source:{id:n.connectingInfo.source.id,position:n.connectingInfo.sourcePosition},destination:{id:t.id,position:e},id:r,type:"pass",name:"Pass"};n.internalConnections.push(o),n.$emit("connect",o,n.internalNodes,n.internalConnections)}n.connectingInfo.source=null,n.connectingInfo.sourcePosition=null}})).on("mouseover",(function(){i.classed("active",!0)})).on("mouseout",(function(){i.classed("active",!1)})),c.push(i)};for(var s in a)u(s);r.on("mouseover",(function(){c.forEach((function(t){return t.classed("active",!0)}))})).on("mouseout",(function(){c.forEach((function(t){return t.classed("active",!1)}))}))},getCurrentNodesEdge:function(){var t=this.currentNodes.map((function(t){return{x:t.x,y:t.y}}));return t.push.apply(t,w(this.currentNodes.map((function(t){return{x:t.x+t.width,y:t.y+t.height}})))),T(t)},save:function(){this.readonly&&!this.readOnlyPermissions.allowSave||this.$emit("save",this.internalNodes,this.internalConnections)},remove:function(){var t=k(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.readonly||this.readOnlyPermissions.allowRemove){t.next=2;break}return t.abrupt("return");case 2:if(e=this.currentConnections.length>0||this.currentNodes.length>0,e){t.next=5;break}return t.abrupt("return");case 5:this.removeRequiresConfirmation?this.$emit("removeconfirmationrequired",this.currentNodes,this.currentConnections):this.removeSelectedNodesAndConnections();case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),confirmRemove:function(){this.removeSelectedNodesAndConnections()},removeSelectedNodesAndConnections:function(){if(!this.readonly){if(this.currentConnections.length>0){var t=!0,e=!1,n=void 0;try{for(var r,o=this.currentConnections[Symbol.iterator]();!(t=(r=o.next()).done);t=!0){var i=r.value;this.removeConnection(i)}}catch(h){e=!0,n=h}finally{try{t||null==o.return||o.return()}finally{if(e)throw n}}this.currentConnections.splice(0,this.currentConnections.length)}if(this.currentNodes.length>0){var c=!0,a=!1,u=void 0;try{for(var s,f=this.currentNodes[Symbol.iterator]();!(c=(s=f.next()).done);c=!0){var l=s.value;this.removeNode(l)}}catch(h){a=!0,u=h}finally{try{c||null==f.return||f.return()}finally{if(a)throw u}}this.currentNodes.splice(0,this.currentNodes.length)}}},removeNode:function(t){var e=this.internalConnections.filter((function(e){return e.source.id===t.id||e.destination.id===t.id})),n=!0,r=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=i.value;this.internalConnections.splice(this.internalConnections.indexOf(a),1)}}catch(u){r=!0,o=u}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}this.internalNodes.splice(this.internalNodes.indexOf(t),1),this.$emit("delete",t,this.internalNodes,this.internalConnections)},removeConnection:function(t){var e=this.internalConnections.indexOf(t);this.internalConnections.splice(e,1),this.$emit("disconnect",t,this.internalNodes,this.internalConnections)},moveCurrentNode:function(t,e){if(this.currentNodes.length>0&&!this.readonly){var n=!0,r=!1,o=void 0;try{for(var i,c=this.currentNodes[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=i.value;a.x+t<0&&(t=-a.x),a.x+=t,a.y+e<0&&(e=-a.y),a.y+=e}}catch(u){r=!0,o=u}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}}},init:function(){var t=this,e=this;e.internalNodes.splice(0,e.internalNodes.length),e.internalConnections.splice(0,e.internalConnections.length),e.nodes.forEach((function(n){var r=Object.assign({},n);r.x=r.x-t.moveCoordinates.diffX,r.y=r.y+t.moveCoordinates.diffY,r.width=r.width||120,r.height=r.height||60,e.internalNodes.push(r)})),e.connections.forEach((function(t){e.internalConnections.push(JSON.parse(JSON.stringify(t)))}))}},mounted:function(){var t=this;t.init(),document.onkeydown=function(e){switch(e.keyCode){case 37:t.moveCurrentNode(-10,0);break;case 38:t.moveCurrentNode(0,-10);break;case 39:t.moveCurrentNode(10,0);break;case 40:t.moveCurrentNode(0,10);break;case 27:t.currentNodes.splice(0,t.currentNodes.length),t.currentConnections.splice(0,t.currentConnections.length);break;case 65:var n,r;if(document.activeElement===document.getElementById("chart"))t.currentNodes.splice(0,t.currentNodes.length),t.currentConnections.splice(0,t.currentConnections.length),(n=t.currentNodes).push.apply(n,w(t.internalNodes)),(r=t.currentConnections).push.apply(r,w(t.internalConnections)),e.preventDefault();break;case 46:case 8:t.remove();break;default:break}}},created:function(){},computed:{hoveredConnector:function(){var t=!0,e=!1,n=void 0;try{for(var r,o=this.internalNodes[Symbol.iterator]();!(t=(r=o.next()).done);t=!0){var i=r.value,c=this.getConnectorPosition(i);for(var a in c){var u=c[a];if(Math.hypot(u.x-this.cursorToChartOffset.x,u.y-this.cursorToChartOffset.y)<10)return{position:a,node:i}}}}catch(s){e=!0,n=s}finally{try{t||null==o.return||o.return()}finally{if(e)throw n}}return null},hoveredConnection:function(){var t=this,e=!0,n=!1,r=void 0;try{for(var o,i=function(){var e=o.value,n=O(e.sourceX,e.sourceY,e.destinationX,e.destinationY,t.cursorToChartOffset.x,t.cursorToChartOffset.y);if(n<5&&N(e.sourceX-2,e.destinationX+2,t.cursorToChartOffset.x)&&N(e.sourceY-2,e.destinationY+2,t.cursorToChartOffset.y)){var r=t.internalConnections.filter((function(t){return t.id===e.id}));return{v:r.length>0?r[0]:null}}},c=this.lines[Symbol.iterator]();!(e=(o=c.next()).done);e=!0){var a=i();if("object"===l(a))return a.v}}catch(u){n=!0,r=u}finally{try{e||null==c.return||c.return()}finally{if(n)throw r}}return null},cursor:function(){return this.connectingInfo.source||this.hoveredConnector?"crosshair":null!=this.hoveredConnection?"pointer":null}},watch:{internalNodes:{immediate:!0,deep:!0,handler:function(){this.renderNodes(),this.renderConnections()}},internalConnections:{immediate:!0,deep:!0,handler:function(){this.renderConnections()}},selectionInfo:{immediate:!0,deep:!0,handler:function(){this.renderSelection()}},currentNodes:{immediate:!0,deep:!0,handler:function(){this.$emit("select",this.currentNodes),this.renderNodes()}},currentConnections:{immediate:!0,deep:!0,handler:function(){this.$emit("selectconnection",this.currentConnections),this.renderConnections()}},cursorToChartOffset:{immediate:!0,deep:!0,handler:function(){this.selectionInfo?this.renderSelection():this.moveInfo&&this.moveAllElements()}},connectingInfo:{immediate:!0,deep:!0,handler:function(){this.renderConnections()}},nodes:{immediate:!0,deep:!0,handler:function(){this.init()}},connections:{immediate:!0,deep:!0,handler:function(){this.init()}}}},Ze=Qe;n("369f");function tn(t,e,n,r,o,i,c,a){var u,s="function"===typeof t?t.options:t;if(e&&(s.render=e,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),i&&(s._scopeId="data-v-"+i),c?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},s._ssrRegister=u):o&&(u=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),u)if(s.functional){s._injectStyles=u;var f=s.render;s.render=function(t,e){return u.call(e),f(t,e)}}else{var l=s.beforeCreate;s.beforeCreate=l?[].concat(l,u):[u]}return{exports:t,options:s}}var en=tn(Ze,o,i,!1,null,null,null),nn=en.exports;nn.install=function(t){t.component(nn.name,nn)};var rn=nn;e["default"]=rn},fdef:function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"}})})); 2 | //# sourceMappingURL=FlowChart.umd.min.js.map -------------------------------------------------------------------------------- /dist/demo.html: -------------------------------------------------------------------------------- 1 | 2 | FlowChart demo 3 | 4 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flowchart-vue", 3 | "version": "0.32.0", 4 | "license": "MIT", 5 | "main": "dist/FlowChart.umd.min.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/joyceworks/flowchart-vue.git" 9 | }, 10 | "keywords": [ 11 | "flowchart", 12 | "flowchart designer" 13 | ], 14 | "private": false, 15 | "scripts": { 16 | "build-lib": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --target lib --name FlowChart src/components/flowchart/index.js", 17 | "analyze": "source-map-explorer 'dist/FlowChart.umd.min.js'" 18 | }, 19 | "dependencies": { 20 | "d3-selection": "1.4.1", 21 | "d3-drag": "1.2.5" 22 | }, 23 | "peerDependencies": { 24 | "vue": "^2.5.22" 25 | }, 26 | "devDependencies": { 27 | "@vue/cli-plugin-babel": "^3.1.0", 28 | "@vue/cli-plugin-eslint": "^3.1.0", 29 | "@vue/cli-service": "^3.1.0", 30 | "babel-eslint": "^10.0.1", 31 | "cz-conventional-changelog": "^3.1.0", 32 | "eslint": "^5.8.0", 33 | "eslint-plugin-vue": "^5.0.0", 34 | "prettier": "^2.0.5", 35 | "source-map-explorer": "^2.5.2", 36 | "vue-template-compiler": "^2.5.22" 37 | }, 38 | "eslintConfig": { 39 | "root": true, 40 | "env": { 41 | "node": true 42 | }, 43 | "extends": [ 44 | "plugin:vue/essential", 45 | "eslint:recommended" 46 | ], 47 | "rules": {}, 48 | "parserOptions": { 49 | "parser": "babel-eslint" 50 | } 51 | }, 52 | "postcss": { 53 | "plugins": { 54 | "autoprefixer": {} 55 | } 56 | }, 57 | "browserslist": [ 58 | "> 1%", 59 | "last 2 versions", 60 | "not ie <= 8" 61 | ], 62 | "config": { 63 | "commitizen": { 64 | "path": "./node_modules/cz-conventional-changelog" 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Flowchart 9 | 10 | 11 | 12 | 18 |
19 | 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joyceworks/flowchart-vue/87265e615bcd9a1c734915d1ff3141b05105ee85/src/.DS_Store -------------------------------------------------------------------------------- /src/assets/modal.css: -------------------------------------------------------------------------------- 1 | .modal { 2 | border: 1px solid #d3d3d3; 3 | box-shadow: 2px 2px 1px #d3d3d3; 4 | background-color: white; 5 | position: absolute; 6 | top: 100px; 7 | left: 0; 8 | right: 0; 9 | margin-left: auto; 10 | margin-right: auto; 11 | } 12 | 13 | .form-control { 14 | display: block; 15 | width: 100%; 16 | height: 30px; 17 | margin-bottom: 10px; 18 | } 19 | 20 | .footer { 21 | padding: 10px; 22 | text-align: right; 23 | } 24 | 25 | .footer > button { 26 | margin-left: 10px; 27 | } 28 | 29 | .body { 30 | padding: 10px; 31 | } 32 | 33 | .header { 34 | padding: 10px; 35 | border-bottom: 1px solid #d3d3d3; 36 | } -------------------------------------------------------------------------------- /src/components/ConnectionDialog.vue: -------------------------------------------------------------------------------- 1 | 26 | 80 | -------------------------------------------------------------------------------- /src/components/NodeDialog.vue: -------------------------------------------------------------------------------- 1 | 33 | -------------------------------------------------------------------------------- /src/components/flowchart/Flowchart.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 1007 | -------------------------------------------------------------------------------- /src/components/flowchart/index.css: -------------------------------------------------------------------------------- 1 | #svg { 2 | background-size: 20px 20px, 20px 20px, 10px 10px, 10px 10px; 3 | background-image: linear-gradient(to right, #dfdfdf 1px, transparent 1px), 4 | linear-gradient(to bottom, #dfdfdf 1px, transparent 1px), 5 | linear-gradient(to right, #f1f1f1 1px, transparent 1px), 6 | linear-gradient(to bottom, #f1f1f1 1px, transparent 1px); 7 | background-position: left -1px top -1px, left -1px top -1px, left -1px top -1px, left -1px top -1px; 8 | height: 100%; 9 | width: 100%; 10 | } 11 | 12 | #chart { 13 | position: relative; 14 | width: 800px; 15 | height: 600px; 16 | border: 1px solid #dfdfdf; 17 | } 18 | 19 | #position { 20 | position: absolute; 21 | right: 4px; 22 | } 23 | 24 | .unselectable { 25 | moz-user-select: -moz-none; 26 | -moz-user-select: none; 27 | -o-user-select: none; 28 | -khtml-user-select: none; 29 | -webkit-user-select: none; 30 | -ms-user-select: none; 31 | user-select: none; 32 | } 33 | 34 | .connector { 35 | cursor: crosshair; 36 | opacity: 0; 37 | } 38 | 39 | .connector.active { 40 | opacity: 1; 41 | fill: white; 42 | stroke: #bbbbbb; 43 | stroke-width: 1px; 44 | } 45 | 46 | .connector:hover { 47 | stroke: red; 48 | } 49 | 50 | #svg .selection { 51 | stroke: lightblue; 52 | fill: lightblue; 53 | fill-opacity: 0.8; 54 | display: none; 55 | } 56 | 57 | #svg .selection.active { 58 | display: block; 59 | } -------------------------------------------------------------------------------- /src/components/flowchart/index.js: -------------------------------------------------------------------------------- 1 | import FlowChart from './Flowchart'; 2 | 3 | FlowChart.install = function(Vue) { 4 | Vue.component(FlowChart.name, FlowChart); 5 | }; 6 | 7 | export default FlowChart; -------------------------------------------------------------------------------- /src/components/flowchart/render.js: -------------------------------------------------------------------------------- 1 | import { select } from "d3-selection"; 2 | import { roundTo20 } from "@/utils/math"; 3 | 4 | function render(g, node, isSelected) { 5 | node.width = node.width || 120; 6 | node.height = node.height || 60; 7 | let header = null; 8 | let title = null; 9 | 10 | const theme = !node.theme ? {} : node.theme; 11 | const headerBackgroundColor = theme.headerBackgroundColor ? theme.headerBackgroundColor : "#f1f3f4"; 12 | const bodyBackgroundColor = theme.bodyBackgroundColor ? theme.bodyBackgroundColor : "white"; 13 | const bodyTextColor = theme.bodyTextColor ? theme.bodyTextColor : "black"; 14 | const headerTextColor = theme.headerTextColor ? theme.headerTextColor : "black"; 15 | 16 | let borderColor = isSelected ? "#666666" : "#bbbbbb"; 17 | if (theme.borderColor) { 18 | if (isSelected) { 19 | borderColor = theme.borderColorSelected; 20 | } else { 21 | borderColor = theme.borderColor; 22 | } 23 | } 24 | 25 | if (node.type !== "start" && node.type !== "end") { 26 | // title 27 | header = g 28 | .append("rect") 29 | .attr("x", node.x) 30 | .attr("y", node.y) 31 | .attr("stroke", borderColor) 32 | .attr("class", "title") 33 | .style("height", "20px") 34 | .style("fill", headerBackgroundColor) 35 | .style("stroke-width", "1px") 36 | .style("width", node.width + "px"); 37 | title = g 38 | .append("text") 39 | .attr("fill", headerTextColor) 40 | .attr("x", node.x + 4) 41 | .attr("y", node.y + 15) 42 | .attr("class", "unselectable") 43 | .text(() => node.name) 44 | .each(function wrap() { 45 | let self = select(this), 46 | textLength = self.node().getComputedTextLength(), 47 | text = self.text(); 48 | while (textLength > node.width - 2 * 4 && text.length > 0) { 49 | text = text.slice(0, -1); 50 | self.text(text + "..."); 51 | textLength = self.node().getComputedTextLength(); 52 | } 53 | }); 54 | } 55 | // body 56 | let body = g.append("rect").attr("class", "body"); 57 | body 58 | .style("width", node.width + "px") 59 | .style("fill", bodyBackgroundColor) 60 | .style("stroke-width", "1px"); 61 | if (node.type !== "start" && node.type !== "end") { 62 | body.attr("x", node.x).attr("y", node.y + 20); 63 | body.style("height", roundTo20(node.height - 20) + "px"); 64 | } else { 65 | body 66 | .attr("x", node.x) 67 | .attr("y", node.y) 68 | .classed(node.type, true) 69 | .attr("rx", 30); 70 | body.style("height", roundTo20(node.height) + "px"); 71 | } 72 | body.attr("stroke", borderColor); 73 | 74 | // body text 75 | let text = 76 | node.type === "start" 77 | ? "Start" 78 | : node.type === "end" 79 | ? "End" 80 | : !node.approvers || node.approvers.length === 0 81 | ? "No approver" 82 | : node.approvers.length > 1 83 | ? `${node.approvers[0].name + "..."}` 84 | : node.approvers[0].name; 85 | let bodyTextY; 86 | if (node.type !== "start" && node.type !== "end") { 87 | bodyTextY = node.y + 25 + roundTo20(node.height - 20) / 2; 88 | } else { 89 | bodyTextY = node.y + 5 + roundTo20(node.height) / 2; 90 | } 91 | let content = g 92 | .append("text") 93 | .attr("fill", bodyTextColor) 94 | .attr("x", node.x + node.width / 2) 95 | .attr("y", bodyTextY) 96 | .attr("class", "unselectable") 97 | .attr("text-anchor", "middle") 98 | .text(function () { 99 | return text; 100 | }) 101 | .each(function wrap() { 102 | let self = select(this), 103 | textLength = self.node().getComputedTextLength(), 104 | text = self.text(); 105 | while (textLength > node.width - 2 * 4 && text.length > 0) { 106 | text = text.slice(0, -1); 107 | self.text(text + "..."); 108 | textLength = self.node().getComputedTextLength(); 109 | } 110 | }); 111 | return { header, title, body, content }; 112 | } 113 | 114 | export default render; 115 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import Flowchart from './components/flowchart/Flowchart'; 2 | 3 | const components = [ 4 | Flowchart, 5 | ]; 6 | 7 | const install = function(Vue) { 8 | components.map(component => { 9 | Vue.component(component.name, component); 10 | }); 11 | }; 12 | 13 | if (typeof window !== 'undefined' && window.Vue) { 14 | install(window.Vue); 15 | } 16 | 17 | export default { 18 | install, 19 | Flowchart, 20 | }; 21 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './views/App'; 3 | 4 | Vue.config.productionTip = false; 5 | 6 | new Vue({ 7 | el: '#app', 8 | mounted() {}, 9 | components: { 10 | App, 11 | }, 12 | }); -------------------------------------------------------------------------------- /src/utils/dom.js: -------------------------------------------------------------------------------- 1 | function ifElementContainChildNode(parentSelector, checkedNode) { 2 | const parentElement = document.querySelector(parentSelector); 3 | const childrenNodes = Array.from(parentElement.childNodes); 4 | return childrenNodes.some((node) => node.contains(checkedNode)); 5 | } 6 | 7 | export { 8 | ifElementContainChildNode 9 | }; 10 | -------------------------------------------------------------------------------- /src/utils/math.js: -------------------------------------------------------------------------------- 1 | function distanceOfPointToLine(beginX, beginY, endX, endY, ptX, ptY) { 2 | const k = (endY - beginY || 1) / (endX - beginX || 1); 3 | const b = beginY - k * beginX; 4 | return Math.abs(k * ptX - ptY + b) / Math.sqrt(k * k + 1); 5 | } 6 | 7 | function between(num1, num2, num) { 8 | return (num > num1 && num < num2) || (num > num2 && num < num1); 9 | } 10 | 11 | function approximatelyEquals(n, m) { 12 | return Math.abs(m - n) <= 3; 13 | } 14 | 15 | function getEdgeOfPoints(points) { 16 | let minX = points.reduce((prev, point) => { 17 | return point.x < prev ? point.x : prev; 18 | }, Infinity); 19 | let maxX = points.reduce((prev, point) => { 20 | return point.x > prev ? point.x : prev; 21 | }, 0); 22 | let minY = points.reduce((prev, point) => { 23 | return point.y < prev ? point.y : prev; 24 | }, Infinity); 25 | let maxY = points.reduce((prev, point) => { 26 | return point.y > prev ? point.y : prev; 27 | }, 0); 28 | return {start: {x: minX, y: minY}, end: {x: maxX, y: maxY}}; 29 | } 30 | 31 | function pointRectangleIntersection(p, r) { 32 | return p.x > r.start.x && p.x < r.end.x && p.y > r.start.y && p.y < r.end.y; 33 | } 34 | 35 | function roundTo20(number) { 36 | return number < 20 ? 20 : number; 37 | } 38 | 39 | export { 40 | distanceOfPointToLine, 41 | between, 42 | approximatelyEquals, 43 | getEdgeOfPoints, 44 | pointRectangleIntersection, 45 | roundTo20, 46 | }; 47 | -------------------------------------------------------------------------------- /src/utils/svg.js: -------------------------------------------------------------------------------- 1 | import {approximatelyEquals} from './math'; 2 | 3 | function lineTo(g, x1, y1, x2, y2, lineWidth, strokeStyle, dash) { 4 | let sta = [x1, y1]; 5 | let end = [x2, y2]; 6 | let path = g.append('path'). 7 | attr('stroke', strokeStyle). 8 | attr('stroke-width', lineWidth). 9 | attr('fill', 'none'). 10 | attr('d', `M ${sta[0]} ${sta[1]} L ${end[0]} ${end[1]}`); 11 | if (dash) { 12 | path.style('stroke-dasharray', dash.join(',')); 13 | } 14 | return path; 15 | } 16 | 17 | function connect(g, x1, y1, x2, y2, startPosition, endPosition, lineWidth, 18 | strokeStyle, markered) { 19 | if (!endPosition) { 20 | endPosition = x1 > x2 ? 'right' : 'left'; 21 | } 22 | 23 | let points = []; 24 | let start = [x1, y1]; 25 | let end = [x2, y2]; 26 | let centerX = start[0] + (end[0] - start[0]) / 2; 27 | let centerY = start[1] + (end[1] - start[1]) / 2; 28 | let second; 29 | let addVerticalCenterLine = function() { 30 | let third = [centerX, second[1]]; 31 | let forth = [centerX, penult[1]]; 32 | points.push(third); 33 | points.push(forth); 34 | }; 35 | let addHorizontalCenterLine = function() { 36 | let third = [second[0], centerY]; 37 | let forth = [penult[0], centerY]; 38 | points.push(third); 39 | points.push(forth); 40 | }; 41 | let addHorizontalTopLine = function() { 42 | points.push([second[0], start[1] - 50]); 43 | points.push([penult[0], start[1] - 50]); 44 | }; 45 | let addHorizontalBottomLine = function() { 46 | points.push([second[0], start[1] + 50]); 47 | points.push([penult[0], start[1] + 50]); 48 | }; 49 | let addVerticalRightLine = function() { 50 | points.push([start[0] + 80, second[1]]); 51 | points.push([start[0] + 80, penult[1]]); 52 | }; 53 | let addVerticalLeftLine = function() { 54 | points.push([start[0] - 80, second[1]]); 55 | points.push([start[0] - 80, penult[1]]); 56 | }; 57 | let addSecondXPenultY = function() { 58 | points.push([second[0], penult[1]]); 59 | }; 60 | let addPenultXSecondY = function() { 61 | points.push([penult[0], second[1]]); 62 | }; 63 | switch (startPosition) { 64 | case 'left': 65 | second = [start[0] - 20, start[1]]; 66 | break; 67 | case 'top': 68 | second = [start[0], start[1] - 20]; 69 | break; 70 | case 'bottom': 71 | second = [start[0], start[1] + 20]; 72 | break; 73 | default: 74 | second = [start[0] + 20, start[1]]; 75 | break; 76 | } 77 | let penult = null; 78 | switch (endPosition) { 79 | case 'right': 80 | penult = [end[0] + 20, end[1]]; 81 | break; 82 | case 'top': 83 | penult = [end[0], end[1] - 20]; 84 | break; 85 | case 'bottom': 86 | penult = [end[0], end[1] + 20]; 87 | break; 88 | default: 89 | penult = [end[0] - 20, end[1]]; 90 | break; 91 | } 92 | points.push(start); 93 | points.push(second); 94 | startPosition = startPosition || 'right'; 95 | endPosition = endPosition || 'left'; 96 | let direction = getDirection(x1, y1, x2, y2); 97 | if (direction.indexOf('r') > -1) { 98 | if (startPosition === 'right' || endPosition === 'left') { 99 | if (second[0] > centerX) { 100 | second[0] = centerX; 101 | } 102 | if (penult[0] < centerX) { 103 | penult[0] = centerX; 104 | } 105 | } 106 | } 107 | if (direction.indexOf('d') > -1) { 108 | if (startPosition === 'bottom' || endPosition === 'top') { 109 | if (second[1] > centerY) { 110 | second[1] = centerY; 111 | } 112 | if (penult[1] < centerY) { 113 | penult[1] = centerY; 114 | } 115 | } 116 | } 117 | if (direction.indexOf('l') > -1) { 118 | if (startPosition === 'left' || endPosition === 'right') { 119 | if (second[0] < centerX) { 120 | second[0] = centerX; 121 | } 122 | if (penult[0] > centerX) { 123 | penult[0] = centerX; 124 | } 125 | } 126 | } 127 | if (direction.indexOf('u') > -1) { 128 | if (startPosition === 'top' || endPosition === 'bottom') { 129 | if (second[1] < centerY) { 130 | second[1] = centerY; 131 | } 132 | if (penult[1] > centerY) { 133 | penult[1] = centerY; 134 | } 135 | } 136 | } 137 | switch (direction) { 138 | case 'lu': { 139 | if (startPosition === 'right') { 140 | switch (endPosition) { 141 | case 'top': 142 | case 'right': 143 | addSecondXPenultY(); 144 | break; 145 | default: { 146 | addHorizontalCenterLine(); 147 | break; 148 | } 149 | } 150 | } else if (startPosition === 'bottom') { 151 | switch (endPosition) { 152 | case 'top': 153 | addVerticalCenterLine(); 154 | break; 155 | default: { 156 | addPenultXSecondY(); 157 | break; 158 | } 159 | } 160 | } else if (startPosition === 'top') { 161 | switch (endPosition) { 162 | case 'top': 163 | case 'right': 164 | addSecondXPenultY(); 165 | break; 166 | default: { 167 | addHorizontalCenterLine(); 168 | break; 169 | } 170 | } 171 | } else { 172 | // startPosition is left 173 | switch (endPosition) { 174 | case 'top': 175 | case 'right': 176 | addVerticalCenterLine(); 177 | break; 178 | default: { 179 | addPenultXSecondY(); 180 | break; 181 | } 182 | } 183 | } 184 | break; 185 | } 186 | case 'u': 187 | if (startPosition === 'right') { 188 | switch (endPosition) { 189 | case 'right': { 190 | break; 191 | } 192 | case 'top': { 193 | addSecondXPenultY(); 194 | break; 195 | } 196 | default: { 197 | addHorizontalCenterLine(); 198 | break; 199 | } 200 | } 201 | } else if (startPosition === 'bottom') { 202 | switch (endPosition) { 203 | case 'left': 204 | case 'right': 205 | addPenultXSecondY(); 206 | break; 207 | default: { 208 | addVerticalRightLine(); 209 | break; 210 | } 211 | } 212 | } else if (startPosition === 'top') { 213 | switch (endPosition) { 214 | case 'left': { 215 | addPenultXSecondY(); 216 | break; 217 | } 218 | case 'right': { 219 | addHorizontalCenterLine(); 220 | break; 221 | } 222 | case 'top': 223 | addVerticalRightLine(); 224 | break; 225 | default: { 226 | break; 227 | } 228 | } 229 | } else { 230 | // left 231 | switch (endPosition) { 232 | case 'left': 233 | case 'right': 234 | break; 235 | default: { 236 | points.push([second[0], penult[1]]); 237 | break; 238 | } 239 | } 240 | } 241 | break; 242 | case 'ru': 243 | if (startPosition === 'right') { 244 | switch (endPosition) { 245 | case 'left': { 246 | addVerticalCenterLine(); 247 | break; 248 | } 249 | case 'top': { 250 | addSecondXPenultY(); 251 | break; 252 | } 253 | default: { 254 | addPenultXSecondY(); 255 | break; 256 | } 257 | } 258 | } else if (startPosition === 'bottom') { 259 | switch (endPosition) { 260 | case 'top': { 261 | addVerticalCenterLine(); 262 | break; 263 | } 264 | default: { 265 | addPenultXSecondY(); 266 | break; 267 | } 268 | } 269 | } else if (startPosition === 'top') { 270 | switch (endPosition) { 271 | case 'right': { 272 | addVerticalCenterLine(); 273 | break; 274 | } 275 | default: { 276 | addSecondXPenultY(); 277 | break; 278 | } 279 | } 280 | } else { 281 | // left 282 | switch (endPosition) { 283 | case 'left': 284 | case 'top': 285 | addSecondXPenultY(); 286 | break; 287 | default: { 288 | addHorizontalCenterLine(); 289 | break; 290 | } 291 | } 292 | } 293 | break; 294 | case 'l': 295 | if (startPosition === 'right') { 296 | switch (endPosition) { 297 | case 'left': 298 | case 'right': 299 | case 'top': 300 | addHorizontalTopLine(); 301 | break; 302 | default: { 303 | addHorizontalBottomLine(); 304 | break; 305 | } 306 | } 307 | } else if (startPosition === 'bottom') { 308 | switch (endPosition) { 309 | case 'left': { 310 | addHorizontalBottomLine(); 311 | break; 312 | } 313 | case 'right': { 314 | addSecondXPenultY(); 315 | break; 316 | } 317 | case 'top': { 318 | addVerticalCenterLine(); 319 | break; 320 | } 321 | default: { 322 | break; 323 | } 324 | } 325 | } else if (startPosition === 'top') { 326 | switch (endPosition) { 327 | case 'left': { 328 | addHorizontalTopLine(); 329 | break; 330 | } 331 | case 'right': { 332 | addSecondXPenultY(); 333 | break; 334 | } 335 | case 'top': { 336 | break; 337 | } 338 | default: { 339 | addVerticalCenterLine(); 340 | break; 341 | } 342 | } 343 | } else { 344 | // left 345 | switch (endPosition) { 346 | case 'left': { 347 | addHorizontalTopLine(); 348 | break; 349 | } 350 | case 'right': { 351 | break; 352 | } 353 | default: { 354 | addSecondXPenultY(); 355 | break; 356 | } 357 | } 358 | } 359 | break; 360 | case 'r': 361 | if (startPosition === 'right') { 362 | switch (endPosition) { 363 | case 'left': { 364 | break; 365 | } 366 | case 'right': { 367 | addHorizontalTopLine(); 368 | break; 369 | } 370 | default: { 371 | addSecondXPenultY(); 372 | break; 373 | } 374 | } 375 | } else if (startPosition === 'bottom') { 376 | switch (endPosition) { 377 | case 'left': { 378 | addSecondXPenultY(); 379 | break; 380 | } 381 | case 'right': { 382 | addHorizontalBottomLine(); 383 | break; 384 | } 385 | case 'top': { 386 | addVerticalCenterLine(); 387 | break; 388 | } 389 | default: { 390 | break; 391 | } 392 | } 393 | } else if (startPosition === 'top') { 394 | switch (endPosition) { 395 | case 'left': { 396 | addPenultXSecondY(); 397 | break; 398 | } 399 | case 'right': { 400 | addHorizontalTopLine(); 401 | break; 402 | } 403 | case 'top': { 404 | break; 405 | } 406 | default: { 407 | addVerticalCenterLine(); 408 | break; 409 | } 410 | } 411 | } else { 412 | // left 413 | switch (endPosition) { 414 | case 'left': 415 | case 'right': 416 | case 'top': 417 | addHorizontalTopLine(); 418 | break; 419 | default: { 420 | addHorizontalBottomLine(); 421 | break; 422 | } 423 | } 424 | } 425 | break; 426 | case 'ld': 427 | if (startPosition === 'right') { 428 | switch (endPosition) { 429 | case 'left': { 430 | addHorizontalCenterLine(); 431 | break; 432 | } 433 | default: { 434 | addSecondXPenultY(); 435 | break; 436 | } 437 | } 438 | } else if (startPosition === 'bottom') { 439 | switch (endPosition) { 440 | case 'left': { 441 | addPenultXSecondY(); 442 | break; 443 | } 444 | case 'top': { 445 | addHorizontalCenterLine(); 446 | break; 447 | } 448 | default: { 449 | addSecondXPenultY(); 450 | break; 451 | } 452 | } 453 | } else if (startPosition === 'top') { 454 | switch (endPosition) { 455 | case 'left': 456 | case 'right': 457 | case 'top': 458 | addPenultXSecondY(); 459 | break; 460 | default: { 461 | addVerticalCenterLine(); 462 | break; 463 | } 464 | } 465 | } else { 466 | // left 467 | switch (endPosition) { 468 | case 'left': 469 | case 'top': 470 | addPenultXSecondY(); 471 | break; 472 | case 'right': { 473 | addVerticalCenterLine(); 474 | break; 475 | } 476 | default: { 477 | addSecondXPenultY(); 478 | break; 479 | } 480 | } 481 | } 482 | break; 483 | case 'd': 484 | if (startPosition === 'right') { 485 | switch (endPosition) { 486 | case 'left': { 487 | addHorizontalCenterLine(); 488 | break; 489 | } 490 | case 'right': { 491 | addPenultXSecondY(); 492 | break; 493 | } 494 | case 'top': { 495 | addSecondXPenultY(); 496 | break; 497 | } 498 | default: { 499 | addVerticalRightLine(); 500 | break; 501 | } 502 | } 503 | } else if (startPosition === 'bottom') { 504 | switch (endPosition) { 505 | case 'left': 506 | case 'right': 507 | addPenultXSecondY(); 508 | break; 509 | case 'top': { 510 | break; 511 | } 512 | default: { 513 | addVerticalRightLine(); 514 | break; 515 | } 516 | } 517 | } else if (startPosition === 'top') { 518 | switch (endPosition) { 519 | case 'left': { 520 | addVerticalLeftLine(); 521 | break; 522 | } 523 | default: { 524 | addVerticalRightLine(); 525 | break; 526 | } 527 | } 528 | } else { 529 | // left 530 | switch (endPosition) { 531 | case 'left': { 532 | break; 533 | } 534 | case 'right': { 535 | addHorizontalCenterLine(); 536 | break; 537 | } 538 | case 'top': { 539 | addSecondXPenultY(); 540 | break; 541 | } 542 | default: { 543 | addVerticalLeftLine(); 544 | break; 545 | } 546 | } 547 | } 548 | break; 549 | case 'rd': { 550 | if (startPosition === 'right' && endPosition === 'left') { 551 | addVerticalCenterLine(); 552 | } else if (startPosition === 'right' && endPosition === 'bottom') { 553 | addSecondXPenultY(); 554 | } else if ( 555 | (startPosition === 'right' && endPosition === 'top') || 556 | (startPosition === 'right' && endPosition === 'right') 557 | ) { 558 | addPenultXSecondY(); 559 | } else if (startPosition === 'bottom' && endPosition === 'left') { 560 | addSecondXPenultY(); 561 | } else if (startPosition === 'bottom' && endPosition === 'right') { 562 | addPenultXSecondY(); 563 | } else if (startPosition === 'bottom' && endPosition === 'top') { 564 | addHorizontalCenterLine(); 565 | } else if (startPosition === 'bottom' && endPosition === 'bottom') { 566 | addSecondXPenultY(); 567 | } else if (startPosition === 'top' && endPosition === 'left') { 568 | addPenultXSecondY(); 569 | } else if (startPosition === 'top' && endPosition === 'right') { 570 | addPenultXSecondY(); 571 | } else if (startPosition === 'top' && endPosition === 'top') { 572 | addPenultXSecondY(); 573 | } else if (startPosition === 'top' && endPosition === 'bottom') { 574 | addVerticalCenterLine(); 575 | } else if (startPosition === 'left' && endPosition === 'left') { 576 | addSecondXPenultY(); 577 | } else if (startPosition === 'left' && endPosition === 'right') { 578 | addHorizontalCenterLine(); 579 | } else if (startPosition === 'left' && endPosition === 'top') { 580 | addHorizontalCenterLine(); 581 | } else if (startPosition === 'left' && endPosition === 'bottom') { 582 | addSecondXPenultY(); 583 | } 584 | break; 585 | } 586 | } 587 | points.push(penult); 588 | points.push(end); 589 | 590 | let lines = []; 591 | let paths = []; 592 | for (let i = 0; i < points.length; i++) { 593 | let source = points[i]; 594 | let destination = points[i + 1]; 595 | lines.push({ 596 | sourceX: source[0], 597 | sourceY: source[1], 598 | destinationX: destination[0], 599 | destinationY: destination[1], 600 | }); 601 | let finish = i === points.length - 2; 602 | if (finish && markered) { 603 | let path = arrowTo(g, source[0], source[1], destination[0], 604 | destination[1], lineWidth, strokeStyle); 605 | paths.push(path); 606 | break; 607 | } else { 608 | let path = lineTo(g, source[0], source[1], destination[0], destination[1], 609 | lineWidth, strokeStyle); 610 | paths.push(path); 611 | } 612 | if (finish) { 613 | break; 614 | } 615 | } 616 | return {lines, paths}; 617 | } 618 | 619 | function arrowTo(g, x1, y1, x2, y2, lineWidth, strokeStyle) { 620 | let path = lineTo(g, x1, y1, x2, y2, lineWidth, strokeStyle); 621 | const id = 'arrow' + strokeStyle.replace('#', ''); 622 | g.append('marker'). 623 | attr('id', id). 624 | attr('markerUnits', 'strokeWidth'). 625 | attr('viewBox', '0 0 12 12'). 626 | attr('refX', 9). 627 | attr('refY', 6). 628 | attr('markerWidth', 12). 629 | attr('markerHeight', 12). 630 | attr('orient', 'auto'). 631 | append('path'). 632 | attr('d', 'M2,2 L10,6 L2,10 L6,6 L2,2'). 633 | attr('fill', strokeStyle); 634 | path.attr('marker-end', 'url(#' + id + ')'); 635 | return path; 636 | } 637 | 638 | function getDirection(x1, y1, x2, y2) { 639 | // Use approximatelyEquals to fix the problem of css position presicion 640 | if (x2 < x1 && approximatelyEquals(y2, y1)) { 641 | return 'l'; 642 | } 643 | if (x2 > x1 && approximatelyEquals(y2, y1)) { 644 | return 'r'; 645 | } 646 | if (approximatelyEquals(x2, x1) && y2 < y1) { 647 | return 'u'; 648 | } 649 | if (approximatelyEquals(x2, x1) && y2 > y1) { 650 | return 'd'; 651 | } 652 | if (x2 < x1 && y2 < y1) { 653 | return 'lu'; 654 | } 655 | if (x2 > x1 && y2 < y1) { 656 | return 'ru'; 657 | } 658 | if (x2 < x1 && y2 > y1) { 659 | return 'ld'; 660 | } 661 | return 'rd'; 662 | } 663 | 664 | export { 665 | arrowTo, 666 | lineTo, 667 | getDirection, 668 | connect, 669 | }; 670 | -------------------------------------------------------------------------------- /src/views/App.vue: -------------------------------------------------------------------------------- 1 | 55 | 187 | 210 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | runtimeCompiler: true, 3 | css: { 4 | loaderOptions: { 5 | less: { 6 | modifyVars: {}, 7 | }, 8 | postcss: { 9 | plugins: [], 10 | }, 11 | }, 12 | extract: false, 13 | }, 14 | baseUrl: process.env.NODE_ENV === "production" ? "/flowchart-vue" : "/" 15 | }; 16 | --------------------------------------------------------------------------------